系统管理相关feign封装
This commit is contained in:
@ -0,0 +1,53 @@
|
||||
package com.chinaunicom.mall.ebtp.common.base.client;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.chinaunicom.mall.ebtp.common.base.entity.*;
|
||||
import com.chinaunicom.mall.ebtp.common.base.fallback.SystemClientFallback;
|
||||
import com.chinaunicom.mall.ebtp.common.constant.ServiceNameConstants;
|
||||
import com.chinaunicom.mall.ebtp.common.dt.fallback.DtFeignClientFallback;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.cloud.openfeign.SpringQueryMap;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@FeignClient(name = ServiceNameConstants.SYSTEM_SERVICE
|
||||
,fallback = SystemClientFallback.class
|
||||
)
|
||||
public interface SystemClient {
|
||||
|
||||
// -----------------------用户接口-----------------------
|
||||
@ApiOperation("分页查询用户信息")
|
||||
@PostMapping("/v1/sysuser/getPage")
|
||||
BaseResponse<Page<SysUser>> getUserPage(
|
||||
@ApiParam(value = "对象数据", required = true) @RequestBody SysUserVO sysUserDTO,
|
||||
@RequestHeader("isFegin") String privateKey
|
||||
);
|
||||
|
||||
@ApiOperation("查询用户列表")
|
||||
@GetMapping("/v1/sysuser/list")
|
||||
BaseResponse<List<SysUser>> getUserlist(
|
||||
@RequestHeader("isFegin") String privateKey,
|
||||
@ApiParam(value = "查询对象数据", required = false) @SpringQueryMap SysUser param);
|
||||
|
||||
// -----------------------组织接口-----------------------
|
||||
@ApiOperation("查询组织信息(当前组织及下级组织列表)")
|
||||
@GetMapping("/v1/sysorg/queryOrgWithChildren")
|
||||
BaseResponse<List<SysOrg>> getOrgWithChildren(@ApiParam(value = "查询条件", required = false) @SpringQueryMap SysOrg sysOrg);
|
||||
|
||||
@ApiOperation("查询机构详细信息")
|
||||
@GetMapping("/v1/sysorg/{id}")
|
||||
BaseResponse<SysOrg> getOrgInfo(@ApiParam(value = "主键id", required = true) @PathVariable String id);
|
||||
|
||||
@ApiOperation("查询机构列表")
|
||||
@GetMapping("/v1/sysorg/list")
|
||||
BaseResponse<List<SysOrg>> getOrglist(@ApiParam(value = "查询对象数据", required = false) @SpringQueryMap SysOrg param);
|
||||
|
||||
@ApiOperation("查询所有数据(树形结构)")
|
||||
@GetMapping("/v1/sysorg/queryAll")
|
||||
BaseResponse<List<SysOrgVO>> queryAll(@SpringQueryMap SysOrg sysOrg);
|
||||
|
||||
}
|
@ -0,0 +1,91 @@
|
||||
package com.chinaunicom.mall.ebtp.common.base.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 实体类 SysOrg-机构表
|
||||
*
|
||||
* @author yss
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@TableName(value = "sys_org", autoResultMap = true)
|
||||
@ApiModel(value = "SysOrg对象", description = "机构表")
|
||||
public class SysOrg extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "部门ID")
|
||||
@TableId(value = "org_id", type = IdType.INPUT)
|
||||
private String orgId;
|
||||
|
||||
@ApiModelProperty(value = "部门名称")
|
||||
private String orgName;
|
||||
|
||||
@ApiModelProperty(value = "部门编码")
|
||||
private String orgNum;
|
||||
|
||||
@ApiModelProperty(value = "部门链式ID")
|
||||
private String orgFullId;
|
||||
|
||||
@ApiModelProperty(value = "部门链式全称")
|
||||
private String orgFullName;
|
||||
|
||||
@ApiModelProperty(value = "上级部门id")
|
||||
private String upOrgId;
|
||||
|
||||
@ApiModelProperty(value = "组织类型(Org:表示公司;Dept:表示部门)")
|
||||
private String orgCategory;
|
||||
|
||||
@ApiModelProperty(value = "部门或者团队领导名称")
|
||||
private String leaderName;
|
||||
|
||||
@ApiModelProperty(value = "部门或者团队领导oaCode")
|
||||
private String leaderOaCode;
|
||||
|
||||
@ApiModelProperty(value = "部门或者团队领导userid")
|
||||
private String leaderUserId;
|
||||
|
||||
@ApiModelProperty(value = "分管部门领导名称")
|
||||
private String topLeaderName;
|
||||
|
||||
@ApiModelProperty(value = "分管部门领导oaCode")
|
||||
private String topLeaderOaCode;
|
||||
|
||||
@ApiModelProperty(value = "分管部门领导userid")
|
||||
private String topLeaderUserId;
|
||||
|
||||
@ApiModelProperty(value = "显示顺序")
|
||||
private String sort;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty(value = "分支机构标识 1是 0不是")
|
||||
private Integer branch;
|
||||
|
||||
@ApiModelProperty(value = "省份简称")
|
||||
private String site;
|
||||
|
||||
@ApiModelProperty(value = "所属分公司编码")
|
||||
private String cuCompanyNumber;
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty(value = "租户ID")
|
||||
private String tenantId;
|
||||
|
||||
@ApiModelProperty(value = "租户名称")
|
||||
private String tenantName;
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package com.chinaunicom.mall.ebtp.common.base.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户角色信息VO类 SysRoleVO
|
||||
*
|
||||
* @author zyx
|
||||
* @date 2025/5/8
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("用户角色信息VO类")
|
||||
@TableName(autoResultMap = true)
|
||||
public class SysOrgVO extends SysOrg implements Serializable {
|
||||
|
||||
/**
|
||||
* 分页数据
|
||||
*/
|
||||
@ApiModelProperty(value = "分页对象信息")
|
||||
private BasePageRequest basePageRequest;
|
||||
private String id;
|
||||
private String title;
|
||||
private String value;
|
||||
private String key;
|
||||
|
||||
@ApiModelProperty(value = "树级结构展示节点")
|
||||
private List<SysOrgVO> children;
|
||||
|
||||
@ApiModelProperty(value = "树形结构所有部门ID")
|
||||
private String allDepartmentId;
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.chinaunicom.mall.ebtp.common.base.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 实体类 SysUser-门户用户表
|
||||
*
|
||||
* @author yss
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "SysUser对象", description = "门户用户表")
|
||||
public class SysUser extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty(value = "密码")
|
||||
private String password;
|
||||
|
||||
@ApiModelProperty(value = "中文姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "一般情况下,等于name字段值,如部门内有重名的情况,可以以特殊名称标明,例如:张明(大),张明(小)等")
|
||||
private String displayName;
|
||||
|
||||
@ApiModelProperty(value = "portal的实际id,不一定为统一邮件前缀")
|
||||
private String portalId;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "HR员工编码(非正式用户无该信息)")
|
||||
private String employeeNumber;
|
||||
|
||||
@ApiModelProperty(value = "用户办公电话")
|
||||
private String officePhone;
|
||||
|
||||
@ApiModelProperty(value = "手机号码(用于接收短信提醒)等")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty(value = "统一邮件")
|
||||
private String email;
|
||||
|
||||
@ApiModelProperty(value = "性别")
|
||||
private String sex;
|
||||
|
||||
@ApiModelProperty(value = "部门机构ID")
|
||||
private String orgId;
|
||||
|
||||
@ApiModelProperty(value = "部门机构名称")
|
||||
private String orgName;
|
||||
|
||||
@ApiModelProperty(value = "岗位")
|
||||
private String position;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.chinaunicom.mall.ebtp.common.base.entity;
|
||||
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ApiModel("用户信息VO类")
|
||||
public class SysUserVO extends SysUser implements Serializable {
|
||||
/**
|
||||
* 分页数据
|
||||
*/
|
||||
@ApiModelProperty(value = "分页对象信息")
|
||||
private BasePageRequest basePageRequest;
|
||||
|
||||
@ApiModelProperty(value = "角色ID集合")
|
||||
private List<String> roleIds;
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package com.chinaunicom.mall.ebtp.common.base.fallback;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.chinaunicom.mall.ebtp.common.base.client.SystemClient;
|
||||
import com.chinaunicom.mall.ebtp.common.base.entity.*;
|
||||
import com.chinaunicom.mall.ebtp.common.dt.client.DtFeignClient;
|
||||
import com.chinaunicom.mall.ebtp.common.dt.entity.*;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Component
|
||||
public class SystemClientFallback implements SystemClient {
|
||||
|
||||
|
||||
@Override
|
||||
public BaseResponse<Page<SysUser>> getUserPage(SysUserVO sysUserDTO, String privateKey) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseResponse<List<SysUser>> getUserlist(String privateKey, SysUser param) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseResponse<SysOrg> getOrgInfo(String id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseResponse<List<SysOrg>> getOrglist(SysOrg param) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseResponse<List<SysOrgVO>> queryAll(SysOrg sysOrg) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseResponse<List<SysOrg>> getOrgWithChildren(SysOrg sysOrg) {
|
||||
return null;
|
||||
}
|
||||
}
|
@ -109,5 +109,11 @@ public interface ServiceNameConstants {
|
||||
* 扩展服务
|
||||
*/
|
||||
String EXTEND_SERVICE = "biz-service-ebtp-extend";
|
||||
|
||||
|
||||
/**
|
||||
* 系统管理服务
|
||||
*/
|
||||
String SYSTEM_SERVICE = "sys-manager-ebtp-project";
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user