|
@@ -93,13 +93,14 @@ public class CouponMgrController extends BaseApiController {
|
|
|
*/
|
|
|
@PostMapping("/list")
|
|
|
@PreAuthorize("@ss.hasPermi('business:coupon:list')")
|
|
|
- public TableDataInfo listCoupon(@RequestBody Coupon coupon) {
|
|
|
+ public TableDataInfo listCoupon(@RequestBody CouponParam coupon) {
|
|
|
List<Coupon> list = new ArrayList<Coupon>();
|
|
|
startPage();
|
|
|
QueryWrapper<Coupon> queryWrapper = new QueryWrapper<Coupon>();
|
|
|
queryWrapper.lambda().like(null != coupon && StringUtils.isNotBlank(coupon.getTitle()), Coupon::getTitle, coupon.getTitle());
|
|
|
queryWrapper.lambda().eq(null != coupon && null != coupon.getStatus(), Coupon::getStatus, coupon.getStatus());
|
|
|
queryWrapper.lambda().eq(null != coupon && null != coupon.getType(), Coupon::getType, coupon.getType());
|
|
|
+ queryWrapper.lambda().notIn(null != coupon && null != coupon.getExcludeCouponIds(), Coupon::getCouponId, coupon.getExcludeCouponIds());
|
|
|
queryWrapper.lambda().eq(Coupon::getIsDeleted, 0);
|
|
|
queryWrapper.orderByAsc("FIELD(`status`, 'init', 'on', 'off')");
|
|
|
queryWrapper.lambda().orderByDesc(Coupon::getCouponId);
|