Commit 28a380fa authored by hezhen's avatar hezhen

123

parent 9e9049ca
......@@ -119,9 +119,11 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
log.error("----参数不能为空");
return ObjectRestResponse.createFailedResult(ResultCode.NULL_CODE,"参数不能为空");
}
List<UserCouponVo> list=new ArrayList<>();
if (amout.compareTo(new BigDecimal("0.00"))>0){
Long time=System.currentTimeMillis();
List<UserCouponVo> list=mapper.getUserCouponsByType(userId,type,time,channel);
if(amout.compareTo(new BigDecimal("0.00"))>0&&list.size()>0){
list=mapper.getUserCouponsByType(userId,type,time,channel);
if(list.size()>0){
for (UserCouponVo couponVo:list){
Integer status=2;
if(couponVo.getType()==1){
......@@ -134,9 +136,10 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
couponVo.setStatus(status);
}
list.sort(Comparator.comparing(UserCouponVo::getStatus));
}
}
list.sort(Comparator.comparing(UserCouponVo::getStatus));
return ObjectRestResponse.succ(list);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment