| @@ -91,18 +91,19 @@ public class WxCouponOrderController extends BaseController { | |||||
| PageInfo<WxCouponOrderCVo> page = wxCouponOrderService.listCUserVoAsPageOptimize(wxCouponOrder, pageNum, pageSize); | PageInfo<WxCouponOrderCVo> page = wxCouponOrderService.listCUserVoAsPageOptimize(wxCouponOrder, pageNum, pageSize); | ||||
| Date now = new Date(); | Date now = new Date(); | ||||
| page.getList().stream().forEach(co->{ | |||||
| if (co.getValidStartDate() != null && co.getValidEndDate() != null ) { | |||||
| if (co.getValidStartDate().getTime() > now.getTime()) { | |||||
| co.setValidStatus(EnumCouponOrderValidStatus.PREPARED.getCode()); | |||||
| } else if (co.getValidEndDate().getTime() < now.getTime()) { | |||||
| co.setValidStatus(EnumCouponOrderValidStatus.ENDED.getCode()); | |||||
| } else { | |||||
| co.setValidStatus(EnumCouponChannelActivityStatus.STARTED.getCode()); | |||||
| } | |||||
| } | |||||
| }); | |||||
| if (null != page.getList()) { | |||||
| page.getList().stream().forEach(co->{ | |||||
| if (co.getValidStartDate() != null && co.getValidEndDate() != null ) { | |||||
| if (co.getValidStartDate().getTime() > now.getTime()) { | |||||
| co.setValidStatus(EnumCouponOrderValidStatus.PREPARED.getCode()); | |||||
| } else if (co.getValidEndDate().getTime() < now.getTime()) { | |||||
| co.setValidStatus(EnumCouponOrderValidStatus.ENDED.getCode()); | |||||
| } else { | |||||
| co.setValidStatus(EnumCouponChannelActivityStatus.STARTED.getCode()); | |||||
| } | |||||
| } | |||||
| }); | |||||
| } | |||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||