增加根据用户编码查询岗位列表接口
This commit is contained in:
@@ -35,6 +35,7 @@ public class Post extends DataEntity<Post> {
|
|||||||
private Integer postSort; // 岗位排序(升序)
|
private Integer postSort; // 岗位排序(升序)
|
||||||
|
|
||||||
private String empCode; // 根据用户查询岗位
|
private String empCode; // 根据用户查询岗位
|
||||||
|
private String userCode; // 根据用户编码查询
|
||||||
|
|
||||||
private String roleCodes; // 关联的角色编号
|
private String roleCodes; // 关联的角色编号
|
||||||
private String roleNames; // 关联的角色名称
|
private String roleNames; // 关联的角色名称
|
||||||
@@ -110,6 +111,16 @@ public class Post extends DataEntity<Post> {
|
|||||||
this.empCode = empCode;
|
this.empCode = empCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiModelProperty("根据用户编码查询")
|
||||||
|
public String getUserCode() {
|
||||||
|
return userCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserCode(String userCode) {
|
||||||
|
this.userCode = userCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiModelProperty("岗位绑定角色编码")
|
||||||
public String getRoleCodes() {
|
public String getRoleCodes() {
|
||||||
return roleCodes;
|
return roleCodes;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,13 +7,20 @@
|
|||||||
SELECT ${sqlMap.column.toSql()}
|
SELECT ${sqlMap.column.toSql()}
|
||||||
FROM ${sqlMap.table.toSql()}
|
FROM ${sqlMap.table.toSql()}
|
||||||
<if test="empCode != null and empCode != ''">
|
<if test="empCode != null and empCode != ''">
|
||||||
JOIN ${_prefix}sys_employee_post b on a.post_code = b.post_code
|
JOIN ${_prefix}sys_employee_post b ON b.post_code = a.post_code
|
||||||
|
</if>
|
||||||
|
<if test="userCode != null and userCode != ''">
|
||||||
|
JOIN ${_prefix}sys_employee_post b2 on b2.post_code = a.post_code
|
||||||
|
JOIN ${_prefix}sys_user u on u.ref_code = b2.emp_code AND u.user_type = 'employee'
|
||||||
</if>
|
</if>
|
||||||
<where>
|
<where>
|
||||||
${sqlMap.where.toSql()}
|
${sqlMap.where.toSql()}
|
||||||
<if test="empCode != null and empCode != ''">
|
<if test="empCode != null and empCode != ''">
|
||||||
AND b.emp_code = #{empCode}
|
AND b.emp_code = #{empCode}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="userCode != null and userCode != ''">
|
||||||
|
AND u.user_code = #{userCode}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
ORDER BY ${sqlMap.order.toSql()}
|
ORDER BY ${sqlMap.order.toSql()}
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
Reference in New Issue
Block a user