刘帅
2026-09-30 a9a6d242b50a7c51ed04d612d9950608919bf2be
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package com.dsh.guns.modular.system.controller.code;
 
 
 
import com.dsh.course.feignClient.account.model.CityManager;
import com.dsh.course.feignClient.account.model.TStoreStaff;
import com.dsh.course.feignClient.activity.model.QueryBodySideAppointmentVO;
import com.dsh.course.feignClient.other.StoreValueConfigClient;
import com.dsh.guns.config.UserExt;
import com.dsh.guns.modular.system.model.Store;
import com.dsh.guns.modular.system.model.StoredValueConfig;
import com.dsh.guns.modular.system.util.ResultUtil;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
 
/**
 * 储值规则配置控制器
 */
 
@Controller
@RequestMapping("/storeValueConfig")
public class TStoredValueConfigController {
    private String PREFIX = "/system/storeValueConfig/";
    @Autowired
    private StoreValueConfigClient storeValueConfigClient;
    /*
     * 储值管理功能已下线,保留原实现以便后续恢复。
     *
     * @RequestMapping("")
     * public String index(Model model) {
     *     StoredValueConfig storeValueConfig = storeValueConfigClient.getStoreValueConfig();
     *     model.addAttribute("description", storeValueConfig.getDescription());
     *     JSONObject jsonObject = new JSONObject(storeValueConfig.getContent());
     *     JSONArray timeRulesArray = jsonObject.getJSONArray("time_rules");
     *     model.addAttribute("content", jsonObject.toString());
     *     if (timeRulesArray.length() > 0) {
     *         JSONObject timeRule = timeRulesArray.getJSONObject(0);
     *         model.addAttribute("time", timeRule.getString("startTime") + " - " + timeRule.getString("endTime"));
     *     } else {
     *         model.addAttribute("time", "");
     *     }
     *     return PREFIX + "StoreValueConfig.html";
     * }
     *
     * @ResponseBody
     * @RequestMapping(value = "/addStoreValueConfig")
     * public ResultUtil addStoreValueConfig(@RequestBody StoredValueConfig storedValueConfig) {
     *     storeValueConfigClient.addStoreValueConfig(storedValueConfig);
     *     return ResultUtil.success();
     * }
     */
 
    /** 储值管理功能已下线,避免通过历史菜单或直接 URL 继续访问。 */
    @ResponseBody
    @RequestMapping({"", "/addStoreValueConfig"})
    public ResultUtil storeValueConfigUnavailable() {
        return ResultUtil.error("储值管理功能暂不提供");
    }
}