fix:门店流水分页查询新增字段

This commit is contained in:
wangff
2025-11-25 16:52:59 +08:00
parent e5a3abbdc7
commit c3f00b4a1f
2 changed files with 9 additions and 10 deletions

View File

@@ -1,6 +1,5 @@
package com.cool.store.request.wallet; package com.cool.store.request.wallet;
import com.cool.store.common.PageBasicInfo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@@ -16,10 +15,7 @@ import java.util.Date;
* @since 2025/11/17 * @since 2025/11/17
*/ */
@Data @Data
public class AccountBillQueryRequest extends PageBasicInfo { public class AccountBillQueryRequest extends StoreShopRequest {
@ApiModelProperty("门店id")
@NotNull(message = "门店id不能为空")
private Long shopId;
@ApiModelProperty("交易开始时间,不传查当月") @ApiModelProperty("交易开始时间,不传查当月")
private Date beginDate; private Date beginDate;
@@ -39,4 +35,10 @@ public class AccountBillQueryRequest extends PageBasicInfo {
@ApiModelProperty("费用类型ID") @ApiModelProperty("费用类型ID")
private Long feeItemId; private Long feeItemId;
//页码
private Integer pageNum;
//分页大小
private Integer pageSize;
} }

View File

@@ -338,17 +338,14 @@ public class WalletServiceImpl implements WalletService {
@Override @Override
public AccountBillPageVO getBillPage(AccountBillQueryRequest request) { public AccountBillPageVO getBillPage(AccountBillQueryRequest request) {
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId()); String storeId = getStoreId(request);
if (Objects.isNull(shopInfo)) {
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
}
LocalDate now = LocalDate.now(); LocalDate now = LocalDate.now();
if (Objects.isNull(request.getBeginDate()) || Objects.isNull(request.getEndDate())) { if (Objects.isNull(request.getBeginDate()) || Objects.isNull(request.getEndDate())) {
request.setBeginDate(Date.valueOf(now.withDayOfMonth(1))); request.setBeginDate(Date.valueOf(now.withDayOfMonth(1)));
request.setEndDate(Date.valueOf(now)); request.setEndDate(Date.valueOf(now));
} }
BillPageRequest billPageRequest = BillPageRequest.builder() BillPageRequest billPageRequest = BillPageRequest.builder()
.outStoreId(shopInfo.getStoreId()) .outStoreId(storeId)
.beginDate(DateUtil.format(request.getBeginDate(), "yyyy-MM-dd HH:mm:ss")) .beginDate(DateUtil.format(request.getBeginDate(), "yyyy-MM-dd HH:mm:ss"))
.endDate(DateUtil.format(request.getEndDate(), "yyyy-MM-dd HH:mm:ss")) .endDate(DateUtil.format(request.getEndDate(), "yyyy-MM-dd HH:mm:ss"))
.walletType(request.getWalletType()) .walletType(request.getWalletType())