From b679205246bbe94e1e83db6f8e26d04668afd402 Mon Sep 17 00:00:00 2001
From: 44323 <443237572@qq.com>
Date: 星期四, 06 六月 2024 11:29:01 +0800
Subject: [PATCH] 短信 obs 支付宝支付

---
 ruoyi-service/ruoyi-management/src/main/java/com/ruoyi/management/controller/TUserController.java |   43 +++++++++++++++++++++++++++----------------
 1 files changed, 27 insertions(+), 16 deletions(-)

diff --git a/ruoyi-service/ruoyi-management/src/main/java/com/ruoyi/management/controller/TUserController.java b/ruoyi-service/ruoyi-management/src/main/java/com/ruoyi/management/controller/TUserController.java
index d63cb2f..4af7cff 100644
--- a/ruoyi-service/ruoyi-management/src/main/java/com/ruoyi/management/controller/TUserController.java
+++ b/ruoyi-service/ruoyi-management/src/main/java/com/ruoyi/management/controller/TUserController.java
@@ -18,11 +18,10 @@
 import com.ruoyi.study.api.vo.VipOrderVO;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
 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.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
 
 import java.util.List;
 
@@ -34,7 +33,7 @@
  * @author 无关风月
  * @since 2024-04-26
  */
-@Controller
+@RestController
 @RequestMapping("/tUser")
 public class TUserController {
     @Autowired
@@ -44,7 +43,7 @@
 
     @Autowired
     private StudyClient studyClient;
-    @ResponseBody
+
     @PostMapping("/userList")
     @ApiOperation(value = "用户列表", tags = {"用户管理"})
     public AjaxResult<PageInfo<AppUserVO>> couponReceive(AppUserQuery query) {
@@ -63,12 +62,11 @@
 ////        }
 ////        res.setRecords(list);
 ////        res.setTotal(list.size());
-        R<PageInfo<AppUserVO>> pageInfoR = studyClient.couponReceive(query);
+        PageInfo<AppUserVO> data = studyClient.couponReceive(query).getData();
 
-        return AjaxResult.success(pageInfoR);
+        return AjaxResult.success(data);
     }
 
-    @ResponseBody
     @PostMapping("/getUserInfo")
     @ApiOperation(value = "查看用户详情", tags = {"用户管理"})
     public AjaxResult<UserInfoVO> getUserInfo(UserInfoQuery dto) {
@@ -116,7 +114,7 @@
 
         return AjaxResult.success(data);
     }
-    @ResponseBody
+
     @PostMapping("/freeze")
     @ApiOperation(value = "冻结/解冻", tags = {"用户管理"})
     public AjaxResult freeze(Integer id) {
@@ -124,39 +122,52 @@
         if (byId.getState() == 1) {
             studyClient.freeze(id);
             return AjaxResult.success("冻结成功");
-        }else {
+        } else {
             studyClient.freeze(id);
             return AjaxResult.success("解冻成功");
         }
     }
-    @ResponseBody
+
     @PostMapping("/getVipSet")
     @ApiOperation(value = "获取会员设置", tags = {"用户管理"})
     public AjaxResult<List<TVipSet>> getVipSet() {
         List<TVipSet> list = vipSetService.list(new QueryWrapper<TVipSet>().orderByAsc("amount"));
         return AjaxResult.success(list);
     }
-    @ResponseBody
+
+    @PostMapping("/getVipSet1")
+    @ApiOperation(value = "获取会员设置", tags = {"家长端"})
+    public R<List<TVipSet>> getVipSet1() {
+        List<TVipSet> list = vipSetService.list(new QueryWrapper<TVipSet>()
+                .orderByAsc("time"));
+        return R.ok(list);
+    }
+
     @PostMapping("/setVipSet")
-    @ApiOperation(value = "获取会员设置", tags = {"用户管理"})
+    @ApiOperation(value = "保存会员设置", tags = {"用户管理"})
     public AjaxResult setVipSet(@RequestBody VipSetVO vo) {
-        String info = vo.getInfo();
         List<TVipSet> list = vo.getList();
         // 删除原有数据 重新保存
         vipSetService.remove(new QueryWrapper<TVipSet>());
         for (TVipSet tVipSet : list) {
-            tVipSet.setInfo(info);
             vipSetService.save(tVipSet);
         }
         return AjaxResult.success("保存成功");
     }
-    @ResponseBody
+
     @PostMapping("/vipOrderList")
     @ApiOperation(value = "列表查询", tags = {"会员管理"})
     public AjaxResult<PageInfo<VipOrderVO>> vipOrderList(AppUserQuery query) {
-
         PageInfo<VipOrderVO> data = studyClient.vipOrderList(query).getData();
         return AjaxResult.success(data);
     }
+
+    @PostMapping("/vipBack")
+    @ApiOperation(value = "会员退款", tags = {"会员管理"})
+    public AjaxResult vipOrderList(Integer id) {
+        studyClient.vipBack(id);
+        return AjaxResult.success();
+    }
+
 }
 

--
Gitblit v1.7.1