From 431dde90aa20f7652092fc0bfa9e6a1a28b06b9f Mon Sep 17 00:00:00 2001
From: jiangqs <343695869@qq.com>
Date: 星期日, 06 八月 2023 12:41:23 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/HongRuiTang

---
 ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/controller/business/MerCouponController.java |   65 +++++++++++++++++++++++++++++++-
 1 files changed, 63 insertions(+), 2 deletions(-)

diff --git a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/controller/business/MerCouponController.java b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/controller/business/MerCouponController.java
index 5099d07..22ef651 100644
--- a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/controller/business/MerCouponController.java
+++ b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/controller/business/MerCouponController.java
@@ -3,12 +3,21 @@
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.security.utils.SecurityUtils;
+import com.ruoyi.member.domain.dto.MerCouponEditDto;
+import com.ruoyi.member.domain.dto.MerCouponPageDto;
+import com.ruoyi.member.domain.dto.MerGoodsCouponListDto;
+import com.ruoyi.member.domain.dto.MgtCouponListDto;
 import com.ruoyi.member.domain.vo.MerCouponGetVo;
 import com.ruoyi.member.domain.vo.MerCouponPageVo;
-import com.ruoyi.member.domain.vo.MgtCouponGetVo;
+import com.ruoyi.member.domain.vo.MetAuditCouponTotalVo;
+import com.ruoyi.member.domain.vo.MgtCouponSimpleListVo;
 import com.ruoyi.member.service.coupon.CouponService;
+import com.ruoyi.member.service.member.MemberCouponService;
+import com.ruoyi.system.api.domain.dto.MerBaseDto;
+import com.ruoyi.system.api.domain.dto.MerBaseGetDto;
 import com.ruoyi.system.api.domain.dto.MerPageDto;
 import com.ruoyi.system.api.domain.dto.MgtBaseGetDto;
+import com.ruoyi.system.api.domain.vo.MerMemberCouponVo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -35,6 +44,10 @@
     @Resource
     private CouponService couponService;
 
+    @Resource
+    private MemberCouponService memberCouponService;
+
+
     @RequestMapping(value = "/pagePlatformMerCoupon", method = RequestMethod.POST)
     @ApiOperation(value = "商户分页获取平台优惠券列表")
     public R<Page<MerCouponPageVo>> pagePlatformMerCoupon(@RequestBody MerPageDto merPageDto) {
@@ -49,7 +62,7 @@
 
     @RequestMapping(value = "/pageShopMerCoupon", method = RequestMethod.POST)
     @ApiOperation(value = "商户分页获取商户优惠券列表")
-    public R<Page<MerCouponPageVo>> pageShopMerCoupon(@RequestBody MerPageDto merPageDto) {
+    public R<Page<MerCouponPageVo>> pageShopMerCoupon(@RequestBody MerCouponPageDto merPageDto) {
         Long userId = SecurityUtils.getUserId();
         merPageDto.setUserId(userId);
         Page<MerCouponPageVo> page = new Page<>();
@@ -67,4 +80,52 @@
         MerCouponGetVo couponGetVo = couponService.getMerCouponVo(mgtBaseGetDto.getId());
         return R.ok(couponGetVo);
     }
+
+    @RequestMapping(value = "/editMerCoupon", method = RequestMethod.POST)
+    @ApiOperation(value = "商户编辑优惠券")
+    public R editMerCoupon(@RequestBody MerCouponEditDto merCouponEditDto) {
+        Long userId = SecurityUtils.getUserId();
+        merCouponEditDto.setUserId(userId);
+        couponService.editMerCoupon(merCouponEditDto);
+        return R.ok();
+    }
+
+    @RequestMapping(value = "/deleteMerCoupon", method = RequestMethod.POST)
+    @ApiOperation(value = "商户删除优惠券")
+    public R deleteMerCoupon(@RequestBody MerBaseGetDto merBaseGetDto) {
+        Long userId = SecurityUtils.getUserId();
+        merBaseGetDto.setUserId(userId);
+        couponService.deleteMerCoupon(merBaseGetDto);
+        return R.ok();
+    }
+
+    @RequestMapping(value = "/listMerCouponSimpleVo", method = RequestMethod.POST)
+    @ApiOperation(value = "获取优惠券选择列表")
+    public R<List<MgtCouponSimpleListVo>> listMgtCouponSimpleVo(@RequestBody MgtCouponListDto mgtCouponListDto) {
+        List<MgtCouponSimpleListVo> mgtCouponSimpleListVoList = couponService.listMgtCouponSimpleVo(mgtCouponListDto);
+        return R.ok(mgtCouponSimpleListVoList);
+    }
+
+    /**
+     * @description: 获取用户优惠券
+     * @author jqs34
+     * @date 2023/5/3 1:45
+     * @version 1.0
+     */
+    @RequestMapping(value = "/listMerShopGoodsMemberCoupon", method = RequestMethod.POST)
+    @ApiOperation(value = "商户获取用户已领取优惠券")
+    public R<List<MerMemberCouponVo>> listMerShopGoodsMemberCoupon(@RequestBody MerGoodsCouponListDto merGoodsCouponListDto){
+        List<MerMemberCouponVo> merMemberCouponVoList = memberCouponService.listMerShopGoodsMemberCoupon(merGoodsCouponListDto);
+        return R.ok(merMemberCouponVoList);
+    }
+
+
+    @RequestMapping(value = "/getMetAuditCouponTotal", method = RequestMethod.POST)
+    @ApiOperation(value = "商户获取优惠券审核统计")
+    public R<MetAuditCouponTotalVo> getMetAuditCouponTotal(@RequestBody MerBaseDto merBaseDto) {
+        Long userId = SecurityUtils.getUserId();
+        merBaseDto.setUserId(userId);
+        MetAuditCouponTotalVo auditCouponTotalVo = couponService.getMetAuditCouponTotal(merBaseDto.getShopId());
+        return R.ok(auditCouponTotalVo);
+    }
 }

--
Gitblit v1.7.1