admin
2019-05-05 81082e03207761edff6b317df8268dc3f968c20a
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
package com.yeshi.fanli.controller;
 
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
 
import javax.annotation.Resource;
 
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
 
import com.yeshi.fanli.service.inter.config.ConfigService;
import com.yeshi.fanli.util.Constant;
import org.yeshi.utils.JsonUtil;
 
@Controller
@RequestMapping("client/html/api/v1/config")
public class ConfigController {
 
    @Resource
    private ConfigService configService;
 
    @RequestMapping(value = "getConfigList", method = RequestMethod.POST)
    public void getConfigList(String[] keys, PrintWriter out) {
        List<String> configList = new ArrayList<String>();
        for (String key : keys) {
            String value = configService.get(key);
            configList.add(value);
        }
        out.print(JsonUtil.loadTrueResult(configList));
    }
 
    @RequestMapping(value = "getSystemName")
    public void getSystemName(String[] keys, PrintWriter out) {
        out.print(JsonUtil.loadTrueResult(Constant.systemCommonConfig.getProjectChineseName() + "后台管理系统"));
    }
 
}