refactor(api): 优化数据传输对象和查询逻辑

- 移除PaymentTaskCreateCmd中的paymentTaskSn字段
- 为OrderRebate类的字段添加必填验证注解
- 在VehicleExtractionVO中新增草帘相关字段
- 为BoxProduct查询添加排序逻辑按sort升序和创建时间降序
This commit is contained in:
shenyifei 2026-01-09 11:54:35 +08:00
parent b06a6a1fdd
commit a6f3195190
4 changed files with 16 additions and 13 deletions

View File

@ -68,6 +68,8 @@ public class BoxBrandGatewayImpl implements BoxBrandGateway {
if (CollUtil.isNotEmpty(brandIdList)) { if (CollUtil.isNotEmpty(brandIdList)) {
LambdaQueryWrapper<BoxProductDO> queryWrapper1 = Wrappers.lambdaQuery(BoxProductDO.class); LambdaQueryWrapper<BoxProductDO> queryWrapper1 = Wrappers.lambdaQuery(BoxProductDO.class);
queryWrapper1.in(BoxProductDO::getBrandId, brandIdList); queryWrapper1.in(BoxProductDO::getBrandId, brandIdList);
queryWrapper1.orderByAsc(BoxProductDO::getSort);
queryWrapper1.orderByDesc(BoxProductDO::getCreatedAt);
List<BoxProductDO> boxProductDOList = boxProductMapper.selectList(queryWrapper1); List<BoxProductDO> boxProductDOList = boxProductMapper.selectList(queryWrapper1);
page.getRecords().forEach(boxBrandDO -> { page.getRecords().forEach(boxBrandDO -> {
@ -97,6 +99,7 @@ public class BoxBrandGatewayImpl implements BoxBrandGateway {
if (CollUtil.isNotEmpty(brandIdList)) { if (CollUtil.isNotEmpty(brandIdList)) {
LambdaQueryWrapper<BoxProductDO> queryWrapper1 = Wrappers.lambdaQuery(BoxProductDO.class); LambdaQueryWrapper<BoxProductDO> queryWrapper1 = Wrappers.lambdaQuery(BoxProductDO.class);
queryWrapper1.in(BoxProductDO::getBrandId, brandIdList); queryWrapper1.in(BoxProductDO::getBrandId, brandIdList);
queryWrapper1.orderByAsc(BoxProductDO::getSort);
queryWrapper1.orderByDesc(BoxProductDO::getCreatedAt); queryWrapper1.orderByDesc(BoxProductDO::getCreatedAt);
List<BoxProductDO> boxProductDOList = boxProductMapper.selectList(queryWrapper1); List<BoxProductDO> boxProductDOList = boxProductMapper.selectList(queryWrapper1);
boxBrandDOList.forEach(boxBrandDO -> { boxBrandDOList.forEach(boxBrandDO -> {

View File

@ -37,12 +37,6 @@ public class PaymentTaskCreateCmd extends Command {
@Schema(title = "任务类型1-瓜农付款任务", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "任务类型1-瓜农付款任务", requiredMode = Schema.RequiredMode.REQUIRED)
private PaymentTaskTypeEnum taskType; private PaymentTaskTypeEnum taskType;
/**
* 付款编码
*/
@Schema(title = "付款编码", requiredMode = Schema.RequiredMode.REQUIRED)
private String paymentTaskSn;
/** /**
* 付款任务对象ID * 付款任务对象ID
*/ */

View File

@ -15,37 +15,37 @@ public class OrderRebate extends DTO {
/** /**
* 记录ID * 记录ID
*/ */
@Schema(title = "记录ID", type = "string") @Schema(title = "记录ID", type = "string", requiredMode = Schema.RequiredMode.REQUIRED)
private Long orderRebateId; private Long orderRebateId;
/** /**
* 订单ID * 订单ID
*/ */
@Schema(title = "订单ID", type = "string") @Schema(title = "订单ID", type = "string", requiredMode = Schema.RequiredMode.REQUIRED)
private Long orderId; private Long orderId;
/** /**
* 客户ID * 客户ID
*/ */
@Schema(title = "客户ID", type = "string") @Schema(title = "客户ID", type = "string", requiredMode = Schema.RequiredMode.REQUIRED)
private Long customerId; private Long customerId;
/** /**
* 经销商ID * 经销商ID
*/ */
@Schema(title = "经销商ID", type = "string") @Schema(title = "经销商ID", type = "string", requiredMode = Schema.RequiredMode.REQUIRED)
private Long dealerId; private Long dealerId;
/** /**
* 客户名称 * 客户名称
*/ */
@Schema(title = "客户名称") @Schema(title = "客户名称", requiredMode = Schema.RequiredMode.REQUIRED)
private String name; private String name;
/** /**
* 返点计算方式1_按净重计算2_固定金额 * 返点计算方式1_按净重计算2_固定金额
*/ */
@Schema(title = "返点计算方式1_按净重计算2_固定金额") @Schema(title = "返点计算方式1_按净重计算2_固定金额", requiredMode = Schema.RequiredMode.REQUIRED)
private OrderRebateCalcMethodEnum calcMethod; private OrderRebateCalcMethodEnum calcMethod;
/** /**
@ -63,7 +63,7 @@ public class OrderRebate extends DTO {
/** /**
* 返点金额 * 返点金额
*/ */
@Schema(title = "返点金额") @Schema(title = "返点金额", requiredMode = Schema.RequiredMode.REQUIRED)
private BigDecimal amount; private BigDecimal amount;
/** /**

View File

@ -35,4 +35,10 @@ public class VehicleExtractionVO {
@Schema(title = "经销商信息") @Schema(title = "经销商信息")
private DealerVO dealerVO; private DealerVO dealerVO;
@Schema(title = "是否开启草帘")
private Boolean openStrawCurtain;
@Schema(title = "草帘价格")
private BigDecimal strawCurtainPrice;
} }