From fd658508f4470f0c479b2a36738b0f50481cbbe9 Mon Sep 17 00:00:00 2001
From: 44323 <443237572@qq.com>
Date: 星期六, 16 九月 2023 10:59:09 +0800
Subject: [PATCH] 后台代码

---
 cloud-server-other/src/main/java/com/dsh/other/controller/StoredValueConfigController.java |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/cloud-server-other/src/main/java/com/dsh/other/controller/StoredValueConfigController.java b/cloud-server-other/src/main/java/com/dsh/other/controller/StoredValueConfigController.java
index b232622..96e644f 100644
--- a/cloud-server-other/src/main/java/com/dsh/other/controller/StoredValueConfigController.java
+++ b/cloud-server-other/src/main/java/com/dsh/other/controller/StoredValueConfigController.java
@@ -1,6 +1,7 @@
 package com.dsh.other.controller;
 
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.dsh.other.entity.StoredValueConfig;
 import com.dsh.other.service.StoredValueConfigService;
 import com.dsh.other.util.ResultUtil;
@@ -10,10 +11,7 @@
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -33,6 +31,19 @@
     @Autowired
     private StoredValueConfigService svconfigService;
 
+    @RequestMapping("/base/storeValueConfig/addStoreValueConfig")
+    public Object addStoreValueConfig(@RequestBody StoredValueConfig storedValueConfig){
+        StoredValueConfig one = svconfigService.getOne(new QueryWrapper<>());
+        one.setContent(storedValueConfig.getContent());
+        one.setDescription(storedValueConfig.getDescription());
+        return svconfigService.updateById(one);
+
+    }
+
+    @RequestMapping("/base/storeValueConfig/getStoreValueConfig")
+    public StoredValueConfig getStoreValueConfig(){
+        return svconfigService.getOne(new QueryWrapper<>());
+    }
     @ResponseBody
     @PostMapping("/base/stored/getRechargeArrange")
     public List<Map<String,Object>> getRechargeConfig(){

--
Gitblit v1.7.1