| | |
| | | |
| | | @Resource |
| | | private UserSettingService userSettingService; |
| | | |
| | | @ResponseBody |
| | | @RequestMapping("getUserSubmitKeyCountSetting") |
| | | public String getUserSubmitKeyCountSetting() { |
| | |
| | | @ResponseBody |
| | | @RequestMapping("setUserSubmitKeyCount") |
| | | public String setUserSubmitKeyCount(String value) { |
| | | List<UserSubmitKeyLimitDto> list = new Gson().fromJson(value, new TypeToken<List<UserSubmitKeyLimitDto>>() { |
| | | List<UserSubmitKeyLimitDto> list = new Gson().fromJson(value, new TypeToken<List<UserSubmitKeyLimitDto>>() { |
| | | }.getType()); |
| | | userSettingService.setUserSubmitKeyCount(list); |
| | | return JsonUtil.loadTrueResult(new Gson().toJson(list)); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @RequestMapping("getTimeoutPayDevices") |
| | | public String getTimeoutPayDevices() { |
| | | String value = systemConfigService.getValue(SystemConfigKeyEnum.RE_EXCUTE_PAY_CLIENTS); |
| | | JSONObject data = new JSONObject(); |
| | | data.put("timeout_devices", value); |
| | | return JsonUtil.loadTrueResult(data); |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @RequestMapping("setTimeoutPayDevices") |
| | | public String setTimeoutPayDevices(String timeout_devices) { |
| | | timeout_devices = timeout_devices.trim(); |
| | | List<Long> idList = new ArrayList<>(); |
| | | String[] sts = timeout_devices.split(","); |
| | | for (String st : sts) { |
| | | st = st.trim(); |
| | | if (!StringUtil.isNullOrEmpty(st)) { |
| | | idList.add(Long.parseLong(st)); |
| | | } |
| | | } |
| | | String st = StringUtil.concat(idList, ","); |
| | | systemConfigService.setValue(SystemConfigKeyEnum.RE_EXCUTE_PAY_CLIENTS, st); |
| | | return JsonUtil.loadTrueResult(""); |
| | | } |
| | | |
| | | |
| | | } |