feat: 优惠券领取列表

This commit is contained in:
dzc committed 2026-02-04 10:39:51 +08:00
1 parent f29cc83be7
commit 768267fd21
5 files changed
+22 -5

No files matched your search

@@ -16,7 +16,8 @@ public enum ActUserReceiveEnum {
ACT_EXPIRED("1", "活动不在进行中"),
ACT_NOT_EXIST("2", "活动不存在"),
ACT_NOT_STARTED("3", "活动未开启"),
USER_LIMIT_REACHED("4", "用户参加活动已达上限"),
// 用户参加活动已达上限
USER_LIMIT_REACHED("4", "已领取,核销码在我的礼券中"),
USER_CANNOT_PARTICIPATE("5", "用户不能参加此活动"),
OTHER_ERROR("6", "其他错误"),
USER_CAN_JOIN_ACT("99", "用户可以参加活动"),
@@ -61,7 +61,11 @@ public class ActCancelItemController {
PjcloudUser user = SecurityUtils.getUser();
ActCancelItemDto dto = new ActCancelItemDto();
dto.setReceiverUserId(user.getId());
dto.setActStatusList(List.of(ActCancelStatusEnum.CANCEL_AWAIT.getCode()));
dto.setActStatusList(List.of(
ActCancelStatusEnum.CANCEL_AWAIT.getCode(),
ActCancelStatusEnum.CANCEL_SUCCESS.getCode(),
ActCancelStatusEnum.CANCEL_EXPIRE.getCode()
));
dto.setIsFindNoExpire(true);
return R.ok(actCancelItemService.pageList(page, dto));
}
@@ -61,7 +61,11 @@ public class ActCouponRecordController {
PjcloudUser user = SecurityUtils.getUser();
ActCouponRecordDto dto = new ActCouponRecordDto();
dto.setUserId(user.getId());
dto.setStatusCodeList(List.of(ActCouponRecordStatusEnum.UNUSED.getCode()));
dto.setStatusCodeList(List.of(
ActCouponRecordStatusEnum.UNUSED.getCode(),
ActCouponRecordStatusEnum.USED.getCode(),
ActCouponRecordStatusEnum.EXPIRED.getCode()
));
dto.setIsFindNoExpire(true);
return R.ok(actCouponRecordService.pageList(page, dto));
}
@@ -368,7 +368,11 @@ public class ActCancelItemServiceImpl extends ServiceImpl<ActCancelItemMapper, A
*/
@Override
public Long userTotal(Long userId) {
return baseMapper.userTotal(userId, List.of(ActCancelStatusEnum.CANCEL_AWAIT.getCode()));
return baseMapper.userTotal(userId, List.of(
ActCancelStatusEnum.CANCEL_AWAIT.getCode(),
ActCancelStatusEnum.CANCEL_SUCCESS.getCode(),
ActCancelStatusEnum.CANCEL_EXPIRE.getCode()
));
}
// 判断用户是否已领取
@@ -266,7 +266,11 @@ public class ActCouponRecordServiceImpl extends ServiceImpl<ActCouponRecordMappe
*/
@Override
public Long userTotal(Long userId) {
return baseMapper.userTotal(userId, List.of(ActCouponRecordStatusEnum.UNUSED.getCode()));
return baseMapper.userTotal(userId, List.of(
ActCouponRecordStatusEnum.UNUSED.getCode(),
ActCouponRecordStatusEnum.USED.getCode(),
ActCouponRecordStatusEnum.EXPIRED.getCode()
));
}
private void disposePageList(List<ActCouponRecordVo> list) {