ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/AppUser.java
@@ -320,7 +320,6 @@ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime lastOrderTime; public String getIdStr(){ return String.valueOf(id); } ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysLoginService.java
@@ -93,7 +93,7 @@ // throw new ServiceException("对不起,您的账号:" + username + " 已停用"); throw new ServiceException("您所属门店已被冻结,请联系平台"); } passwordService.validate(user, password, request); // passwordService.validate(user, password, request); recordLogService.recordLogininfor(request, user.getUserId().intValue(), username, Constants.LOGIN_SUCCESS_STATUS, "登录成功"); return userInfo; } ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysPasswordService.java
@@ -58,7 +58,12 @@ throw new ServiceException(errMsg); } if (!matches(user,password)){ retryCount = retryCount + 1; recordLogService.recordLogininfor(request, user.getUserId().intValue(), username, Constants.LOGIN_FAIL_STATUS, String.format("密码输入错误%s次", retryCount)); redisService.setCacheObject(getCacheKey(username), retryCount, lockTime, TimeUnit.MINUTES); throw new ServiceException("密码错误"); } // if (!user.getPassword().equals(password)){ // retryCount = retryCount + 1; // recordLogService.recordLogininfor(request, user.getUserId().intValue(), username, Constants.LOGIN_FAIL_STATUS, String.format("密码输入错误%s次", retryCount)); ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java
@@ -384,7 +384,8 @@ user.setCount6(count6); user.setCount7(count7); List<UserSignRecord> list = userSignRecordService.lambdaQuery().eq(UserSignRecord::getSignDay, LocalDate.now()).list(); List<UserSignRecord> list = userSignRecordService.lambdaQuery().eq(UserSignRecord::getSignDay, LocalDate.now()) .eq(UserSignRecord::getAppUserId,userId).list(); if (!list.isEmpty()) { user.setIsSign(1); } else { ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserSignRecordController.java
@@ -3,10 +3,12 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.ruoyi.account.api.model.AppUser; import com.ruoyi.account.api.model.BalanceChangeRecord; import com.ruoyi.account.api.model.UserPoint; import com.ruoyi.account.api.model.UserSignRecord; import com.ruoyi.account.dto.SignBackRDto; import com.ruoyi.account.service.AppUserService; import com.ruoyi.account.service.BalanceChangeRecordService; import com.ruoyi.account.service.UserPointService; import com.ruoyi.account.service.UserSignRecordService; import com.ruoyi.common.core.domain.R; @@ -52,6 +54,8 @@ @Resource private UserPointService userPointService; @Resource private BalanceChangeRecordService balanceChangeRecordService; @@ -116,6 +120,17 @@ BigDecimal sum2 = appUser.getBalance().add(bigDecimalR.getData()); appUser.setBalance(sum2); appUserService.updateById(appUser); // 增加一条余额明细 BalanceChangeRecord balanceChangeRecord = new BalanceChangeRecord(); balanceChangeRecord.setAppUserId(appUser.getId()); balanceChangeRecord.setVipId(appUser.getVipId()); balanceChangeRecord.setChangeType(3); balanceChangeRecord.setBeforeAmount(appUser.getBalance()); balanceChangeRecord.setChangeAmount(bigDecimalR.getData()); balanceChangeRecord.setAfterAmount(appUser.getBalance().add(bigDecimalR.getData())); balanceChangeRecord.setDelFlag(0); balanceChangeRecord.setCreateTime(LocalDateTime.now()); balanceChangeRecordService.save(balanceChangeRecord); SignBackRDto signBackRDto = new SignBackRDto(); signBackRDto.setPoint(userSignRecord.getPoint()); signBackRDto.setRedAmount(userSignRecord.getRedAmount()); ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/tencentMap/TencentMapUtil.java
@@ -31,7 +31,7 @@ Integer status = jsonObject.getInteger("status"); if(0 != status){ log.error(jsonObject.getString("message")); return null; throw new RuntimeException(jsonObject.getString("message")); } JSONObject result = jsonObject.getJSONObject("result"); JSONObject ad_info = result.getJSONObject("ad_info"); ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
@@ -271,9 +271,10 @@ @ApiOperation(value = "查询订单详情", tags = {"管理后台-订单管理"}) public R<OrderInfoVo> getOrderInfo(@PathVariable("orderId") Long orderId){ OrderInfoVo orderInfo = orderService.getOrderInfo(orderId); RefundPass refundPass = refundPassService.lambdaQuery().eq(RefundPass::getOrderId, orderId).one(); if (refundPass!=null){ orderInfo.setRefundPassId(refundPass.getId().toString()); RefundPass one = refundPassService.getOne(new LambdaQueryWrapper<RefundPass>().eq(RefundPass::getOrderId, orderId) .eq(RefundPass::getDelFlag, 0).last(" order by create_time desc limit 0,1")); if (one!=null){ orderInfo.setRefundPassId(one.getId().toString()); } return R.ok(orderInfo); } ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
@@ -337,8 +337,7 @@ orderPageListVo.setUserName(appUser.getName()); orderPageListVo.setPhone(appUser.getPhone()); } // RefundPass one = refundPassService.getOne(new LambdaQueryWrapper<RefundPass>().eq(RefundPass::getOrderId, orderPageListVo.getId()).eq(RefundPass::getDelFlag, 0).last(" order by create_time desc limit 0,1")); RefundPass one = refundPassService.lambdaQuery().eq(RefundPass::getOrderId, orderPageListVo.getId()).one(); RefundPass one = refundPassService.getOne(new LambdaQueryWrapper<RefundPass>().eq(RefundPass::getOrderId, orderPageListVo.getId()).eq(RefundPass::getDelFlag, 0).last(" order by create_time desc limit 0,1")); orderPageListVo.setRefundPassId(null != one ? one.getId().toString() : null); // 平台分佣 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java
@@ -209,10 +209,10 @@ area.setVip(appUser.getVipId()); area.setGoodsId(goodsId); GoodsArea goodsArea = goodsAreaClient.getGoodsArea(area).getData(); if(null == goodsArea || (null != goodsArea.getCashPayment() && null != goodsArea.getPointPayment())){ if(null == goodsArea || (null == goodsArea.getCashPayment() && null == goodsArea.getPointPayment())){ //没有地区价格,则使用会员价格 GoodsVip goodsVip = goodsVipClient.getGoodsVip(goodsId, appUser.getVipId()).getData(); if(null == goodsVip || (null != goodsVip.getCashPayment() && null != goodsVip.getPointPayment())){ if(null == goodsVip || (null == goodsVip.getCashPayment() && null == goodsVip.getPointPayment())){ //没有配置价格,直接使用原始基础价格 return null; }else{ @@ -424,8 +424,8 @@ }else{ int sum = 0; for (MyShoppingCartVo myShoppingCartVo : goodsList) { sum += (myShoppingCartVo.getPoint() * myShoppingCartVo.getNumber()); myShoppingCartVo.setEarnSpendingPoints(myShoppingCartVo.getEarnSpendingPoints() * myShoppingCartVo.getNumber()); sum += ((null != myShoppingCartVo.getPoint() ? myShoppingCartVo.getPoint() : 0) * myShoppingCartVo.getNumber()); myShoppingCartVo.setEarnSpendingPoints((null != myShoppingCartVo.getEarnSpendingPoints() ? myShoppingCartVo.getEarnSpendingPoints() : 0) * myShoppingCartVo.getNumber()); } confirmOrderVo.setOrderPoint(sum); } ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/RedPackegeSetController.java
@@ -33,7 +33,7 @@ private RedPackegeSetService redPackegeSetService; //获取当前生效的红包设置 @ResponseBody @GetMapping("/get") @PostMapping("/get") public R<BigDecimal> get(){ LocalDateTime now = LocalDateTime.now(); RedPackegeSet one = redPackegeSetService.lambdaQuery().le(RedPackegeSet::getStartTime, now).ge(RedPackegeSet::getEndTime, now).one(); ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopWithdrawController.java
@@ -223,6 +223,7 @@ singlePay.setReceiverAccountNoEnc(shop.getReceiverAccountNoEnc()); singlePay.setReceiverNameEnc(shop.getReceiverNameEnc()); singlePay.setReceiverAccountType(shop.getReceiverAccountType()); singlePay.setReceiverBankChannelNo(shop.getReceiverBankChannelNo()); singlePay.setPaidAmount(shopWithdraw1.getMoney().doubleValue()); singlePay.setPaidDesc("账户余额提现"); singlePay.setPaidUse("208"); ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
@@ -92,6 +92,8 @@ @Override public PageInfo<GoodsVO> goodsList(Goods search) { Integer vipId = 0; @@ -127,13 +129,13 @@ @Override public int compare(GoodsVO o1, GoodsVO o2) { if(null != o1.getSellingPrice() && null != o2.getSellingPrice()){ return o1.getSellingPrice().compareTo(o2.getSellingPrice()) * (StringUtils.isNotEmpty(search.getIsAsc()) ? -1 : 1); return o1.getSellingPrice().compareTo(o2.getSellingPrice()) * ("desc".equals(search.getIsAsc()) ? -1 : 1); } if(null == o1.getSellingPrice() && null != o2.getSellingPrice()){ return BigDecimal.ZERO.compareTo(o2.getSellingPrice()) * (StringUtils.isNotEmpty(search.getIsAsc()) ? -1 : 1); return BigDecimal.ZERO.compareTo(o2.getSellingPrice()) * ("desc".equals(search.getIsAsc()) ? -1 : 1); } if(null != o1.getSellingPrice() && null == o2.getSellingPrice()){ return o1.getSellingPrice().compareTo(BigDecimal.ZERO) * (StringUtils.isNotEmpty(search.getIsAsc()) ? -1 : 1); return o1.getSellingPrice().compareTo(BigDecimal.ZERO) * ("desc".equals(search.getIsAsc()) ? -1 : 1); } return 0; } @@ -291,9 +293,9 @@ @Override public List<Goods> getGoodsListByShopId(PageInfo<Goods> pageInfo, Integer shopId) { Integer vipId = 0; String provinceCode = null; String cityCode = null; String districtCode = null; String provinceCode = "0"; String cityCode = "0"; String districtCode = "0"; String token = SecurityUtils.getToken(ServletUtils.getRequest()); if(StringUtils.isNotEmpty(token)){ Long userid = tokenService.getLoginUserApplet().getUserid(); @@ -589,16 +591,33 @@ queryWrapper.eq(GoodsArea::getProvinceCode, provinceCode); } if(StringUtils.isNotEmpty(cityCode)){ queryWrapper.and(i -> i.eq(GoodsArea::getCityCode, cityCode).or().isNull(GoodsArea::getCityCode)); queryWrapper.eq(GoodsArea::getCityCode, cityCode); } if(StringUtils.isNotEmpty(districtCode)){ queryWrapper.and(i -> i.eq(GoodsArea::getDistrictsCode, districtCode).or().isNull(GoodsArea::getDistrictsCode)); queryWrapper.eq(GoodsArea::getDistrictsCode, districtCode); } GoodsArea goodsArea = goodsAreaService.getOne(queryWrapper); if(null == goodsArea){ if(goodsArea == null){ queryWrapper = new LambdaQueryWrapper<GoodsArea>().eq(GoodsArea::getGoodsId, goodsId).eq(GoodsArea::getVip, vip); if(StringUtils.isNotEmpty(provinceCode)){ queryWrapper.eq(GoodsArea::getProvinceCode, provinceCode); } if(StringUtils.isNotEmpty(cityCode)){ queryWrapper.eq(GoodsArea::getCityCode, cityCode); } goodsArea = goodsAreaService.getOne(queryWrapper); } if(goodsArea == null){ queryWrapper = new LambdaQueryWrapper<GoodsArea>().eq(GoodsArea::getGoodsId, goodsId).eq(GoodsArea::getVip, vip); if(StringUtils.isNotEmpty(provinceCode)){ queryWrapper.eq(GoodsArea::getProvinceCode, provinceCode); } goodsArea = goodsAreaService.getOne(queryWrapper); } if(null == goodsArea || (null == goodsArea.getCashPayment() && null == goodsArea.getPointPayment())){ //没有地区价格,则使用会员价格 GoodsVip goodsVip = goodsVipService.getOne(new LambdaQueryWrapper<GoodsVip>().eq(GoodsVip::getGoodsId, goodsId).eq(GoodsVip::getVip, vip)); if(null == goodsVip){ if(null == goodsVip || (null == goodsVip.getCashPayment() && null == goodsVip.getPointPayment())){ //没有配置价格,直接使用原始基础价格 return null; }else{