master:查看返单记录列表返回数据调优;

pull/1121/head
liujiang 2025-10-14 15:40:19 +08:00
parent c5b2c7fd3a
commit d18d39d3a6
5 changed files with 19 additions and 7 deletions

View File

@ -35,8 +35,7 @@ public class StoreSaleRefundRecordController extends XktBaseController {
@ApiOperation(value = "查询档口销售出库返单记录", httpMethod = "POST", response = R.class)
@GetMapping("/list/{storeId}/{storeSaleId}")
public R<List<StoreSaleRefundRecordVO>> selectPage(@PathVariable("storeId") Long storeId, @PathVariable("storeSaleId") Long storeSaleId) {
List<StoreSaleRefundRecordDTO> refundDTOList = this.storeSaleRefundRecordService.selectList(storeId, storeSaleId);
return R.ok(BeanUtil.copyToList(refundDTOList, StoreSaleRefundRecordVO.class));
return R.ok(BeanUtil.copyToList(this.storeSaleRefundRecordService.selectList(storeId, storeSaleId), StoreSaleRefundRecordVO.class));
}
}

View File

@ -30,8 +30,10 @@ public class StoreSaleRefundRecordVO {
private Date createTime;
@ApiModelProperty(value = "支付方式支付宝、微信、现金、欠款ALIPAY WECHAT_PAY CASH DEBT")
private Integer payWay;
@ApiModelProperty(value = "数量")
private Integer quantity;
@ApiModelProperty(value = "销售数量")
private Integer saleQuantity;
@ApiModelProperty(value = "退货数量")
private Integer refundQuantity;
@ApiModelProperty(value = "总金额")
private BigDecimal amount;

View File

@ -71,6 +71,14 @@ public class StoreSaleRefundRecord extends XktBaseEntity {
*/
@Excel(name = "数量")
private Integer quantity;
/**
*
*/
private Integer saleQuantity;
/**
* 退
*/
private Integer refundQuantity;
/**
*
*/

View File

@ -28,8 +28,10 @@ public class StoreSaleRefundRecordDTO {
private Date createTime;
@ApiModelProperty(value = "支付方式支付宝、微信、现金、欠款ALIPAY WECHAT_PAY CASH DEBT")
private Integer payWay;
@ApiModelProperty(value = "数量")
private Integer quantity;
@ApiModelProperty(value = "销售数量")
private Integer saleQuantity;
@ApiModelProperty(value = "退货数量")
private Integer refundQuantity;
@ApiModelProperty(value = "总金额")
private BigDecimal amount;

View File

@ -49,7 +49,8 @@ public class StoreSaleRefundRecordServiceImpl implements IStoreSaleRefundRecordS
throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR);
}
List<StoreSaleRefundRecord> refundRecordList = this.refundRecordMapper.selectList(new LambdaQueryWrapper<StoreSaleRefundRecord>()
.eq(StoreSaleRefundRecord::getStoreId, storeId).eq(StoreSaleRefundRecord::getStoreSaleId, storeSaleId).eq(StoreSaleRefundRecord::getDelFlag, Constants.UNDELETED));
.eq(StoreSaleRefundRecord::getStoreId, storeId).eq(StoreSaleRefundRecord::getStoreSaleId, storeSaleId)
.eq(StoreSaleRefundRecord::getDelFlag, Constants.UNDELETED));
if (CollectionUtils.isEmpty(refundRecordList)) {
return new ArrayList<>();
}