|
|
@ -149,7 +149,6 @@ public class UserService{ |
|
|
|
UserEntity userEntity=new UserEntity(); |
|
|
|
UserEntity userEntity=new UserEntity(); |
|
|
|
userEntity.setUserId(updateUserForm.getUserId()); |
|
|
|
userEntity.setUserId(updateUserForm.getUserId()); |
|
|
|
userEntity.setName(updateUserForm.getName()); |
|
|
|
userEntity.setName(updateUserForm.getName()); |
|
|
|
userEntity.setHeadImg(updateUserForm.getHeadImg()); |
|
|
|
|
|
|
|
userEntity.setAddress(updateUserForm.getAddress()); |
|
|
|
userEntity.setAddress(updateUserForm.getAddress()); |
|
|
|
userEntity.setServiceAddress(updateUserForm.getServiceAddress()); |
|
|
|
userEntity.setServiceAddress(updateUserForm.getServiceAddress()); |
|
|
|
userEntity.setUserType(updateUserForm.getUserType()); |
|
|
|
userEntity.setUserType(updateUserForm.getUserType()); |
|
|
@ -159,6 +158,16 @@ public class UserService{ |
|
|
|
userEntity.setAge(updateUserForm.getAge()); |
|
|
|
userEntity.setAge(updateUserForm.getAge()); |
|
|
|
userEntity.setSex(updateUserForm.getSex()); |
|
|
|
userEntity.setSex(updateUserForm.getSex()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(updateUserForm.getActivityImgFile()!=null) { |
|
|
|
|
|
|
|
//保存头像
|
|
|
|
|
|
|
|
String imageName = imageService.saveImg(updateUserForm.getActivityImgFile()); |
|
|
|
|
|
|
|
if (imageName == null) { |
|
|
|
|
|
|
|
logger.error("更新头像失败"); |
|
|
|
|
|
|
|
return new JSONResponse<>(DefaultRes.fail, Result.FAIL); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
userEntity.setHeadImg(imageName); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(userMapper.update(userEntity)){ |
|
|
|
if(userMapper.update(userEntity)){ |
|
|
|
return new JSONResponse<>(DefaultRes.ok,Result.OK); |
|
|
|
return new JSONResponse<>(DefaultRes.ok,Result.OK); |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|