| | |
| | | |
| | | /** |
| | | * 获取时限 |
| | | * @url {ctx}/api/web/syTimeLimit/getTimeLimit |
| | | * @param limitTable 时限对应表 |
| | | * @param limitType 时限类型 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/getTimeLimit") |
| | | public Object getTimeLimit(@RequestParam(value = "limitTable") int limitTable, @RequestParam(value = "limitType") String limitType) { |
| | | try { |
| | | QueryWrapper<SyTimeLimit> syTimeLimitQueryWrapper = new QueryWrapper<>(); |
| | | syTimeLimitQueryWrapper.eq("limit_table", limitTable).eq("limit_type", limitType); |
| | | SyTimeLimit syTimeLimit = service.getOne(syTimeLimitQueryWrapper); |
| | | int timeTerm = 0; |
| | | if (ObjectUtils.isNotEmpty(syTimeLimit)){ |
| | | timeTerm = syTimeLimit.getTimeTerm(); |
| | | } |
| | | return ReturnSucUtils.getRepInfo(timeTerm); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取时限 |
| | | * @url {ctx}/api/web/syTimeLimit/getExpireTime |
| | | * @param computeTime 计算时间 |
| | | * @param limitType 时限类型 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/getExpireTime") |
| | | public Object getExpireTime(@RequestParam(value = "computeTime") Date computeTime, @RequestParam(value = "limitType") String limitType) { |
| | | public Object getExpireTime(@RequestParam(value = "limitType") String limitType) { |
| | | try { |
| | | QueryWrapper<SyTimeLimit> syTimeLimitQueryWrapper = new QueryWrapper<>(); |
| | | syTimeLimitQueryWrapper.eq("limit_type", limitType); |