1 文件已重命名
40个文件已修改
1个文件已添加
| | |
| | | private String qrCode; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty("消费绿电分数") |
| | | @TableField(exist = false) |
| | | private Integer customPoint; |
| | | |
| | | @ApiModelProperty("绑定门店id列表") |
| | | @TableField(exist = false) |
| | |
| | | private BigDecimal serviceAmount; |
| | | // 电站价总金额 |
| | | private BigDecimal totalAmount; |
| | | |
| | | //获得积分 |
| | | private Integer point; |
| | | |
| | | } |
| | |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "活动状态(1-未开始,2-进行中,3-已结束)") |
| | | |
| | | @TableField(exist = false) |
| | | private Integer activityStatus; |
| | | |
| | | |
| | | @ApiModelProperty(value = "排序") |
| | | @TableField("sort") |
| | | private Integer sort; |
| | |
| | | |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("create_time") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "商品id") |
| | |
| | | @ApiModelProperty(value = "活动开始日期") |
| | | @TableField("start_time") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime startTime; |
| | | |
| | | @ApiModelProperty(value = "活动结束日期") |
| | | @TableField("end_time") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | |
| | | private LocalDateTime endTime; |
| | | |
| | | @ApiModelProperty(value = "是否上架:0否 1是") |
| | |
| | | @TableField(exist = false) |
| | | private BigDecimal sellingPrice; |
| | | |
| | | @ApiModelProperty(value = "活动价格") |
| | | @TableField(exist = false) |
| | | private BigDecimal activityPrice; |
| | | |
| | | @TableField(exist = false) |
| | | private GoodsSeckill goodsSeckills; |
| | | |
| | |
| | | @TableField(exist = false) |
| | | private String shopName; |
| | | |
| | | @ApiModelProperty(value = "联系电话") |
| | | @TableField(exist = false) |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("报备商户号") |
| | | @TableField("tradeMerchantNo") |
| | |
| | | |
| | | private Integer shopId; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd",shape = JsonFormat.Shape.STRING) |
| | | private LocalDate startTime; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd",shape = JsonFormat.Shape.STRING) |
| | | private LocalDate endTime; |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R<Shop> getServiceProvider(Long appUserId) { |
| | | return R.fail("获取服务商失败"); |
| | | public R<List<String>> getServiceProvider(Long appUserId) { |
| | | return R.fail("获取用户店铺失败"); |
| | | } |
| | | |
| | | @Override |
| | |
| | | * 获取所有门店 |
| | | * @return |
| | | */ |
| | | @PostMapping("/shop/getAllShop") |
| | | @GetMapping("/shop/getAllShop") |
| | | R<List<Shop>> getAllShop(); |
| | | |
| | | |
| | |
| | | * 获取指定用户的服务商 |
| | | */ |
| | | @GetMapping("/shop/getServiceProvider") |
| | | R<Shop> getServiceProvider(@RequestParam("appUserId") Long appUserId); |
| | | R<List<String>> getServiceProvider(@RequestParam("appUserId") Long appUserId); |
| | | |
| | | /** |
| | | * 获取指定用户的高级服务商 |
| | |
| | | package com.ruoyi.system.api.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ruoyi.common.core.annotation.Excel; |
| | | import com.ruoyi.common.core.annotation.Excel.ColumnType; |
| | | import com.ruoyi.common.core.web.domain.BaseModel; |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @TableName("sys_config") |
| | | public class SysConfig extends BaseModel { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | * 参数主键 |
| | | */ |
| | | @Excel(name = "参数主键", cellType = ColumnType.NUMERIC) |
| | | @TableField("config_id") |
| | | private Long configId; |
| | | |
| | | /** |
| | |
| | | * 参数键值 |
| | | */ |
| | | @Excel(name = "参数键值") |
| | | @TableField("config_value") |
| | | private String configValue; |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | String myString = "968484"; |
| | | String myString = "a123456"; |
| | | System.err.println("MD5 of '" + myString + "' is: " + generateMD5(myString)); |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | String s = encryptPassword("123456"); |
| | | String s = encryptPassword("dc483e80a7a0bd9ef71d8cf973673924"); |
| | | System.err.println(s); |
| | | |
| | | System.err.println(matchesPassword("123456", "$2a$10$QTL3AZW2YMtRu/jMEOzYmeeAB7c3aIq/4VyuvqtyEAARVYfhXyFRi")); |
| | | System.err.println(matchesPassword("123456", "$2a$10$Mg1l9OMJ/gFTQZmDql.21OVgGulPTQgze/cZWNe5plRpRDRjq79Ju")); |
| | | System.err.println(matchesPassword("dc483e80a7a0bd9ef71d8cf973673924", "$2a$10$2ZQZbvvVRq3DqaWJ9bzGAe4mQIpF/uGqb2GxMtINatKAP/n1ZKnNO")); |
| | | System.err.println(matchesPassword("", "$2a$10$Mg1l9OMJ/gFTQZmDql.21OVgGulPTQgze/cZWNe5plRpRDRjq79Ju")); |
| | | } |
| | | } |
| | |
| | | public R getInfo(@PathVariable("configId") Long configId) { |
| | | return R.ok(configService.selectConfigById(configId)); |
| | | } |
| | | /** |
| | | * 获取积分配置 兑换商品、充值积分 |
| | | */ |
| | | @GetMapping(value = "/getPointConfigInfo") |
| | | public R getPointConfigInfo() { |
| | | return R.ok(configService.getPointConfigInfo()); |
| | | } |
| | | |
| | | /** |
| | | * 根据参数键名查询参数值 |
| | |
| | | @Log(title = "参数管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/editPointConfig") |
| | | public AjaxResult editPointConfig(@RequestParam("configId")Long configId, @RequestParam("configValue")String configValue) { |
| | | if(configId!=6||configId!=8){ |
| | | if(configId!=6L&&configId!=8L){ |
| | | return AjaxResult.error("请选择积分配置id"); |
| | | } |
| | | SysConfig config=new SysConfig(); |
| | |
| | | config.setUpdateBy(SecurityUtils.getUsername()); |
| | | return toAjax(configService.updateConfig(config)); |
| | | } |
| | | |
| | | /** |
| | | * 修改积分参数配置 |
| | | */ |
| | | @Log(title = "参数管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/editPointConfig2") |
| | | public AjaxResult editPointConfig2(@RequestParam("configValue1")String configValue1, |
| | | @RequestParam("configValue2")String configValue2) { |
| | | SysConfig config=new SysConfig(); |
| | | config.setConfigId(6L); |
| | | config.setConfigValue(configValue1); |
| | | config.setUpdateBy(SecurityUtils.getUsername()); |
| | | configService.updateConfig(config); |
| | | SysConfig config2=new SysConfig(); |
| | | config2.setConfigId(8L); |
| | | config2.setConfigValue(configValue2); |
| | | config2.setUpdateBy(SecurityUtils.getUsername()); |
| | | configService.updateConfig(config2); |
| | | return success(); |
| | | } |
| | | |
| | | /** |
| | | * 修改参数配置 |
| | |
| | | */ |
| | | @Log(title = "用户管理", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @ApiOperation(value = "添加系统用户", tags = {"管理后台-账号管理", "门店后台-部门管理"}) |
| | | @ApiOperation(value = "添加系统用户", tags = {"管理后台-账号管理"}) |
| | | public AjaxResult add(@RequestBody SysUser user) { |
| | | user.setUserName(user.getPhonenumber()); |
| | | Long userid = tokenService.getLoginUser().getUserid(); |
| | |
| | | public AjaxResult resetPwd(@RequestBody SysUser user) { |
| | | userService.checkUserAllowed(user); |
| | | userService.checkUserDataScope(user.getUserId()); |
| | | |
| | | //todo 双重加密,在登录时校验 修改密码时校验 |
| | | user.setPassword(SecurityUtils.encryptPassword(MD5Generator.generateMD5("a123456"))); |
| | | user.setUpdateBy(SecurityUtils.getUsername()); |
| | | return toAjax(userService.resetPwd(user)); |
| | |
| | | * @return 结果 |
| | | */ |
| | | public int deleteConfigByIds(Long[] configIds); |
| | | |
| | | List<SysConfig> getPointConfigInfo(); |
| | | } |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.ruoyi.system.api.domain.SysConfig; |
| | | import io.swagger.models.auth.In; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 参数配置 服务层 |
| | |
| | | * @return 结果 |
| | | */ |
| | | public boolean checkConfigKeyUnique(SysConfig config); |
| | | |
| | | Map<Long, String> getPointConfigInfo(); |
| | | } |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.ruoyi.common.core.constant.CacheConstants; |
| | | import com.ruoyi.common.core.constant.UserConstants; |
| | | import com.ruoyi.common.core.exception.ServiceException; |
| | |
| | | import com.ruoyi.system.api.domain.SysConfig; |
| | | import com.ruoyi.system.mapper.SysConfigMapper; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | | import jdk.nashorn.internal.runtime.regexp.joni.Config; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import javax.annotation.Resource; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import javax.xml.namespace.QName; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 参数配置 服务层实现 |
| | |
| | | } |
| | | return UserConstants.UNIQUE; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Map<Long, String> getPointConfigInfo() { |
| | | Map<Long,String> map=new HashMap<>(); |
| | | List<SysConfig> list = configMapper.getPointConfigInfo(); |
| | | list.forEach(config -> { |
| | | map.put(config.getConfigId(),config.getConfigValue()); |
| | | }); |
| | | |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * 设置cache key |
| | | * |
| | |
| | | <include refid="selectConfigVo"/> |
| | | where config_key = #{configKey} limit 1 |
| | | </select> |
| | | |
| | | <select id="getPointConfigInfo" resultMap="SysConfigResult"> |
| | | <include refid="selectConfigVo"/> |
| | | where config_id IN (6, 8) |
| | | </select> |
| | | |
| | | <insert id="insertConfig" parameterType="com.ruoyi.system.api.domain.SysConfig"> |
| | | insert into sys_config ( |
| | | <if test="configName != null and configName != '' ">config_name,</if> |
| | |
| | | package com.ruoyi.account.controller; |
| | | |
| | | |
| | | import cn.hutool.http.HttpResponse; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | |
| | | import com.ruoyi.common.core.constant.CacheConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.core.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.web.controller.BaseController; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.common.redis.service.RedisService; |
| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | |
| | | |
| | | |
| | | |
| | | /* |
| | | |
| | | @GetMapping("/detail") |
| | | @ApiOperation(value = "用户列表-详情", tags = {"管理后台"}) |
| | | public R<AppUser> detail(Long id, Integer shopId) { |
| | | Long userid = tokenService.getLoginUser().getUserid(); |
| | | SysUser sysUser = sysUserClient.getSysUser(userid).getData(); |
| | | public R<AppUser> detail(Long id) { |
| | | AppUser byId = appUserService.getById(id); |
| | | Shop shop1 = shopClient.getServiceProvider(byId.getId()).getData(); |
| | | if(null != shop1){ |
| | | byId.setShopName(shop1.getName()); |
| | | byId.setShopId(shop1.getId()); |
| | | //获取店铺名称 |
| | | List<String> shopNames=shopClient.getServiceProvider(byId.getId()).getData(); |
| | | if(null != shopNames){ |
| | | byId.setShopNames(shopNames); |
| | | } |
| | | R<List<Shop>> shopByUserId = shopClient.getShopByUserId(id); |
| | | if (shopByUserId.getData() != null) { |
| | | List<String> shopName = new ArrayList<>(); |
| | | for (Shop datum : shopByUserId.getData()) { |
| | | shopName.add(datum.getName()); |
| | | } |
| | | byId.setShopNames(shopName); |
| | | } |
| | | |
| | | //最后下单时间 |
| | | R<Order> lastOrder = remoteOrderGoodsClient.getLastOrder(id); |
| | | if (lastOrder.getData() != null) { |
| | | byId.setLastOrderTime(lastOrder.getData().getCreateTime()); |
| | | } |
| | | |
| | | //消费总金额 |
| | | if(null == shopId || 1 == sysUser.getRoleType()){ |
| | | shopId = -1; |
| | | } |
| | | if(null == shopId && 2 == sysUser.getRoleType()){ |
| | | shopId = sysUser.getObjectId(); |
| | | } |
| | | R<List<Order>> orderR = remoteOrderGoodsClient.byUserId(id, shopId); |
| | | List<Order> orderList = orderR.getData(); |
| | | if (!CollectionUtils.isEmpty(orderList)){ |
| | | BigDecimal paymentAmount = orderList.stream().map(Order::getPaymentAmount).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | byId.setShopAmount(paymentAmount); |
| | | }else { |
| | | byId.setShopAmount(BigDecimal.ZERO); |
| | | } |
| | | Integer customPoint =(byId.getExchangePoint()==null?0:byId.getExchangePoint())+ |
| | | (byId.getTransferableOutPoint()==null?0:byId.getTransferableOutPoint())- |
| | | (byId.getCancelPoint()==null?0:byId.getCancelPoint()); |
| | | byId.setCustomPoint(customPoint); |
| | | |
| | | return R.ok(byId); |
| | | } |
| | | */ |
| | | |
| | | |
| | | |
| | |
| | | /** |
| | | * 工作台-顶部 |
| | | */ |
| | | @GetMapping("/homeStatistics/statistics") |
| | | @GetMapping("/statistics") |
| | | @ApiOperation(value = "统计", tags = {"后台-工作台-顶部"}) |
| | | public R<UserStatistics> statistics() { |
| | | QueryWrapper<AppUser> queryWrapper = new QueryWrapper<>(); |
| | |
| | | queryWrapper.eq("del_flag", 0);//未删除的 |
| | | queryWrapper.ne("status", 3);//未注销的 |
| | | if (userId != null) { |
| | | queryWrapper.eq("user_id", userId); |
| | | queryWrapper.eq("id", userId); |
| | | } |
| | | //统计充值积分 |
| | | Map<String, Object> result = appUserService.getMap(queryWrapper); |
| | |
| | | return R.ok(pageInfo); |
| | | } |
| | | |
| | | /** |
| | | * 导出用户积分列表 |
| | | */ |
| | | @ResponseBody |
| | | @GetMapping("/exportUserPoint") |
| | | @ApiOperation(value = "导出用户积分列表", tags = "后台-财务统计-用户积分统计") |
| | | public void exportUserPoint(HttpServletResponse response, @RequestParam(value = "name",required = false) String name) { |
| | | |
| | | List<UserPointStatisticsVO> exportList=appUserMapper.exportUserPoint(name); |
| | | ExcelUtil<UserPointStatisticsVO> util = new ExcelUtil<UserPointStatisticsVO>(UserPointStatisticsVO.class); |
| | | util.exportExcel(response, exportList, "用户积分汇总"); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/saveOrUpdateAppUser") |
| | | Long saveOrUpdateAppUser(@RequestBody AppUser appuser){ |
| | | if (appuser.getId() == null) { |
| | |
| | | |
| | | } |
| | | |
| | | @GetMapping("/getAllUser") |
| | | @ApiOperation(value = "获取所有用户") |
| | | public R<List<AppUser>> getAllUser() { |
| | | LambdaQueryWrapper<AppUser> queryWrapper=new LambdaQueryWrapper<>(); |
| | | queryWrapper.select(AppUser::getId,AppUser::getName); |
| | | queryWrapper.eq(AppUser::getDelFlag,0);//未删除的 |
| | | queryWrapper.ne(AppUser::getStatus, 3);//未注销的 |
| | | List<AppUser> list = appUserService.list(queryWrapper); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | @PostMapping("/appUserShop/insert") |
| | | @PostMapping("/insert") |
| | | R insert(@RequestBody AppUserShop appUserShop){ |
| | | appUserShopService.save(appUserShop); |
| | | return R.ok(); |
| | | } |
| | | @DeleteMapping("/appUserShop/delete") |
| | | R delete(@RequestParam("id") Integer id,@RequestParam("userId") Long originalUserId){ |
| | | QueryWrapper<AppUserShop> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("shop_id", id); |
| | | wrapper.eq("app_user_id", originalUserId); |
| | | @DeleteMapping("/delete") |
| | | R delete(@RequestParam("id") Integer id,@RequestParam("userId") Long userId){ |
| | | LambdaQueryWrapper<AppUserShop> wrapper = new LambdaQueryWrapper<AppUserShop>(); |
| | | wrapper.eq(AppUserShop::getShopId, id); |
| | | wrapper.eq(AppUserShop::getAppUserId, userId); |
| | | appUserShopService.remove(wrapper); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | |
| | | */ |
| | | @GetMapping("/getUserPointStatisticsPageList") |
| | | @ApiOperation(value = "用户积分统计", tags = "管理后台-财务统计-用户积分统计") |
| | | public R<UserPointStatisticsOutVO> getUserPointStatisticsPageList(@RequestParam(value = "types",required = false) Collection<Integer> types, |
| | | public R<PageInfo<UserPointStatisticsPageVO>> getUserPointStatisticsPageList(@RequestParam(value = "types",required = false) Collection<Integer> types, |
| | | @RequestParam(value = "name",required = false) String name, |
| | | @RequestParam(value = "phone",required = false) String phone, |
| | | @RequestParam(value = "beginTime",required = false) LocalDateTime beginTime, |
| | | @RequestParam(value = "endTime",required = false) LocalDateTime endTime, |
| | | @ApiParam("当前页")@RequestParam("pageCurr") Integer pageCurr, |
| | | @ApiParam("分页大小")@RequestParam("pageSize") Integer pageSize) { |
| | | UserPointStatisticsOutVO userPointStatisticsOutVO = new UserPointStatisticsOutVO(); |
| | | //查找记录 |
| | | PageInfo<UserPointStatisticsPageVO> pageInfo=userPointService.getUserPointStatisticsPageList(types,name,phone,beginTime,endTime,pageCurr,pageSize); |
| | | return R.ok(pageInfo); |
| | | } |
| | | |
| | | /** |
| | | * 用户积分统计 |
| | | */ |
| | | @GetMapping("/getUserPointStatisticsTop") |
| | | @ApiOperation(value = "用户积分统计-顶部", tags = "管理后台-财务统计-用户积分统计") |
| | | public R<UserPointStatisticsTopVO> getUserPointStatisticsTop(@RequestParam(value = "types",required = false) Collection<Integer> types, |
| | | @RequestParam(value = "name",required = false) String name, |
| | | @RequestParam(value = "phone",required = false) String phone, |
| | | @RequestParam(value = "beginTime",required = false) LocalDateTime beginTime, |
| | | @RequestParam(value = "endTime",required = false) LocalDateTime endTime |
| | | ) { |
| | | UserPointStatisticsTopVO userPointStatisticsOutVO = new UserPointStatisticsTopVO(); |
| | | //充值绿电分 |
| | | |
| | | Integer chargePoint=userPointService.selectRechargeAndUse(name,phone,beginTime,endTime,17); |
| | |
| | | Integer usePoint=(exchangePoint==null?0:exchangePoint )-( cancelPoint==null?0:cancelPoint); |
| | | userPointStatisticsOutVO.setChargeTotalPoint(chargePoint==null?0:chargePoint); |
| | | userPointStatisticsOutVO.setUseTotalPoint(usePoint); |
| | | |
| | | //查找记录 |
| | | PageInfo<UserPointStatisticsPageVO> pageInfo=userPointService.getUserPointStatisticsPageList(types,name,phone,beginTime,endTime,pageCurr,pageSize); |
| | | userPointStatisticsOutVO.setPageInfo(pageInfo); |
| | | |
| | | return R.ok(userPointStatisticsOutVO); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | List<UserPointStatisticsVO> getUserPointPageList(PageInfo<UserPointStatisticsVO> pageInfo,@Param("name") String name); |
| | | |
| | | List<UserPointStatisticsVO> exportUserPoint(String name); |
| | | } |
| | |
| | | public PageInfo<UserPointStatisticsVO> getUserPointPageList(String name, Integer pageCurr, Integer pageSize) { |
| | | PageInfo<UserPointStatisticsVO> pageInfo=new PageInfo<>(pageCurr,pageSize); |
| | | List<UserPointStatisticsVO> list=baseMapper.getUserPointPageList(pageInfo, name); |
| | | list.forEach(x->{ |
| | | x.setIdStr(String.valueOf(x.getId())); |
| | | }); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
File was renamed from ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/UserPointStatisticsOutVO.java |
| | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class UserPointStatisticsOutVO { |
| | | public class UserPointStatisticsTopVO { |
| | | private Integer chargeTotalPoint; |
| | | private Integer useTotalPoint; |
| | | PageInfo<UserPointStatisticsPageVO> pageInfo; |
| | | } |
| | |
| | | package com.ruoyi.account.vo; |
| | | |
| | | import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.A; |
| | | import com.ruoyi.common.core.annotation.Excel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | @ApiModelProperty("用户id") |
| | | private Long id; |
| | | @ApiModelProperty("用户姓名") |
| | | @Excel(name = "用户姓名") |
| | | private String name; |
| | | @ApiModelProperty("绿电分总数") |
| | | @Excel(name = "绿电分总数") |
| | | private Integer totalPoint; |
| | | @ApiModelProperty("已使用绿电分数") |
| | | @Excel(name = "已使用绿电分数") |
| | | private Integer usePoint; |
| | | @ApiModelProperty("可用绿电分数") |
| | | @Excel(name = "可用绿电分数") |
| | | private Integer availablePoint; |
| | | @ApiModelProperty("用户名idStr") |
| | | private String idStr; |
| | | } |
| | |
| | | id, name, phone, avatar, vip_id, wx_openid, ali_openid, status, create_time, del_flag, first_add, last_login_time, invite_user_id, shop_id, part_point, part_grow_point, shop_point, share_point, shop_amount, last_shop_time |
| | | </sql> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <select id="getNearbyReferrer" resultType="com.ruoyi.account.vo.NearbyReferrerVo"> |
| | | select |
| | | id, |
| | |
| | | and `name` like CONCAT('%',#{name},'%') |
| | | </if> |
| | | </select> |
| | | <select id="exportUserPoint" resultType="com.ruoyi.account.vo.UserPointStatisticsVO"> |
| | | select |
| | | id, |
| | | name, |
| | | (recharge_point + transferable_in_point)as `totalPoint`, |
| | | (exchange_point - cancel_point + transferable_out_point) as `usePoint`, |
| | | available_point |
| | | from |
| | | t_app_user |
| | | where |
| | | del_flag=0 |
| | | <if test="null != name and name!= '' "> |
| | | and `name` like CONCAT('%',#{name},'%') |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | return R.fail("导入订单-保存用户积分流水失败"); |
| | | } |
| | | //保存到数据库 |
| | | chargeOrder.setPoint(point); |
| | | chargeOrderService.save(chargeOrder); |
| | | |
| | | return R.ok(); |
| | |
| | | if (null != shop) { |
| | | orderPageListVo.setShopName(shop.getName()); |
| | | } |
| | | orderPageListVo.setIdStr(orderPageListVo.getId().toString()); |
| | | |
| | | } |
| | | return pageInfo.setRecords(list); |
| | |
| | | public class OrderManagePageListVO { |
| | | @ApiModelProperty("订单id") |
| | | private Long id; |
| | | @ApiModelProperty("订单idStr") |
| | | private String idStr; |
| | | @ApiModelProperty("订单编号") |
| | | @Excel(name = "订单编号") |
| | | private String orderNumber; |
| | |
| | | goods.setIntegral(getPoint(goods.getSellingPrice())); |
| | | goods.setDelFlag(0); |
| | | goods.setCreateTime(LocalDateTime.now()); |
| | | |
| | | goodsService.addGoods(goods); |
| | | return R.ok(); |
| | | } |
| | |
| | | */ |
| | | @GetMapping("/manageGoodsList") |
| | | @ApiOperation(value = "商品列表", tags = {"管理后台-商品管理"}) |
| | | public R<IPage<Goods>> manageGoodsList(@ApiParam("页码") @RequestParam Integer pageNum, |
| | | public R<PageInfo<Goods>> manageGoodsList(@ApiParam("页码") @RequestParam Integer pageNum, |
| | | @ApiParam("每一页数据大小") Integer pageSize, |
| | | Goods goods){ |
| | | return R.ok(goodsService.getManageGoodsList(new Page<>(pageNum, pageSize), goods)); |
| | | return goodsService.getManageGoodsList(pageNum,pageSize,goods); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | import com.ruoyi.common.core.web.controller.BaseController; |
| | | import com.ruoyi.common.core.web.page.TableDataInfo; |
| | | import com.ruoyi.order.feignClient.OrderClient; |
| | | import com.ruoyi.other.api.domain.Goods; |
| | | import com.ruoyi.other.api.domain.GoodsSeckill; |
| | | import com.ruoyi.other.api.domain.SeckillActivityInfo; |
| | | import com.ruoyi.other.api.domain.Shop; |
| | | import com.ruoyi.other.api.domain.*; |
| | | import com.ruoyi.other.api.feignClient.ShopClient; |
| | | import com.ruoyi.other.api.vo.GetSeckillActivityInfo; |
| | | import com.ruoyi.other.mapper.SeckillActivityInfoMapper; |
| | | import com.ruoyi.other.service.GoodsSeckillService; |
| | | import com.ruoyi.other.service.GoodsService; |
| | | import com.ruoyi.other.service.SeckillActivityInfoService; |
| | | import com.ruoyi.other.service.ShopService; |
| | | import com.ruoyi.other.service.*; |
| | | import com.ruoyi.other.vo.SeckillActivityDetailVO; |
| | | import com.ruoyi.other.vo.SeckillActivityVO; |
| | | import io.swagger.annotations.Api; |
| | |
| | | private OrderClient orderClient; |
| | | @Resource |
| | | private ShopService shopService; |
| | | @Autowired |
| | | private GoodsCategoryService goodsCategoryService; |
| | | @Autowired |
| | | private GoodsShopService goodsShopService; |
| | | |
| | | |
| | | /** |
| | |
| | | SeckillActivityVO vo = new SeckillActivityVO(); |
| | | |
| | | SeckillActivityInfo seckillActivityInfo = seckillActivityInfoService.getById(id); |
| | | if (seckillActivityInfo==null)return R.fail("秒杀活动不存在"); |
| | | Goods goods = goodsService.getById(seckillActivityInfo.getGoodId()); |
| | | QueryWrapper<GoodsShop> queryWrapper = new QueryWrapper<GoodsShop>(); |
| | | queryWrapper.eq("goods_id", goods.getId()); |
| | | GoodsShop goodsShop = goodsShopService.getOne(queryWrapper); |
| | | GoodsSeckill goodsSeckill = goodsSeckillService.getOne(new LambdaQueryWrapper<GoodsSeckill>() |
| | | .eq(GoodsSeckill::getSeckillActivityInfoId, seckillActivityInfo.getId())); |
| | | |
| | | GoodsCategory category = goodsCategoryService.getById(goods.getGoodsCategoryId()); |
| | | Shop shop = shopService.getById(goodsShop.getShopId()); |
| | | vo.setId(seckillActivityInfo.getId().toString()); |
| | | vo.setGoodsId(seckillActivityInfo.getGoodId()); |
| | | vo.setGoodsName(goods.getName()); |
| | | vo.setGoodsCategoryName(goods.getCategoryName()); |
| | | vo.setGoodsCategoryName(category.getName()); |
| | | vo.setSellingPrice(goods.getSellingPrice()); |
| | | vo.setOriginalPrice(goods.getOriginalPrice()); |
| | | vo.setActivityPrice(goodsSeckill.getSellingPrice()); |
| | | vo.setMaxNum(seckillActivityInfo.getMaxNum());//活动限购 |
| | | vo.setStartTime(seckillActivityInfo.getStartTime()); |
| | | vo.setEndTime(seckillActivityInfo.getEndTime()); |
| | | |
| | | vo.setShopId(goodsShop.getShopId()); |
| | | vo.setShopName(shop.getName()); |
| | | |
| | | |
| | | return R.ok(vo); |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/getShopBalanceStatementPageList") |
| | | public R<PageInfo<ShopBalanceStatementVO>> getShopBalanceStatementPageList(@RequestParam("types") Collection<Integer> types, |
| | | public R<PageInfo<ShopBalanceStatementVO>> getShopBalanceStatementPageList(@RequestParam(value = "types",required = false) Collection<Integer> types, |
| | | @RequestParam(value = "objectId", required = false) Long objectId, |
| | | @RequestParam(value = "id") Integer id, |
| | | @RequestParam(value = "id",required = false) Integer id, |
| | | @ApiParam("当前页")@RequestParam("pageCurr") Integer pageCurr, |
| | | @ApiParam("分页大小")@RequestParam("pageSize") Integer pageSize) { |
| | | PageInfo<ShopBalanceStatementVO> pageInfo=shopBalanceStatementService.getShopBalanceStatementPageList(types,objectId,id,pageCurr,pageSize); |
| | |
| | | @PutMapping("/editShop") |
| | | @ApiOperation(value = "门店管理-编辑门店", tags = {"管理后台-门店管理"}) |
| | | public R<Void> editShop(@RequestBody Shop shop){ |
| | | //修改店长 |
| | | |
| | | //判断是否修改店长 |
| | | Shop byId = shopService.getById(shop.getId()); |
| | | |
| | | String phone = shop.getPhone(); |
| | | AppUser appUser = appUserClient.getAppUserByPhone1(phone).getData(); |
| | | if (appUser == null){ |
| | | return R.fail("该手机号未注册"); |
| | | if (!phone.equals(byId.getPhone())){ |
| | | //修改店长 |
| | | AppUser appUser = appUserClient.getAppUserByPhone1(phone).getData(); |
| | | if (appUser == null){ |
| | | return R.fail("该手机号未注册"); |
| | | } |
| | | |
| | | Long originalUserId = byId.getAppUserId(); |
| | | //添加用户id到shop信息中 |
| | | shop.setAppUserId(appUser.getId()); |
| | | //删除店铺关系 |
| | | R deleteR = appUserShopClient.delete(shop.getId(), originalUserId); |
| | | if (deleteR.getCode()!=200){ |
| | | throw new RuntimeException("删除用户门店关系失败"); |
| | | } |
| | | //添加shopuser |
| | | AppUserShop appUserShop = new AppUserShop(); |
| | | appUserShop.setAppUserId(appUser.getId()); |
| | | appUserShop.setShopId(shop.getId()); |
| | | R appUserShopR = appUserShopClient.insert(appUserShop); |
| | | if (appUserShopR.getCode()!=200){ |
| | | throw new RuntimeException("添加用户门店关系失败"); |
| | | } |
| | | |
| | | } |
| | | Long originalUserId = shop.getAppUserId(); |
| | | //添加用户id到shop信息中 |
| | | shop.setAppUserId(appUser.getId()); |
| | | //删除店铺关系 |
| | | R deleteR = appUserShopClient.delete(shop.getId(), originalUserId); |
| | | if (deleteR.getCode()!=200){ |
| | | throw new RuntimeException("删除用户门店关系失败"); |
| | | } |
| | | |
| | | |
| | | //删除客服电话 |
| | | QueryWrapper<Phone> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("shop_id", shop.getId()); |
| | | phoneService.remove(queryWrapper); |
| | | Phone one = phoneService.getOne(queryWrapper); |
| | | if (!one.getPhoneOne().equals(shop.getServiceTel())){ |
| | | phoneService.removeById(one.getId()); |
| | | //添加客服phone |
| | | Phone phone1 = new Phone(); |
| | | phone1.setType(2);//门店 |
| | | phone1.setPhoneOne(shop.getServiceTel()); |
| | | phone1.setShopId(shop.getId()); |
| | | phoneService.save(phone1); |
| | | } |
| | | |
| | | |
| | | //修改店铺 |
| | | shopService.updateById(shop); |
| | | //添加shopuser |
| | | AppUserShop appUserShop = new AppUserShop(); |
| | | appUserShop.setAppUserId(appUser.getId()); |
| | | appUserShop.setShopId(shop.getId()); |
| | | R appUserShopR = appUserShopClient.insert(appUserShop); |
| | | if (appUserShopR.getCode()!=200){ |
| | | throw new RuntimeException("添加用户门店关系失败"); |
| | | } |
| | | //添加客服phone |
| | | Phone phone1 = new Phone(); |
| | | phone1.setType(2);//门店 |
| | | phone1.setPhoneOne(shop.getServiceTel()); |
| | | phone1.setShopId(shop.getId()); |
| | | phoneService.save(phone1); |
| | | |
| | | |
| | | return R.ok(); |
| | | |
| | | } |
| | |
| | | /** |
| | | * 获取所有门店 |
| | | */ |
| | | @PostMapping("/getAllShop") |
| | | @GetMapping("/getAllShop") |
| | | public R<List<Shop>> getAllShop(){ |
| | | List<Shop> list = shopService.list(new LambdaQueryWrapper<Shop>().eq(Shop::getDelFlag, 0)); |
| | | List<Shop> list = shopService.list(new LambdaQueryWrapper<Shop>().select(Shop::getName,Shop::getId).eq(Shop::getDelFlag, 0)); |
| | | return R.ok(list); |
| | | } |
| | | |
| | |
| | | List<ReceiverBankChannel> list = receiverBankChannelService.list(new LambdaQueryWrapper<ReceiverBankChannel>() |
| | | .like(ReceiverBankChannel::getName, name)); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | @GetMapping("/getServiceProvider") |
| | | R<List<String>> getServiceProvider(@RequestParam("appUserId") Long appUserId){ |
| | | LambdaQueryWrapper<Shop> queryWrapper=new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(Shop::getAppUserId, appUserId); |
| | | queryWrapper.eq(Shop::getDelFlag,0); |
| | | List<Shop> shops = shopMapper.selectList(queryWrapper); |
| | | List<String> collect = shops.stream().map(Shop::getName).distinct().collect(Collectors.toList()); |
| | | return R.ok(collect); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | @GetMapping("/getBalanceList") |
| | | @ApiOperation(value = "门店余额列表", tags = {"后台-财务统计-余额列表"}) |
| | | R<PageInfo<ShopBalanceListVO>> getBalanceList(@ApiParam("门店名称")@RequestParam("name") String name, |
| | | R<PageInfo<ShopBalanceListVO>> getBalanceList(@ApiParam("门店名称")@RequestParam(value = "name",required = false) String name, |
| | | @ApiParam("当前页")@RequestParam("pageCurr") Integer pageCurr, |
| | | @ApiParam("分页大小")@RequestParam("pageSize") Integer pageSize){ |
| | | PageInfo<ShopBalanceListVO> pageInfo=shopService.getBalanceList(name,pageCurr,pageSize); |
| | |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | import com.ruoyi.other.api.domain.Shop; |
| | | import com.ruoyi.other.api.domain.ShopBalanceStatement; |
| | | import com.ruoyi.other.api.domain.ShopWithdraw; |
| | | import com.ruoyi.other.mapper.ShopWithdrawMapper; |
| | | import com.ruoyi.other.service.ShopBalanceStatementService; |
| | | import com.ruoyi.other.service.ShopService; |
| | | import com.ruoyi.other.service.ShopWithdrawService; |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private SysUserClient sysUserClient; |
| | | @Autowired |
| | | private ShopWithdrawMapper shopWithdrawMapper; |
| | | |
| | | |
| | | @GetMapping("/getShopById") |
| | |
| | | @ApiParam("手机号") String phone, |
| | | @ApiParam("审核状态(0=待审核,1=审核通过,2=审核失败)")Integer auditStatus) { |
| | | //模糊查询手机号 |
| | | List<Long> collect=null; |
| | | List<Integer> shopIds=null; |
| | | if (StringUtils.isNotEmpty(phone)) { |
| | | List<AppUser> data = appUserClient.getAppUserByPhoneNoFilter(phone).getData(); |
| | | collect = data.stream().map(AppUser::getId).collect(Collectors.toList()); |
| | | if (CollectionUtils.isEmpty(collect)) { |
| | | QueryWrapper<Shop> queryWrapper=new QueryWrapper<>(); |
| | | queryWrapper.like(StringUtils.isNotEmpty(phone),"phone", phone); |
| | | shopIds=shopService.list(queryWrapper).stream().map(Shop::getId).collect(Collectors.toList()); |
| | | if (CollectionUtils.isEmpty(shopIds)) { |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | } |
| | | if (shopId!=null && !shopIds.contains(shopId)){ |
| | | shopIds.add(shopId); |
| | | } |
| | | |
| | | Page<ShopWithdraw> page = shopWithdrawService.page(Page.of(pageNum, pageSize), new LambdaQueryWrapper<ShopWithdraw>() |
| | | .eq(shopId!=null,ShopWithdraw::getShopId,shopId) |
| | | .eq(auditStatus!=null,ShopWithdraw::getAuditStatus,auditStatus) |
| | | .in(collect!=null,ShopWithdraw::getCreateUserId,collect) |
| | | .orderByDesc(ShopWithdraw::getCreateTime) |
| | | |
| | | ); |
| | | PageInfo<ShopWithdraw> page=new PageInfo<>(pageNum,pageSize); |
| | | List<ShopWithdraw> list =shopWithdrawMapper.page(page,shopIds,auditStatus); |
| | | list.forEach(x->{ |
| | | x.setIdStr(x.getId().toString()); |
| | | }); |
| | | page.setRecords(list); |
| | | return R.ok(page); |
| | | } |
| | | |
| | |
| | | |
| | | List<GoodsVO> selectListByShopId(PageInfo<GoodsVO> pageInfo, @Param("shopId") Integer shopId); |
| | | |
| | | IPage<Goods> selectManageGoodsList(@Param("page") IPage<Goods> page, @Param("goods") Goods goods); |
| | | List<Goods> selectManageGoodsList( PageInfo<Goods> page, @Param("goods") Goods goods); |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | List<GoodsVO> selectListByShopId(PageInfo<GoodsVO> pageInfo, @Param("shopId") Integer shopId); |
| | | |
| | | List<ShopBalanceListVO> getBalanceList(PageInfo<ShopBalanceListVO> pageInfo, String name); |
| | | List<ShopBalanceListVO> getBalanceList(PageInfo<ShopBalanceListVO> pageInfo,@Param("name") String name); |
| | | |
| | | List<ShopBalanceExcel> shopBalanceExcel(String name); |
| | | List<ShopBalanceExcel> shopBalanceExcel(@Param("name")String name); |
| | | } |
| | |
| | | package com.ruoyi.other.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.other.api.domain.ShopWithdraw; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface ShopWithdrawMapper extends BaseMapper<ShopWithdraw> { |
| | | |
| | | List<ShopWithdraw> page(PageInfo<ShopWithdraw> page, @Param("shopIds") List<Integer> shopIds, @Param("auditStatus") Integer auditStatus); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.other.api.domain.Goods; |
| | | import com.ruoyi.other.dto.AddGoodsDTO; |
| | |
| | | |
| | | void updateManageGoods(Goods goods); |
| | | |
| | | IPage<Goods> getManageGoodsList(Page<Goods> page, Goods goods); |
| | | R<PageInfo<Goods>> getManageGoodsList(Integer pageNum, Integer pageSize, Goods goods); |
| | | |
| | | Goods getManageGoodsDetail(Long goodsId); |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public IPage<Goods> getManageGoodsList(Page<Goods> page, Goods goods) { |
| | | IPage<Goods> goodsIPage = goodsMapper.selectManageGoodsList(page, goods); |
| | | /* goodsIPage.getRecords().forEach(goods1 -> { |
| | | Integer data = orderClient.getGoodsSaleNum(goods1.getId(), 1).getData(); |
| | | goods1.setSaleNum(data); |
| | | });*/ |
| | | return goodsIPage; |
| | | public R getManageGoodsList(Integer pageNum,Integer pageSize, Goods goods) { |
| | | PageInfo<Goods> pageInfo = new PageInfo<>(pageNum,pageSize); |
| | | List<Goods> list = goodsMapper.selectManageGoodsList(pageInfo, goods); |
| | | pageInfo.setRecords(list); |
| | | return R.ok(pageInfo); |
| | | } |
| | | |
| | | @Override |
| | |
| | | throw new RuntimeException("该秒杀商品已在其他秒杀活动中存在"); |
| | | } |
| | | seckillActivityInfo.setId(null); |
| | | seckillActivityInfo.setCreateTime(LocalDateTime.now()); |
| | | seckillActivityInfo.setDelFlag(0); |
| | | seckillActivityInfo.setIsShelves(0);//下架状态 |
| | | seckillActivityInfo.setSellingPrice(seckillActivityInfo.getActivityPrice()); |
| | | this.baseMapper.insert(seckillActivityInfo); |
| | | //添加价格积分 |
| | | GoodsSeckill goodsSeckill = new GoodsSeckill(); |
| | |
| | | if(null==one){ |
| | | throw new RuntimeException("该秒杀活动不存在"); |
| | | } |
| | | seckillActivityInfo.setSellingPrice(seckillActivityInfo.getActivityPrice()); |
| | | this.baseMapper.updateById(seckillActivityInfo);//修改限购数量、开始时间、结束时间 |
| | | |
| | | //修改价格积分 |
| | |
| | | AND ts.id = #{goods.shopId} |
| | | </if> |
| | | </where> |
| | | ORDER BY tg.sort DESC |
| | | ORDER BY IFNULL(tg.sort,0) DESC |
| | | </select> |
| | | |
| | | |
| | |
| | | WHERE tsai.id = #{seckillActivityId} AND tsai.del_flag = 0 |
| | | </select> |
| | | <select id="querySeckillActivity" resultType="com.ruoyi.other.vo.SeckillActivityVO"> |
| | | SELECT |
| | | SELECT DISTINCT |
| | | tsai.id, |
| | | tg.id goodsId, |
| | | tg.`name` goodsName, |
| | |
| | | tg.sale_num saleNum, |
| | | tgc.`name` goodsCategoryName, |
| | | tsai.max_num maxNum, |
| | | |
| | | tg.home_page_picture, |
| | | tgse.selling_price activityPrice, |
| | | tg.selling_price sellingPrice, |
| | |
| | | FROM |
| | | t_seckill_activity_info tsai |
| | | LEFT JOIN t_goods tg ON tsai.good_id = tg.id |
| | | LEFT JOIN t_goods_category tgc ON tgc.id = tg.goods_category_id |
| | | LEFT JOIN t_goods_shop tgs ON tg.id = tgs.goods_id |
| | | LEFT JOIN t_shop ts ON tgs.shop_id = ts.id |
| | | LEFT JOIN t_goods_category tgc ON tg.goods_category_id = tgc.id |
| | | INNER JOIN t_goods_shop tgs ON tg.id = tgs.goods_id |
| | | INNER JOIN t_shop ts ON tgs.shop_id = ts.id |
| | | LEFT JOIN t_goods_seckill tgse ON tsai.id = tgse.seckill_activity_info_id |
| | | WHERE tsai.del_flag = 0 |
| | | |
| | | <if test="goods.id != null"> |
| | | AND tsai.id = #{goods.id} |
| | | </if> |
| | |
| | | <if test="goods.shopId != null"> |
| | | AND tgs.shop_id = #{goods.shopId} |
| | | </if> |
| | | <if test="goods.status != null and goods.status ==1"> |
| | | <if test="goods.activityStatus != null and goods.activityStatus ==1"> |
| | | AND tsai.start_time <![CDATA[>]]> NOW() |
| | | </if> |
| | | <if test="goods.status != null and goods.status ==2"> |
| | | <if test="goods.activityStatus != null and goods.activityStatus ==2"> |
| | | AND tsai.start_time <![CDATA[<=]]> NOW() AND tsai.end_time <![CDATA[>]]> NOW() |
| | | </if> |
| | | <if test="goods.status != null and goods.status ==3"> |
| | | <if test="goods.activityStatus != null and goods.activityStatus ==3"> |
| | | AND tsai.end_time <![CDATA[<]]> NOW() |
| | | </if> |
| | | order by tsai.create_time desc |
| | | <if test="goods.status!= null "> |
| | | and tsai.is_shelves =#{goods.status} |
| | | </if> |
| | | order by tsai.start_time desc |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.other.mapper.ShopWithdrawMapper"> |
| | | |
| | | <select id="page" resultType="com.ruoyi.other.api.domain.ShopWithdraw"> |
| | | select tsw.id , |
| | | tsw.shop_id, |
| | | tsw.money, |
| | | tsw.audit_status, |
| | | tsw.audit_user_id, |
| | | tsw.audit_time, |
| | | tsw.audit_msg, |
| | | tsw.status, |
| | | tsw.remark, |
| | | tsw.arrival_time, |
| | | tsw.create_time, |
| | | tsw.create_user_id, |
| | | tsw.tradeMerchantNo, |
| | | tsw.receiverAccountNoEnc, |
| | | tsw.receiverAccountType, |
| | | tsw.receiverBankChannelNo, |
| | | ts.name as shopName, |
| | | ts.phone |
| | | from `t_shop_withdraw` tsw |
| | | left join t_shop ts on tsw.shop_id=ts.id |
| | | where |
| | | tsw.del_flag=0 |
| | | <if test="auditStatus!=null"> |
| | | and tsw.audit_status=#{auditStatus} |
| | | </if> |
| | | <if test="null != shopIds and shopIds.size() > 0"> |
| | | and tsw.shop_id in |
| | | <foreach collection="shopIds" item="shopId" open="(" separator="," close=")"> |
| | | #{shopId} |
| | | </foreach> |
| | | </if> |
| | | |
| | | </select> |
| | | </mapper> |