From 290d1671a29460ccff015dda1a35b71f651b3bc9 Mon Sep 17 00:00:00 2001 From: owen Date: Sun, 10 Sep 2023 23:36:23 +0800 Subject: [PATCH] =?UTF-8?q?trade:=20=E5=88=86=E9=94=80=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E5=8A=9F=E8=83=BD=EF=BC=9A=E6=8E=A8=E5=B9=BF?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/codegen/java/service/serviceImpl.vm | 6 ++++++ .../yudao/module/trade/convert/order/TradeOrderConvert.java | 1 + 2 files changed, 7 insertions(+) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/service/serviceImpl.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/service/serviceImpl.vm index a732039ce..148d1fa41 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/service/serviceImpl.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/service/serviceImpl.vm @@ -15,6 +15,9 @@ import ${basePackage}.module.${table.moduleName}.dal.mysql.${table.businessName} import static ${ServiceExceptionUtilClassName}.exception; import static ${basePackage}.module.${table.moduleName}.enums.ErrorCodeConstants.*; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.collection.ListUtil; + /** * ${table.classComment} Service 实现类 * @@ -61,6 +64,9 @@ public class ${table.className}ServiceImpl implements ${table.className}Service @Override public ${table.className}DO get${simpleClassName}(${primaryColumn.javaType} id) { + if (CollUtil.isEmpty(ids)) { + return ListUtil.empty(); + } return ${classNameVar}Mapper.selectById(id); } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/convert/order/TradeOrderConvert.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/convert/order/TradeOrderConvert.java index 8588fb972..225b4aec8 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/convert/order/TradeOrderConvert.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/convert/order/TradeOrderConvert.java @@ -277,6 +277,7 @@ public interface TradeOrderConvert { default BrokerageAddReqBO convert(TradeOrderItemDO item, ProductSkuRespDTO sku) { return new BrokerageAddReqBO().setBizId(String.valueOf(item.getId())) + .setSourceUserId(item.getUserId()) .setBasePrice(item.getPayPrice() * item.getCount()) .setFirstFixedPrice(sku.getSubCommissionFirstPrice()) .setSecondFixedPrice(sku.getSubCommissionSecondPrice());