feat(corp): 添加企业,部门新增雪花id传入参数

main
zhaokai 2026-03-02 13:58:22 +08:00
parent 295f2806d4
commit a6bbdb3398
5 changed files with 13 additions and 2 deletions

View File

@ -26,7 +26,7 @@ import java.util.ArrayList;
* @Author zhaokai
* @Date 2025-10-31 10:52:09
*/
@Api(tags = "企业相关方信息")
@Api(tags = "企业相关方信息-废弃")
@RequestMapping("/${application.gateway}/corpInfoXgf")
@RestController
@AllArgsConstructor

View File

@ -26,6 +26,8 @@ import java.util.List;
@NoArgsConstructor
@AllArgsConstructor
public class CorpInfoAddCmd extends Command {
@ApiModelProperty(value = "雪花id", name = "id")
private Long id;
@ApiModelProperty(value = "企业id", name = "corpinfoId", required = true)
private String corpinfoId;

View File

@ -22,7 +22,8 @@ import java.util.List;
@NoArgsConstructor
@AllArgsConstructor
public class DepartmentAddCmd extends Command {
@ApiModelProperty(value = "雪花id", name = "id")
private Long id;
@ApiModelProperty(value = "部门id", name = "departmentId", required = true)
private String departmentId;
@ApiModelProperty(value = "名称,汉字30以内", name = "name", required = true)

View File

@ -1,5 +1,6 @@
package com.zcloud.basic.info.gatewayimpl;
import cn.hutool.json.JSONUtil;
import com.alibaba.cola.dto.Response;
import com.alibaba.cola.dto.SingleResponse;
import com.jjb.saas.framework.auth.model.SSOUser;
@ -57,8 +58,12 @@ public class DepartmentGatewayImpl implements DepartmentGateway {
deptCmd.setDeptName(departmentE.getName());
deptCmd.setParentIds(deptDetailCO.getData().getParentIds());
deptCmd.setAddTypeEnum("MANUAL");
if(departmentE.getId()!=null){
deptCmd.setId(departmentE.getId());
}
//TODO gbs部门表 sys_dept tenant_idparent_idsadd_type_enum存储错误导致gbs页面看不到参数还没有待定
// TODO gbs的这个创建部门接口没有区分企业, 新建的企业创建其他企业有的部门名称时报错:名称已存在
log.info("DepartmentAddExe,新增部门调用GBS请求"+ JSONUtil.toJsonStr(deptCmd));
SingleResponse<Long> response = deptFacade.add(deptCmd);
d.setId(response.getData());
departmentRepository.save(d);

View File

@ -165,6 +165,9 @@ public class CorpInfoRepositoryImpl extends BaseRepositoryImpl<CorpInfoMapper, C
ouac.setAccount(corpInfoDO.getCorpName());
ouac.setTenantId(tenantId);
ouac.setPassword(corpInfoDO.getPassword());
if(corpInfoDO!= null){
ouac.setId(corpInfoDO.getId());
}
// try {
log.info("创建企业请求底座请求:{}", JSONUtil.toJsonStr(ouac));
SingleResponse<Long> corpId = unitFacade.add(ouac);