diff --git a/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/controller/SysEveRoleController.java b/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/controller/SysEveRoleController.java index 8e342fde..c9a4eb3a 100644 --- a/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/controller/SysEveRoleController.java +++ b/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/controller/SysEveRoleController.java @@ -8,6 +8,7 @@ import com.skyeye.annotation.api.Api; import com.skyeye.annotation.api.ApiImplicitParam; import com.skyeye.annotation.api.ApiImplicitParams; import com.skyeye.annotation.api.ApiOperation; +import com.skyeye.common.entity.CommonPageInfo; import com.skyeye.common.object.InputObject; import com.skyeye.common.object.OutputObject; import com.skyeye.eve.entity.userauth.auth.RoleMation; @@ -38,10 +39,7 @@ public class SysEveRoleController { * @param outputObject */ @ApiOperation(id = "sys013", value = "获取角色列表", method = "POST", allUse = "1") - @ApiImplicitParams({ - @ApiImplicitParam(id = "limit", name = "limit", value = "分页参数,每页多少条数据", required = "required,num"), - @ApiImplicitParam(id = "page", name = "page", value = "分页参数,第几页", required = "required,num"), - @ApiImplicitParam(id = "roleName", name = "roleName", value = "角色名称", required = "")}) + @ApiImplicitParams(classBean = CommonPageInfo.class) @RequestMapping("/post/SysEveRoleController/querySysRoleList") public void querySysRoleList(InputObject inputObject, OutputObject outputObject) { sysEveRoleService.querySysRoleList(inputObject, outputObject); diff --git a/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/dao/SysEveRoleDao.java b/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/dao/SysEveRoleDao.java index c3c26967..f4ec8b46 100644 --- a/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/dao/SysEveRoleDao.java +++ b/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/dao/SysEveRoleDao.java @@ -4,6 +4,7 @@ package com.skyeye.eve.dao; +import com.skyeye.common.entity.CommonPageInfo; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -19,7 +20,7 @@ import java.util.Map; */ public interface SysEveRoleDao { - List> querySysRoleList(Map map); + List> querySysRoleList(CommonPageInfo commonPageInfo); List> querySysRoleBandMenuList(Map map); diff --git a/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/service/impl/ExExplainServiceImpl.java b/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/service/impl/ExExplainServiceImpl.java index 4316b20a..f575173c 100644 --- a/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/service/impl/ExExplainServiceImpl.java +++ b/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/service/impl/ExExplainServiceImpl.java @@ -16,7 +16,6 @@ import com.skyeye.jedis.JedisClientService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import org.springframework.web.util.HtmlUtils; import java.util.HashMap; import java.util.Map; @@ -68,7 +67,6 @@ public class ExExplainServiceImpl implements ExExplainService { public void queryExExplainMation(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); Map bean = exExplainDao.queryExExplainMation(map); - bean.put("content", HtmlUtils.htmlUnescape(bean.get("content").toString())); outputObject.setBean(bean); outputObject.settotal(1); } @@ -112,7 +110,6 @@ public class ExExplainServiceImpl implements ExExplainService { map.put("title", "标题"); map.put("content", "等待发布说明。"); } else { - bean.put("content", HtmlUtils.htmlUnescape(bean.get("content").toString())); jedisClient.set(key, JSONUtil.toJsonStr(bean)); map = bean; } diff --git a/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/service/impl/SysEveRoleServiceImpl.java b/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/service/impl/SysEveRoleServiceImpl.java index eb4432b5..19cb28e6 100644 --- a/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/service/impl/SysEveRoleServiceImpl.java +++ b/skyeye-promote/skyeye-userauth/src/main/java/com/skyeye/eve/service/impl/SysEveRoleServiceImpl.java @@ -7,6 +7,7 @@ package com.skyeye.eve.service.impl; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import com.skyeye.common.constans.Constants; +import com.skyeye.common.entity.CommonPageInfo; import com.skyeye.common.object.InputObject; import com.skyeye.common.object.OutputObject; import com.skyeye.common.util.DateUtil; @@ -49,9 +50,9 @@ public class SysEveRoleServiceImpl implements SysEveRoleService { */ @Override public void querySysRoleList(InputObject inputObject, OutputObject outputObject) { - Map map = inputObject.getParams(); - Page pages = PageHelper.startPage(Integer.parseInt(map.get("page").toString()), Integer.parseInt(map.get("limit").toString())); - List> beans = sysEveRoleDao.querySysRoleList(map); + CommonPageInfo commonPageInfo = inputObject.getParams(CommonPageInfo.class); + Page pages = PageHelper.startPage(commonPageInfo.getPage(), commonPageInfo.getLimit()); + List> beans = sysEveRoleDao.querySysRoleList(commonPageInfo); outputObject.setBeans(beans); outputObject.settotal(pages.getTotal()); } diff --git a/skyeye-promote/skyeye-userauth/src/main/resources/mapper/userauth/SysEveRoleMapper.xml b/skyeye-promote/skyeye-userauth/src/main/resources/mapper/userauth/SysEveRoleMapper.xml index c1773668..97263ebf 100644 --- a/skyeye-promote/skyeye-userauth/src/main/resources/mapper/userauth/SysEveRoleMapper.xml +++ b/skyeye-promote/skyeye-userauth/src/main/resources/mapper/userauth/SysEveRoleMapper.xml @@ -2,7 +2,7 @@ - SELECT a.id, a.role_name roleName, @@ -12,10 +12,11 @@ (SELECT COUNT(*) FROM sys_eve_user b WHERE INSTR(CONCAT(',', b.role_id, ','), CONCAT(',', a.id, ','))) userNum FROM sys_eve_role a - WHERE 1 = 1 - - AND a.role_name LIKE '%${roleName}%' - + + + + + ORDER BY a.create_time DESC