提交 17c41e02 authored 作者: zhouzhigang's avatar zhouzhigang

后台用户修改

上级 fab58c31
......@@ -154,7 +154,7 @@ public class UserController {
@ApiOperation(value = "修改" , notes ="修改入驻出版社时修改管理员表中的数据")
@PostMapping(value = SysUserRequestPath.UPDATE + SysUserRequestPath.USER)
public CallBack<Boolean> update(@RequestBody Press press){
public CallBack<Boolean> update(@RequestBody Press press) throws Exception{
return CallBack.success(userSerivce.updateUser(press));
}
......
......@@ -70,7 +70,7 @@ public interface UserService extends BaseService<User,String> {
* @auther zzg
* @data 2019年12月19日 下午5:01:07
*/
boolean updateUser(Press press);
boolean updateUser(Press press) throws Exception;
}
......@@ -231,7 +231,7 @@ public class UserServiceImpl extends BaseServiceImpl<User,String> implements Use
}
@Override
public boolean updateUser(Press press) {
public boolean updateUser(Press press) throws Exception{
User user = new User();
user.setRelationId(press.getId());
user.setType(MemberTypeEnum.PUBLISHER.getCode());
......@@ -240,13 +240,7 @@ public class UserServiceImpl extends BaseServiceImpl<User,String> implements Use
if("******".equals(press.getPassword())){
member.setPassword(member.getPassword());
}else{
try {
member.setPassword(MD5Util.getEncoderByMd5(press.getPassword()));
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
member.setPassword(MD5Util.getEncoderByMd5(press.getPassword()));
}
member.setPhone(press.getPhone());
userMapper.updateByPrimaryKey(member);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论