| | |
| | | @ResponseBody |
| | | @RequestMapping("list") |
| | | public String list(SystemConfigQuery query, int page, int limit, String callback) { |
| | | List<SystemConfig> list = systemConfigService.listByType(SystemConfigType.common); |
| | | List<SystemConfig> list = systemConfigService.listByType(query.getType() == null ? SystemConfigType.common : query.getType()); |
| | | long count = list.size(); |
| | | JSONObject data = new JSONObject(); |
| | | Gson gson = new GsonBuilder().registerTypeAdapter(Date.class, new JsonSerializer<Date>() { |
| | |
| | | |
| | | @ResponseBody |
| | | @RequestMapping("getKeyList") |
| | | public String getKeyList() { |
| | | public String getKeyList(SystemConfigType type) { |
| | | JSONArray array = new JSONArray(); |
| | | for (SystemConfigKey key : SystemConfigKey.values()) { |
| | | if (key.getType() == SystemConfigType.common) { |
| | | if (key.getType() == (type == null ? SystemConfigType.common : type)) { |
| | | JSONObject data = new JSONObject(); |
| | | data.put("key", key.name()); |
| | | data.put("value", key.getDesc()); |