Commit 3ca08b07 authored by fangxinjiang's avatar fangxinjiang

EKP 费用明细服务

parent b842f3bf
...@@ -106,6 +106,7 @@ ...@@ -106,6 +106,7 @@
<module>yifu-business</module> <module>yifu-business</module>
<module>yifu-msg</module> <module>yifu-msg</module>
<module>yifu-permission</module> <module>yifu-permission</module>
<module>yifu-ekp</module>
</modules> </modules>
<dependencyManagement> <dependencyManagement>
......
dapr.upms.appUrl=http://yifu-upms.qas-mvp.svc.cluster.local:3500/v1.0/invoke/ dapr.upms.appUrl=http://localhost:3500/v1.0/invoke/
dapr.upms.appId=yifu-upms dapr.upms.appId=yifu-upms
#\u6D4B\u8BD5\u73AF\u5883 #\u6D4B\u8BD5\u73AF\u5883
#dapr.check.appUrl=http://yifu-check.qas-mvp.svc.cluster.local:3500/v1.0/invoke/ #dapr.check.appUrl=http://yifu-check.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
#\u6D4B\u8BD5\u73AF\u5883 #\u672C\u5730
dapr.check.appUrl=http://yifu-check.qas-mvp.svc.cluster.local:3500/v1.0/invoke/ dapr.check.appUrl=http://localhost:3507/v1.0/invoke/
dapr.check.appId=yifu-check dapr.check.appId=yifu-check
#\u6D4B\u8BD5\u73AF\u5883 #\u672C\u5730
dapr.archives.appUrl=http://yifu-archives.qas-mvp.svc.cluster.local:3500/v1.0/invoke/ dapr.archives.appUrl=http://localhost:3508/v1.0/invoke/
dapr.archives.appId=yifu-archives dapr.archives.appId=yifu-archives
#\u6D4B\u8BD5\u73AF\u5883 #\u672C\u5730
dapr.salary.appUrl=http://yifu-salary.qas-mvp.svc.cluster.local:3500/v1.0/invoke/ dapr.salary.appUrl=http://localhost:3520/v1.0/invoke/
dapr.salary.appId=yifu-salary dapr.salary.appId=yifu-salary
#\u6D4B\u8BD5\u73AF\u5883
dapr.social.appUrl=http://yifu-social.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.social.appUrl=http://localhost:3510/v1.0/invoke/
dapr.social.appId=yifu-social dapr.social.appId=yifu-social
#\u6D4B\u8BD5\u73AF\u5883-B\u7AEF\u670D\u52A1 #\u6D4B\u8BD5\u73AF\u5883-B\u7AEF\u670D\u52A1
...@@ -25,9 +26,9 @@ dapr.business.appUrl=http://yifu-business.qas-mvp.svc.cluster.local:3500/v1.0/in ...@@ -25,9 +26,9 @@ dapr.business.appUrl=http://yifu-business.qas-mvp.svc.cluster.local:3500/v1.0/in
dapr.business.appId=yifu-business dapr.business.appId=yifu-business
#\u6D4B\u8BD5\u73AF\u5883-\u6D88\u606F\u63D0\u9192\u670D\u52A1 #\u6D4B\u8BD5\u73AF\u5883-\u6D88\u606F\u63D0\u9192\u670D\u52A1
dapr.msg.appUrl=http://yifu-msg.qas-mvp.svc.cluster.local:3500/v1.0/invoke/ dapr.msg.appUrl=http://localhost:3535/v1.0/invoke/
dapr.msg.appId=yifu-msg dapr.msg.appId=yifu-msg
#\u6D4B\u8BD5\u73AF\u5883-EKP\u6743\u9650 #\u6D4B\u8BD5\u73AF\u5883-EKP\u6743\u9650
dapr.permission.appUrl=http://yifu-permission.qas-mvp.svc.cluster.local:3500/v1.0/invoke/ dapr.permission.appUrl=http://localhost:3536/v1.0/invoke/
dapr.permission.appId=yifu-permission dapr.permission.appId=yifu-permission
\ No newline at end of file
# 忽略匹配下列规则的Git 提交 V2.1.0
### gradle ###
.gradle
/build/
!gradle/wrapper/gradle-wrapper.jar
### STS ###
.settings/
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
bin/
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
*.lock
rebel.xml
### NetBeans ###
nbproject/private/
build/
nbbuild/
nbdist/
.nb-gradle/
### maven ###
target/
*.war
*.ear
*.zip
*.tar
*.tar.gz
### logs ####
/logs/
*.log
### temp ignore ###
*.cache
*.diff
*.patch
*.tmp
*.java~
*.properties~
*.xml~
### system ignore ###
.DS_Store
Thumbs.db
Servers
.metadata
upload
gen_code
### node ###
node_modules
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>yifu</artifactId>
<groupId>com.yifu.cloud.plus.v1</groupId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>yifu-ekp</artifactId>
<description>EKP-数据处理</description>
<packaging>pom</packaging>
<!--项目子模块-->
<modules>
<module>yifu-ekp-api</module>
<module>yifu-ekp-biz</module>
</modules>
</project>
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu</artifactId>
<version>1.0.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>yifu-ekp-api</artifactId>
<packaging>jar</packaging>
<description>EKP 数据处理</description>
<dependencies>
<!-- core 工具类 -->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-core</artifactId>
</dependency>
<!--swagger 注解-->
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
</dependency>
<!--mybatis 依赖-->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-mybatis</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-archives-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
package com.yifu.cloud.plus.v1.yifu.permission.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
/**
* 新权限-菜单表
*
* @author hyc
* @date 2023-08-29 14:49:40
*/
@Data
@TableName("sys_menu")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "新权限-菜单表")
public class SysMenu extends BaseEntity {
/**
* ID
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "ID")
private String id;
/**
* 菜单名称
*/
@Schema(description = "菜单名称")
private String menuName;
/**
* 上级菜单名称
*/
@Schema(description = "上级菜单名称")
private String menuNameParent;
/**
* 上级菜单id
*/
@Schema(description = "上级菜单id")
private String menuParentId;
/**
* 表单ID
*/
@Schema(description = "表单ID")
private String modelId;
/**
* 视图ID
*/
@Schema(description = "视图ID")
private String viewId;
/**
* 权限维度
*/
@Schema(description = "权限维度")
private String permissionType;
/**
* 授权状态(0启用、1禁用)
*/
@Schema(description = "授权状态(0启用、1禁用)")
private String permissionStatus;
/**
* 删除状态(0是、1否)
*/
@Schema(description = "删除状态(0是、1否)")
private String deleteStatus;
/**
* 收入权限id
*/
@Schema(description = "收入权限id")
private String incomeId;
/**
* 客户权限id
* 1客户权限;2商机;3报价单;4合同;5项目;6BU;7条线;8部门;9收入归属
*/
@Schema(description = "客户权限id")
private String customerId;
/**
* 合同权限id
*/
@Schema(description = "合同权限id")
private String contractId;
/**
* 商机权限id
*/
@Schema(description = "商机权限id")
private String bussinessId;
/**
* 报价单权限id
*/
@Schema(description = "报价单权限id")
private String quotationId;
/**
* 项目权限id
*/
@Schema(description = "项目权限id")
private String domainId;
/**
* BU归属权限id
*/
@Schema(description = "BU归属权限id")
private String buId;
/**
* 条线类型权限id
*/
@Schema(description = "条线类型权限id")
private String lineId;
/**
* 部门权限id
*/
@Schema(description = "部门权限id")
private String deptId;
/**
* 二级指标归属id
*/
@Schema(description = "二级指标归属id")
private String twoLevelId;
/**
* 权限idList
*/
@Schema(description = "权限idList")
@TableField(exist = false)
private List<String> columnIdList;
/**
* 是否开关(0开、1关)
*/
@Schema(description = "是否开关(0开、1关)")
private String isOpen;
/**
* 表名,用来先查结果集
*/
@Schema(description = "表名,用来先查结果集")
private String tableName;
/**
* 查询字段维度,如果fdId超长,则使用本字段
*/
@Schema(description = "查询字段维度,如果fdId超长,则使用本字段")
private String queryFields;
/**
* 税务主体字段ID
*/
@Schema(description = "税务主体字段ID")
private String taxId;
}
package com.yifu.cloud.plus.v1.yifu.permission.entity;/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
/**
* 新权限-角色表
*
* @author hgw
* @date 2023-08-29 14:49:40
*/
@Data
@TableName("sys_role_info")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "新权限-角色表")
public class SysRoleInfo extends BaseEntity {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("主键")
@Schema(description = "主键")
private String fdId;
/**
* 角色名称
*/
@ExcelAttribute(name = "角色名称", isNotEmpty = true, errorInfo = "角色名称不能为空", maxLength = 20)
@NotBlank(message = "角色名称不能为空")
@Length(max = 20, message = "角色名称不能超过20个字符")
@ExcelProperty("角色名称")
@Schema(description = "角色名称")
private String roleName;
/**
* 角色描述
*/
@ExcelAttribute(name = "角色描述", maxLength = 200)
@Length(max = 200, message = "角色描述不能超过200个字符")
@ExcelProperty("角色描述")
@Schema(description = "角色描述")
private String remark;
/**
* 状态:0:正常;1:冻结/停用
*/
@ExcelAttribute(name = "状态:0:正常;1:冻结/停用", isNotEmpty = true, errorInfo = "状态:0:正常;1:冻结/停用不能为空")
@NotBlank(message = "状态:0:正常;1:冻结/停用不能为空")
@ExcelProperty("状态:0:正常;1:冻结/停用")
@Schema(description = "状态:0:正常;1:冻结/停用")
private Integer status;
/**
* 删除状态图:0:正常;1:删除
*/
@ExcelAttribute(name = "删除状态图:0:正常;1:删除", isNotEmpty = true, errorInfo = "删除状态图:0:正常;1:删除不能为空")
@NotBlank(message = "删除状态图:0:正常;1:删除不能为空")
@ExcelProperty("删除状态图:0:正常;1:删除")
@Schema(description = "删除状态图:0:正常;1:删除")
private Integer deleteFlag;
/**
* 数据权限(全量0;部分全量1;数据权限2;客户a;商机b;报价单c;合同d;项目e;BUf;条线g;收入归属h;)
*/
@ExcelAttribute(name = "数据权限(全量0;部分全量1;数据权限2;客户a;商机b;报价单c;合同d;项目e;BUf;条线g;收入归属h;)", isNotEmpty = true, errorInfo = "数据权限(全量0;部分全量1;数据权限2;客户a;商机b;报价单c;合同d;项目e;BUf;条线g;收入归属h;)不能为空", maxLength = 50)
@NotBlank(message = "数据权限(全量0;部分全量1;数据权限2;客户a;商机b;报价单c;合同d;项目e;BUf;条线g;收入归属h;)不能为空")
@Length(max = 50, message = "数据权限(全量0;部分全量1;数据权限2;客户a;商机b;报价单c;合同d;项目e;BUf;条线g;收入归属h;)不能超过50个字符")
@ExcelProperty("数据权限(全量0;部分全量1;数据权限2;客户a;商机b;报价单c;合同d;项目e;BUf;条线g;收入归属h;)")
@Schema(description = "数据权限(全量0;部分全量1;数据权限2;客户a;商机b;报价单c;合同d;项目e;BUf;条线g;收入归属h;)")
private String dataAuth;
}
package com.yifu.cloud.plus.v1.yifu.permission.entity;/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
/**
* 新权限-角色-菜单-关联表
*
* @author hgw
* @date 2023-08-29 14:49:40
*/
@Data
@TableName("sys_role_menu_res")
@Schema(description = "新权限-角色-菜单-关联表")
public class SysRoleMenuRes {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("主键")
@Schema(description = "主键")
private String fdId;
/**
* 角色ID
*/
@ExcelAttribute(name = "角色ID", isNotEmpty = true, errorInfo = "角色ID不能为空", maxLength = 36)
@NotBlank(message = "角色ID不能为空")
@Length(max = 36, message = "角色ID不能超过36个字符")
@ExcelProperty("角色ID")
@Schema(description = "角色ID")
private String roleId;
/**
* 菜单ID
*/
@ExcelAttribute(name = "菜单ID", isNotEmpty = true, errorInfo = "菜单ID不能为空", maxLength = 36)
@NotBlank(message = "菜单ID不能为空")
@Length(max = 36, message = "菜单ID不能超过36个字符")
@ExcelProperty("菜单ID")
@Schema(description = "菜单ID")
private String menuId;
}
package com.yifu.cloud.plus.v1.yifu.permission.entity;/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
/**
* 新权限-账号管理表
*
* @author hgw
* @date 2023-08-29 14:49:40
*/
@Data
@TableName("sys_user_info")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "新权限-账号管理表")
public class SysUserInfo extends BaseEntity {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("主键")
@Schema(description = "主键")
private String fdId;
/**
* ele表-员工姓名
*/
@ExcelAttribute(name = "ele表-员工姓名", maxLength = 200)
@Length(max = 200, message = "ele表-员工姓名不能超过200个字符")
@ExcelProperty("ele表-员工姓名")
@Schema(description = "ele表-员工姓名")
private String fdName;
/**
* per表-登录账号
*/
@ExcelAttribute(name = "per表-登录账号", maxLength = 200)
@Length(max = 200, message = "per表-登录账号不能超过200个字符")
@ExcelProperty("per表-登录账号")
@Schema(description = "per表-登录账号")
private String fdLoginName;
/**
* ele表-所在部门
*/
@ExcelAttribute(name = "ele表-所在部门", maxLength = 450)
@Length(max = 450, message = "ele表-所在部门不能超过450个字符")
@ExcelProperty("ele表-所在部门")
@Schema(description = "ele表-所在部门")
private String fdLdapDn;
/**
* 所在部门
*/
@ExcelAttribute(name = "所在部门", maxLength = 100)
@Length(max = 100, message = "所在部门不能超过100个字符")
@ExcelProperty("所在部门")
@Schema(description = "所在部门")
private String fdDeptName;
/**
* per表-手机号
*/
@ExcelAttribute(name = "per表-手机号", maxLength = 150)
@Length(max = 150, message = "per表-手机号不能超过150个字符")
@ExcelProperty("per表-手机号")
@Schema(description = "per表-手机号")
private String fdMobileNo;
/**
* per表-邮箱
*/
@ExcelAttribute(name = "per表-邮箱", maxLength = 200)
@Length(max = 200, message = "per表-邮箱不能超过200个字符")
@ExcelProperty("per表-邮箱")
@Schema(description = "per表-邮箱")
private String fdEmail;
/**
* 状态:0正常;1冻结
*/
@ExcelAttribute(name = "状态:0正常;1冻结", isNotEmpty = true, errorInfo = "状态:0正常;1冻结不能为空")
@NotBlank(message = "状态:0正常;1冻结不能为空")
@ExcelProperty("状态:0正常;1冻结")
@Schema(description = "状态:0正常;1冻结")
private Integer status;
/**
* 角色名称合集
*/
@TableField(exist = false)
private String roleNames;
}
package com.yifu.cloud.plus.v1.yifu.permission.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 新权限-用户权限表
*
* @author hyc
* @date 2023-08-29 14:49:40
*/
@Data
@TableName("sys_user_permission")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "新权限-用户权限表")
public class SysUserPermission extends BaseEntity {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "id")
private String id;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 登录账号
*/
@Schema(description = "登录账号")
private String empLoginName;
/**
* 用户id
*/
@Schema(description = "用户id")
private String userId;
/**
* 所在部门
*/
@Schema(description = "所在部门")
private String empDept;
/**
* 权限类型 客户、商机、报价单、
* 1客户权限;2商机;3报价单;4合同;5项目;6BU;7条线;8部门;9收入归属;10二级指标归属;11税务主体
*/
@Schema(description = "权限类型")
private String permissionType;
/**
* 名称
*/
@Schema(description = "名称")
private String name;
/**
* 编码
*/
@Schema(description = "编码")
private String code;
/**
* 是否包含(0 是 1否)
*/
@Schema(description = "是否包含(0 是 1否)")
private String isContains;
/**
* 授权状态(0启用、1禁用)
*/
@Schema(description = "授权状态(0启用、1禁用)")
private String permissionStatus;
/**
* 删除状态(0是、1否)
*/
@Schema(description = "删除状态(0是、1否)")
private String deleteFlag;
/**
* 部门id
*/
@Schema(description = "部门id")
private String domainId;
/**
* 0:从EKP同步的;1:MVP新增的。
*/
@Schema(description = "来源")
private String sourceType;
}
package com.yifu.cloud.plus.v1.yifu.permission.entity;/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
/**
* 新权限-账号-角色关联表
*
* @author hgw
* @date 2023-08-29 14:49:40
*/
@Data
@TableName("sys_user_role_res")
@Schema(description = "新权限-账号-角色关联表")
public class SysUserRoleRes {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("主键")
@Schema(description = "主键")
private String fdId;
/**
* 账号ID
*/
@ExcelAttribute(name = "账号ID", isNotEmpty = true, errorInfo = "账号ID不能为空", maxLength = 36)
@NotBlank(message = "账号ID不能为空")
@Length(max = 36, message = "账号ID不能超过36个字符")
@ExcelProperty("账号ID")
@Schema(description = "账号ID")
private String userId;
/**
* 角色ID
*/
@ExcelAttribute(name = "角色ID", isNotEmpty = true, errorInfo = "角色ID不能为空", maxLength = 36)
@NotBlank(message = "角色ID不能为空")
@Length(max = 36, message = "角色ID不能超过36个字符")
@ExcelProperty("角色ID")
@Schema(description = "角色ID")
private String roleId;
@TableField(exist = false)
private String roleName;
@TableField(exist = false)
private String userName;
}
package com.yifu.cloud.plus.v1.yifu.permission.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* @Author hgw
* @Date 2023-9-21 17:03:57
* @Description
* @Version 1.0
*/
@Data
public class IdTypeEkpVo implements Serializable {
/**
* 主键
*/
@Schema(description = "主键")
private String fdId;
/**
* 类型
*/
@Schema(description = "类型")
private String type;
}
package com.yifu.cloud.plus.v1.yifu.permission.vo;/*
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* 新权限-字段vo
*
* @author huyc
* @date 2023-09-04 14:49:40
*/
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
@Data
public class SysDictVo implements Serializable {
/**
* 名称
*/
@Schema(description = "名称")
private String id;
/**
* 编码
*/
@Schema(description = "编码")
private String name;
}
\ No newline at end of file
package com.yifu.cloud.plus.v1.yifu.permission.vo;
import com.yifu.cloud.plus.v1.yifu.permission.entity.SysMenu;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
/**
* 新权限-菜单表
*
* @author hyc
* @date 2023-08-29 14:49:40
*/
@Data
public class SysMenuSearchVo extends SysMenu {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,多个逗号分割")
private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
/**
* @Author fxj
* 查询数据起
**/
@Schema(description = "查询limit 开始")
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
}
package com.yifu.cloud.plus.v1.yifu.permission.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 新权限-菜单表
*
* @author hyc
* @date 2023-08-29 14:49:40
*/
@Data
public class SysMenuVo extends RowIndex implements Serializable {
/**
* ID
*/
@TableId(type = IdType.ASSIGN_ID)
@NotBlank(message = "ID 不能为空")
@Length(max = 36, message = "ID 不能超过36 个字符")
@ExcelAttribute(name = "ID", isNotEmpty = true, errorInfo = "ID 不能为空", maxLength = 36)
@Schema(description = "ID")
@ExcelProperty("ID")
private String id;
/**
* 菜单名称
*/
@Length(max = 20, message = "菜单名称 不能超过20 个字符")
@ExcelAttribute(name = "菜单名称", maxLength = 20)
@Schema(description = "菜单名称")
@ExcelProperty("菜单名称")
private String menuName;
/**
* 上级菜单名称
*/
@Length(max = 20, message = "上级菜单名称 不能超过20 个字符")
@ExcelAttribute(name = "上级菜单名称", maxLength = 20)
@Schema(description = "上级菜单名称")
@ExcelProperty("上级菜单名称")
private String menuNameParent;
/**
* 上级菜单id
*/
@Length(max = 36, message = "上级菜单id 不能超过36 个字符")
@ExcelAttribute(name = "上级菜单id", maxLength = 36)
@Schema(description = "上级菜单id")
@ExcelProperty("上级菜单id")
private String menuParentId;
/**
* 表单ID
*/
@Length(max = 36, message = "表单ID 不能超过36 个字符")
@ExcelAttribute(name = "表单ID", maxLength = 36)
@Schema(description = "表单ID")
@ExcelProperty("表单ID")
private String modelId;
/**
* 视图ID
*/
@Length(max = 36, message = "视图ID 不能超过36 个字符")
@ExcelAttribute(name = "视图ID", maxLength = 36)
@Schema(description = "视图ID")
@ExcelProperty("视图ID")
private String viewId;
/**
* 授权状态(0启用、1禁用)
*/
@Length(max = 1, message = "授权状态(0启用、1禁用) 不能超过1 个字符")
@ExcelAttribute(name = "授权状态(0启用、1禁用)", maxLength = 1)
@Schema(description = "授权状态(0启用、1禁用)")
@ExcelProperty("授权状态(0启用、1禁用)")
private String permissionStatus;
/**
* 删除状态(0是、1否)
*/
@Length(max = 1, message = "删除状态(0是、1否) 不能超过1 个字符")
@ExcelAttribute(name = "删除状态(0是、1否)", maxLength = 1)
@Schema(description = "删除状态(0是、1否)")
@ExcelProperty("删除状态(0是、1否)")
private String deleteStatus;
/**
* 收入权限id
*/
@Length(max = 20, message = "收入权限id 不能超过20 个字符")
@ExcelAttribute(name = "收入权限id", maxLength = 20)
@Schema(description = "收入权限id")
@ExcelProperty("收入权限id")
private String incomeId;
/**
* 客户权限id
*/
@Length(max = 20, message = "客户权限id 不能超过20 个字符")
@ExcelAttribute(name = "客户权限id", maxLength = 20)
@Schema(description = "客户权限id")
@ExcelProperty("客户权限id")
private String customerId;
/**
* 合同权限id
*/
@Length(max = 20, message = "合同权限id 不能超过20 个字符")
@ExcelAttribute(name = "合同权限id", maxLength = 20)
@Schema(description = "合同权限id")
@ExcelProperty("合同权限id")
private String contractId;
/**
* 商机权限id
*/
@Length(max = 20, message = "商机权限id 不能超过20 个字符")
@ExcelAttribute(name = "商机权限id", maxLength = 20)
@Schema(description = "商机权限id")
@ExcelProperty("商机权限id")
private String bussinessId;
/**
* 报价单权限id
*/
@Length(max = 20, message = "报价单权限id 不能超过20 个字符")
@ExcelAttribute(name = "报价单权限id", maxLength = 20)
@Schema(description = "报价单权限id")
@ExcelProperty("报价单权限id")
private String quotationId;
/**
* 项目权限id
*/
@Length(max = 20, message = "项目权限id 不能超过20 个字符")
@ExcelAttribute(name = "项目权限id", maxLength = 20)
@Schema(description = "项目权限id")
@ExcelProperty("项目权限id")
private String domainId;
/**
* BU归属权限id
*/
@Length(max = 20, message = "BU归属权限id 不能超过20 个字符")
@ExcelAttribute(name = "BU归属权限id", maxLength = 20)
@Schema(description = "BU归属权限id")
@ExcelProperty("BU归属权限id")
private String buId;
/**
* 条线类型权限id
*/
@Length(max = 20, message = "条线类型权限id 不能超过20 个字符")
@ExcelAttribute(name = "条线类型权限id", maxLength = 20)
@Schema(description = "条线类型权限id")
@ExcelProperty("条线类型权限id")
private String lineId;
/**
* 部门权限id
*/
@Length(max = 20, message = "部门权限id 不能超过20 个字符")
@ExcelAttribute(name = "部门权限id", maxLength = 20)
@Schema(description = "部门权限id")
@ExcelProperty("部门权限id")
private String deptId;
}
package com.yifu.cloud.plus.v1.yifu.permission.vo;/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
import cn.hutool.core.lang.tree.Tree;
import com.yifu.cloud.plus.v1.yifu.permission.entity.SysRoleInfo;
import com.yifu.cloud.plus.v1.yifu.permission.entity.SysRoleMenuRes;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 角色新增vo
*
* @author hgw
* @date 2023-08-29 14:49:40
*/
@Data
public class SysRoleInfoSaveVo implements Serializable {
private SysRoleInfo role;
private List<SysRoleMenuRes> resList;
private List<Tree<String>> tree;
}
package com.yifu.cloud.plus.v1.yifu.permission.vo;
import com.yifu.cloud.plus.v1.yifu.permission.entity.SysRoleInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
/**
* 新权限-角色表
*
* @author hgw
* @date 2023-08-29 14:49:40
*/
@Data
public class SysRoleInfoSearchVo extends SysRoleInfo {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,多个逗号分割")
private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间起")
private LocalDateTime createTimeStart;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间止")
private LocalDateTime createTimeEnd;
/**
* @Author fxj
* 查询数据起
**/
@Schema(description = "查询limit 开始")
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
}
package com.yifu.cloud.plus.v1.yifu.permission.vo;/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 新权限-角色表
*
* @author hgw
* @date 2023-08-29 14:49:40
*/
@Data
public class SysRoleInfoVo extends RowIndex implements Serializable {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@NotBlank(message = "主键 不能为空")
@Length(max = 36, message = "主键 不能超过36 个字符")
@ExcelAttribute(name = "主键", isNotEmpty = true, errorInfo = "主键 不能为空", maxLength = 36)
@Schema(description = "主键")
@ExcelProperty("主键")
private String fdId;
/**
* 角色名称
*/
@NotBlank(message = "角色名称 不能为空")
@Length(max = 20, message = "角色名称 不能超过20 个字符")
@ExcelAttribute(name = "角色名称", isNotEmpty = true, errorInfo = "角色名称 不能为空", maxLength = 20)
@Schema(description = "角色名称")
@ExcelProperty("角色名称")
private String roleName;
/**
* 角色描述
*/
@Length(max = 200, message = "角色描述 不能超过200 个字符")
@ExcelAttribute(name = "角色描述", maxLength = 200)
@Schema(description = "角色描述")
@ExcelProperty("角色描述")
private String remark;
/**
* 状态:0:正常;1:冻结/停用
*/
@NotBlank(message = "状态:0:正常;1:冻结/停用 不能为空")
@ExcelAttribute(name = "状态:0:正常;1:冻结/停用", isNotEmpty = true, errorInfo = "状态:0:正常;1:冻结/停用 不能为空")
@Schema(description = "状态:0:正常;1:冻结/停用")
@ExcelProperty("状态:0:正常;1:冻结/停用")
private Integer status;
/**
* 删除状态图:0:正常;1:删除
*/
@NotBlank(message = "删除状态图:0:正常;1:删除 不能为空")
@ExcelAttribute(name = "删除状态图:0:正常;1:删除", isNotEmpty = true, errorInfo = "删除状态图:0:正常;1:删除 不能为空")
@Schema(description = "删除状态图:0:正常;1:删除")
@ExcelProperty("删除状态图:0:正常;1:删除")
private Integer deleteFlag;
/**
* 数据权限(全量0;部分全量1;数据权限2;客户a;商机b;报价单c;合同d;项目e;BUf;条线g;收入归属h;)
*/
@NotBlank(message = "数据权限(全量0;部分全量1;数据权限2;客户a;商机b;报价单c;合同d;项目e;BUf;条线g;收入归属h;) 不能为空")
@Length(max = 50, message = "数据权限(全量0;部分全量1;数据权限2;客户a;商机b;报价单c;合同d;项目e;BUf;条线g;收入归属h;) 不能超过50 个字符")
@ExcelAttribute(name = "数据权限(全量0;部分全量1;数据权限2;客户a;商机b;报价单c;合同d;项目e;BUf;条线g;收入归属h;)", isNotEmpty = true, errorInfo = "数据权限(全量0;部分全量1;数据权限2;客户a;商机b;报价单c;合同d;项目e;BUf;条线g;收入归属h;) 不能为空", maxLength = 50)
@Schema(description = "数据权限(全量0;部分全量1;数据权限2;客户a;商机b;报价单c;合同d;项目e;BUf;条线g;收入归属h;)")
@ExcelProperty("数据权限(全量0;部分全量1;数据权限2;客户a;商机b;报价单c;合同d;项目e;BUf;条线g;收入归属h;)")
private String dataAuth;
/**
* 创建人id
*/
@Length(max = 36, message = "创建人id 不能超过36 个字符")
@ExcelAttribute(name = "创建人id", maxLength = 36)
@Schema(description = "创建人id")
@ExcelProperty("创建人id")
private String createBy;
/**
* 创建人姓名
*/
@Length(max = 200, message = "创建人姓名 不能超过200 个字符")
@ExcelAttribute(name = "创建人姓名", maxLength = 200)
@Schema(description = "创建人姓名")
@ExcelProperty("创建人姓名")
private String createName;
/**
* 创建时间
*/
@ExcelAttribute(name = "创建时间", isDate = true)
@Schema(description = "创建时间")
@ExcelProperty("创建时间")
private LocalDateTime createTime;
/**
* 更新人id
*/
@Length(max = 200, message = "更新人id 不能超过200 个字符")
@ExcelAttribute(name = "更新人id", maxLength = 200)
@Schema(description = "更新人id")
@ExcelProperty("更新人id")
private String updateBy;
/**
* 更新时间
*/
@ExcelAttribute(name = "更新时间", isDate = true)
@Schema(description = "更新时间")
@ExcelProperty("更新时间")
private LocalDateTime updateTime;
}
package com.yifu.cloud.plus.v1.yifu.permission.vo;/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
import com.yifu.cloud.plus.v1.yifu.permission.entity.SysRoleMenuRes;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
/**
* 新权限-角色-菜单-关联表
*
* @author hgw
* @date 2023-08-29 14:49:40
*/
@Data
public class SysRoleMenuResSearchVo extends SysRoleMenuRes {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,多个逗号分割")
private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
/**
* @Author fxj
* 查询数据起
**/
@Schema(description = "查询limit 开始")
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
}
package com.yifu.cloud.plus.v1.yifu.permission.vo;/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 新权限-角色-菜单-关联表
*
* @author hgw
* @date 2023-08-29 14:49:40
*/
@Data
public class SysRoleMenuResVo extends RowIndex implements Serializable {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@NotBlank(message = "主键 不能为空")
@Length(max = 36, message = "主键 不能超过36 个字符")
@ExcelAttribute(name = "主键", isNotEmpty = true, errorInfo = "主键 不能为空", maxLength = 36)
@Schema(description = "主键")
@ExcelProperty("主键")
private String fdId;
/**
* 角色ID
*/
@NotBlank(message = "角色ID 不能为空")
@Length(max = 36, message = "角色ID 不能超过36 个字符")
@ExcelAttribute(name = "角色ID", isNotEmpty = true, errorInfo = "角色ID 不能为空", maxLength = 36)
@Schema(description = "角色ID")
@ExcelProperty("角色ID")
private String roleId;
/**
* 菜单ID
*/
@NotBlank(message = "菜单ID 不能为空")
@Length(max = 36, message = "菜单ID 不能超过36 个字符")
@ExcelAttribute(name = "菜单ID", isNotEmpty = true, errorInfo = "菜单ID 不能为空", maxLength = 36)
@Schema(description = "菜单ID")
@ExcelProperty("菜单ID")
private String menuId;
}
package com.yifu.cloud.plus.v1.yifu.permission.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* 税务主体
* @author hgw
* @date 2024-1-10 18:05:30
*/
@Data
public class SysTaxVo implements Serializable {
/**
* id
*/
@Schema(description = "id")
private String id;
/**
* 名称
*/
@Schema(description = "名称")
private String name;
}
\ No newline at end of file
package com.yifu.cloud.plus.v1.yifu.permission.vo;/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* 新权限-账号管理表
*
* @author huyc
* @date 2023-09-04 14:49:40
*/
@Data
public class SysUserDeptVo implements Serializable {
/**
* 名称
*/
@Schema(description = "名称")
private String name;
/**
* 编码
*/
@Schema(description = "编码")
private String code;
/**
* 类型
*/
@Schema(description = "类型")
private String type;
/**
* 登录名
*/
@Schema(description = "登录名")
private String loginName;
/**
* 部门id
*/
@Schema(description = "部门id")
private String domainId;
}
\ No newline at end of file
package com.yifu.cloud.plus.v1.yifu.permission.vo;
import com.yifu.cloud.plus.v1.yifu.permission.entity.SysUserInfo;
import com.yifu.cloud.plus.v1.yifu.permission.entity.SysUserRoleRes;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 账号新增vo
*
* @author hgw
* @date 2023-08-29 14:49:40
*/
@Data
public class SysUserInfoSaveVo implements Serializable {
private SysUserInfo user;
private List<SysUserRoleRes> resList;
private String dataAuth;
}
package com.yifu.cloud.plus.v1.yifu.permission.vo;/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
import com.yifu.cloud.plus.v1.yifu.permission.entity.SysUserInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
/**
* 新权限-账号管理表
*
* @author hgw
* @date 2023-08-29 14:49:40
*/
@Data
public class SysUserInfoSearchVo extends SysUserInfo {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,多个逗号分割")
private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
/**
* @Author fxj
* 查询数据起
**/
@Schema(description = "查询limit 开始")
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
}
package com.yifu.cloud.plus.v1.yifu.permission.vo;/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 新权限-账号管理表
*
* @author hgw
* @date 2023-08-29 14:49:40
*/
@Data
public class SysUserInfoVo extends RowIndex implements Serializable {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@NotBlank(message = "主键 不能为空")
@Length(max = 36, message = "主键 不能超过36 个字符")
@ExcelAttribute(name = "主键", isNotEmpty = true, errorInfo = "主键 不能为空", maxLength = 36)
@Schema(description = "主键")
@ExcelProperty("主键")
private String fdId;
/**
* ele表-员工姓名
*/
@Length(max = 200, message = "ele表-员工姓名 不能超过200 个字符")
@ExcelAttribute(name = "ele表-员工姓名", maxLength = 200)
@Schema(description = "ele表-员工姓名")
@ExcelProperty("ele表-员工姓名")
private String fdName;
/**
* per表-登录账号
*/
@Length(max = 200, message = "per表-登录账号 不能超过200 个字符")
@ExcelAttribute(name = "per表-登录账号", maxLength = 200)
@Schema(description = "per表-登录账号")
@ExcelProperty("per表-登录账号")
private String fdLoginName;
/**
* ele表-所在部门
*/
@Length(max = 450, message = "ele表-所在部门 不能超过450 个字符")
@ExcelAttribute(name = "ele表-所在部门", maxLength = 450)
@Schema(description = "ele表-所在部门")
@ExcelProperty("ele表-所在部门")
private String fdLdapDn;
/**
* 所在部门
*/
@Length(max = 100, message = "所在部门 不能超过100 个字符")
@ExcelAttribute(name = "所在部门", maxLength = 100)
@Schema(description = "所在部门")
@ExcelProperty("所在部门")
private String fdDeptName;
/**
* per表-手机号
*/
@Length(max = 150, message = "per表-手机号 不能超过150 个字符")
@ExcelAttribute(name = "per表-手机号", maxLength = 150)
@Schema(description = "per表-手机号")
@ExcelProperty("per表-手机号")
private String fdMobileNo;
/**
* per表-邮箱
*/
@Length(max = 200, message = "per表-邮箱 不能超过200 个字符")
@ExcelAttribute(name = "per表-邮箱", maxLength = 200)
@Schema(description = "per表-邮箱")
@ExcelProperty("per表-邮箱")
private String fdEmail;
/**
* 状态:0正常;1冻结
*/
@NotBlank(message = "状态:0正常;1冻结 不能为空")
@ExcelAttribute(name = "状态:0正常;1冻结", isNotEmpty = true, errorInfo = "状态:0正常;1冻结 不能为空")
@Schema(description = "状态:0正常;1冻结")
@ExcelProperty("状态:0正常;1冻结")
private Integer status;
/**
* 角色名称合集
*/
@Length(max = 200, message = "角色名称合集 不能超过200 个字符")
@ExcelAttribute(name = "角色名称合集", maxLength = 200)
@Schema(description = "角色名称合集")
@ExcelProperty("角色名称合集")
private String roleNames;
/**
* 创建人id
*/
@Length(max = 36, message = "创建人id 不能超过36 个字符")
@ExcelAttribute(name = "创建人id", maxLength = 36)
@Schema(description = "创建人id")
@ExcelProperty("创建人id")
private String createBy;
/**
* 创建人姓名
*/
@Length(max = 200, message = "创建人姓名 不能超过200 个字符")
@ExcelAttribute(name = "创建人姓名", maxLength = 200)
@Schema(description = "创建人姓名")
@ExcelProperty("创建人姓名")
private String createName;
/**
* 创建时间
*/
@ExcelAttribute(name = "创建时间", isDate = true)
@Schema(description = "创建时间")
@ExcelProperty("创建时间")
private LocalDateTime createTime;
/**
* 更新人id
*/
@Length(max = 200, message = "更新人id 不能超过200 个字符")
@ExcelAttribute(name = "更新人id", maxLength = 200)
@Schema(description = "更新人id")
@ExcelProperty("更新人id")
private String updateBy;
/**
* 更新时间
*/
@ExcelAttribute(name = "更新时间", isDate = true)
@Schema(description = "更新时间")
@ExcelProperty("更新时间")
private LocalDateTime updateTime;
}
package com.yifu.cloud.plus.v1.yifu.permission.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 新权限-用户权限表
*
* @author hyc
* @date 2023-08-29 14:49:40
*/
@Data
public class SysUserPermissionExportVo implements Serializable {
/**
* 员工姓名
*/
@Length(max = 20, message = "员工姓名 不能超过20 个字符")
@ExcelAttribute(name = "员工姓名", maxLength = 20)
@Schema(description = "员工姓名")
@ExcelProperty("员工姓名")
private String empName;
/**
* 登录账号
*/
@NotBlank(message = "登录账号 不能为空")
@Length(max = 10, message = "登录账号 不能超过10 个字符")
@ExcelAttribute(name = "登录账号", isNotEmpty = true, errorInfo = "登录账号 不能为空", maxLength = 10)
@Schema(description = "登录账号")
@ExcelProperty("登录账号")
private String empLoginName;
/**
* 所属部门
*/
@Length(max = 20, message = "所属部门 不能超过20 个字符")
@ExcelAttribute(name = "所属部门", maxLength = 20)
@Schema(description = "所属部门")
@ExcelProperty("所属部门")
private String empDept;
/**
* 权限类型
*/
@Length(max = 8, message = "权限类型 不能超过8 个字符")
@ExcelAttribute(name = "权限类型", maxLength = 8)
@Schema(description = "权限类型")
@ExcelProperty("权限类型")
private String permissionType;
/**
* 名称
*/
@Length(max = 20, message = "名称 不能超过20 个字符")
@ExcelAttribute(name = "名称", maxLength = 20)
@Schema(description = "名称")
@ExcelProperty("名称")
private String name;
/**
* 编码
*/
@Length(max = 30, message = "编码 不能超过30 个字符")
@ExcelAttribute(name = "编码", maxLength = 30)
@Schema(description = "编码")
@ExcelProperty("编码")
private String code;
/**
* 是否包含(0 是 1否)
*/
@Length(max = 1, message = "是否含下级部门 不能超过1 个字符")
@ExcelAttribute(name = "是否含下级部门", maxLength = 1)
@Schema(description = "是否含下级部门")
@ExcelProperty("是否含下级部门")
private String isContains;
/**
* 授权状态(0启用、1禁用)
*/
@Length(max = 1, message = "授权状态 不能超过1 个字符")
@ExcelAttribute(name = "授权状态", maxLength = 1)
@Schema(description = "授权状态")
@ExcelProperty("授权状态")
private String permissionStatus;
}
package com.yifu.cloud.plus.v1.yifu.permission.vo;
import com.yifu.cloud.plus.v1.yifu.permission.entity.SysUserPermission;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;
/**
* 新权限-用户权限表
*
* @author hyc
* @date 2023-08-29 14:49:40
*/
@Data
public class SysUserPermissionSearchVo extends SysUserPermission {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,数组")
private List<String> idList;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
/**
* @Author fxj
* 查询数据起
**/
@Schema(description = "查询limit 开始")
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
}
package com.yifu.cloud.plus.v1.yifu.permission.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 新权限-用户权限表
*
* @author hyc
* @date 2023-08-29 14:49:40
*/
@Data
public class SysUserPermissionVo extends RowIndex implements Serializable {
/**
* 员工姓名
*/
@Length(max = 20, message = "员工姓名 不能超过20 个字符")
@ExcelAttribute(name = "员工姓名", maxLength = 20)
@Schema(description = "员工姓名")
@ExcelProperty("员工姓名")
private String empName;
/**
* 登录账号
*/
@NotBlank(message = "登录账号 不能为空")
@Length(max = 20, message = "登录账号 不能超过20 个字符")
@ExcelAttribute(name = "登录账号", isNotEmpty = true, errorInfo = "登录账号 不能为空", maxLength = 20)
@Schema(description = "登录账号")
@ExcelProperty("登录账号")
private String empLoginName;
/**
* 用户id
*/
@Schema(description = "用户id")
@ExcelAttribute(name = "用户id")
private String userId;
/**
* 所属部门
*/
@Length(max = 20, message = "所属部门 不能超过20 个字符")
@ExcelAttribute(name = "所属部门", maxLength = 20)
@Schema(description = "所属部门")
@ExcelProperty("所属部门")
private String empDept;
/**
* 权限类型
*/
@NotBlank(message = "权限类型 不能为空")
@Length(max = 8, message = "权限类型 不能超过8 个字符")
@ExcelAttribute(name = "权限类型", isNotEmpty = true, errorInfo = "权限类型 不能为空", maxLength = 8)
@Schema(description = "权限类型")
@ExcelProperty("权限类型")
private String permissionType;
/**
* 名称
*/
@Length(max = 200, message = "名称 不能超过200 个字符")
@ExcelAttribute(name = "名称", maxLength = 200)
@Schema(description = "名称")
@ExcelProperty("名称")
private String name;
/**
* 编码
*/
@Length(max = 30, message = "编码 不能超过30 个字符")
@ExcelAttribute(name = "编码", maxLength = 30)
@Schema(description = "编码")
@ExcelProperty("编码")
private String code;
/**
* 是否包含(0 是 1否)
*/
@Length(max = 1, message = "是否含下级部门 不能超过1 个字符")
@ExcelAttribute(name = "是否含下级部门", maxLength = 1)
@Schema(description = "是否含下级部门")
@ExcelProperty("是否含下级部门")
private String isContains;
/**
* 授权状态(0启用、1禁用)
*/
@Length(max = 1, message = "授权状态 不能超过1 个字符")
@ExcelAttribute(name = "授权状态", maxLength = 1)
@Schema(description = "授权状态")
@ExcelProperty("授权状态")
private String permissionStatus;
}
package com.yifu.cloud.plus.v1.yifu.permission.vo;/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
import com.yifu.cloud.plus.v1.yifu.permission.entity.SysUserRoleRes;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
/**
* 新权限-账号-角色关联表
*
* @author hgw
* @date 2023-08-29 14:49:40
*/
@Data
public class SysUserRoleResSearchVo extends SysUserRoleRes {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,多个逗号分割")
private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
/**
* @Author fxj
* 查询数据起
**/
@Schema(description = "查询limit 开始")
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
}
package com.yifu.cloud.plus.v1.yifu.permission.vo;/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 新权限-账号-角色关联表
*
* @author hgw
* @date 2023-08-29 14:49:40
*/
@Data
public class SysUserRoleResVo extends RowIndex implements Serializable {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@NotBlank(message = "主键 不能为空")
@Length(max = 36, message = "主键 不能超过36 个字符")
@ExcelAttribute(name = "主键", isNotEmpty = true, errorInfo = "主键 不能为空", maxLength = 36)
@Schema(description = "主键")
@ExcelProperty("主键")
private String fdId;
/**
* 账号ID
*/
@NotBlank(message = "账号ID 不能为空")
@Length(max = 36, message = "账号ID 不能超过36 个字符")
@ExcelAttribute(name = "账号ID", isNotEmpty = true, errorInfo = "账号ID 不能为空", maxLength = 36)
@Schema(description = "账号ID")
@ExcelProperty("账号ID")
private String userId;
/**
* 角色ID
*/
@NotBlank(message = "角色ID 不能为空")
@Length(max = 36, message = "角色ID 不能超过36 个字符")
@ExcelAttribute(name = "角色ID", isNotEmpty = true, errorInfo = "角色ID 不能为空", maxLength = 36)
@Schema(description = "角色ID")
@ExcelProperty("角色ID")
private String roleId;
}
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.yifu.cloud.plus.v1.msg.utils.EkpMsgUtil
\ No newline at end of file
FROM moxm/java:1.8-full
RUN mkdir -p /yifu-ekp-biz
WORKDIR yifu-ekp-biz
ARG JAR_FILE=target/yifu-ekp-biz.jar
COPY ${JAR_FILE} app.jar
EXPOSE 5027
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
CMD sleep 60; java -jar app.jar $JAVA_OPTS
#!/usr/bin/env bash
mvn clean package -Pprd -Dmaven.test.skip=true docker:build -DpushImage
\ No newline at end of file
#!/usr/bin/env bash
mvn clean package -Ptest -Dmaven.test.skip=true docker:build -DpushImage
\ No newline at end of file
#!/usr/bin/env bash
mvn clean package -Dmaven.test.skip=true docker:build -DpushImage
\ No newline at end of file
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>yifu-ekp-biz</artifactId>
<packaging>jar</packaging>
<description>EKP-数据处理</description>
<dependencies>
<!--选配: 依赖seata模块-->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-seata</artifactId>
</dependency>
<!--选配: orm 模块-->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!--必备:安全模块-->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-security</artifactId>
</dependency>
<!--必备:日志处理-->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-log</artifactId>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-archives-api</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-salary-api</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-insurances-api</artifactId>
<version>1.0.0</version>
</dependency>
<!--必备:swagger-->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-swagger</artifactId>
</dependency>
<!--必备:undertow容器-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-archives-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-salary-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
<version>5.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>sharding-transaction-base-seata-at</artifactId>
<version>4.1.1</version>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-core</artifactId>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-ekp</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>1.1.0</version>
<configuration>
<serverId>docker-hub</serverId>
<!--指定生成的镜像名-->
<imageName>${my.hub.host}/${map.group.name}/${project.artifactId}:${project.version}</imageName>
<dockerDirectory>${project.basedir}/</dockerDirectory>
<!--指定远程 docker api地址-->
<!--<dockerHost>http://172.16.66.232:2375</dockerHost>-->
<!-- 这里是复制 jar 包到 docker 容器指定目录配置-->
<resources>
<resource>
<targetPath>/</targetPath>
<!--jar 包所在的路径 此处配置的 即对应 target 目录-->
<directory>${project.build.directory}</directory>
<!-- 需要包含的 jar包 ,这里对应的是 Dockerfile中添加的文件名 -->
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
<forceTags>true</forceTags>
</configuration>
</plugin>
</plugins>
</build>
</project>
package com.yifu.cloud.plus.v1.ekp;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.EnableYifuResourceServer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* @author pig archetype
* <p>
* 项目启动类
*/
@EnableYifuResourceServer
@SpringBootApplication
public class EkpApplication {
public static void main(String[] args) {
SpringApplication.run(EkpApplication.class, args);
}
}
package com.yifu.cloud.plus.v1.permission.config;
import com.google.common.collect.Range;
import org.apache.shardingsphere.sharding.api.sharding.standard.PreciseShardingValue;
import org.apache.shardingsphere.sharding.api.sharding.standard.RangeShardingValue;
import org.apache.shardingsphere.sharding.api.sharding.standard.StandardShardingAlgorithm;
import org.springframework.stereotype.Component;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
@Component
public class OTAStrategyShardingAlgorithm implements StandardShardingAlgorithm<LocalDateTime> {
private static final DateTimeFormatter yyyy = DateTimeFormatter.ofPattern("yyyy");
/**
* 数据插入
* @param collection
* @param preciseShardingValue
* @Author hyc
* @Date 2022-07-21
* @return
*/
@Override
public String doSharding(Collection<String> collection, PreciseShardingValue<LocalDateTime> preciseShardingValue) {
LocalDateTime value = preciseShardingValue.getValue();
String tableSuffix = value.format(yyyy);
String logicTableName = preciseShardingValue.getLogicTableName();
String table = logicTableName.concat("_").concat(tableSuffix);
return collection.stream().filter(s -> s.equals(table)).findFirst().orElseThrow(() -> new RuntimeException("逻辑分表不存在"));
}
/**
* 【范围】数据查询
* @param collection
* @param rangeShardingValue
* @Author hyc
* @Date 2022-07-21
* @return
*/
@Override
public Collection<String> doSharding(Collection<String> collection, RangeShardingValue<LocalDateTime> rangeShardingValue) {
// 逻辑表名
String logicTableName = rangeShardingValue.getLogicTableName();
// 范围参数
Range<LocalDateTime> valueRange = rangeShardingValue.getValueRange();
Set<String> queryRangeTables = extracted(logicTableName, valueRange.lowerEndpoint(), valueRange.upperEndpoint());
ArrayList<String> tables = new ArrayList<>(collection);
tables.retainAll(queryRangeTables);
return tables;
}
/**
* 根据范围计算表名
* @param logicTableName 逻辑表明
* @param lowerEndpoint 范围起点
* @param upperEndpoint 范围终端
* @Author hyc
* @Date 2022-07-21
* @return 物理表名集合
*/
private Set<String> extracted(String logicTableName, LocalDateTime lowerEndpoint, LocalDateTime upperEndpoint) {
Set<String> rangeTable = new HashSet<>();
while (lowerEndpoint.isBefore(upperEndpoint)) {
String str = getTableNameByDate(lowerEndpoint, logicTableName);
rangeTable.add(str);
lowerEndpoint = lowerEndpoint.plusYears(1);
}
// 获取物理表明
String tableName = getTableNameByDate(upperEndpoint, logicTableName);
rangeTable.add(tableName);
return rangeTable;
}
/**
* 根据日期获取表明
* @param dateTime 日期
* @param logicTableName 逻辑表名
* @Author hyc
* @Date 2022-07-21
* @return 物理表名
*/
private String getTableNameByDate(LocalDateTime dateTime, String logicTableName) {
String tableSuffix = dateTime.format(yyyy);
return logicTableName.concat("_").concat(tableSuffix);
}
@Override
public Properties getProps() {
return null;
}
@Override
public void init(Properties properties) {
}
}
# 数据源配置
spring:
shardingsphere:
datasource:
ds0:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.1.122:33306/ekp?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
username: root
password: ll_mysql
hikari:
driver-class-name: ${spring.datasource.driver-class-name}
jdbc-url: ${spring.datasource.url}
username: ${spring.datasource.username}
password: ${spring.datasource.password}
pool-name: AmytangHikariCP
minimum-idle: 10 # 最小空闲连接数量
idle-timeout: 60000 # 空闲连接存活最大时间,默认600000(10分钟)
maximum-pool-size: 12 # 连接池最大连接数,默认是10
auto-commit: true #此属性控制从池返回的连接的默认自动提交行为,默认值:true
max-lifetime: 0 #此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
names: ds0
rules:
sharding:
key-generators:
snowflake:
type: SNOWFLAKE
sharding-algorithms:
t-payment-inline:
props:
strategy: standard
algorithmClassName: com.yifu.cloud.plus.v1.ekp.config.OTAStrategyShardingAlgorithm
type: CLASS_BASED
tables:
t_payment_info:
actual-data-nodes: ds0.t_payment_info_20$->{17..24}
key-generate-strategy:
column: ID
key-generator-name: snowflake
table-strategy:
standard:
sharding-column: CREATE_TIME
sharding-algorithm-name: t-payment-inline
mvc:
pathmatch:
matching-strategy: ant_path_matcher
config:
activate:
on-profile: dev
redis:
host: 127.0.0.1
password: '@yf_2017'
## spring security 配置
security:
oauth2:
resource:
loadBalanced: true
token-info-uri: http://127.0.0.1:3000/oauth/check_token
# 直接放行URL
ignore:
urls:
- /v3/api-docs
- /actuator/**
- /swagger-ui/**
\ No newline at end of file
# 数据源配置
spring:
shardingsphere:
datasource:
ds0:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.0.143:3306/ekp?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
username: root
password: ll_mysql
hikari:
driver-class-name: ${spring.datasource.driver-class-name}
jdbc-url: ${spring.datasource.url}
username: ${spring.datasource.username}
password: ${spring.datasource.password}
pool-name: AmytangHikariCP
minimum-idle: 10 # 最小空闲连接数量
idle-timeout: 60000 # 空闲连接存活最大时间,默认600000(10分钟)
maximum-pool-size: 12 # 连接池最大连接数,默认是10
auto-commit: true #此属性控制从池返回的连接的默认自动提交行为,默认值:true
max-lifetime: 0 #此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
names: ds0
rules:
sharding:
key-generators:
snowflake:
type: SNOWFLAKE
sharding-algorithms:
t-payment-inline:
props:
strategy: standard
algorithmClassName: com.yifu.cloud.plus.v1.ekp.config.OTAStrategyShardingAlgorithm
type: CLASS_BASED
tables:
t_payment_info:
actual-data-nodes: ds0.t_payment_info_20$->{17..24}
key-generate-strategy:
column: ID
key-generator-name: snowflake
table-strategy:
standard:
sharding-column: CREATE_TIME
sharding-algorithm-name: t-payment-inline
mvc:
pathmatch:
matching-strategy: ant_path_matcher
config:
activate:
on-profile: prd
redis:
host: 192.168.10.153
port: 22379
password: '@yf_2017'
## spring security 配置
security:
oauth2:
resource:
loadBalanced: true
token-info-uri: http://127.0.0.1:3000/oauth/check_token
# 直接放行URL
ignore:
urls:
- /v3/api-docs
- /actuator/**
- /swagger-ui/**
\ No newline at end of file
# 数据源配置
spring:
shardingsphere:
datasource:
ds0:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.1.122:33306/ekp?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
username: root
password: ll_mysql
hikari:
driver-class-name: ${spring.datasource.driver-class-name}
jdbc-url: ${spring.datasource.url}
username: ${spring.datasource.username}
password: ${spring.datasource.password}
pool-name: AmytangHikariCP
minimum-idle: 10 # 最小空闲连接数量
idle-timeout: 60000 # 空闲连接存活最大时间,默认600000(10分钟)
maximum-pool-size: 12 # 连接池最大连接数,默认是10
auto-commit: true #此属性控制从池返回的连接的默认自动提交行为,默认值:true
max-lifetime: 0 #此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
names: ds0
rules:
sharding:
key-generators:
snowflake:
type: SNOWFLAKE
sharding-algorithms:
t-payment-inline:
props:
strategy: standard
algorithmClassName: com.yifu.cloud.plus.v1.ekp.config.OTAStrategyShardingAlgorithm
type: CLASS_BASED
tables:
t_payment_info:
actual-data-nodes: ds0.t_payment_info_20$->{17..24}
key-generate-strategy:
column: ID
key-generator-name: snowflake
table-strategy:
standard:
sharding-column: CREATE_TIME
sharding-algorithm-name: t-payment-inline
mvc:
pathmatch:
matching-strategy: ant_path_matcher
config:
activate:
on-profile: test
redis:
host: 192.168.1.65
port: 22379
password: '@yf_2017'
## spring security 配置
security:
oauth2:
resource:
loadBalanced: true
token-info-uri: http://127.0.0.1:3000/oauth/check_token
# 直接放行URL
ignore:
urls:
- /v3/api-docs
- /actuator/**
- /swagger-ui/**
\ No newline at end of file
server:
port: 5077
# 加解密根密码
jasypt:
encryptor:
password: yifu #根密码
# 暴露监控端点
management:
endpoints:
web:
exposure:
include: "*"
endpoint:
health:
show-details: ALWAYS
# mybaits-plus配置
mybatis-plus:
mapper-locations: classpath:/mapper/*Mapper.xml
global-config:
banner: false
db-config:
id-type: auto
table-underline: true
logic-delete-value: 1
logic-not-delete-value: 0
configuration:
map-underscore-to-camel-case: true
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
spring:
application:
name: @artifactId@
servlet:
multipart:
#所有上传文件最大大小
max-request-size: 100MB
#单个文件最大大小
max-file-size: 50MB
#swagger 文档 https://springdoc.org/
### OpenAPI3 注解
# OpenAPI 3 注解位置
# @Tag(name = “接口类描述”) Controller 类上
# @Operation(summary =“接口方法描述”) Controller 方法上
# @Parameters Controller 方法上
# @Parameter(description=“参数描述”) Controller 方法上 @Parameters 里
# @Parameter(description=“参数描述”) Controller 方法的参数上
# @Parameter(hidden = true) 或 @Hidden --
# @Schema DTO类上
# @Schema DTO属性上
springdoc:
api-docs:
#是否开启文档功能
enabled: true
#swagger后端请求地址
path: /api-docs
swagger-ui:
#自定义swagger前端请求路径,输入http:127.0.0.1:8080/test会自动重定向到swagger页面
path: /api
#包扫描路径
packages-to-scan: com.yifu.cloud.plus.v1.ekp.controller
#这里定义了两个分组,可定义多个,也可以不定义
group-configs:
#分组名
#- group: admin
#按路径匹配
# pathsToMatch: /admin/**
#分组名
- group: ekp
#按包路径匹配
packagesToScan: com.yifu.cloud.plus.v1.ekp.controller
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false" scan="false">
<springProperty scop="context" name="spring.application.name" source="spring.application.name" defaultValue=""/>
<property name="log.path" value="logs/${spring.application.name}"/>
<!-- 彩色日志格式 -->
<property name="CONSOLE_LOG_PATTERN"
value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>
<conversionRule conversionWord="wex"
converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/>
<conversionRule conversionWord="wEx"
converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
<!-- Console log output -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- Log file debug output -->
<appender name="debug" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/debug.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${log.path}/%d{yyyy-MM, aux}/debug.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
<maxFileSize>50MB</maxFileSize>
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
</encoder>
</appender>
<!-- Log file error output -->
<appender name="error" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/error.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${log.path}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
<maxFileSize>50MB</maxFileSize>
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>ERROR</level>
</filter>
</appender>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root level="INFO">
<appender-ref ref="console"/>
<appender-ref ref="debug"/>
<appender-ref ref="error"/>
</root>
</configuration>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.permission.mapper.SysMenuMapper">
<resultMap id="sysMenuMap" type="com.yifu.cloud.plus.v1.yifu.permission.entity.SysMenu">
<id property="id" column="ID"/>
<result property="menuName" column="MENU_NAME"/>
<result property="menuNameParent" column="MENU_NAME_PARENT"/>
<result property="menuParentId" column="MENU_PARENT_ID"/>
<result property="modelId" column="MODEL_ID"/>
<result property="viewId" column="VIEW_ID"/>
<result property="permissionType" column="PERMISSION_TYPE"/>
<result property="permissionStatus" column="PERMISSION_STATUS"/>
<result property="deleteStatus" column="DELETE_STATUS"/>
<result property="incomeId" column="INCOME_ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="contractId" column="CONTRACT_ID"/>
<result property="bussinessId" column="BUSSINESS_ID"/>
<result property="quotationId" column="QUOTATION_ID"/>
<result property="domainId" column="DOMAIN_ID"/>
<result property="buId" column="BU_ID"/>
<result property="lineId" column="LINE_ID"/>
<result property="deptId" column="DEPT_ID"/>
<result property="twoLevelId" column="TWO_LEVEL_ID"/>
<result property="createBy" column="CREATE_BY"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/>
<result property="isOpen" column="IS_OPEN"/>
<result property="tableName" column="TABLE_NAME"/>
<result property="queryFields" column="QUERY_FIELDS"/>
<result property="taxId" column="TAX_ID"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.MENU_NAME,
a.MODEL_ID,
a.MENU_NAME_PARENT,
a.MENU_PARENT_ID,
a.PERMISSION_TYPE,
a.PERMISSION_STATUS,
a.DELETE_STATUS,
a.INCOME_ID,
a.CUSTOMER_ID,
a.CONTRACT_ID,
a.BUSSINESS_ID,
a.QUOTATION_ID,
a.DOMAIN_ID,
a.BU_ID,
a.LINE_ID,
a.DEPT_ID,
a.IS_OPEN,
a.TWO_LEVEL_ID,
a.VIEW_ID,
a.CREATE_TIME,
a.TABLE_NAME,
a.QUERY_FIELDS,
a.TAX_ID
</sql>
<sql id="sysMenu_where">
<if test="sysMenu != null">
<if test="sysMenu.menuName != null and sysMenu.menuName.trim() != ''">
AND a.MENU_NAME like concat('%',#{sysMenu.menuName},'%')
</if>
<if test="sysMenu.menuNameParent != null and sysMenu.menuNameParent.trim() != ''">
AND a.MENU_NAME_PARENT = #{sysMenu.menuNameParent}
</if>
<if test="sysMenu.menuParentId != null and sysMenu.menuParentId.trim() != ''">
AND a.MENU_PARENT_ID = #{sysMenu.menuParentId}
</if>
<if test="sysMenu.permissionStatus != null and sysMenu.permissionStatus.trim() != ''">
AND a.PERMISSION_STATUS = #{sysMenu.permissionStatus}
</if>
</if>
</sql>
<!--sysMenu简单分页查询-->
<select id="getSysMenuPage" resultMap="sysMenuMap">
SELECT
<include refid="Base_Column_List"/>
FROM sys_menu a
<where>
a.DELETE_STATUS = '1'
<include refid="sysMenu_where"/>
</where>
order by a.CREATE_TIME desc
</select>
<select id="selectMenuId" resultType="java.lang.Long">
SELECT
count(1)
FROM modeling_app_model a
WHERE a.fd_id = #{modelId}
</select>
<select id="selectViewId" resultType="java.lang.Long">
SELECT
count(1)
FROM modeling_app_collection_view a
WHERE a.fd_model_id = #{modelId} and a.fd_id = #{viewId}
</select>
<select id="selectColumnList" resultType="java.lang.String">
SELECT
a.fd_column
FROM sys_xform_db_column a
LEFT JOIN sys_xform_db_table b on a.fd_main_id = b.fd_id
WHERE b.fd_model_id = #{modelId}
</select>
<!--根据modelId获取菜单-->
<select id="getSysMenuByModelId" resultMap="sysMenuMap">
SELECT
<include refid="Base_Column_List"/>
FROM sys_menu a
where a.DELETE_STATUS = '1' and a.PERMISSION_STATUS='0' and a.MODEL_ID = #{modelId}
limit 1
</select>
<!-- 获取税务主体列表-->
<select id="getSysTaxVoPage" resultType="com.yifu.cloud.plus.v1.yifu.permission.vo.SysTaxVo">
select fd_id AS id,a.fd_3afab4c6755286 AS name
from ekp_7e091e5e36848fb97451 a
where a.fd_3afab4c6755286 is not null
<if test="vo != null">
<if test="vo.name != null and vo.name.trim() != ''">
AND a.fd_3afab4c6755286 like concat('%',#{vo.name},'%')
</if>
</if>
GROUP BY a.fd_3afab4c6755286 ORDER BY a.fd_3afab4c6755286 desc
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.permission.mapper.SysRoleInfoMapper">
<resultMap id="sysRoleInfoMap" type="com.yifu.cloud.plus.v1.yifu.permission.entity.SysRoleInfo">
<id property="fdId" column="fd_id"/>
<result property="roleName" column="role_name"/>
<result property="remark" column="remark"/>
<result property="status" column="status"/>
<result property="deleteFlag" column="delete_flag"/>
<result property="dataAuth" column="data_auth"/>
<result property="createBy" column="CREATE_BY"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="updateTime" column="UPDATE_TIME"/>
</resultMap>
<sql id="Base_Column_List">
a.fd_id,
a.role_name,
a.remark,
a.status,
a.delete_flag,
a.data_auth,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME
</sql>
<sql id="sysRoleInfo_where">
<if test="sysRoleInfo != null">
<if test="sysRoleInfo.fdId != null and sysRoleInfo.fdId.trim() != ''">
AND a.fd_id = #{sysRoleInfo.fdId}
</if>
<if test="sysRoleInfo.roleName != null and sysRoleInfo.roleName.trim() != ''">
AND a.role_name like concat('%',#{sysRoleInfo.roleName},'%')
</if>
<if test="sysRoleInfo.remark != null and sysRoleInfo.remark.trim() != ''">
AND a.remark = #{sysRoleInfo.remark}
</if>
<if test="sysRoleInfo.status != null">
AND a.status = #{sysRoleInfo.status}
</if>
<if test="sysRoleInfo.deleteFlag != null">
AND a.delete_flag = #{sysRoleInfo.deleteFlag}
</if>
<if test="sysRoleInfo.dataAuth != null and sysRoleInfo.dataAuth.trim() != ''">
AND a.data_auth = #{sysRoleInfo.dataAuth}
</if>
<if test="sysRoleInfo.createBy != null and sysRoleInfo.createBy.trim() != ''">
AND a.CREATE_BY = #{sysRoleInfo.createBy}
</if>
<if test="sysRoleInfo.createName != null and sysRoleInfo.createName.trim() != ''">
AND a.CREATE_NAME = #{sysRoleInfo.createName}
</if>
<if test="sysRoleInfo.createTime != null">
AND a.CREATE_TIME = #{sysRoleInfo.createTime}
</if>
<if test="sysRoleInfo.createTimeStart != null">
AND a.CREATE_TIME <![CDATA[ >= ]]> #{sysRoleInfo.createTimeStart}
</if>
<if test="sysRoleInfo.createTimeEnd != null">
AND a.CREATE_TIME <![CDATA[ <= ]]> #{sysRoleInfo.createTimeEnd}
</if>
<if test="sysRoleInfo.updateBy != null and sysRoleInfo.updateBy.trim() != ''">
AND a.UPDATE_BY = #{sysRoleInfo.updateBy}
</if>
<if test="sysRoleInfo.updateTime != null">
AND a.UPDATE_TIME = #{sysRoleInfo.updateTime}
</if>
</if>
</sql>
<!--sysRoleInfo简单分页查询-->
<select id="getSysRoleInfoPage" resultMap="sysRoleInfoMap">
SELECT
<include refid="Base_Column_List"/>
FROM sys_role_info a
<where>
a.delete_flag = 0
<include refid="sysRoleInfo_where"/>
</where>
order by a.CREATE_TIME desc
</select>
<!-- 根据用户Id获取所有的角色的权限-->
<select id="getAllRoleDataAuthByUserId" resultType="java.lang.String">
SELECT
a.data_auth
FROM sys_role_info a
left join sys_user_role_res r on r.role_id = a.fd_id
where a.delete_flag = 0 and r.user_id = #{userId}
</select>
<!-- 根据角色Id获取所有的角色的权限-->
<select id="getRoleDataAuthByRoleId" resultType="java.lang.String">
SELECT
a.data_auth
FROM sys_role_info a
where a.delete_flag = 0 and a.fd_id in
<foreach item="idStr" index="index" collection="roleIdList" open="(" separator="," close=")">
#{idStr}
</foreach>
</select>
<!-- 查找名称是否存在-->
<select id="checkExistenceRole" resultType="java.lang.Integer">
SELECT
count(1)
FROM sys_role_info a
where a.delete_flag = 0 and a.role_name = #{roleName}
<if test="roleId != null and roleId.trim() != ''">
AND a.fd_id != #{roleId}
</if>
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.permission.mapper.SysRoleMenuResMapper">
<resultMap id="sysRoleMenuResMap" type="com.yifu.cloud.plus.v1.yifu.permission.entity.SysRoleMenuRes">
<id property="fdId" column="fd_id"/>
<result property="roleId" column="role_id"/>
<result property="menuId" column="menu_id"/>
</resultMap>
<sql id="Base_Column_List">
a.fd_id,
a.role_id,
a.menu_id
</sql>
<sql id="sysRoleMenuRes_where">
<if test="sysRoleMenuRes != null">
<if test="sysRoleMenuRes.fdId != null and sysRoleMenuRes.fdId.trim() != ''">
AND a.fd_id = #{sysRoleMenuRes.fdId}
</if>
<if test="sysRoleMenuRes.roleId != null and sysRoleMenuRes.roleId.trim() != ''">
AND a.role_id = #{sysRoleMenuRes.roleId}
</if>
<if test="sysRoleMenuRes.menuId != null and sysRoleMenuRes.menuId.trim() != ''">
AND a.menu_id = #{sysRoleMenuRes.menuId}
</if>
</if>
</sql>
<!--sysRoleMenuRes简单分页查询-->
<select id="getSysRoleMenuResPage" resultMap="sysRoleMenuResMap">
SELECT
<include refid="Base_Column_List"/>
FROM sys_role_menu_res a
<where>
1=1
<include refid="sysRoleMenuRes_where"/>
</where>
</select>
<!-- 根据角色删除关联表 -->
<delete id="deleteByRoleId">
delete from sys_role_menu_res where role_id = #{roleId}
</delete>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.permission.mapper.SysUserInfoMapper">
<resultMap id="sysUserInfoMap" type="com.yifu.cloud.plus.v1.yifu.permission.entity.SysUserInfo">
<id property="fdId" column="fd_id"/>
<result property="fdName" column="fd_name"/>
<result property="fdLoginName" column="fd_login_name"/>
<result property="fdLdapDn" column="fd_ldap_dn"/>
<result property="fdDeptName" column="fd_dept_name"/>
<result property="fdMobileNo" column="fd_mobile_no"/>
<result property="fdEmail" column="fd_email"/>
<result property="status" column="status"/>
<result property="roleNames" column="role_names"/>
<result property="createBy" column="CREATE_BY"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="updateTime" column="UPDATE_TIME"/>
</resultMap>
<sql id="Base_Column_List">
a.fd_id,
a.fd_name,
a.fd_login_name,
a.fd_ldap_dn,
a.fd_dept_name,
a.fd_mobile_no,
a.fd_email,
a.status,
GROUP_CONCAT(r.role_name ORDER BY r.create_time asc) as role_names,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME
</sql>
<sql id="sysUserInfo_where">
<if test="sysUserInfo != null">
<if test="sysUserInfo.fdId != null and sysUserInfo.fdId.trim() != ''">
AND a.fd_id = #{sysUserInfo.fdId}
</if>
<if test="sysUserInfo.fdName != null and sysUserInfo.fdName.trim() != ''">
AND a.fd_name like concat('%',#{sysUserInfo.fdName},'%')
</if>
<if test="sysUserInfo.fdLoginName != null and sysUserInfo.fdLoginName.trim() != ''">
AND a.fd_login_name = #{sysUserInfo.fdLoginName}
</if>
<if test="sysUserInfo.fdLdapDn != null and sysUserInfo.fdLdapDn.trim() != ''">
AND a.fd_ldap_dn = #{sysUserInfo.fdLdapDn}
</if>
<if test="sysUserInfo.fdDeptName != null and sysUserInfo.fdDeptName.trim() != ''">
AND a.fd_dept_name like concat('%',#{sysUserInfo.fdDeptName},'%')
</if>
<if test="sysUserInfo.fdMobileNo != null and sysUserInfo.fdMobileNo.trim() != ''">
AND a.fd_mobile_no = #{sysUserInfo.fdMobileNo}
</if>
<if test="sysUserInfo.fdEmail != null and sysUserInfo.fdEmail.trim() != ''">
AND a.fd_email = #{sysUserInfo.fdEmail}
</if>
<if test="sysUserInfo.status != null">
AND a.status = #{sysUserInfo.status}
</if>
<if test="sysUserInfo.createBy != null and sysUserInfo.createBy.trim() != ''">
AND a.CREATE_BY = #{sysUserInfo.createBy}
</if>
<if test="sysUserInfo.createName != null and sysUserInfo.createName.trim() != ''">
AND a.CREATE_NAME = #{sysUserInfo.createName}
</if>
<if test="sysUserInfo.createTime != null">
AND a.CREATE_TIME = #{sysUserInfo.createTime}
</if>
<if test="sysUserInfo.updateBy != null and sysUserInfo.updateBy.trim() != ''">
AND a.UPDATE_BY = #{sysUserInfo.updateBy}
</if>
<if test="sysUserInfo.updateTime != null">
AND a.UPDATE_TIME = #{sysUserInfo.updateTime}
</if>
</if>
</sql>
<!--sysUserInfo简单分页查询-->
<select id="getSysUserInfoPage" resultMap="sysUserInfoMap">
SELECT
a.fd_id,
a.fd_name,
a.fd_login_name,
a.fd_ldap_dn,
a.fd_dept_name,
a.fd_mobile_no,
a.fd_email,
a.status,
a.role_names,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME
from (
SELECT
<include refid="Base_Column_List"/>
FROM sys_user_info a
LEFT JOIN sys_user_role_res res on a.fd_id=res.user_id
LEFT JOIN sys_role_info r on res.role_id=r.fd_id and r.delete_flag = 0 and r.status = 0
<where>
1=1
<include refid="sysUserInfo_where"/>
</where>
GROUP BY a.fd_id
) a
<if test="sysUserInfo != null">
<if test="sysUserInfo.roleNames != null and sysUserInfo.roleNames.trim() != ''">
where a.role_names like concat('%',#{sysUserInfo.roleNames},'%')
</if>
</if>
order by a.CREATE_TIME desc
</select>
<!--list-->
<select id="getEkpUser" resultMap="sysUserInfoMap">
select e.fd_id,e.fd_name,p.fd_login_name,e.fd_ldap_dn
,SUBSTRING_INDEX(SUBSTRING_INDEX(e.fd_ldap_dn,',ou', 2),',ou=', -1) AS fd_dept_name
,p.fd_mobile_no,p.fd_email
from sys_org_element e JOIN sys_org_person p on e.fd_id=p.fd_id
where e.fd_is_available = '1'
</select>
<!--list-->
<select id="getResAndRoleNameUserId" resultType="com.yifu.cloud.plus.v1.yifu.permission.entity.SysUserRoleRes">
SELECT
a.fd_id as fdId
,a.user_id as userId
,a.role_id as roleId
,r.role_name as roleName
FROM sys_user_role_res a
LEFT JOIN sys_role_info r on a.role_id=r.fd_id and r.delete_flag = 0 and r.status = 0
where a.user_id=#{userId}
</select>
<!--给EKP用的,获取列表是否全量的权限-->
<!--#全量0;部分全量1;数据权限2;客户a;商机b;报价单c;合同d;项目e;BUf;条线g;收入归属h;)-->
<select id="getAuthByUserIdAndModelId" resultType="java.lang.Integer">
select
case
when a.data_auth is null then 0
when a.data_auth like "%0%" then 1
when a.data_auth like "%a%" and a.CUSTOMER_ID is not null then 1
when a.data_auth like "%b%" and a.BUSSINESS_ID is not null then 1
when a.data_auth like "%c%" and a.QUOTATION_ID is not null then 1
when a.data_auth like "%d%" and a.CONTRACT_ID is not null then 1
when a.data_auth like "%e%" and a.DOMAIN_ID is not null then 1
when a.data_auth like "%f%" and a.BU_ID is not null then 1
when a.data_auth like "%g%" and a.LINE_ID is not null then 1
when a.data_auth like "%h%" and a.INCOME_ID is not null then 1
else 2 end
from (
SELECT
GROUP_CONCAT(DISTINCT a.data_auth) as data_auth
,b.INCOME_ID
,b.CUSTOMER_ID
,b.CONTRACT_ID
,b.BUSSINESS_ID
,b.QUOTATION_ID
,b.DOMAIN_ID
,b.BU_ID
,b.LINE_ID
FROM
sys_menu b
join sys_role_menu_res m on b.id=m.menu_id
join sys_role_info a on m.role_id = a.fd_id
join sys_user_role_res r on r.role_id = a.fd_id
where a.delete_flag = 0 and a.status = 0 and b.DELETE_STATUS='1' and b.PERMISSION_STATUS='0'
and r.user_id = #{userId} and b.MODEL_ID=#{modelId}
) a
</select>
<select id="getUserByCodeOrLoginName" resultMap="sysUserInfoMap">
SELECT
a.fd_id,
a.fd_name,
a.fd_login_name,
a.fd_dept_name
FROM sys_user_info a
<where>
1=1 and a.status = 0
<if test="code != null and code != ''">
AND (a.fd_login_name like concat('%',#{code},'%') or a.fd_name like concat('%',#{code},'%'))
</if>
</where>
order by a.CREATE_TIME desc
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.permission.mapper.SysUserRoleResMapper">
<resultMap id="sysUserRoleResMap" type="com.yifu.cloud.plus.v1.yifu.permission.entity.SysUserRoleRes">
<id property="fdId" column="fd_id"/>
<result property="userId" column="user_id"/>
<result property="roleId" column="role_id"/>
</resultMap>
<sql id="Base_Column_List">
a.fd_id,
a.user_id,
a.role_id
</sql>
<sql id="sysUserRoleRes_where">
<if test="sysUserRoleRes != null">
<if test="sysUserRoleRes.fdId != null and sysUserRoleRes.fdId.trim() != ''">
AND a.fd_id = #{sysUserRoleRes.fdId}
</if>
<if test="sysUserRoleRes.userId != null and sysUserRoleRes.userId.trim() != ''">
AND a.user_id = #{sysUserRoleRes.userId}
</if>
<if test="sysUserRoleRes.roleId != null and sysUserRoleRes.roleId.trim() != ''">
AND a.role_id = #{sysUserRoleRes.roleId}
</if>
</if>
</sql>
<!--sysUserRoleRes简单分页查询-->
<select id="getSysUserRoleResPage" resultMap="sysUserRoleResMap">
SELECT
<include refid="Base_Column_List"/>
FROM sys_user_role_res a
<where>
1=1
<include refid="sysUserRoleRes_where"/>
</where>
</select>
<!--sysUserRoleRes简单分页查询-->
<select id="getSysUserByRoleId" resultType="java.lang.String">
SELECT
DISTINCT u.fd_name
FROM sys_user_role_res a
join sys_user_info u on a.user_id=u.fd_id
where a.role_id = #{roleId}
</select>
<!-- 根据账号删除关联表 -->
<delete id="deleteByUserId">
delete from sys_user_role_res where user_id = #{userId}
</delete>
<!-- 根据角色删除关联表 -->
<delete id="deleteByRoleId">
delete from sys_user_role_res where role_id = #{roleId}
</delete>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment