fix-优惠券
This commit is contained in:
@@ -628,12 +628,17 @@ public class CouponUserServiceImpl extends ServiceImpl<CouponUserDao, CouponUser
|
|||||||
lqw.eq(CouponUser::getUid, userId);
|
lqw.eq(CouponUser::getUid, userId);
|
||||||
if (type.equals("usable")) {
|
if (type.equals("usable")) {
|
||||||
lqw.eq(CouponUser::getStatus, CouponConstants.STORE_COUPON_USER_STATUS_USABLE);
|
lqw.eq(CouponUser::getStatus, CouponConstants.STORE_COUPON_USER_STATUS_USABLE);
|
||||||
lqw.lt(CouponUser::getMoney, money);
|
if (money.compareTo(new BigDecimal(-1)) > 0) {
|
||||||
|
lqw.lt(CouponUser::getMoney, money);
|
||||||
|
}
|
||||||
lqw.orderByDesc(CouponUser::getId);
|
lqw.orderByDesc(CouponUser::getId);
|
||||||
}
|
}
|
||||||
if (type.equals("unusable") || "used".equals(type)) {
|
if (type.equals("unusable") || "used".equals(type)) {
|
||||||
lqw.and(w -> w.gt(CouponUser::getStatus, CouponConstants.STORE_COUPON_USER_STATUS_USABLE).or().gt(CouponUser::getMoney, money));
|
if (money.compareTo(new BigDecimal(-1)) > 0) {
|
||||||
//lqw.gt(CouponUser::getStatus, CouponConstants.STORE_COUPON_USER_STATUS_USABLE);
|
lqw.and(w -> w.gt(CouponUser::getStatus, CouponConstants.STORE_COUPON_USER_STATUS_USABLE).or().gt(CouponUser::getMoney, money));
|
||||||
|
} else {
|
||||||
|
lqw.gt(CouponUser::getStatus, CouponConstants.STORE_COUPON_USER_STATUS_USABLE);
|
||||||
|
}
|
||||||
lqw.last(StrUtil.format(" order by case `status` when {} then {} when {} then {} when {} then {} end", 0, 1, 1, 2, 2, 3));
|
lqw.last(StrUtil.format(" order by case `status` when {} then {} when {} then {} when {} then {} end", 0, 1, 1, 2, 2, 3));
|
||||||
}
|
}
|
||||||
Page<CouponUser> page = PageHelper.startPage(pageParamRequest.getPage(), pageParamRequest.getLimit());
|
Page<CouponUser> page = PageHelper.startPage(pageParamRequest.getPage(), pageParamRequest.getLimit());
|
||||||
@@ -664,10 +669,11 @@ public class CouponUserServiceImpl extends ServiceImpl<CouponUserDao, CouponUser
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
userCouponResponse.setValidStr(validStr);
|
userCouponResponse.setValidStr(validStr);
|
||||||
if (("used".equals(type) && "unusable".equals(validStr)) || ("unusable".equals(type) && "unusable".equals(validStr)) ||
|
// if (("used".equals(type) && "unusable".equals(validStr)) || ("unusable".equals(type) && "unusable".equals(validStr)) ||
|
||||||
("usable".equals(type))) {
|
// ("usable".equals(type))) {
|
||||||
responseList.add(userCouponResponse);
|
// responseList.add(userCouponResponse);
|
||||||
}
|
// }
|
||||||
|
responseList.add(userCouponResponse);
|
||||||
}
|
}
|
||||||
return CommonPage.copyPageInfo(page, responseList);
|
return CommonPage.copyPageInfo(page, responseList);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -334,8 +334,8 @@ public class ReturnCommissionPlatformInformationJoinUserServiceImpl extends Serv
|
|||||||
// flag = false;
|
// flag = false;
|
||||||
// errorInfo = errorInfo + StrUtil.format("滴友id存在重复{},", vo.getDriverSn());
|
// errorInfo = errorInfo + StrUtil.format("滴友id存在重复{},", vo.getDriverSn());
|
||||||
// }
|
// }
|
||||||
ReturnCommissionPlatformInformation information = mapAll.get(vo.getPlatformName());
|
ReturnCommissionPlatformInformation information = mapAll.get(vo.getPlatformAbbreviation());
|
||||||
if (StrUtil.isBlank(vo.getPlatformName())) {
|
if (StrUtil.isBlank(vo.getPlatformAbbreviation())) {
|
||||||
flag = false;
|
flag = false;
|
||||||
errorInfo = errorInfo + StrUtil.format("excel内司机编号:{},的注册平台为空,", vo.getDriverSn());
|
errorInfo = errorInfo + StrUtil.format("excel内司机编号:{},的注册平台为空,", vo.getDriverSn());
|
||||||
}
|
}
|
||||||
@@ -344,7 +344,7 @@ public class ReturnCommissionPlatformInformationJoinUserServiceImpl extends Serv
|
|||||||
errorInfo = errorInfo + StrUtil.format("excel内司机编号:{},的注册平台不存在,", vo.getDriverSn());
|
errorInfo = errorInfo + StrUtil.format("excel内司机编号:{},的注册平台不存在,", vo.getDriverSn());
|
||||||
} else if (!information.getIsShow()) {
|
} else if (!information.getIsShow()) {
|
||||||
flag = false;
|
flag = false;
|
||||||
errorInfo = errorInfo + StrUtil.format("分佣平台:{}已下架,", information.getName());
|
errorInfo = errorInfo + StrUtil.format("分佣平台:{}已下架,", information.getAbbreviation());
|
||||||
}
|
}
|
||||||
User user = null;
|
User user = null;
|
||||||
if (!vo.getIsJoin()) {
|
if (!vo.getIsJoin()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user