| | |
| | | package com.jsh.erp.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.jsh.erp.datasource.entities.SysDict; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.jsh.erp.dto.ConfigSecurityCreateOrUpdate; |
| | | import com.jsh.erp.dto.ConfigSecurityQuery; |
| | | import com.jsh.erp.datasource.entities.ConfigSecurity; |
| | |
| | | |
| | | @GetMapping(value = "/list") |
| | | @ApiOperation(value = "高级安全防护列表") |
| | | public BaseResponseInfo findAccountInOutList(ConfigSecurityQuery configSecurityQuery, |
| | | public BaseResponseInfo getPageList(ConfigSecurityQuery configSecurityQuery, |
| | | HttpServletRequest request) throws Exception{ |
| | | BaseResponseInfo res = new BaseResponseInfo(); |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | try { |
| | | List<ConfigSecurity> dataList = configSecurityService.findList(configSecurityQuery); |
| | | Long total = configSecurityService.findListCount(configSecurityQuery); |
| | | map.put("total", total); |
| | | map.put("rows", dataList); |
| | | // List<ConfigSecurity> dataList = configSecurityService.findList(configSecurityQuery); |
| | | // Long total = configSecurityService.findListCount(configSecurityQuery); |
| | | // map.put("total", total); |
| | | // map.put("rows", dataList); |
| | | PageInfo<ConfigSecurity> pageInfo =configSecurityService.findPageInfo(configSecurityQuery); |
| | | map.put("total",pageInfo.getTotal()); |
| | | map.put("rows",pageInfo.getList()); |
| | | res.code = 200; |
| | | res.data = map; |
| | | } catch(Exception e){ |
| | |
| | | return res; |
| | | } |
| | | |
| | | @GetMapping(value = "/enable-list-all") |
| | | @ApiOperation(value = "高级安全防护列表") |
| | | public BaseResponseInfo getEnabledListAll() throws Exception{ |
| | | BaseResponseInfo res = new BaseResponseInfo(); |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | try { |
| | | List<ConfigSecurity> list =configSecurityService.getEnabledListAll(); |
| | | map.put("data",list); |
| | | res.code = 200; |
| | | res.data = list; |
| | | res.msg="查询成功"; |
| | | } catch(Exception e){ |
| | | logger.error(e.getMessage(), e); |
| | | res.code = 500; |
| | | res.data = null; |
| | | res.msg="查询失败"; |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | |
| | | @PostMapping |
| | | public BaseResponseInfo add(@RequestBody @Valid ConfigSecurityCreateOrUpdate configSecurityCreateOrUpdate) { |