Commit 50233d25 authored by 赵啸非's avatar 赵啸非

添加更新默认用户角色

parent 32bc90d6
...@@ -344,7 +344,7 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE ...@@ -344,7 +344,7 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
userEntity.setRealName(userResp.getName()); userEntity.setRealName(userResp.getName());
userEntity.setPhone(userResp.getPhone()); userEntity.setPhone(userResp.getPhone());
userEntity.setMobile(userResp.getPhone()); userEntity.setMobile(userResp.getPhone());
userEntity.setLoginPwd(SecurityUtil.md5DoubleEncoding("xhxADMIN8@a")); userEntity.setLoginPwd("xhxADMIN8@a");
userEntity.setUserType(2); userEntity.setUserType(2);
this.save(userEntity); this.save(userEntity);
//更新默认用户角色 //更新默认用户角色
...@@ -379,4 +379,8 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE ...@@ -379,4 +379,8 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
Long[] userIds = roleUserService.find(roleUserQuery).stream().map(RoleUserEntity::getId).toArray(Long[]::new); Long[] userIds = roleUserService.find(roleUserQuery).stream().map(RoleUserEntity::getId).toArray(Long[]::new);
roleUserService.remove(userIds, context); roleUserService.remove(userIds, context);
} }
public static void main(String[] args) {
}
} }
\ No newline at end of file
...@@ -134,7 +134,7 @@ public class H5LoginController extends BaseCRUDJsonBodyMappingController<UserSer ...@@ -134,7 +134,7 @@ public class H5LoginController extends BaseCRUDJsonBodyMappingController<UserSer
userEntity.setLoginName(req.getOpenId()); userEntity.setLoginName(req.getOpenId());
// userEntity.setPhone(req.getPhone()); // userEntity.setPhone(req.getPhone());
// userEntity.setMobile(req.getPhone()); // userEntity.setMobile(req.getPhone());
userEntity.setLoginPwd(SecurityUtil.md5DoubleEncoding("123")); userEntity.setLoginPwd("123");
userEntity.setUserType(2); userEntity.setUserType(2);
userEntity.setRoleIds("2"); userEntity.setRoleIds("2");
userEntity = userService.save(userEntity); userEntity = userService.save(userEntity);
...@@ -203,7 +203,7 @@ public class H5LoginController extends BaseCRUDJsonBodyMappingController<UserSer ...@@ -203,7 +203,7 @@ public class H5LoginController extends BaseCRUDJsonBodyMappingController<UserSer
userEntity.setLoginName(req.getOpenId()); userEntity.setLoginName(req.getOpenId());
userEntity.setPhone(req.getPhone()); userEntity.setPhone(req.getPhone());
userEntity.setMobile(req.getPhone()); userEntity.setMobile(req.getPhone());
userEntity.setLoginPwd(SecurityUtil.md5DoubleEncoding("123")); userEntity.setLoginPwd("123");
userEntity.setUserType(2); userEntity.setUserType(2);
// CompanyEntity companyEntity = companyService.getCompanyByH5(req); // CompanyEntity companyEntity = companyService.getCompanyByH5(req);
// userEntity.setCompanyId(companyEntity.getId()); // userEntity.setCompanyId(companyEntity.getId());
...@@ -218,6 +218,7 @@ public class H5LoginController extends BaseCRUDJsonBodyMappingController<UserSer ...@@ -218,6 +218,7 @@ public class H5LoginController extends BaseCRUDJsonBodyMappingController<UserSer
}else { }else {
userEntity.setPhone(req.getPhone()); userEntity.setPhone(req.getPhone());
userEntity.setRealName(req.getUserName());
userEntity.setMobile(req.getPhone()); userEntity.setMobile(req.getPhone());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment