trade: 分销业务后台功能:推广订单列表

This commit is contained in:
owen 2023-09-10 23:36:23 +08:00
parent dffdd471d5
commit 290d1671a2
2 changed files with 7 additions and 0 deletions

View File

@ -15,6 +15,9 @@ import ${basePackage}.module.${table.moduleName}.dal.mysql.${table.businessName}
import static ${ServiceExceptionUtilClassName}.exception; import static ${ServiceExceptionUtilClassName}.exception;
import static ${basePackage}.module.${table.moduleName}.enums.ErrorCodeConstants.*; import static ${basePackage}.module.${table.moduleName}.enums.ErrorCodeConstants.*;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.ListUtil;
/** /**
* ${table.classComment} Service 实现类 * ${table.classComment} Service 实现类
* *
@ -61,6 +64,9 @@ public class ${table.className}ServiceImpl implements ${table.className}Service
@Override @Override
public ${table.className}DO get${simpleClassName}(${primaryColumn.javaType} id) { public ${table.className}DO get${simpleClassName}(${primaryColumn.javaType} id) {
if (CollUtil.isEmpty(ids)) {
return ListUtil.empty();
}
return ${classNameVar}Mapper.selectById(id); return ${classNameVar}Mapper.selectById(id);
} }

View File

@ -277,6 +277,7 @@ public interface TradeOrderConvert {
default BrokerageAddReqBO convert(TradeOrderItemDO item, ProductSkuRespDTO sku) { default BrokerageAddReqBO convert(TradeOrderItemDO item, ProductSkuRespDTO sku) {
return new BrokerageAddReqBO().setBizId(String.valueOf(item.getId())) return new BrokerageAddReqBO().setBizId(String.valueOf(item.getId()))
.setSourceUserId(item.getUserId())
.setBasePrice(item.getPayPrice() * item.getCount()) .setBasePrice(item.getPayPrice() * item.getCount())
.setFirstFixedPrice(sku.getSubCommissionFirstPrice()) .setFirstFixedPrice(sku.getSubCommissionFirstPrice())
.setSecondFixedPrice(sku.getSubCommissionSecondPrice()); .setSecondFixedPrice(sku.getSubCommissionSecondPrice());