From 529ad9dd8d1876b57e852bc45b602ba3ccc8df2a Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Wed, 10 Apr 2024 17:19:08 +0800
Subject: [PATCH] 公告-首页公告调整

---
 src/main/java/cc/mrbird/febs/mall/controller/AdminMallMemberController.java |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/src/main/java/cc/mrbird/febs/mall/controller/AdminMallMemberController.java b/src/main/java/cc/mrbird/febs/mall/controller/AdminMallMemberController.java
index 08eda2d..86be4d2 100644
--- a/src/main/java/cc/mrbird/febs/mall/controller/AdminMallMemberController.java
+++ b/src/main/java/cc/mrbird/febs/mall/controller/AdminMallMemberController.java
@@ -9,6 +9,9 @@
 import cc.mrbird.febs.mall.service.IAdminMallMemberService;
 import cc.mrbird.febs.mall.service.IApiMallMemberService;
 import cc.mrbird.febs.mall.vo.*;
+import cc.mrbird.febs.vip.entity.MallVipBenefitsRecord;
+import cc.mrbird.febs.vip.mapper.MallVipBenefitsRecordMapper;
+import cc.mrbird.febs.vip.service.IMallVipBenefitsService;
 import cn.hutool.core.date.DateTime;
 import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.StrUtil;
@@ -33,6 +36,8 @@
 
     private final IAdminMallMemberService mallMemberService;
     private final IApiMallMemberService apiMallMemberService;
+    private final IMallVipBenefitsService mallVipBenefitsService;
+    private final MallVipBenefitsRecordMapper mallVipBenefitsRecordMapper;
 
     /**
      * 平台账单
@@ -614,4 +619,25 @@
         return new FebsResponse().success().message("操作成功");
     }
 
+    @PostMapping("addMemberCoupon")
+    @ControllerEndpoint(operation = "会员添加优惠券呢", exceptionMessage = "操作失败")
+    public FebsResponse addMemberCoupon(@Valid MallMember mallmember) {
+        return mallMemberService.addMemberCoupon(mallmember);
+    }
+
+    @GetMapping(value = "/findMemberBenefitsInPage")
+    public FebsResponse findMemberBenefitsInPage(MallVipBenefitsRecord record, QueryRequest request) {
+        Map<String, Object> data = getDataTable(mallVipBenefitsService.findVipBenefitsInPage(record, request));
+        return new FebsResponse().success().data(data);
+    }
+
+    @PostMapping(value = "/sendGift/{id}")
+    public FebsResponse sendGift(@PathVariable("id") Long id) {
+        MallVipBenefitsRecord record = new MallVipBenefitsRecord();
+        record.setId(id);
+        record.setStatus(1);
+        mallVipBenefitsRecordMapper.updateById(record);
+
+        return new FebsResponse().success();
+    }
 }

--
Gitblit v1.9.1