| | |
| | | @GetMapping("/getList") |
| | | @Authorization |
| | | public TableDataInfo selectConfigList(@RequestParam(value = "pageNum",required = false) Integer pageNum, |
| | | @RequestParam(value = "pageSize",required = false) Integer pageSize) |
| | | @RequestParam(value = "pageSize",required = false) Integer pageSize, |
| | | @RequestParam(value = "name",required = false) String name) |
| | | { |
| | | if(pageNum==null) |
| | | { |
| | |
| | | } |
| | | |
| | | Page<RoleManagementEntity> pageParam = new Page<>(pageNum,pageSize); |
| | | List<RoleManagementEntity> list = iRoleManagementService.selectConfigList(pageParam,pageSize); |
| | | List<RoleManagementEntity> list = iRoleManagementService.selectConfigList(pageParam,pageSize,name); |
| | | |
| | | int num=iRoleManagementService.countNum(); |
| | | int num=iRoleManagementService.countNum(name); |
| | | return getDataTable(list,num); |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.dg.core.db.gen.entity.RoleManagementEntity; |
| | | import org.springframework.data.repository.query.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @param state |
| | | * @return |
| | | */ |
| | | public List<RoleManagementEntity> selectConfigList(IPage<RoleManagementEntity> page, Integer state); |
| | | public List<RoleManagementEntity> selectConfigList(IPage<RoleManagementEntity> page, Integer state, |
| | | @Param("name") String name); |
| | | |
| | | /** |
| | | * 新增角色 |
| | |
| | | * 统计条数 |
| | | * @return |
| | | */ |
| | | public int countNum(); |
| | | public int countNum(String name); |
| | | |
| | | |
| | | |
| | |
| | | * @param state |
| | | * @return |
| | | */ |
| | | public List<RoleManagementEntity> selectConfigList(IPage<RoleManagementEntity> page, Integer state); |
| | | public List<RoleManagementEntity> selectConfigList(IPage<RoleManagementEntity> page, |
| | | Integer state,String name); |
| | | |
| | | /** |
| | | * 新增角色 |
| | |
| | | * 统计条数 |
| | | * @return |
| | | */ |
| | | public int countNum(); |
| | | public int countNum(String name); |
| | | } |
| | |
| | | @Service |
| | | public class RoleManagementImpl extends ServiceImpl<RoleManagementMapper, RoleManagementEntity> implements IRoleManagementService { |
| | | @Override |
| | | public List<RoleManagementEntity> selectConfigList(IPage<RoleManagementEntity> page, Integer state) { |
| | | return baseMapper.selectConfigList(page,state); |
| | | public List<RoleManagementEntity> selectConfigList(IPage<RoleManagementEntity> page, Integer state,String name) { |
| | | return baseMapper.selectConfigList(page,state,name); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public int countNum() { |
| | | return baseMapper.countNum(); |
| | | public int countNum(String name) { |
| | | return baseMapper.countNum(name); |
| | | } |
| | | } |
| | |
| | | |
| | | <select id="selectConfigList" resultMap="RoleManagementEntityResult"> |
| | | <include refid="selectRoleManagementEntityVo"/> |
| | | <!-- <where>--> |
| | | <!-- <if test="userName != null and userName != ''">--> |
| | | <!-- AND user_name like concat('%', #{userName}, '%')--> |
| | | <!-- </if>--> |
| | | <where> |
| | | <if test="name!=null and name!=''"> |
| | | and role_name=#{name} |
| | | </if> |
| | | <!-- <if test="streetName != null and streetName != ''">--> |
| | | <!-- AND street_name like concat('%', #{streetName}, '%')--> |
| | | <!-- </if>--> |
| | |
| | | <!-- AND role_id=#{roleId}--> |
| | | <!-- </if>--> |
| | | |
| | | <!-- </where>--> |
| | | </where> |
| | | |
| | | order by create_time desc |
| | | </select> |
| | |
| | | |
| | | <select id="countNum" resultType="integer"> |
| | | select count(id) from automessage_role_management |
| | | <where> |
| | | <if test="name!=null and name!=''"> |
| | | and role_name=#{name} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | and role_id=#{roleId} |
| | | </if> |
| | | |
| | | |
| | | </where> |
| | | </select> |
| | | |