266ece32 by 肖初晴

【DAOP-1.0】企业认证

【功能点】测试问题处理
1 parent 0e45b599
package com.csbr.qingcloud.portal.domain.vo;
import csbr.cloud.entity.domain.base.vo.CsbrBaseVO;
import csbr.cloud.entity.domain.common.CommonJson;
import io.swagger.v3.oas.annotations.media.Schema;
import jdk.jfr.Name;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.List;
/**
* 人员表 视图对象类
*
* @author xiaocq
* @date 2023-12-19
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@Schema(name = "人员详情返回实体")
public class StaffRSVO extends CsbrBaseVO {
/**
* 上级guid
*/
@Schema(description = "上级guid")
private String leaderGuid;
/**
* 用户guid
*/
@Schema(description = "用户guid")
private String userGuid;
/**
* 微信小程序openId
*/
@Schema(description = "微信小程序openId")
private String wechatOpenId;
/**
* 微信公众号openId
*/
@Name("微信公众号openId")
@Schema(description = "微信公众号openId")
private String openId;
/**
* 微信唯一码
*/
@Name("微信唯一码")
@Schema(description = "微信唯一码")
private String unionId;
/**
* 工作地
*/
@Schema(description = "工作地")
private String workAddress;
/**
* 是否部门负责人
*/
@Schema(description = "是否部门负责人")
private String isLeader;
/**
* 公司邮箱
*/
@Schema(description = "公司邮箱")
private String companyEmail;
/**
* 姓名
*/
@Schema(description = "姓名")
private String staffName;
/**
* 工号
*/
@Schema(description = "工号")
private String staffNo;
/**
* 手机号码
*/
@Schema(description = "手机号码")
private String mobileNo;
/**
* 身份证号
*/
@Schema(description = "身份证号")
private String idCode;
/**
* 企业guid
*/
@Schema(description = "企业guid")
private String tenantGuid;
/**
* 部门guidJson
*/
@Schema(description = "部门guidJson")
private String organisationGuidJson;
/**
* 组织架构guid列表
*/
@Schema(description = "组织架构guid列表")
private String organisationRelGuidJson;
/**
* 岗位guidJson
*/
@Schema(description = "岗位guidJson")
private String postGuidJson;
@Schema(description = "是否管理员")
private String isAdmin;
/********非库表存储属性*****/
/** 职级名称 */
@Schema(description = "上级名称")
private String leaderName;
/** 企业名称 */
@Schema(description = "企业名称")
private String tenantName;
@Schema(description = "状态Y 期用;S 停用")
private String bizState;
/** 部门guid列表 */
@Schema(description = "部门guid列表")
private List<String> organisationGuidList;
/** 部门列表名称 */
@Schema(description = "部门列表名称")
private List<String> organisationNameList;
/** 岗位guid列表 */
@Schema(description = "岗位guid列表")
private List<String> postGuidList;
/** 岗位列表名称 */
@Schema(description = "岗位列表名称")
private List<String> postNameList;
/********字典类*****/
/********实体类、用户单选、组织机构单选*****/
/********范围查询*****/
/********自定义扩展*****/
/********子对象*****/
@Schema(description = "菜单模板")
private List<CommonJson> funcPermissionTemplateJson;
}
......@@ -2,14 +2,13 @@ package com.csbr.qingcloud.portal.feign;
import com.csbr.cloud.common.config.FastCallFeignConfiguration;
import com.csbr.cloud.common.response.CommonRes;
import com.csbr.qingcloud.portal.domain.vo.StaffRSVO;
import com.csbr.qingcloud.portal.domain.vo.TenantRQVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
......@@ -30,4 +29,7 @@ public interface PersonelFeign {
@PostMapping(value = "/tenant/check", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
CommonRes<Boolean> checkTenant(@Validated @RequestBody TenantRQVO vo);
@GetMapping(value = "/staff/getByUserGuid", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
CommonRes<StaffRSVO> getByUserGuid(@RequestParam String userGuid);
}
......
......@@ -457,7 +457,10 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris
dto.setLogonUser(vo.getLogonUser());
List<UserVO> userList = userFeign.getUserSomeInfo(dto).getData().getRecords();
if(CollectionUtils.isNotEmpty(userList)){
throw new CsbrUserException(UserError.VALIDATE_CODE_ERROR, "账号已存在!");
StaffRSVO staffVO = personelFeign.getByUserGuid(userList.get(0).getGuid()).getData();
if(staffVO != null && StringUtils.isNotBlank(staffVO.getIsAdmin()) && "Y".equals(staffVO.getIsAdmin())){
throw new CsbrUserException(UserError.VALIDATE_CODE_ERROR, "账号已存在!");
}
}
dto = new UserQueryDTO();
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!