From ee9cb0da4a43bcf523ebb157678f64a2895fba1a Mon Sep 17 00:00:00 2001 From: nickchange <126672920+nickchange@users.noreply.github.com> Date: 星期二, 10 十月 2023 15:30:38 +0800 Subject: [PATCH] 10.10 --- cloud-server-other/src/main/java/com/dsh/other/controller/StoredValueConfigController.java | 20 +++++++++++++++----- 1 files changed, 15 insertions(+), 5 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 3ac028f..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,8 +31,20 @@ @Autowired private StoredValueConfigService svconfigService; - @ResponseBody + @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(){ List<Map<String,Object>> responses = new ArrayList<>(); -- Gitblit v1.7.1