| | |
| | | || coupon.getType()==null |
| | | ||coupon.getLimitPrice()==null |
| | | ||coupon.getPrice()==null |
| | | ||coupon.getUseType() ==null |
| | | ||coupon.getNum()==null |
| | | ||(coupon.getUseType() ==0 &&( |
| | | coupon.getStartDate()==null |
| | | ||coupon.getEndDate()==null |
| | | )) |
| | | ||(coupon.getUseType() ==1 &&( |
| | | coupon.getValidDays()==null |
| | | || coupon.getValidDays()<=0 |
| | | )) |
| | | /* ||coupon.getIntegral()==null*/ |
| | | ||coupon.getStartDate()==null |
| | | ||coupon.getEndDate()==null |
| | | // ||coupon.getStartDate()==null |
| | | // ||coupon.getEndDate()==null |
| | | // ||coupon.getValidDays()==null |
| | | |
| | | ){ |
| | |
| | | Utils.MP.blankToNull(pageWrap ); |
| | | queryWrapper.selectAll(Coupon.class); |
| | | queryWrapper.like(StringUtils.isNotBlank(pageWrap. getName()),Coupon::getName,pageWrap.getName()); |
| | | queryWrapper.eq(pageWrap.getStatus()!=null,Coupon::getStatus,pageWrap.getStatus()); |
| | | queryWrapper.eq(Coupon::getIsdeleted,Constants.ZERO); |
| | | queryWrapper.orderByDesc(Coupon::getCreateDate); |
| | | queryWrapper.orderByDesc(Coupon::getId); |
| | | List<Coupon> result = couponJoinMapper.selectList( queryWrapper); |
| | | for(Coupon model:result){ |
| | | initCouponStatus(model); |
| | |
| | | MPJLambdaWrapper<Coupon> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | queryWrapper.selectAll(Coupon.class); |
| | | queryWrapper.select("(select count(id) from member_coupon where ISDELETED=0 and COUPON_ID=t.id) as received"); |
| | | queryWrapper.select("(select count(id) from member_coupon where ISDELETED=0 and COUPON_ID=t.id and STATUS=0) as unused"); |
| | | queryWrapper.select("(select count(id) from member_coupon where ISDELETED=0 and COUPON_ID=t.id and STATUS=1) as used"); |
| | | //已发放数量(不包含定向发放) |
| | | queryWrapper.select("(select count(id) from member_coupon where ISDELETED=0 and COUPON_ID=t.id and GET_METHOD !=2) as received"); |
| | | // queryWrapper.select("(select count(id) from member_coupon where ISDELETED=0 and COUPON_ID=t.id and STATUS=0) as unused"); |
| | | // queryWrapper.select("(select count(id) from member_coupon where ISDELETED=0 and COUPON_ID=t.id and STATUS=1) as used"); |
| | | |
| | | queryWrapper.like(StringUtils.isNotBlank(pageWrap.getModel().getName()),Coupon::getName,pageWrap.getModel().getName()); |
| | | queryWrapper.eq(pageWrap.getModel().getCouponType()!=null,Coupon::getCouponType,pageWrap.getModel().getCouponType()); |