优惠券同步 下架问题
This commit is contained in:
@@ -45,6 +45,7 @@ public class MkPointsGoodsRecordServiceImpl extends ServiceImpl<MkPointsGoodsRec
|
||||
.eq(MkPointsGoodsRecord::getIsDel, 0)
|
||||
.like(MkPointsGoodsRecord::getPointsGoodsName, param.getPointsGoodsName())
|
||||
.like(MkPointsGoodsRecord::getGoodsCategory, param.getGoodsCategory())
|
||||
.orderBy(MkPointsGoodsRecord::getCreateTime, false)
|
||||
, MkPointsGoodsRecordDTO.class);
|
||||
pages.getRecords().forEach(data -> {
|
||||
data.fillCouponInfo();
|
||||
|
||||
@@ -100,11 +100,9 @@ public class MkPointsGoodsServiceImpl extends ServiceImpl<MkPointsGoodsMapper, M
|
||||
} else {
|
||||
queryWrapper.eq(MkPointsGoodsRecord::getStatus, status);
|
||||
queryWrapper.orderBy(MkPointsGoodsRecord::getStatus, false);
|
||||
queryWrapper.orderBy(MkPointsGoodsRecord::getCreateTime, false);
|
||||
}
|
||||
} else {
|
||||
queryWrapper.orderBy(MkPointsGoodsRecord::getCreateTime, false);
|
||||
}
|
||||
queryWrapper.orderBy(MkPointsGoodsRecord::getCreateTime, false);
|
||||
Page<MkPointsGoodsRecord> pages = goodsRecordService.page(Page.of(page, size), queryWrapper);
|
||||
pages.getRecords().forEach(MkPointsGoodsRecord::fillCouponInfo);
|
||||
return pages;
|
||||
@@ -159,4 +157,11 @@ public class MkPointsGoodsServiceImpl extends ServiceImpl<MkPointsGoodsMapper, M
|
||||
return updateById(goodUp);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateGoodsCouponStatus(Long couponId) {
|
||||
MkPointsGoods upMkPointsGoods = new MkPointsGoods();
|
||||
upMkPointsGoods.setStatus(0);
|
||||
update(upMkPointsGoods, query().eq(MkPointsGoods::getCouponId, couponId));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user