Merge remote-tracking branch 'origin/HQPT_USER' into HQPT_USER
正在显示
6 个修改的文件
包含
21 行增加
和
6 行删除
| @@ -27,9 +27,11 @@ public class RoleController { | @@ -27,9 +27,11 @@ public class RoleController { | ||
| 27 | @RequestParam(value = "pageSize",required = false,defaultValue = "10") | 27 | @RequestParam(value = "pageSize",required = false,defaultValue = "10") |
| 28 | int pageSize, | 28 | int pageSize, |
| 29 | @RequestParam(value = "roleName",required = false) | 29 | @RequestParam(value = "roleName",required = false) |
| 30 | - String roleName){ | 30 | + String roleName, |
| 31 | + @RequestParam(value = "type", required = false) | ||
| 32 | + String type){ | ||
| 31 | 33 | ||
| 32 | - return roleService.findAll(pageNum,pageSize, roleName); | 34 | + return roleService.findAll(pageNum,pageSize, roleName, type); |
| 33 | } | 35 | } |
| 34 | 36 | ||
| 35 | @LogAnnotation(moduleName = "岗位/角色管理",operate = "岗位/角色添加") | 37 | @LogAnnotation(moduleName = "岗位/角色管理",operate = "岗位/角色添加") |
| @@ -18,7 +18,8 @@ public interface ROLEMapper { | @@ -18,7 +18,8 @@ public interface ROLEMapper { | ||
| 18 | 18 | ||
| 19 | List<ROLE> selectByParentId(Integer roleId); | 19 | List<ROLE> selectByParentId(Integer roleId); |
| 20 | 20 | ||
| 21 | - List<ROLE> findAll(@Param("roleName") String roleName); | 21 | + List<ROLE> findAll(@Param("roleName") String roleName, |
| 22 | + @Param("type") String type); | ||
| 22 | 23 | ||
| 23 | int updateByPrimaryKeySelective(ROLE record); | 24 | int updateByPrimaryKeySelective(ROLE record); |
| 24 | 25 |
| @@ -5,7 +5,7 @@ import com.tianbo.warehouse.model.ROLE; | @@ -5,7 +5,7 @@ import com.tianbo.warehouse.model.ROLE; | ||
| 5 | import com.tianbo.warehouse.model.RolePermission; | 5 | import com.tianbo.warehouse.model.RolePermission; |
| 6 | 6 | ||
| 7 | public interface RoleService { | 7 | public interface RoleService { |
| 8 | - PageInfo<ROLE> findAll(int pageNum, int pageSize, String roleName); | 8 | + PageInfo<ROLE> findAll(int pageNum, int pageSize, String roleName, String type); |
| 9 | 9 | ||
| 10 | int insertSelective(ROLE record); | 10 | int insertSelective(ROLE record); |
| 11 | 11 |
| @@ -33,9 +33,9 @@ public class RoleServiceImp implements RoleService{ | @@ -33,9 +33,9 @@ public class RoleServiceImp implements RoleService{ | ||
| 33 | PermissionService permissionService; | 33 | PermissionService permissionService; |
| 34 | 34 | ||
| 35 | @Override | 35 | @Override |
| 36 | - public PageInfo<ROLE> findAll(int pageNum, int pageSize, String roleName){ | 36 | + public PageInfo<ROLE> findAll(int pageNum, int pageSize, String roleName, String type){ |
| 37 | Page<ROLE> page = PageHelper.startPage(pageNum,pageSize); | 37 | Page<ROLE> page = PageHelper.startPage(pageNum,pageSize); |
| 38 | - List<ROLE> list = roleMapper.findAll(roleName); | 38 | + List<ROLE> list = roleMapper.findAll(roleName, type); |
| 39 | PageInfo<ROLE> result = new PageInfo<ROLE>(list); | 39 | PageInfo<ROLE> result = new PageInfo<ROLE>(list); |
| 40 | 40 | ||
| 41 | return result; | 41 | return result; |
| @@ -179,6 +179,9 @@ | @@ -179,6 +179,9 @@ | ||
| 179 | <if test="roleName != '' and roleName !=null"> | 179 | <if test="roleName != '' and roleName !=null"> |
| 180 | and role_name = #{roleName, jdbcType=VARCHAR} | 180 | and role_name = #{roleName, jdbcType=VARCHAR} |
| 181 | </if> | 181 | </if> |
| 182 | + <if test="type != '' and type !=null"> | ||
| 183 | + and type = #{type, jdbcType=VARCHAR} | ||
| 184 | + </if> | ||
| 182 | </select> | 185 | </select> |
| 183 | <select id="findRolesByUserId" parameterType="java.lang.Integer" resultMap="BaseResultMap"> | 186 | <select id="findRolesByUserId" parameterType="java.lang.Integer" resultMap="BaseResultMap"> |
| 184 | SELECT | 187 | SELECT |
| @@ -126,6 +126,9 @@ | @@ -126,6 +126,9 @@ | ||
| 126 | <if test="age != null" > | 126 | <if test="age != null" > |
| 127 | age, | 127 | age, |
| 128 | </if> | 128 | </if> |
| 129 | + <if test="companyId != null" > | ||
| 130 | + company_id, | ||
| 131 | + </if> | ||
| 129 | </trim> | 132 | </trim> |
| 130 | <trim prefix="values (" suffix=")" suffixOverrides="," > | 133 | <trim prefix="values (" suffix=")" suffixOverrides="," > |
| 131 | <if test="userId != null" > | 134 | <if test="userId != null" > |
| @@ -170,6 +173,9 @@ | @@ -170,6 +173,9 @@ | ||
| 170 | <if test="age != null" > | 173 | <if test="age != null" > |
| 171 | #{age,jdbcType=INTEGER}, | 174 | #{age,jdbcType=INTEGER}, |
| 172 | </if> | 175 | </if> |
| 176 | + <if test="companyId != null" > | ||
| 177 | + #{companyId,jdbcType=INTEGER}, | ||
| 178 | + </if> | ||
| 173 | </trim> | 179 | </trim> |
| 174 | </insert> | 180 | </insert> |
| 175 | <update id="updateByPrimaryKeySelective" parameterType="com.tianbo.warehouse.model.USERS" > | 181 | <update id="updateByPrimaryKeySelective" parameterType="com.tianbo.warehouse.model.USERS" > |
| @@ -211,6 +217,9 @@ | @@ -211,6 +217,9 @@ | ||
| 211 | <if test="age != null" > | 217 | <if test="age != null" > |
| 212 | age = #{age,jdbcType=INTEGER}, | 218 | age = #{age,jdbcType=INTEGER}, |
| 213 | </if> | 219 | </if> |
| 220 | + <if test="companyId != null" > | ||
| 221 | + company_id = #{companyId,jdbcType=INTEGER}, | ||
| 222 | + </if> | ||
| 214 | </set> | 223 | </set> |
| 215 | where user_id = #{userId,jdbcType=INTEGER} | 224 | where user_id = #{userId,jdbcType=INTEGER} |
| 216 | </update> | 225 | </update> |
-
请 注册 或 登录 后发表评论