发放优惠券
This commit is contained in:
@@ -2,7 +2,6 @@ package com.czg.controller.admin;
|
||||
|
||||
import com.czg.annotation.SaAdminCheckPermission;
|
||||
import com.czg.market.dto.ChatCouponDTO;
|
||||
import com.czg.market.dto.ChatCouponGrantDTO;
|
||||
import com.czg.market.entity.ChatCoupon;
|
||||
import com.czg.market.entity.MkShopCouponRecord;
|
||||
import com.czg.market.service.ChatCouponService;
|
||||
@@ -61,15 +60,6 @@ public class AChatCouponController {
|
||||
chatCouponService.expiredChatCoupon(shopId, id);
|
||||
return CzgResult.success();
|
||||
}
|
||||
/**
|
||||
* 群聊优惠券活动-发放优惠券
|
||||
*/
|
||||
@PostMapping("/grant")
|
||||
@SaAdminCheckPermission(value = "chat:coupon:grant", name = "群聊优惠券活动-发放优惠券")
|
||||
public CzgResult<Void> grantChatCoupon(@RequestBody ChatCouponGrantDTO chatCouponGrant) {
|
||||
chatCouponService.grantChatCoupon(chatCouponGrant.getId(), chatCouponGrant.getShopUserId(), chatCouponGrant.getUserId());
|
||||
return CzgResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 群聊优惠券活动-发放记录
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.czg.controller.user;
|
||||
|
||||
import com.czg.market.dto.ChatCouponGrantDTO;
|
||||
import com.czg.market.service.ChatCouponService;
|
||||
import com.czg.resp.CzgResult;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author ww
|
||||
* @description
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/user/chat/coupon")
|
||||
public class UChatCouponController {
|
||||
@Resource
|
||||
private ChatCouponService chatCouponService;
|
||||
|
||||
/**
|
||||
* 群聊优惠券活动-发放优惠券
|
||||
*/
|
||||
@PostMapping("/grant")
|
||||
public CzgResult<Void> grantChatCoupon(@RequestBody ChatCouponGrantDTO chatCouponGrant) {
|
||||
chatCouponService.grantChatCoupon(chatCouponGrant.getId(), chatCouponGrant.getShopUserId(), chatCouponGrant.getUserId());
|
||||
return CzgResult.success();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user