| | |
| | | QueryWrapper<PointsMerchandise> wrapper = new QueryWrapper<PointsMerchandise>() |
| | | .eq("state", 1) |
| | | .eq("shelves", 1) |
| | | .gt("endTime", new Date()); |
| | | .gt("endTime", new Date()) |
| | | .eq("status", 1); |
| | | if(cIds.size() > 0){ |
| | | wrapper.in("id", cIds); |
| | | } |
| | |
| | | integralCommodity.setCommodityId(merchandise.getId()); |
| | | integralCommodity.setCommodityImg(merchandise.getCover()); |
| | | integralCommodity.setCommodityName(merchandise.getName()); |
| | | if(merchandise.getRedemptionMethod() == 1){ |
| | | integralCommodity.setIntegral(merchandise.getIntegral()); |
| | | } |
| | | if(merchandise.getRedemptionMethod() == 2){ |
| | | integralCommodity.setCommodityPrice(merchandise.getPrice()); |
| | | integralCommodity.setIntegral(merchandise.getIntegral()); |
| | | } |
| | | if(merchandise.getRedemptionMethod() == 3){ |
| | | integralCommodity.setCommodityPrice(merchandise.getPrice()); |
| | | } |
| | | integralCommodity.setRedemptionMethod(merchandise.getRedemptionMethod()); |
| | | integralCommodity.setGoodsType(merchandise.getType()); |
| | | integralCommodity.setSort(merchandise.getSort()); |
| | | commodity.add(integralCommodity); |
| | |
| | | storeCoupons.add(couponStore.getCouponId()); |
| | | } |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | QueryWrapper<Coupon> queryWrapper = new QueryWrapper<Coupon>().eq("state", 1).gt("endTime", sdf.format(new Date())); |
| | | QueryWrapper<Coupon> queryWrapper = new QueryWrapper<Coupon>() |
| | | .eq("state", 1).gt("endTime", sdf.format(new Date())); |
| | | if(storeCoupons.size() > 0){ |
| | | queryWrapper.in("id", storeCoupons); |
| | | } |
| | |
| | | integralCommodity.setCommodityId(coupon.getId()); |
| | | integralCommodity.setCommodityImg(coupon.getCover()); |
| | | integralCommodity.setCommodityName(coupon.getName()); |
| | | integralCommodity.setCommodityPrice(coupon.getIntegral()); |
| | | integralCommodity.setGoodsType(coupon.getType()); |
| | | // integralCommodity.setSort(coupon.getSort()); |
| | | if(coupon.getRedemptionMethod() == 1){ |
| | | integralCommodity.setIntegral(coupon.getIntegral().intValue()); |
| | | } |
| | | if(coupon.getRedemptionMethod() == 2){ |
| | | integralCommodity.setCommodityPrice(coupon.getCash()); |
| | | integralCommodity.setIntegral(coupon.getIntegral().intValue()); |
| | | } |
| | | integralCommodity.setRedemptionMethod(coupon.getRedemptionMethod()); |
| | | integralCommodity.setGoodsType(4); |
| | | commodity.add(integralCommodity); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | System.out.println(commodity); |
| | | return commodity; |
| | | } |
| | | |
| | |
| | | |
| | | list = pmdsService.list(new QueryWrapper<PointsMerchandise>() |
| | | .eq("state", 1) |
| | | .eq("shelves", 1).le("startTime", new Date()).ge("endTime", new Date())); |
| | | .eq("shelves", 1) |
| | | .le("startTime", new Date()) |
| | | .ge("endTime", new Date()) |
| | | .eq("status", 1) |
| | | ); |
| | | if (list.size() > 0) { |
| | | Iterator<PointsMerchandise> iterator = list.iterator(); |
| | | while (iterator.hasNext()) { |