shopId填充
This commit is contained in:
parent
536560322c
commit
7d405f9455
|
|
@ -3,6 +3,7 @@ package com.czg.controller.admin;
|
|||
import com.czg.market.dto.MkShopConsumerCouponDTO;
|
||||
import com.czg.market.service.MkShopConsumerCouponService;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.sa.StpKit;
|
||||
import com.czg.validator.group.DefaultGroup;
|
||||
import com.czg.validator.group.UpdateGroup;
|
||||
import jakarta.annotation.Resource;
|
||||
|
|
@ -29,6 +30,8 @@ public class AConsumerCouponController {
|
|||
*/
|
||||
@GetMapping("/getConsumerCouponPage")
|
||||
public CzgResult<Page<MkShopConsumerCouponDTO>> getConsumerCouponPage(MkShopConsumerCouponDTO param) {
|
||||
Long shopId = StpKit.USER.getShopId(0L);
|
||||
param.setShopId(shopId);
|
||||
return CzgResult.success(mkShopConsumerCouponService.getConsumerCouponPage(param));
|
||||
}
|
||||
|
||||
|
|
@ -45,6 +48,8 @@ public class AConsumerCouponController {
|
|||
*/
|
||||
@PostMapping("/addConsumerCoupon")
|
||||
public CzgResult<Void> addConsumerCoupon(@RequestBody MkShopConsumerCouponDTO param) {
|
||||
Long shopId = StpKit.USER.getShopId(0L);
|
||||
param.setShopId(shopId);
|
||||
mkShopConsumerCouponService.addConsumerCoupon(param);
|
||||
return CzgResult.success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public class MkShopConsumerCouponServiceImpl extends ServiceImpl<MkShopConsumerC
|
|||
private MkCouponGiftService couponGiftService;
|
||||
|
||||
@Override
|
||||
public Page<MkShopConsumerCouponDTO> getConsumerCouponPage(MkShopConsumerCouponDTO param) {
|
||||
public Page<MkShopConsumerCouponDTO> getConsumerCouponPage(MkShopConsumerCouponDTO param) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq(MkShopConsumerCoupon::getShopId, param.getShopId())
|
||||
.orderBy(MkShopConsumerCoupon::getCreateTime).desc();
|
||||
|
|
|
|||
Loading…
Reference in New Issue