| | |
| | | query.getCouponType()) |
| | | .eq(StringUtils.isNotNull(query.getDistributionMethod()), |
| | | Coupon::getDistributionMethod, query.getDistributionMethod()) |
| | | .orderByDesc(Coupon::getCreateTime) |
| | | .page(new Page<>(query.getPageCurr(), query.getPageSize())); |
| | | if (StringUtils.isEmpty(page.getRecords())) { |
| | | return PageDTO.empty(page); |
| | |
| | | this.updateById(coupon); |
| | | } |
| | | |
| | | /** |
| | | * 上架/下架 |
| | | * |
| | | * @param dto 管理后台-优惠券上架下架数据传输对象 |
| | | */ |
| | | @Override |
| | | public void updStatus(MgtCouponUpdDTO dto) { |
| | | this.lambdaUpdate() |
| | | .set(Coupon::getCouponStatus, dto.getCouponStatus()) |
| | | .eq(Coupon::getId, dto.getId()); |
| | | .eq(Coupon::getId, dto.getId()).update(); |
| | | } |
| | | |
| | | /** |