企业开通相关逻辑整理
This commit is contained in:
@@ -72,6 +72,7 @@
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:4.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.coolstore:coolstore-base:1.5.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring-boot-starter:2.0.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring-boot-autoconfigure:2.0.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring:2.0.4" level="project" />
|
||||
@@ -87,7 +88,6 @@
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.2.0.Final" level="project" />
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.cool.store.dto.enterprise;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
|
||||
public class AgentInfoDTO {
|
||||
|
||||
@JSONField(name = "agentid")
|
||||
private Long agentId;
|
||||
|
||||
@JSONField(name = "appid")
|
||||
private Long appId;
|
||||
|
||||
@JSONField(name = "auth_mode")
|
||||
private Integer authMode;
|
||||
|
||||
public Long getAgentId() {
|
||||
return agentId;
|
||||
}
|
||||
|
||||
public void setAgentId(Long agentId) {
|
||||
this.agentId = agentId;
|
||||
}
|
||||
|
||||
public Long getAppId() {
|
||||
return appId;
|
||||
}
|
||||
|
||||
public void setAppId(Long appId) {
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public Integer getAuthMode() {
|
||||
return authMode;
|
||||
}
|
||||
|
||||
public void setAuthMode(Integer authMode) {
|
||||
this.authMode = authMode;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.cool.store.dto.enterprise;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 企业标识信息
|
||||
*/
|
||||
public class AuthAgentInfoDTO {
|
||||
|
||||
@JSONField(name = "agent")
|
||||
private List<AgentInfoDTO> agentInfos;
|
||||
|
||||
public List<AgentInfoDTO> getAgentInfos() {
|
||||
return agentInfos;
|
||||
}
|
||||
|
||||
public void setAgentInfos(List<AgentInfoDTO> agentInfos) {
|
||||
this.agentInfos = agentInfos;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.cool.store.dto.enterprise;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 授权企业信息
|
||||
* @author zhangchenbiao
|
||||
* @date 2022-01-18 04:40
|
||||
*/
|
||||
@Data
|
||||
public class AuthCorpInfoDTO {
|
||||
|
||||
@JSONField(name = "corp_logo_url")
|
||||
private String corpLogoUrl;
|
||||
|
||||
@JSONField(name = "corp_name")
|
||||
private String corpName;
|
||||
|
||||
@JSONField(name = "corpid")
|
||||
private String corpId;
|
||||
|
||||
private String industry;
|
||||
|
||||
@JSONField(name = "auth_channel")
|
||||
private String authChannel;
|
||||
|
||||
@JSONField(name = "auth_channel_type")
|
||||
private String authChannelType;
|
||||
|
||||
@JSONField(name = "is_authenticated")
|
||||
private boolean isAuthenticated;
|
||||
|
||||
@JSONField(name = "auth_level")
|
||||
private int authLevel;
|
||||
|
||||
@JSONField(name = "corp_province")
|
||||
private String corpProvince;
|
||||
@JSONField(name = "corp_city")
|
||||
private String corpCity;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.cool.store.dto.enterprise;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
|
||||
/**
|
||||
* 企业开通授权信息
|
||||
* @author zhangchenbiao
|
||||
* @date 2022-01-18 04:40
|
||||
*/
|
||||
public class AuthInfoDTO {
|
||||
|
||||
@JSONField(name = "auth_corp_info")
|
||||
private AuthCorpInfoDTO authCorpInfo;
|
||||
|
||||
@JSONField(name = "auth_user_info")
|
||||
private AuthUserInfoDTO authUserInfo;
|
||||
|
||||
@JSONField(name = "auth_info")
|
||||
private AuthAgentInfoDTO authAgentInfo;
|
||||
|
||||
public AuthCorpInfoDTO getAuthCorpInfo() {
|
||||
return authCorpInfo;
|
||||
}
|
||||
|
||||
public void setAuthCorpInfo(AuthCorpInfoDTO authCorpInfo) {
|
||||
this.authCorpInfo = authCorpInfo;
|
||||
}
|
||||
|
||||
public AuthUserInfoDTO getAuthUserInfo() {
|
||||
return authUserInfo;
|
||||
}
|
||||
|
||||
public void setAuthUserInfo(AuthUserInfoDTO authUserInfo) {
|
||||
this.authUserInfo = authUserInfo;
|
||||
}
|
||||
|
||||
public AuthAgentInfoDTO getAuthAgentInfo() {
|
||||
return authAgentInfo;
|
||||
}
|
||||
|
||||
public void setAuthAgentInfo(AuthAgentInfoDTO authAgentInfo) {
|
||||
this.authAgentInfo = authAgentInfo;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.cool.store.dto.enterprise;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 钉钉通讯录授权范围
|
||||
* @author zhangchenbiao
|
||||
* @date 2022-01-18 04:40
|
||||
*/
|
||||
public class AuthScopeDTO {
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
private List<String> deptIdList;
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private List<String> userIdList;
|
||||
|
||||
public List<String> getDeptIdList() {
|
||||
return deptIdList;
|
||||
}
|
||||
|
||||
public void setDeptIdList(List<String> deptIdList) {
|
||||
this.deptIdList = deptIdList;
|
||||
}
|
||||
|
||||
public List<String> getUserIdList() {
|
||||
return userIdList;
|
||||
}
|
||||
|
||||
public void setUserIdList(List<String> userIdList) {
|
||||
this.userIdList = userIdList;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.cool.store.dto.enterprise;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
|
||||
/**
|
||||
* 授权用户信息
|
||||
* @author zhangchenbiao
|
||||
* @date 2022-01-18 04:40
|
||||
*/
|
||||
public class AuthUserInfoDTO {
|
||||
|
||||
@JSONField(name = "userId")
|
||||
private String userId;
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
}
|
||||
@@ -153,4 +153,44 @@ public class EnterpriseUserDTO implements Serializable {
|
||||
return enterpriseUserDO;
|
||||
}
|
||||
|
||||
|
||||
public static EnterpriseUserDO convertEnterpriseUserDTO2EnterpriseUserDO(EnterpriseUserDTO dto){
|
||||
if(dto == null){
|
||||
return null;
|
||||
}
|
||||
EnterpriseUserDO enterpriseUserDO = new EnterpriseUserDO();
|
||||
enterpriseUserDO.setName(dto.getName());
|
||||
enterpriseUserDO.setId(dto.getId());
|
||||
enterpriseUserDO.setUserId(dto.getUserId());
|
||||
enterpriseUserDO.setTel(dto.getTel());
|
||||
enterpriseUserDO.setWorkPlace(dto.getWorkPlace());
|
||||
enterpriseUserDO.setRemark(dto.getRemark());
|
||||
enterpriseUserDO.setMobile(dto.getMobile());
|
||||
enterpriseUserDO.setEmail(dto.getEmail());
|
||||
enterpriseUserDO.setOrgEmail(dto.getOrgEmail());
|
||||
enterpriseUserDO.setActive(dto.getActive());
|
||||
enterpriseUserDO.setOrderInDepts(dto.getOrderInDepts());
|
||||
enterpriseUserDO.setIsAdmin(dto.getIsAdmin());
|
||||
enterpriseUserDO.setIsBoss(dto.getIsBoss());
|
||||
enterpriseUserDO.setDingid(dto.getDingid());
|
||||
enterpriseUserDO.setUnionid(dto.getUnionid());
|
||||
enterpriseUserDO.setIsHide(dto.getIsHide());
|
||||
enterpriseUserDO.setPosition(dto.getPosition());
|
||||
enterpriseUserDO.setAvatar(dto.getAvatar());
|
||||
enterpriseUserDO.setExtattr(dto.getExtattr());
|
||||
enterpriseUserDO.setIsEnterprise(dto.getIsEnterprise());
|
||||
enterpriseUserDO.setRoles(dto.getRoles());
|
||||
enterpriseUserDO.setIsLeader(dto.getIsLeader());
|
||||
enterpriseUserDO.setCreateTime(dto.getCreateTime());
|
||||
enterpriseUserDO.setLanguage(dto.getLanguage());
|
||||
enterpriseUserDO.setIsLeaderInDepts(JSONObject.toJSONString(dto.getIsLeaderInDepts()));
|
||||
enterpriseUserDO.setJobnumber(dto.getJobnumber());
|
||||
enterpriseUserDO.setMonitoredDepartments(dto.getMonitoredDepartments());
|
||||
/*enterpriseUserDO.setAppType(dto.getAppType());
|
||||
enterpriseUserDO.setPassword(dto.getPassword());*/
|
||||
enterpriseUserDO.setThirdOaUniqueFlag(dto.getThirdOaUniqueFlag());
|
||||
return enterpriseUserDO;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.cool.store.dto.enterprise;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author 邵凌志
|
||||
* @date 2020/12/9 16:29
|
||||
*/
|
||||
@Data
|
||||
public class QueryDeptChildDTO {
|
||||
|
||||
private String id;
|
||||
|
||||
private String parentId;
|
||||
|
||||
private String name;
|
||||
/**
|
||||
* 部门次序
|
||||
*/
|
||||
private Integer departOrder;
|
||||
|
||||
private String path;
|
||||
}
|
||||
@@ -0,0 +1,185 @@
|
||||
package com.cool.store.dto.enterprise;
|
||||
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
/**
|
||||
* @ClassName SysDepartmentDO
|
||||
* @Description
|
||||
* @author 王春辉
|
||||
*/
|
||||
@Data
|
||||
public class SysDepartmentDTO {
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 父部门id,根部门为1
|
||||
*/
|
||||
private String parentId;
|
||||
|
||||
/**
|
||||
* 在父部门中的次序值
|
||||
*/
|
||||
private Integer departOrder;
|
||||
|
||||
/**
|
||||
* 是否同步创建一个关联此部门的企业群, true表示是, false表示不是
|
||||
*/
|
||||
private Boolean createDeptGroup;
|
||||
|
||||
/**
|
||||
* 当群已经创建后,是否有新人加入部门会自动加入该群, true表示是, false表示不是
|
||||
*/
|
||||
private Boolean autoAddUser;
|
||||
|
||||
/**
|
||||
* 是否隐藏部门, true表示隐藏, false表示显示
|
||||
*/
|
||||
private Boolean depHiding;
|
||||
|
||||
/**
|
||||
* 可以查看指定隐藏部门的其他部门列表,如果部门隐藏,则此值生效,取值为其他的部门id组成的的字符串,使用|符号进行分割
|
||||
*/
|
||||
private String deptPerimits;
|
||||
|
||||
/**
|
||||
* 可以查看指定隐藏部门的其他人员列表,如果部门隐藏,则此值生效,取值为其他的人员userid组成的的字符串,使用|符号进行分割
|
||||
*/
|
||||
private String userPerimits;
|
||||
|
||||
/**
|
||||
* 是否本部门的员工仅可见员工自己, 为true时,本部门员工默认只能看到员工自己
|
||||
*/
|
||||
private Boolean outerDept;
|
||||
|
||||
/**
|
||||
* 本部门的员工仅可见员工自己为true时,可以配置额外可见部门,值为部门id组成的的字符串,使用|符号进行分割
|
||||
*/
|
||||
private String outerPermitDepts;
|
||||
|
||||
/**
|
||||
* 本部门的员工仅可见员工自己为true时,可以配置额外可见人员,值为userid组成的的字符串,使用| 符号进行分割
|
||||
*/
|
||||
private String outerPermitUsers;
|
||||
|
||||
/**
|
||||
* 企业群群主
|
||||
*/
|
||||
private String orgDeptOwner;
|
||||
|
||||
/**
|
||||
* 部门的主管列表,取值为由主管的userid组成的字符串,不同的userid使用|符号进行分割
|
||||
*/
|
||||
private String deptManagerUseridList;
|
||||
|
||||
|
||||
/**
|
||||
* 该部门下所有的用户数,包括子部门
|
||||
*/
|
||||
private Integer userCount;
|
||||
|
||||
/**
|
||||
* 部门下所有未激活的用户数,包括子部门
|
||||
*/
|
||||
private Integer unactiveUserCount;
|
||||
|
||||
/**
|
||||
* 父级部门ids
|
||||
*/
|
||||
private String parentIds;
|
||||
|
||||
/**
|
||||
* 子部门ids
|
||||
*/
|
||||
private String subIds;
|
||||
|
||||
|
||||
public SysDepartmentDTO() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造函数
|
||||
*
|
||||
* @param nodeId 节点Id
|
||||
*/
|
||||
public SysDepartmentDTO(String nodeId) {
|
||||
this.id = nodeId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造函数
|
||||
*
|
||||
* @param nodeId 节点Id
|
||||
* @param parentId 父节点Id
|
||||
*/
|
||||
|
||||
public SysDepartmentDTO(String nodeId, String parentId) {
|
||||
this.id = nodeId;
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设置部门名称
|
||||
*
|
||||
* @param name 部门名称
|
||||
*/
|
||||
public void setName(String name) {
|
||||
if (StringUtils.isNotBlank(name)) {
|
||||
this.name = name.replaceAll("[\\ud800\\udc00-\\udbff\\udfff\\ud800-\\udfff]", "");
|
||||
if (StringUtils.isBlank(this.name)) {
|
||||
this.name = "空";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取父部门id,根部门为1
|
||||
*
|
||||
* @return parent_id - 父部门id,根部门为1
|
||||
*/
|
||||
public String getParentId() {
|
||||
if (id.equals(CommonConstants.ROOT_DEPT_ID_STR)) {
|
||||
return null;
|
||||
}
|
||||
return parentId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SysDepartment{" +
|
||||
"id=" + id +
|
||||
", parentId=" + parentId + ",name='" + name + '\'' +
|
||||
'}';
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
SysDepartmentDTO that = (SysDepartmentDTO) o;
|
||||
return Objects.equals(id, that.id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id);
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,14 @@
|
||||
package com.cool.store.model.entity;
|
||||
package com.cool.store.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author zhangchenbiao
|
||||
@@ -1,12 +1,13 @@
|
||||
package com.cool.store.model.entity;
|
||||
package com.cool.store.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author zhangchenbiao
|
||||
@@ -6,6 +6,7 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -28,7 +29,7 @@ public class RegionDO implements Serializable {
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("父区域id")
|
||||
private Long parentId;
|
||||
private String parentId;
|
||||
|
||||
@ApiModelProperty("阿里云分组id")
|
||||
private String groupId;
|
||||
@@ -74,4 +75,15 @@ public class RegionDO implements Serializable {
|
||||
|
||||
@ApiModelProperty("第三方唯一id")
|
||||
private String thirdDeptId;
|
||||
|
||||
public String getFullRegionPath() {
|
||||
if(id != null && id == 1L){
|
||||
return "/1/";
|
||||
}
|
||||
if (StringUtils.isNotBlank(regionPath)) {
|
||||
return regionPath + id + "/";
|
||||
} else {
|
||||
return "/" + id + "/";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
|
||||
import com.cool.store.entity.EnterpriseUserDO;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName EnterpriseUserDO
|
||||
* @Description 用于封装EnterpriseUserDO和部门字段
|
||||
* @author 首亮
|
||||
*/
|
||||
@Data
|
||||
public class EnterpriseUserRequest {
|
||||
|
||||
private EnterpriseUserDO enterpriseUserDO;
|
||||
|
||||
private String department;
|
||||
|
||||
private String departments;
|
||||
|
||||
private List<String> departmentLists;
|
||||
|
||||
private List<String> leaderInDepts;
|
||||
}
|
||||
Reference in New Issue
Block a user