This commit is contained in:
2023-11-13 21:48:12 +08:00
parent 03e1b91e5d
commit 165f68b0ed
4 changed files with 14 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ package cn.lihongjie.coal.organization.service;
import cn.lihongjie.coal.base.dto.CommonQuery;
import cn.lihongjie.coal.base.dto.IdRequest;
import cn.lihongjie.coal.base.service.BaseService;
import cn.lihongjie.coal.coalParameterDef.service.CoalParameterDefService;
import cn.lihongjie.coal.organization.dto.CreateOrganizationDto;
import cn.lihongjie.coal.organization.dto.OrganizationDto;
import cn.lihongjie.coal.organization.dto.UpdateOrganizationDto;
@@ -34,6 +35,8 @@ public class OrganizationService extends BaseService<OrganizationEntity, Organiz
@Autowired UserService userService;
@Autowired CoalParameterDefService coalParameterDefService;
@PostConstruct
public void init() {}
@@ -48,6 +51,7 @@ public class OrganizationService extends BaseService<OrganizationEntity, Organiz
dto.setUsername(request.getOrgAdminUserName());
dto.setPassword(request.getOrgAdminPassword());
userService.createOrgAdmin(dto);
coalParameterDefService.initDefault(entity.getId());
return getById(entity.getId());
}

View File

@@ -23,5 +23,8 @@ public class CreateUserDto extends OrgCommonDto {
@Comment("手机号")
private String phone;
@Comment("机构管理员标识")
private Boolean orgAdmin;
private List<String> roles;
}

View File

@@ -17,5 +17,8 @@ public class UpdateUserDto extends OrgCommonDto {
@Comment("手机号")
private String phone;
@Comment("机构管理员标识")
private Boolean orgAdmin;
private List<String> roles;
}

View File

@@ -21,6 +21,10 @@ public class UserDto extends OrgCommonDto {
@Comment("会话ID")
private String sessionId;
@Comment("机构管理员标识")
private Boolean orgAdmin;
private List<RoleDto> roles;
private List<RoleDto> otherRoles;