分页值

This commit is contained in:
wangw 2025-10-15 15:48:38 +08:00
parent 7d28f42fba
commit 95f3e11250
3 changed files with 21 additions and 8 deletions

View File

@ -10,6 +10,7 @@ import com.czg.enums.ShopUserFlowBizEnum;
import com.czg.market.entity.SmsPushEventUser;
import com.czg.resp.CzgResult;
import com.czg.sa.StpKit;
import com.czg.utils.AssertUtil;
import com.mybatisflex.core.paginate.Page;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletResponse;
@ -165,7 +166,7 @@ public class ShopUserController {
*/
@PostMapping("/getPushEventUser")
public CzgResult<Page<ShopUser>> getPushEventUser(@RequestBody @Validated SmsPushEventUser smsPushEventUser) {
smsPushEventUser.setShopId(StpKit.USER.getShopId());
AssertUtil.isNull(smsPushEventUser.getShopId(), "店铺id不能为空");
return CzgResult.success(shopUserService.getPushEventUser(smsPushEventUser));
}

View File

@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.time.LocalDateTime;
@ -48,7 +49,7 @@ public class SmsPushEventUser implements Serializable {
private Integer sexWoman;
private Integer sexUnknown;
/**
/**
* 是否会员 0否 1是 null全查
*/
private Integer isVip;
@ -62,11 +63,11 @@ public class SmsPushEventUser implements Serializable {
* 下单时间 从未下单 1查询 其余不查
*/
private Integer noOrder;
/**
/**
* 下单时间 下过一单 1查询 其余不查
*/
private Integer oneOrder;
/**
/**
* 下单时间 下过五单及以上 1查询 其余不查
*/
private Integer fiveOrder;
@ -76,15 +77,15 @@ public class SmsPushEventUser implements Serializable {
* 下单时间 今天 1查询 其余不查
*/
private Integer orderTimeToday;
/**
/**
* 下单时间 昨天 1查询 其余不查
*/
private Integer orderTimeYesterday;
/**
/**
* 下单时间 两周内 1查询 其余不查
*/
private Integer orderTimeTwoWeeks;
/**
/**
* 下单时间 两周前 1查询 其余不查
*/
private Integer orderTimeMoreThanTwoWeeks;
@ -102,5 +103,16 @@ public class SmsPushEventUser implements Serializable {
@Column(onInsertValue = "now()")
private LocalDateTime createTime;
@Column(ignore = true)
private Integer page;
@Column(ignore = true)
private Integer size;
public Integer getPage() {
return page == null ? 1 : page;
}
public Integer getSize() {
return size == null ? 10 : size;
}
}

View File

@ -95,7 +95,7 @@ public class AShopUserServiceImpl implements AShopUserService {
@Override
public Page<ShopUser> getPushEventUser(SmsPushEventUser smsPushEventUser) {
PageHelper.startPage(PageUtil.buildPage());
PageHelper.startPage(new Page<>(smsPushEventUser.getPage(), smsPushEventUser.getSize()));
Long mainShopId = shopInfoService.getMainIdByShopId(smsPushEventUser.getShopId());
// 调用Mapper层查询
return shopUserMapper.selectPushEventUser(