| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | @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<>(); |