Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -196,7 +196,15 @@ public class UserController extends BaseController {
|
|||||||
public ApiResult<?> update(@RequestBody User user) {
|
public ApiResult<?> update(@RequestBody User user) {
|
||||||
user.setStatus(null);
|
user.setStatus(null);
|
||||||
user.setUsername(null);
|
user.setUsername(null);
|
||||||
|
if (user.getPassword() != null) {
|
||||||
|
String pwd = userService.encodePassword(user.getPassword());
|
||||||
|
User originData = userService.getByIdRel(user.getUserId());
|
||||||
|
if(!pwd.equals(originData.getPassword())) {
|
||||||
|
user.setPassword(pwd);
|
||||||
|
}else {
|
||||||
user.setPassword(null);
|
user.setPassword(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (userService.updateUser(user)) {
|
if (userService.updateUser(user)) {
|
||||||
return success("修改成功");
|
return success("修改成功");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,9 @@
|
|||||||
<if test="param.organizationId != null">
|
<if test="param.organizationId != null">
|
||||||
AND a.organization_id = #{param.organizationId}
|
AND a.organization_id = #{param.organizationId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="param.organizationIdWithChildren != null">
|
||||||
|
AND (a.organization_id = #{param.organizationIdWithChildren} OR a.parent_id = #{param.organizationIdWithChildren})
|
||||||
|
</if>
|
||||||
<if test="param.parentId != null">
|
<if test="param.parentId != null">
|
||||||
AND a.parent_id = #{param.parentId}
|
AND a.parent_id = #{param.parentId}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -133,4 +133,8 @@ public class OrganizationParam extends BaseParam {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String leaderUsername;
|
private String leaderUsername;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "企业及部门筛选")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer organizationIdWithChildren;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user