diff --git a/ruoyi-admin/src/main/resources/application-dev.yml b/ruoyi-admin/src/main/resources/application-dev.yml index 358d77584..036955b3a 100644 --- a/ruoyi-admin/src/main/resources/application-dev.yml +++ b/ruoyi-admin/src/main/resources/application-dev.yml @@ -49,7 +49,7 @@ spring: driverClassName: com.mysql.cj.jdbc.Driver # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562 # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题) - url: jdbc:mysql://82.156.121.2:13306/loopin?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true + url: jdbc:mysql://82.156.121.2:13306/soopin?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true username: wzj password: A085F27A43B0 # # 从库数据源 diff --git a/ruoyi-modules/ruoyi-member/src/main/java/com/wzj/soopin/member/service/impl/FansServiceImpl.java b/ruoyi-modules/ruoyi-member/src/main/java/com/wzj/soopin/member/service/impl/FansServiceImpl.java index 19c1c053b..8f8370078 100644 --- a/ruoyi-modules/ruoyi-member/src/main/java/com/wzj/soopin/member/service/impl/FansServiceImpl.java +++ b/ruoyi-modules/ruoyi-member/src/main/java/com/wzj/soopin/member/service/impl/FansServiceImpl.java @@ -97,7 +97,7 @@ public class FansServiceImpl extends ServiceImpl implements IF Map params = new HashMap<>(); params.put("userID", follower.getId()); params.put("nickName", follower.getNickname() == null ? "" : follower.getNickname()); - params.put("faceUrl", vlogger.getAvatar()); + params.put("faceUrl", follower.getAvatar()); MQMessage message = MQMessage.builder() .messageType(MQMessageType.IM.name()) .data(params) diff --git a/ruoyi-modules/ruoyi-order/src/main/java/com/wzj/soopin/order/service/impl/OrderServiceImpl.java b/ruoyi-modules/ruoyi-order/src/main/java/com/wzj/soopin/order/service/impl/OrderServiceImpl.java index a46c1037b..abf528782 100644 --- a/ruoyi-modules/ruoyi-order/src/main/java/com/wzj/soopin/order/service/impl/OrderServiceImpl.java +++ b/ruoyi-modules/ruoyi-order/src/main/java/com/wzj/soopin/order/service/impl/OrderServiceImpl.java @@ -17,6 +17,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.wzj.soopin.goods.domain.entity.Product; import com.wzj.soopin.goods.domain.entity.Sku; import com.wzj.soopin.goods.domain.entity.SkuSnapshot; +import com.wzj.soopin.goods.domain.vo.ProductVO; import com.wzj.soopin.goods.mapper.ProductMapper; import com.wzj.soopin.goods.mapper.SkuMapper; import com.wzj.soopin.goods.mapper.SkuSnapshotMapper; @@ -235,8 +236,9 @@ public class OrderServiceImpl extends ServiceImpl implements BigDecimal totalAmount = new BigDecimal(0); List skus = skuMapper.selectByIds(map.keySet()); Assert.isTrue(skus.size() == skuItemBOList.size(), () -> new ServiceException("下单商品不存在")); - LinkedHashMap productMap = productMapper.selectByIds(skus.stream().map(Sku::getProductId).collect(Collectors.toList())) - .stream().collect(Collectors.toMap(Product::getId, it -> it, (v1, v2) -> v2, LinkedHashMap::new)); + + LinkedHashMap productMap = TenantHelper.ignore(() -> productMapper.selectByIds(skus.stream().map(Sku::getProductId).collect(Collectors.toList())) + .stream().collect(Collectors.toMap(Product::getId, it -> it, (v1, v2) -> v2, LinkedHashMap::new))); for (Sku sku : skus) { Integer quantity = map.get(sku.getId()); Assert.isTrue(quantity < sku.getStock(), () -> new ServiceException("下单商品库存不足")); diff --git a/ruoyi-modules/ruoyi-transaction/src/main/java/com/wzj/soopin/transaction/service/impl/WithdrawServiceImpl.java b/ruoyi-modules/ruoyi-transaction/src/main/java/com/wzj/soopin/transaction/service/impl/WithdrawServiceImpl.java index e3a7086f2..dbd957eea 100644 --- a/ruoyi-modules/ruoyi-transaction/src/main/java/com/wzj/soopin/transaction/service/impl/WithdrawServiceImpl.java +++ b/ruoyi-modules/ruoyi-transaction/src/main/java/com/wzj/soopin/transaction/service/impl/WithdrawServiceImpl.java @@ -69,10 +69,10 @@ public class WithdrawServiceImpl extends ServiceImpl i public boolean audit(WithdrawBO bo) { Withdraw withdraw = getById(bo.getId()); if (withdraw == null) { - throw new RuntimeException("提现申请不存在"); + throw new ServiceException("提现申请不存在"); } if (!Objects.equals(WithdrawAuditStatus.PENDING.getCode(), withdraw.getStatus())) { - throw new RuntimeException("提现申请已处理"); + throw new ServiceException("提现申请已处理"); } //发起提现 @@ -139,10 +139,10 @@ public class WithdrawServiceImpl extends ServiceImpl i Withdraw withdraw = getById(id); if (withdraw == null) { - throw new RuntimeException("提现申请不存在"); + throw new ServiceException("提现申请不存在"); } if (!Objects.equals(WithdrawStatus.PENDING.getCode(), withdraw.getStatus())) { - throw new RuntimeException("提现申请已处理"); + throw new ServiceException("提现申请已处理"); } withdraw.setStatus(WithdrawStatus.SUCCESS.getCode()); updateById(withdraw); @@ -164,12 +164,12 @@ public class WithdrawServiceImpl extends ServiceImpl i public InitiateBatchTransferResponseNew withdraw (Withdraw withdraw) { MemberAccount memberAccount = memberAccountService.getMemberAccount(withdraw.getMemberId()); if (memberAccount == null) { - throw new RuntimeException("用户不存在"); + throw new ServiceException("用户不存在"); } //检查当前用于的账户余额是否充足 BigDecimal balance = memberAccount.getWallet(); if (balance==null||balance.compareTo(withdraw.getMoney()) < 0) { - throw new RuntimeException("用户余额不足"); + throw new ServiceException("用户余额不足"); } //检查提现次数是否超过限制 long count = this.count(new LambdaQueryWrapper() @@ -179,7 +179,7 @@ public class WithdrawServiceImpl extends ServiceImpl i ); if (count >= 3) { - throw new RuntimeException("提现次数超过限制"); + throw new ServiceException("提现次数超过限制"); } //生成费用 BigDecimal fee = withdraw.getMoney().multiply(new BigDecimal("0.00")); diff --git a/script/docker/nginx/conf/nginx.conf b/script/docker/nginx/conf/nginx.conf index 2f8455fa6..7a49275d3 100644 --- a/script/docker/nginx/conf/nginx.conf +++ b/script/docker/nginx/conf/nginx.conf @@ -220,7 +220,7 @@ http { location ^~ /file/ { proxy_pass http://43.143.227.203:9000/; proxy_set_header X-Real-IP $remote_addr; - client_max_body_size 100M; + client_max_body_size 300M; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } # app分享 @@ -232,7 +232,7 @@ http { # app分享-接口代理 location /prod-api/ { proxy_pass http://43.143.227.203:8880/; - client_max_body_size 100M; + client_max_body_size 300M; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }