|
|
@@ -9,6 +9,7 @@ import com.zhongshu.card.client.model.org.*;
|
|
|
import com.zhongshu.card.client.model.orgModel.OrgBindUserAllParam;
|
|
|
import com.zhongshu.card.client.model.project.ProjectSaveParam;
|
|
|
import com.zhongshu.card.client.service.org.OrganizationService;
|
|
|
+import com.zhongshu.card.client.service.org.UserAccountService;
|
|
|
import com.zhongshu.card.server.core.model.org.OrgBindUserParam;
|
|
|
import com.zhongshu.card.server.core.service.org.OrganizationUserServiceImpl;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
@@ -25,13 +26,23 @@ import javax.validation.Valid;
|
|
|
import java.util.List;
|
|
|
|
|
|
@RestController
|
|
|
-@RequestMapping("organization")
|
|
|
-@Tag(name = "机构管理")
|
|
|
+@RequestMapping("organizationUser")
|
|
|
+@Tag(name = "机构管理-用户管理")
|
|
|
public class OrganizationUserController {
|
|
|
|
|
|
@Autowired
|
|
|
private OrganizationUserServiceImpl organizationUserService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private UserAccountService userAccountService;
|
|
|
+
|
|
|
+ @ResourceAuth(value = "user", type = AuthType.User)
|
|
|
+ @Operation(summary = "机构保存用户", description = "机构保存用户")
|
|
|
+ @RequestMapping(value = {"saveOrgUser"}, method = {RequestMethod.POST})
|
|
|
+ public ResultContent saveOrgUser(@RequestBody UserCountAddParam param) {
|
|
|
+ return organizationUserService.saveOrgUser(param);
|
|
|
+ }
|
|
|
+
|
|
|
@ResourceAuth(value = "user", type = AuthType.User)
|
|
|
@ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform)
|
|
|
@Operation(summary = "机构绑定用户", description = "机构绑定用户,机构已存在 用户已存在")
|
|
|
@@ -40,4 +51,23 @@ public class OrganizationUserController {
|
|
|
return this.organizationUserService.orgBindUser(param);
|
|
|
}
|
|
|
|
|
|
+ @ResourceAuth(value = "user", type = AuthType.User)
|
|
|
+ @Operation(summary = "项目用户列表-分页查询", description = "项目用户列表-分页查询")
|
|
|
+ @RequestMapping(value = {"projectUserPage"}, method = {RequestMethod.POST})
|
|
|
+ public ResultContent<Page<OrganizationUserModel>> projectUserPage(
|
|
|
+ @Parameter(hidden = true) @PageableDefault(page = 0, size = 10) Pageable pageable,
|
|
|
+ @Parameter(required = false) OrganizationUserSearch param) {
|
|
|
+ // 项目用户 包括项目下所有的机构的用户
|
|
|
+ param.setIsSearchProject(Boolean.TRUE);
|
|
|
+ Assert.hasText(param.getProjectOid(), "projectOid不能为空");
|
|
|
+ return userAccountService.pageOrgUser(param, pageable);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ResourceAuth(value = "user", type = AuthType.User)
|
|
|
+ @Operation(summary = "机构用户详情", description = "平台用户详情")
|
|
|
+ @RequestMapping(value = {"getOrgUserDetail"}, method = {RequestMethod.POST})
|
|
|
+ public ResultContent getOrgUserDetail(@RequestBody OrgUserDetailParam param) {
|
|
|
+ return userAccountService.getOrgUserDetail(param);
|
|
|
+ }
|
|
|
+
|
|
|
}
|