|
@@ -73,6 +73,7 @@ public class BizCouponRecordServiceImpl extends ServiceImpl<BizCouponRecordMappe
|
|
if (ObjectUtil.isEmpty(loginUserDataScope)) {
|
|
if (ObjectUtil.isEmpty(loginUserDataScope)) {
|
|
queryWrapper.in("brr.user_id", StpLoginUserUtil.getLoginUser().getId());
|
|
queryWrapper.in("brr.user_id", StpLoginUserUtil.getLoginUser().getId());
|
|
}
|
|
}
|
|
|
|
+ queryWrapper.eq("bcr.delete_flag","NOT_DELETE");
|
|
queryWrapper.orderByDesc("bcr.create_time");
|
|
queryWrapper.orderByDesc("bcr.create_time");
|
|
Page<BizCouponRecord> pageList = this.getBaseMapper().getPageList(CommonPageRequest.defaultPage(), queryWrapper);
|
|
Page<BizCouponRecord> pageList = this.getBaseMapper().getPageList(CommonPageRequest.defaultPage(), queryWrapper);
|
|
for(BizCouponRecord bizCouponRecord : pageList.getRecords()){
|
|
for(BizCouponRecord bizCouponRecord : pageList.getRecords()){
|
|
@@ -84,6 +85,35 @@ public class BizCouponRecordServiceImpl extends ServiceImpl<BizCouponRecordMappe
|
|
return pageList;
|
|
return pageList;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public Page<BizCouponRecord> userPage(BizCouponRecordPageParam bizCouponRecordPageParam) {
|
|
|
|
+ QueryWrapper<BizCouponRecord> queryWrapper = new QueryWrapper<BizCouponRecord>().checkSqlInjection();
|
|
|
|
+ if(ObjectUtil.isNotEmpty(bizCouponRecordPageParam.getCouponNo())) {
|
|
|
|
+ queryWrapper.like("bcr.coupon_no", bizCouponRecordPageParam.getCouponNo());
|
|
|
|
+ }
|
|
|
|
+ if(ObjectUtil.isNotEmpty(bizCouponRecordPageParam.getCouponStatus())) {
|
|
|
|
+ queryWrapper.eq("bcr.coupon_status", bizCouponRecordPageParam.getCouponStatus());
|
|
|
|
+ }
|
|
|
|
+ if(ObjectUtil.isNotEmpty(bizCouponRecordPageParam.getBeginTime()) && ObjectUtil.isNotEmpty(bizCouponRecordPageParam.getEndTime())){
|
|
|
|
+ queryWrapper.between("bcr.time",bizCouponRecordPageParam.getBeginTime()+" 00:00:00",bizCouponRecordPageParam.getEndTime()+" 23:59:59");
|
|
|
|
+ }
|
|
|
|
+ if(ObjectUtil.isNotEmpty(bizCouponRecordPageParam.getOrgId())){
|
|
|
|
+ queryWrapper.eq("bcr.org_id",bizCouponRecordPageParam.getOrgId());
|
|
|
|
+ }
|
|
|
|
+ queryWrapper.in("brr.user_id", StpLoginUserUtil.getLoginUser().getId());
|
|
|
|
+ queryWrapper.eq("bcr.delete_flag","NOT_DELETE");
|
|
|
|
+ queryWrapper.orderByDesc("bcr.create_time");
|
|
|
|
+ Page<BizCouponRecord> pageList = this.getBaseMapper().getPageList(CommonPageRequest.defaultPage(), queryWrapper);
|
|
|
|
+ for(BizCouponRecord bizCouponRecord : pageList.getRecords()){
|
|
|
|
+ if(ObjectUtil.isNotEmpty(bizCouponRecord.getPhone())){
|
|
|
|
+ //电话号码解密
|
|
|
|
+ bizCouponRecord.setPhone(CommonCryptogramUtil.doSm4CbcDecrypt(bizCouponRecord.getPhone()));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return pageList;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Override
|
|
@Override
|
|
public void add(BizCouponRecordAddParam bizCouponRecordAddParam) {
|
|
public void add(BizCouponRecordAddParam bizCouponRecordAddParam) {
|
|
@@ -137,6 +167,7 @@ public class BizCouponRecordServiceImpl extends ServiceImpl<BizCouponRecordMappe
|
|
public BizCouponRecord getCouponNoList(BizCouponRecordPageParam bizCouponRecordPageParam) {
|
|
public BizCouponRecord getCouponNoList(BizCouponRecordPageParam bizCouponRecordPageParam) {
|
|
QueryWrapper<BizCouponRecord> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<BizCouponRecord> queryWrapper = new QueryWrapper<>();
|
|
queryWrapper.eq("brr.user_id",bizCouponRecordPageParam.getUserId());
|
|
queryWrapper.eq("brr.user_id",bizCouponRecordPageParam.getUserId());
|
|
|
|
+ queryWrapper.eq("bcr.delete_flag","NOT_DELETE");
|
|
queryWrapper.groupBy("brr.user_id");
|
|
queryWrapper.groupBy("brr.user_id");
|
|
BizCouponRecord couponNoList = this.getBaseMapper().getCouponNoList(queryWrapper);
|
|
BizCouponRecord couponNoList = this.getBaseMapper().getCouponNoList(queryWrapper);
|
|
return couponNoList;
|
|
return couponNoList;
|