refactor(api): 优化数据传输对象和查询逻辑
- 移除PaymentTaskCreateCmd中的paymentTaskSn字段 - 为OrderRebate类的字段添加必填验证注解 - 在VehicleExtractionVO中新增草帘相关字段 - 为BoxProduct查询添加排序逻辑按sort升序和创建时间降序
This commit is contained in:
parent
b06a6a1fdd
commit
a6f3195190
@ -68,6 +68,8 @@ public class BoxBrandGatewayImpl implements BoxBrandGateway {
|
||||
if (CollUtil.isNotEmpty(brandIdList)) {
|
||||
LambdaQueryWrapper<BoxProductDO> queryWrapper1 = Wrappers.lambdaQuery(BoxProductDO.class);
|
||||
queryWrapper1.in(BoxProductDO::getBrandId, brandIdList);
|
||||
queryWrapper1.orderByAsc(BoxProductDO::getSort);
|
||||
queryWrapper1.orderByDesc(BoxProductDO::getCreatedAt);
|
||||
List<BoxProductDO> boxProductDOList = boxProductMapper.selectList(queryWrapper1);
|
||||
|
||||
page.getRecords().forEach(boxBrandDO -> {
|
||||
@ -97,6 +99,7 @@ public class BoxBrandGatewayImpl implements BoxBrandGateway {
|
||||
if (CollUtil.isNotEmpty(brandIdList)) {
|
||||
LambdaQueryWrapper<BoxProductDO> queryWrapper1 = Wrappers.lambdaQuery(BoxProductDO.class);
|
||||
queryWrapper1.in(BoxProductDO::getBrandId, brandIdList);
|
||||
queryWrapper1.orderByAsc(BoxProductDO::getSort);
|
||||
queryWrapper1.orderByDesc(BoxProductDO::getCreatedAt);
|
||||
List<BoxProductDO> boxProductDOList = boxProductMapper.selectList(queryWrapper1);
|
||||
boxBrandDOList.forEach(boxBrandDO -> {
|
||||
|
||||
@ -37,12 +37,6 @@ public class PaymentTaskCreateCmd extends Command {
|
||||
@Schema(title = "任务类型:1-瓜农付款任务", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private PaymentTaskTypeEnum taskType;
|
||||
|
||||
/**
|
||||
* 付款编码
|
||||
*/
|
||||
@Schema(title = "付款编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String paymentTaskSn;
|
||||
|
||||
/**
|
||||
* 付款任务对象ID
|
||||
*/
|
||||
|
||||
@ -15,37 +15,37 @@ public class OrderRebate extends DTO {
|
||||
/**
|
||||
* 记录ID
|
||||
*/
|
||||
@Schema(title = "记录ID", type = "string")
|
||||
@Schema(title = "记录ID", type = "string", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long orderRebateId;
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
@Schema(title = "订单ID", type = "string")
|
||||
@Schema(title = "订单ID", type = "string", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 客户ID
|
||||
*/
|
||||
@Schema(title = "客户ID", type = "string")
|
||||
@Schema(title = "客户ID", type = "string", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long customerId;
|
||||
|
||||
/**
|
||||
* 经销商ID
|
||||
*/
|
||||
@Schema(title = "经销商ID", type = "string")
|
||||
@Schema(title = "经销商ID", type = "string", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long dealerId;
|
||||
|
||||
/**
|
||||
* 客户名称
|
||||
*/
|
||||
@Schema(title = "客户名称")
|
||||
@Schema(title = "客户名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 返点计算方式:1_按净重计算;2_固定金额;
|
||||
*/
|
||||
@Schema(title = "返点计算方式:1_按净重计算;2_固定金额;")
|
||||
@Schema(title = "返点计算方式:1_按净重计算;2_固定金额;", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private OrderRebateCalcMethodEnum calcMethod;
|
||||
|
||||
/**
|
||||
@ -63,7 +63,7 @@ public class OrderRebate extends DTO {
|
||||
/**
|
||||
* 返点金额
|
||||
*/
|
||||
@Schema(title = "返点金额")
|
||||
@Schema(title = "返点金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
|
||||
@ -35,4 +35,10 @@ public class VehicleExtractionVO {
|
||||
|
||||
@Schema(title = "经销商信息")
|
||||
private DealerVO dealerVO;
|
||||
|
||||
@Schema(title = "是否开启草帘")
|
||||
private Boolean openStrawCurtain;
|
||||
|
||||
@Schema(title = "草帘价格")
|
||||
private BigDecimal strawCurtainPrice;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user