初始代码

This commit is contained in:
wangmingwei
2026-04-21 16:49:46 +08:00
parent aae9dc4036
commit f0453ff3a3
2396 changed files with 256575 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
<?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>yunzhupaas-java-boot</artifactId>
<groupId>com.yunzhupaas</groupId>
<version>5.2.0-RELEASE</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>yunzhupaas-common-all</artifactId>
<dependencies>
<dependency>
<groupId>com.yunzhupaas</groupId>
<artifactId>yunzhupaas-common-database</artifactId>
</dependency>
<dependency>
<groupId>com.yunzhupaas</groupId>
<artifactId>yunzhupaas-common-swagger</artifactId>
</dependency>
<dependency>
<groupId>com.yunzhupaas</groupId>
<artifactId>yunzhupaas-common-file</artifactId>
</dependency>
<dependency>
<groupId>com.yunzhupaas</groupId>
<artifactId>yunzhupaas-file-core-starter</artifactId>
<version>5.2.0-RELEASE</version>
</dependency>
<dependency>
<groupId>com.yunzhupaas</groupId>
<artifactId>yunzhupaas-common-office</artifactId>
</dependency>
<dependency>
<groupId>com.yunzhupaas</groupId>
<artifactId>yunzhupaas-common-event</artifactId>
</dependency>
</dependencies>
<profiles>
<profile>
<id>boot3</id>
<activation>
<jdk>[17,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>com.yunzhupaas</groupId>
<artifactId>yunzhupaas-common-office-v3</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</profile>
</profiles>
</project>

View File

@@ -0,0 +1,69 @@
package com.yunzhupaas.model;
import lombok.Data;
import java.util.Date;
@Data
public class AppDataInfoModel {
/**
* 单据主键
*/
private String id;
/**
* 对象类型
*/
private String objectType;
/**
* 对象主键
*/
private String objectId;
/**
* 数据
*/
private String objectData;
/**
* 描述
*/
private String description;
/**
* 有效标志
*/
private Integer enabledMark;
/**
* 创建时间
*/
private Date creatorTime;
/**
* 创建用户
*/
private String creatorUserId;
/**
* 删除时间
*/
private Date deleteTime;
/**
* 删除用户
*/
private String deleteUserId;
/**
* 删除标志
*/
private Integer deleteMark;
/**
* 关联系统id
*/
private String systemId;
}

View File

@@ -0,0 +1,22 @@
package com.yunzhupaas.model;
import lombok.Data;
@Data
public class AppObjectDataModel {
private String id;
private boolean hasChildren;
private String fullName;
private String icon;
private String urlAddress;
private String parentId;
private Integer type;
private String propertyJson;
private boolean isData;
private String children;
private String iconBackground;
private String moduleId;
}

View File

@@ -0,0 +1,48 @@
package com.yunzhupaas.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
*
* @author 云筑产品开发平台组
* @version V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2024/3/16 8:49
*/
@Data
public class LoginForm {
@Schema(description = "账号")
private String account;
@Schema(description = "密码")
private String password;
/**
* 登录类型
*/
@Schema(description = "登录类型")
private String grantType;
/**
* 验证码标识
*/
@Schema(description = "验证码标识")
private String timestamp;
/**
* 来源类型
*/
private String origin;
/**
* 验证码
*/
@Schema(description = "验证码")
private String code;
public LoginForm() {
}
public LoginForm(String account, String password) {
this.account = account;
this.password = password;
}
}

View File

@@ -0,0 +1,22 @@
package com.yunzhupaas.model.app;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class AppMenuModel {
@Schema(description = "扩展字段")
private String propertyJson;
@Schema(description = "菜单编码")
private String enCode;
@Schema(description = "菜单名称")
private String fullName;
@Schema(description = "图标")
private String icon;
@Schema(description = "主键id")
private String id;
@Schema(description = "链接地址")
private String urlAddress;
}

View File

@@ -0,0 +1,28 @@
<?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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.yunzhupaas</groupId>
<artifactId>yunzhupaas-java-boot</artifactId>
<version>5.2.0-RELEASE</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>yunzhupaas-generater-base</artifactId>
<dependencies>
<dependency>
<groupId>com.yunzhupaas</groupId>
<artifactId>yunzhupaas-provider</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.yunzhupaas</groupId>
<artifactId>yunzhupaas-visualdev-onlinedev-biz</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,15 @@
package com.yunzhupaas.model;
import java.lang.annotation.*;
@Documented
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface FieLdsModelExcel {
String fieLdsModel() default "{}";
String type() default "mast";
}

View File

@@ -0,0 +1,32 @@
package com.yunzhupaas.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description="子表条件组合模型")
public class GeneraterSwapModel {
@Schema(description = "表单json")
private String formDataStr;
@Schema(description = "表列表")
private String tableList;
@Schema(description = "子表名称")
private String childTable;
@Schema(description = "菜单id")
private String menuId;
@Schema(description = "查询条件json")
private String queryJson;
@Schema(description = "高级查询条件json")
private String superQueryJson;
@Schema(description = "pc列表")
private String columnData;
@Schema(description = "app列表")
private String appColumnData;
}

View File

@@ -0,0 +1,39 @@
package com.yunzhupaas.model;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.yunzhupaas.database.model.superQuery.SuperJsonModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.poi.ss.formula.functions.T;
import java.util.List;
import java.util.Map;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class QueryAllModel {
private MPJLambdaWrapper wrapper;
private Map<String,Class> classMap;
/**
* 数据过滤
*/
private String ruleJson;
/**
* 高级查询
*/
private String superJson;
/**
* 数据权限-通过菜单id查询
*/
private String moduleId;
private String dbLink;
private String dbType;
/**
* 所有分组都放进来统一处理
*/
private List<List<SuperJsonModel>> queryList;
}

View File

@@ -0,0 +1,30 @@
package com.yunzhupaas.model;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class QueryModel<T> {
private QueryWrapper<T> obj;
private Class<T> entity;
private String queryJson;
private String moduleId;
private String dbLink;
private String dbType;
public QueryModel(QueryWrapper<T> obj, Class<T> entity, String queryJsonOrModuleId, String dbLink) {
this.obj = obj;
this.entity = entity;
this.queryJson = queryJsonOrModuleId;
this.moduleId = queryJsonOrModuleId;
this.dbLink = dbLink;
}
}

View File

@@ -0,0 +1,502 @@
package com.yunzhupaas.util;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yunzhupaas.util.visiual.YunzhupaasKeyConsts;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Data
public class GenUtil {
/**
* 字段说明
*/
private String fieldName;
/**
* 运算符
*/
private String operator;
/**
* 逻辑拼接符号
*/
private String logic;
/**
* 组件标识
*/
private String yunzhupaasKey;
/**
* 字段key
*/
private String field;
/**
* 自定义的值
*/
private String fieldValue;
/**
* 自定义的值2
*/
private String fieldValue2;
private List<String> selectIgnore;
/**
* 数据库类型
*/
private String dbType;
/**
* 日期格式
*/
private String format;
/**
* 数字精度
*/
private String precision;
/**
* @param wrapper wrapper对象
* @param fieldDb 数据库字段名实际包括前缀
* @return
*/
public QueryWrapper<?> solveValue(QueryWrapper<?> wrapper, String fieldDb) {
MyType myType = myControl(yunzhupaasKey);
if ("||".equals(logic)) {
wrapper.or();
}
if (fieldValue == null) {
fieldValue = "";
}
try {
ArrayList splitKey = new ArrayList<String>() {{
add(YunzhupaasKeyConsts.DATE);
add(YunzhupaasKeyConsts.TIME);
add(YunzhupaasKeyConsts.NUM_INPUT);
add(YunzhupaasKeyConsts.CREATETIME);
add(YunzhupaasKeyConsts.MODIFYTIME);
}};
if (splitKey.contains(yunzhupaasKey) && "between".equals(operator)) {
List<String> data = JsonUtil.getJsonToList(fieldValue, String.class);
fieldValue = data.get(0);
fieldValue2 = data.get(1);
}
selectIgnore = new ArrayList<String>() {{
add(YunzhupaasKeyConsts.COMSELECT);
add(YunzhupaasKeyConsts.ADDRESS);
add(YunzhupaasKeyConsts.CASCADER);
add(YunzhupaasKeyConsts.CHECKBOX);
add(YunzhupaasKeyConsts.DEPSELECT);
}};
myType.judge(wrapper, fieldDb);
return wrapper;
} catch (Exception e) {
return wrapper;
}
}
/**
* 判断控件的所属类型
*
* @param yunzhupaasKey 控件标识
* @return 控件类型
*/
public MyType myControl(String yunzhupaasKey) {
MyType myType = null;
switch (yunzhupaasKey) {
/** 基础 */
case YunzhupaasKeyConsts.COM_INPUT:
case YunzhupaasKeyConsts.TEXTAREA:
case YunzhupaasKeyConsts.BILLRULE:
case YunzhupaasKeyConsts.POPUPTABLESELECT:
case YunzhupaasKeyConsts.RELATIONFORM:
case YunzhupaasKeyConsts.RELATIONFORM_ATTR:
case YunzhupaasKeyConsts.POPUPSELECT:
case YunzhupaasKeyConsts.POPUPSELECT_ATTR:
myType = new BasicControl();
break;
// 数字类型
case YunzhupaasKeyConsts.CALCULATE:
case YunzhupaasKeyConsts.NUM_INPUT:
myType = new NumControl();
break;
// 日期类型
case YunzhupaasKeyConsts.DATE:
case YunzhupaasKeyConsts.CREATETIME:
case YunzhupaasKeyConsts.MODIFYTIME:
myType = new DateControl();
break;
// 时间类型
case YunzhupaasKeyConsts.TIME:
myType = new TimeControl();
break;
// 下拉类型
default:
myType = new SelectControl();
}
return myType;
}
public void getNullWrapper(QueryWrapper<?> wrapper, String fieldDb) {
if ("||".equals(logic)) {
wrapper.or(t -> {
t.isNull(fieldDb);
t.or().eq(fieldDb, "");
t.or().eq(fieldDb, "[]");
});
} else {
wrapper.and(t -> {
t.isNull(fieldDb);
t.or().eq(fieldDb, "");
t.or().eq(fieldDb, "[]");
});
}
}
private void getNotNullWrapper(QueryWrapper<?> wrapper, String fieldDb) {
if ("||".equals(logic)) {
wrapper.or(t -> {
t.isNotNull(fieldDb);
t.ne(fieldDb, "");
t.ne(fieldDb, "[]");
});
} else {
wrapper.and(t -> {
t.isNotNull(fieldDb);
t.ne(fieldDb, "");
t.ne(fieldDb, "[]");
});
}
}
/**
* 基础类型
*/
class BasicControl extends MyType {
@Override
void judge(QueryWrapper<?> wrapper, String fieldDb) {
switch (operator) {
case "null":
getNullWrapper(wrapper, fieldDb);
break;
case "notNull":
getNotNullWrapper(wrapper, fieldDb);
break;
case "==":
wrapper.eq(fieldDb, fieldValue);
break;
case "<>":
wrapper.ne(fieldDb, fieldValue);
break;
case "like":
wrapper.like(fieldDb, fieldValue);
break;
case "notLike":
wrapper.notLike(fieldDb, fieldValue);
break;
}
}
}
class NumControl extends MyType {
@Override
void judge(QueryWrapper<?> wrapper, String fieldDb) {
BigDecimal num1 = new BigDecimal(fieldValue);
BigDecimal num2 = null;
if (fieldValue2 != null) {
num2 = new BigDecimal(fieldValue2);
}
// 精度处理
String fieldPrecisionValue;
String fieldPrecisionValue2;
if (StringUtils.isNotBlank(precision)) {
String yunzhupaasNum = "0." + StringUtils.repeat("0", Integer.parseInt(precision));
DecimalFormat numFormat = new DecimalFormat(yunzhupaasNum);
fieldPrecisionValue = numFormat.format(new BigDecimal(fieldValue));
num1 = new BigDecimal(fieldPrecisionValue);
if (fieldValue2 != null) {
fieldPrecisionValue2 = numFormat.format(new BigDecimal(fieldValue2));
num2 = new BigDecimal(fieldPrecisionValue2);
}
}
switch (operator) {
case "null":
getNullWrapper(wrapper, fieldDb);
break;
case "notNull":
getNotNullWrapper(wrapper, fieldDb);
break;
case "==":
wrapper.eq(fieldDb, num1);
break;
case "<>":
wrapper.ne(fieldDb, num1);
break;
case ">":
wrapper.gt(fieldDb, num1);
break;
case "<":
wrapper.lt(fieldDb, num1);
break;
case ">=":
wrapper.ge(fieldDb, num1);
break;
case "<=":
wrapper.le(fieldDb, num1);
break;
case "between":
wrapper.between(fieldDb, num1, num2);
break;
}
}
}
class DateControl extends MyType {
@Override
void judge(QueryWrapper<?> wrapper, String fieldDb) {
Long time = null;
Long time2 = null;
Date date = new Date();
Date date2 = new Date();
if (StringUtils.isNoneBlank(fieldValue)) {
time = Long.valueOf(fieldValue);
date = new Date(time);
}
if (StringUtils.isNoneBlank(fieldValue2)) {
time2 = Long.valueOf(fieldValue2);
// 日期类型的要加上当天的23:59:59
if (YunzhupaasKeyConsts.DATE.equals(yunzhupaasKey)) {
date2 = new Date(time2 + 60 * 60 * 24 * 1000 - 1000);
} else {
date2 = new Date(time2);
}
}
switch (operator) {
case "null":
getNullWrapper(wrapper, fieldDb);
break;
case "notNull":
getNotNullWrapper(wrapper, fieldDb);
break;
case "==":
if (YunzhupaasKeyConsts.DATE.equals(yunzhupaasKey)) {
wrapper.between(fieldDb, date, new Date(time + 60 * 60 * 24 * 1000));
} else {
wrapper.eq(fieldDb, date);
}
break;
case "<>":
wrapper.ne(fieldDb, date);
break;
case ">":
wrapper.gt(fieldDb, date);
break;
case "<":
wrapper.lt(fieldDb, date);
break;
case ">=":
wrapper.ge(fieldDb, date);
break;
case "<=":
wrapper.le(fieldDb, date);
break;
case "between":
wrapper.between(fieldDb, date, date2);
break;
}
}
}
class TimeControl extends MyType {
@Override
void judge(QueryWrapper<?> wrapper, String fieldDb) {
switch (operator) {
case "null":
getNullWrapper(wrapper, fieldDb);
break;
case "notNull":
getNotNullWrapper(wrapper, fieldDb);
break;
case "==":
wrapper.eq(fieldDb, fieldValue);
break;
case "<>":
wrapper.ne(fieldDb, fieldValue);
break;
case ">":
wrapper.gt(fieldDb, fieldValue);
break;
case "<":
wrapper.lt(fieldDb, fieldValue);
break;
case ">=":
wrapper.ge(fieldDb, fieldValue);
break;
case "<=":
wrapper.le(fieldDb, fieldValue);
break;
case "between":
wrapper.between(fieldDb, fieldValue, fieldValue2);
break;
}
}
}
private ArrayList<String> solveListValue(String fieldValue) {
ArrayList<String> result = new ArrayList<>();
try {
List<List> list = JsonUtil.getJsonToList(fieldValue, List.class);
for (List listSub : list) {
result.add(JSONArray.toJSONString(listSub));
// 组织选择需要取最后每个数组最后一个
String value = (String)listSub.get(listSub.size() - 1);
result.add(value);
}
}catch (Exception e){
List<String> list = JsonUtil.getJsonToList(fieldValue, String.class);
result.add(JSONArray.toJSONString(list));
String value = list.get(list.size() - 1);
result.add(value);
}
return result;
}
/**
* 下拉控件类型
*/
class SelectControl extends MyType {
@Override
void judge(QueryWrapper<?> wrapper, String fieldDb) {
List<String> list = solveListValue(fieldValue);
if (StringUtils.isNoneBlank(fieldValue) && fieldValue.charAt(0) == '[' && !selectIgnore.contains(yunzhupaasKey)) {
list = JSONUtil.toList(fieldValue, String.class);
}
if (selectIgnore.contains(yunzhupaasKey) && StringUtils.isBlank(fieldValue)) {
fieldValue = "[]";
}
switch (operator) {
case "null":
getNullWrapper(wrapper, fieldDb);
break;
case "notNull":
getNotNullWrapper(wrapper, fieldDb);
break;
case "==":
wrapper.eq(fieldDb, fieldValue);
break;
case "<>":
wrapper.ne(fieldDb, fieldValue);
break;
case "like":
wrapper.like(fieldDb, fieldValue);
break;
case "notLike":
wrapper.notLike(fieldDb, fieldValue);
break;
case "in":
if (list.size() > 0) {
List<String> finalList = list;
if ("||".equals(logic)) {
wrapper.or(t -> {
if (finalList.size() > 0) {
for (int i = 0; i < finalList.size(); i++) {
String value = finalList.get(i);
if (i == 0) {
t.like(fieldDb, value);
} else {
t.or().like(fieldDb, value);
}
}
}
});
} else {
wrapper.and(t -> {
if (finalList.size() > 0) {
for (int i = 0; i < finalList.size(); i++) {
String value = finalList.get(i);
if (i == 0) {
t.like(fieldDb, value);
} else {
t.or().like(fieldDb, value);
}
}
}
});
}
if(YunzhupaasKeyConsts.CASCADER.equals(yunzhupaasKey) || YunzhupaasKeyConsts.COMSELECT.equals(yunzhupaasKey) || YunzhupaasKeyConsts.ADDRESS.equals(yunzhupaasKey)){
getNotNullWrapper(wrapper,fieldDb);
}
}
break;
case "notIn":
if (list.size() > 0) {
List<String> finalList1 = list;
if ("||".equals(logic)) {
wrapper.or(t -> {
if (finalList1.size() > 0) {
for (int i = 0; i < finalList1.size(); i++) {
String value = finalList1.get(i);
if (i == 0) {
t.notLike(fieldDb, value);
} else {
t.notLike(fieldDb, value);
}
}
}
});
} else {
wrapper.and(t -> {
if (finalList1.size() > 0) {
for (int i = 0; i < finalList1.size(); i++) {
String value = finalList1.get(i);
if (i == 0) {
t.notLike(fieldDb, value);
} else {
t.notLike(fieldDb, value);
}
}
}
});
}
if(YunzhupaasKeyConsts.CASCADER.equals(yunzhupaasKey) || YunzhupaasKeyConsts.COMSELECT.equals(yunzhupaasKey) || YunzhupaasKeyConsts.ADDRESS.equals(yunzhupaasKey)){
getNotNullWrapper(wrapper,fieldDb);
}
}
break;
}
}
}
abstract class MyType {
abstract void judge(QueryWrapper<?> wrapper, String fieldDb);
}
}

View File

@@ -0,0 +1,284 @@
package com.yunzhupaas.util;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.yunzhupaas.database.model.superQuery.SuperJsonModel;
import com.yunzhupaas.database.model.superQuery.SuperQueryJsonModel;
import com.yunzhupaas.emnus.SearchMethodEnum;
import com.yunzhupaas.model.QueryAllModel;
import com.yunzhupaas.model.visualJson.FieLdsModel;
import com.yunzhupaas.model.visualJson.config.ConfigModel;
import com.yunzhupaas.onlinedev.util.onlineDevUtil.OnlineProductSqlUtils;
import lombok.Data;
import org.apache.poi.ss.formula.functions.T;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@Data
public class QueryUtil {
/**
* 运算符
*/
private SearchMethodEnum symbol;
/**
* 逻辑拼接符号
*/
private boolean and;
/**
* 组件标识
*/
private String yunzhupaasKey;
/**
* 字段key
*/
private String vModel;
/**
* 自定义的值
*/
private Object fieldValue;
/**
* 自定义的值2
*/
private Object fieldValueTwo;
/**
* 实体对象
*/
private Map<String, Class> classMap;
/**
* 数据库类型
*/
private String dbType;
private Boolean isSqlServer = false;
private List<String> dataList = new ArrayList<>();
public <T> MPJLambdaWrapper<T> queryList(QueryAllModel queryAllModel) {
MPJLambdaWrapper<T> wrapper = queryAllModel.getWrapper();
classMap = queryAllModel.getClassMap();
dbType = queryAllModel.getDbType();
isSqlServer = "Microsoft SQL Server".equalsIgnoreCase(dbType);
List<List<SuperJsonModel>> superJsonModelList = queryAllModel.getQueryList();
for (List<SuperJsonModel> list : superJsonModelList) {
boolean flag = false;
for (SuperJsonModel superJsonModel : list) {
if (superJsonModel.getConditionList().size() > 0) {
for (SuperQueryJsonModel item : superJsonModel.getConditionList()) {
if (item.getGroups().size() > 0) {
flag = true;
}
}
}
}
if (list.size() > 0 && flag) {
wrapper.and(gw -> {
for (SuperJsonModel superJsonModel : list) {
String matchLogic = superJsonModel.getMatchLogic();
Boolean authorizeLogic = superJsonModel.getAuthorizeLogic();
boolean isAddMatchLogic = SearchMethodEnum.And.getSymbol().equalsIgnoreCase(matchLogic);
List<SuperQueryJsonModel> conditionList = superJsonModel.getConditionList();
if (conditionList.size() == 0)
continue;
// 参数值转换
OnlineProductSqlUtils.superList(conditionList, true);
if (authorizeLogic) {
gw.and(tw -> {
queryWrapperList(tw, conditionList, isAddMatchLogic);
});
} else {
gw.or(tw -> {
queryWrapperList(tw, conditionList, isAddMatchLogic);
});
}
}
});
}
}
return wrapper;
}
private <T> void queryWrapperList(MPJLambdaWrapper<T> tw, List<SuperQueryJsonModel> conditionList,
boolean isAddMatchLogic) {
for (SuperQueryJsonModel superQueryJsonModel : conditionList) {
String logic = superQueryJsonModel.getLogic();
and = SearchMethodEnum.And.getSymbol().equalsIgnoreCase(logic);
List<FieLdsModel> queryList = superQueryJsonModel.getGroups();
if (queryList.size() > 0) {
queryWrapper(tw, queryList, isAddMatchLogic);
}
}
}
private <T> void queryWrapper(MPJLambdaWrapper<T> tw, List<FieLdsModel> queryListAll, boolean isAnd) {
if (isAnd) {
tw.and(qw -> {
query(qw, queryListAll);
});
} else {
tw.or(qw -> {
query(qw, queryListAll);
});
}
}
private <T> void query(MPJLambdaWrapper<T> qw, List<FieLdsModel> queryListAll) {
for (FieLdsModel fieLdsModel : queryListAll) {
List<FieLdsModel> queryList = new ArrayList() {
{
add(fieLdsModel);
}
};
if (and) {
qw.and(ew -> {
fieldsModel(ew, queryList);
});
} else {
qw.or(ew -> {
fieldsModel(ew, queryList);
});
}
}
}
private void fieldsModel(MPJLambdaWrapper wrapper, List<FieLdsModel> queryList) {
for (FieLdsModel fieLdsModel : queryList) {
ConfigModel config = fieLdsModel.getConfig();
yunzhupaasKey = config.getYunzhupaasKey();
symbol = SearchMethodEnum.getSearchMethod(fieLdsModel.getSymbol());
vModel = fieLdsModel.getVModel();
if (!and) {
wrapper.or();
}
String table = ObjectUtil.isNotEmpty(config.getRelationTable()) ? config.getRelationTable()
: config.getTableName();
Class<T> tClass = classMap.get(table);
try {
Field declaredField = null;
Field[] declaredFields = tClass.getDeclaredFields();
for (Field item : declaredFields) {
String tableFieldName = item.getAnnotation(TableField.class) == null ? ""
: item.getAnnotation(TableField.class).value();
if (vModel.equalsIgnoreCase(tableFieldName) || item.getName().equals(vModel)) {
declaredField = item;
break;
}
}
declaredField.setAccessible(true);
vModel = table + "." + declaredField.getAnnotation(TableField.class).value();
} catch (Exception e) {
e.printStackTrace();
}
fieldValue = fieLdsModel.getFieldValueOne();
fieldValueTwo = fieLdsModel.getFieldValueTwo();
dataList = fieLdsModel.getDataList();
getSymbolWrapper(wrapper);
}
}
private void getNullWrapper(MPJLambdaWrapper<?> wrapper) {
if (!and) {
wrapper.or(t -> t.isNull(vModel));
} else {
wrapper.and(t -> t.isNull(vModel));
}
}
private void getNotNullWrapper(MPJLambdaWrapper<?> wrapper) {
if (!and) {
wrapper.or(t -> t.isNotNull(vModel));
} else {
wrapper.and(t -> t.isNotNull(vModel));
}
}
private void getInWrapper(MPJLambdaWrapper<?> wrapper) {
if (!and) {
wrapper.or(qw -> {
for (String id : dataList) {
if (isSqlServer) {
id = String.valueOf(id).replaceAll("\\[", "[[]");
}
switch (symbol) {
case Included:
qw.or().like(vModel, id);
break;
default:
qw.notLike(vModel, id);
break;
}
}
});
} else {
wrapper.and(qw -> {
for (String id : dataList) {
if (isSqlServer) {
id = String.valueOf(id).replaceAll("\\[", "[[]");
}
switch (symbol) {
case Included:
qw.or().like(vModel, id);
break;
default:
qw.notLike(vModel, id);
break;
}
}
});
}
}
private void getSymbolWrapper(MPJLambdaWrapper<?> wrapper) {
switch (symbol) {
case IsNull:
getNullWrapper(wrapper);
break;
case IsNotNull:
getNotNullWrapper(wrapper);
break;
case Equal:
wrapper.eq(vModel, fieldValue);
break;
case NotEqual:
wrapper.ne(vModel, fieldValue);
break;
case GreaterThan:
wrapper.gt(vModel, fieldValue);
break;
case LessThan:
wrapper.lt(vModel, fieldValue);
break;
case GreaterThanOrEqual:
wrapper.ge(vModel, fieldValue);
break;
case LessThanOrEqual:
wrapper.le(vModel, fieldValue);
break;
case Like:
if (isSqlServer) {
fieldValue = String.valueOf(fieldValue).replaceAll("\\[", "[[]");
}
wrapper.like(vModel, fieldValue);
break;
case NotLike:
if (isSqlServer) {
fieldValue = String.valueOf(fieldValue).replaceAll("\\[", "[[]");
}
wrapper.notLike(vModel, fieldValue);
break;
case Included:
case NotIncluded:
getInWrapper(wrapper);
break;
case Between:
wrapper.between(vModel, fieldValue, fieldValueTwo);
break;
default:
break;
}
}
}

View File

@@ -0,0 +1,69 @@
<?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>yunzhupaas-java-boot</artifactId>
<groupId>com.yunzhupaas</groupId>
<version>5.2.0-RELEASE</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>yunzhupaas-provider</artifactId>
<dependencies>
<dependency>
<groupId>com.yunzhupaas</groupId>
<artifactId>yunzhupaas-common-all</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.yunzhupaas</groupId>
<artifactId>yunzhupaas-permission-entity</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.yunzhupaas</groupId>
<artifactId>yunzhupaas-system-entity</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.yunzhupaas</groupId>
<artifactId>yunzhupaas-message-entity</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk18on</artifactId>
</dependency>
<dependency>
<groupId>com.yunzhupaas</groupId>
<artifactId>yunzhupaas-flowable-entity</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.yunzhupaas</groupId>
<artifactId>yunzhupaas-extend-entity</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.yunzhupaas</groupId>
<artifactId>yunzhupaas-visualdev-base-entity</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.yunzhupaas</groupId>
<artifactId>yunzhupaas-visualdev-onlinedev-entity</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.yunzhupaas</groupId>
<artifactId>yunzhupaas-common-sms</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,172 @@
package com.yunzhupaas.base.service;
import com.yunzhupaas.base.ActionResult;
import com.yunzhupaas.base.entity.DictionaryDataEntity;
import com.yunzhupaas.base.model.dictionarytype.DictionaryExportModel;
import com.yunzhupaas.base.vo.DownloadVO;
import com.yunzhupaas.exception.DataException;
import java.util.List;
/**
* 字典数据
*
* @author 云筑产品开发平台组
* @version V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2023/09/27
*/
public interface DictionaryDataService extends SuperService<DictionaryDataEntity> {
/**
* 列表
*
* @param dictionaryTypeId 字段分类id
* @param enable 是否只看有效
* @return ignore
*/
List<DictionaryDataEntity> getList(String dictionaryTypeId, Boolean enable);
/**
* 列表
*
* @param dictionaryTypeId 类别主键
* @return ignore
*/
List<DictionaryDataEntity> getList(String dictionaryTypeId);
/**
* 列表
*
* @param dictionaryTypeId 类别主键(在线开发数据转换)
* @return ignore
*/
List<DictionaryDataEntity> getDicList(String dictionaryTypeId);
/**
* 列表
*
* @param dictionaryTypeId 类别主键(在线开发数据转换)
* @return ignore
*/
List<DictionaryDataEntity> geDicList(String dictionaryTypeId);
/**
* 列表
*
* @param parentId 父级id
* @return ignore
*/
Boolean isExistSubset(String parentId);
/**
* 信息
*
* @param id 主键值
* @return ignore
*/
DictionaryDataEntity getInfo(String id);
/**
* 代码生成器数据字典转换
* @param value encode 或者 id
* @param dictionaryTypeId 类别
* @return
*/
DictionaryDataEntity getSwapInfo(String value,String dictionaryTypeId);
/**
* 验证名称
*
* @param dictionaryTypeId 类别主键
* @param fullName 名称
* @param id 主键值
* @return ignore
*/
boolean isExistByFullName(String dictionaryTypeId, String fullName, String id);
/**
* 验证编码
*
* @param dictionaryTypeId 类别主键
* @param enCode 编码
* @param id 主键值
* @return ignore
*/
boolean isExistByEnCode(String dictionaryTypeId, String enCode, String id);
/**
* 删除
*
* @param entity 实体对象
*/
void delete(DictionaryDataEntity entity);
/**
* 创建
*
* @param entity 实体对象
*/
void create(DictionaryDataEntity entity);
/**
* 更新
*
* @param id 主键值
* @param entity 实体对象
* @return ignore
*/
boolean update(String id, DictionaryDataEntity entity);
/**
* 上移
*
* @param id 主键值
* @return ignore
*/
boolean first(String id);
/**
* 下移
*
* @param id 主键值
* @return ignore
*/
boolean next(String id);
/**
* 获取名称
*
* @param id 主键id集合
* @return ignore
*/
List<DictionaryDataEntity> getDictionName(List<String> id);
/**
* 导出数据
*
* @param id 主键
* @return DownloadVO
*/
DownloadVO exportData(String id);
/**
* 导入数据
*
* @param exportModel ignore
* @param type 类型
* @return ignore
* @throws DataException ignore
*/
ActionResult importData(DictionaryExportModel exportModel, Integer type) throws DataException;
/**
* 根据字典分类获取 字典信息列表
* @param typeCode
* @return
*/
List<DictionaryDataEntity> getListByTypeDataCode(String typeCode);
/**
* 获取启用字典列表
* @param typeCode
* @return
*/
List<DictionaryDataEntity> getByTypeCodeEnable(String typeCode);
}

View File

@@ -0,0 +1,127 @@
package com.yunzhupaas.base.service;
import com.yunzhupaas.base.service.SuperService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yunzhupaas.base.Pagination;
import com.yunzhupaas.base.entity.ModuleButtonEntity;
import java.util.List;
/**
* 按钮权限
*
* @author 云筑产品开发平台组
* @version V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2023/09/27
*/
public interface ModuleButtonService extends SuperService<ModuleButtonEntity> {
/**
* 列表
*
* @return ignore
*/
List<ModuleButtonEntity> getList();
/**
* 列表
*
* @return ignore
*/
List<ModuleButtonEntity> getEnabledMarkList(String enabledMark);
/**
* 列表
*
* @param moduleId 功能主键
* @return ignore
*/
List<ModuleButtonEntity> getListByModuleIds(String moduleId);
/**
* 列表(带关键字的)
*
* @param moduleId 功能主键
* @param pagination 分页参数
* @return ignore
*/
List<ModuleButtonEntity> getListByModuleIds(String moduleId, Pagination pagination);
/**
* 信息
*
* @param id 主键值
* @return ignore
*/
ModuleButtonEntity getInfo(String id);
/**
* 信息
*
* @param id 主键值
* @param moduleId
* @return ignore
*/
ModuleButtonEntity getInfo(String id, String moduleId);
/**
* 验证名称
*
* @param moduleId 功能主键
* @param fullName 名称
* @param id 主键值
* @return ignore
*/
boolean isExistByFullName(String moduleId, String fullName, String id);
/**
* 验证编码
*
* @param moduleId 功能主键
* @param enCode 编码
* @param id 主键值
* @return ignore
*/
boolean isExistByEnCode(String moduleId, String enCode, String id);
/**
* 创建
*
* @param entity 实体对象
*/
void create(ModuleButtonEntity entity);
/**
* 更新
*
* @param id 主键值
* @param entity 实体对象
* @return ignore
*/
boolean update(String id, ModuleButtonEntity entity);
/**
* 删除
*
* @param entity 实体对象
*/
void delete(ModuleButtonEntity entity);
/**
* 通过moduleIds获取按钮权限
*
* @param ids
* @return
*/
List<ModuleButtonEntity> getListByModuleIds(List<String> ids);
/**
* 通过moduleIds获取按钮权限
*
* @param ids
* @return
*/
List<ModuleButtonEntity> getListByIds(List<String> ids);
}

View File

@@ -0,0 +1,157 @@
package com.yunzhupaas.base.service;
import com.yunzhupaas.base.service.SuperService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yunzhupaas.base.Pagination;
import com.yunzhupaas.base.entity.ModuleButtonEntity;
import com.yunzhupaas.base.entity.ModuleColumnEntity;
import java.util.List;
/**
* 列表权限
*
* @author 云筑产品开发平台组
* @version V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2023/09/27
*/
public interface ModuleColumnService extends SuperService<ModuleColumnEntity> {
/**
* 列表
*
* @return ignore
*/
List<ModuleColumnEntity> getList();
/**
* 列表
*
* @return ignore
*/
List<ModuleColumnEntity> getEnabledMarkList(String enabledMark);
/**
* 列表
*
* @param moduleId 功能主键
* @param pagination 分页参数
* @return ignore
*/
List<ModuleColumnEntity> getList(String moduleId, Pagination pagination);
/**
* 列表
*
* @param moduleId 功能主键
* @return ignore
*/
List<ModuleColumnEntity> getList(String moduleId);
/**
* 列表
*
* @param bindTable 绑定表格Id
* @return ignore
*/
List<ModuleColumnEntity> getListByBindTable(String bindTable);
/**
* 信息
*
* @param id 主键值
* @return ignore
*/
ModuleColumnEntity getInfo(String id);
/**
* 通过id和菜单id获取详情
*
* @param id 主键值
* @param moduleId
* @return
*/
ModuleColumnEntity getInfo(String id, String moduleId);
/**
* 验证名称
*
* @param moduleId 功能主键
* @param fullName 名称
* @param id 主键值
* @return ignore
*/
boolean isExistByFullName(String moduleId, String fullName, String id);
/**
* 验证编码
*
* @param moduleId 功能主键
* @param enCode 编码
* @param id 主键值
* @return ignore
*/
boolean isExistByEnCode(String moduleId, String enCode, String id);
/**
* 创建
*
* @param entity 实体对象
*/
void create(ModuleColumnEntity entity);
/**
* 创建
*
* @param entitys 实体对象
*/
void create(List<ModuleColumnEntity> entitys);
/**
* 更新
*
* @param id 主键值
* @param entity 实体对象
*/
boolean update(String id, ModuleColumnEntity entity);
/**
* 删除
*
* @param entity 实体对象
*/
void delete(ModuleColumnEntity entity);
/**
* 上移
*
* @param id 主键值
*/
boolean first(String id);
/**
* 下移
*
* @param id 主键值
*/
boolean next(String id);
/**
* 通过moduleIds获取权限
*
* @param ids
* @return
*/
List<ModuleColumnEntity> getListByModuleId(List<String> ids);
/**
* 通过moduleIds获取权限
*
* @param ids
* @return
*/
List<ModuleColumnEntity> getListByIds(List<String> ids);
}

View File

@@ -0,0 +1,111 @@
package com.yunzhupaas.base.service;
import com.yunzhupaas.base.service.SuperService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yunzhupaas.base.entity.ModuleDataAuthorizeSchemeEntity;
import java.util.List;
/**
* 数据权限方案
*
* @author 云筑产品开发平台组
* @version V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2023/09/27
*/
public interface ModuleDataAuthorizeSchemeService extends SuperService<ModuleDataAuthorizeSchemeEntity> {
/**
* 列表
*
* @return ignore
*/
List<ModuleDataAuthorizeSchemeEntity> getList();
/**
* 列表
*
* @return ignore
*/
List<ModuleDataAuthorizeSchemeEntity> getEnabledMarkList(String enabledMark);
/**
* 列表
*
* @param moduleId 功能主键
* @return ignore
*/
List<ModuleDataAuthorizeSchemeEntity> getList(String moduleId);
/**
* 信息
*
* @param id 主键值
* @return ignore
*/
ModuleDataAuthorizeSchemeEntity getInfo(String id);
/**
* 创建
*
* @param entity 实体对象
*/
void create(ModuleDataAuthorizeSchemeEntity entity);
/**
* 更新
*
* @param id 主键值
* @param entity 实体对象
* @return ignore
*/
boolean update(String id, ModuleDataAuthorizeSchemeEntity entity);
/**
* 删除
*
* @param entity 实体对象
*/
void delete(ModuleDataAuthorizeSchemeEntity entity);
/**
* 判断名称是否重复
* @param id
* @param fullName
* @return
*/
Boolean isExistByFullName(String id, String fullName, String moduleId);
/**
* 判断名称是否重复
* @param id
* @param enCode
* @return
*/
Boolean isExistByEnCode(String id, String enCode, String moduleId);
/**
* 是否存在全部数据
* @param moduleId
* @return
*/
Boolean isExistAllData(String moduleId);
/**
* 通过moduleIds获取权限
*
* @param ids
* @return
*/
List<ModuleDataAuthorizeSchemeEntity> getListByModuleId(List<String> ids);
/**
* 通过moduleIds获取权限
*
* @param ids
* @return
*/
List<ModuleDataAuthorizeSchemeEntity> getListByIds(List<String> ids);
}

View File

@@ -0,0 +1,134 @@
package com.yunzhupaas.base.service;
import com.yunzhupaas.base.service.SuperService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yunzhupaas.base.Pagination;
import com.yunzhupaas.base.entity.ModuleFormEntity;
import java.util.List;
/**
* 表单权限
*
* @author 云筑产品开发平台组
* @version V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2024-09-14
*/
public interface ModuleFormService extends SuperService<ModuleFormEntity> {
/**
* 列表
*
* @return ignore
*/
List<ModuleFormEntity> getList();
/**
* 列表
*
* @return ignore
*/
List<ModuleFormEntity> getEnabledMarkList(String enabledMark);
/**
* 列表
*
* @param moduleId 功能主键
* @param pagination 分页参数
* @return ignore
*/
List<ModuleFormEntity> getList(String moduleId, Pagination pagination);
/**
* 列表
*
* @param moduleId 功能主键
* @return ignore
*/
List<ModuleFormEntity> getList(String moduleId);
/**
* 信息
*
* @param id 主键值
* @return ignore
*/
ModuleFormEntity getInfo(String id);
/**
* 信息
*
* @param id 主键值
* @param moduleId
* @return ignore
*/
ModuleFormEntity getInfo(String id, String moduleId);
/**
* 验证名称
*
* @param moduleId 功能主键
* @param fullName 名称
* @param id 主键值
* @return ignore
*/
boolean isExistByFullName(String moduleId, String fullName, String id);
/**
* 验证编码
*
* @param moduleId 功能主键
* @param enCode 编码
* @param id 主键值
* @return ignore
*/
boolean isExistByEnCode(String moduleId, String enCode, String id);
/**
* 创建
*
* @param entity 实体对象
*/
void create(ModuleFormEntity entity);
/**
* 创建
*
* @param entitys 实体对象
*/
void create(List<ModuleFormEntity> entitys);
/**
* 更新
*
* @param id 主键值
* @param entity 实体对象
* @return ignore
*/
boolean update(String id, ModuleFormEntity entity);
/**
* 删除
*
* @param entity 实体对象
*/
void delete(ModuleFormEntity entity);
/**
* 通过moduleIds获取权限
*
* @param ids
* @return
*/
List<ModuleFormEntity> getListByModuleId(List<String> ids);
/**
* 通过moduleIds获取权限
*
* @param ids
* @return
*/
List<ModuleFormEntity> getListByIds(List<String> ids);
}

View File

@@ -0,0 +1,258 @@
package com.yunzhupaas.base.service;
import com.yunzhupaas.base.ActionResult;
import com.yunzhupaas.base.entity.ModuleEntity;
import com.yunzhupaas.base.model.module.*;
import com.yunzhupaas.base.vo.DownloadVO;
import com.yunzhupaas.exception.DataException;
import java.util.List;
import java.util.Map;
/**
* 系统功能
*
* @author 云筑产品开发平台组
* @version V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2023/09/27
*/
public interface ModuleService extends SuperService<ModuleEntity> {
/**
* 列表
*
* @param filterFlowWork
* @param moduleAuthorize
* @param moduleUrlAddressAuthorize
* @return ignore
*/
List<ModuleEntity> getList(boolean filterFlowWork, List<String> moduleAuthorize, List<String> moduleUrlAddressAuthorize);
/**
* 列表
*
* @return ignore
*/
List<ModuleEntity> getList();
/**
* 列表
*
* @param systemId 系统id
* @param category
* @param keyword
* @param parentId
* @param release
* @return ignore
*/
List<ModuleEntity> getList(String systemId, String category, String keyword, Integer type, Integer enabledMark, String parentId, boolean release);
/**
* 通过id获取子菜单
*
* @param id 主键
* @return ignore
*/
List<ModuleEntity> getList(String id);
/**
* 信息
*
* @param id 主键值
* @return ignore
*/
ModuleEntity getInfo(String id);
/**
* 信息
*
* @param id 主键值
* @return ignore
*/
ModuleEntity getInfo(String id, String systemId);
/**
* 信息
*
* @param fullName 主键值
* @return ignore
*/
List<ModuleEntity> getInfoByFullName(String fullName, String systemId);
/**
* 信息
*
* @param id 主键值
* @return ignore
*/
ModuleEntity getInfo(String id, String systemId, String parentId);
/**
* 验证名称
*
* @param entity ignore
* @param category 分类
* @param systemId 分类
* @return ignore
*/
boolean isExistByFullName(ModuleEntity entity, String category, String systemId);
/**
* 验证编码
*
* @param entity 实体
* @param category 分类
* @param systemId 分类
* @return ignore
*/
boolean isExistByEnCode(ModuleEntity entity, String category, String systemId);
/**
* 删除
*
* @param entity 实体对象
*/
void delete(ModuleEntity entity);
/**
* 删除
*
* @param systemId 实体对象
*/
void deleteBySystemId(String systemId);
/**
* 删除权限(同步菜单 不处理数据权限)
*
* @param entity 实体对象
*/
void deleteModule(ModuleEntity entity);
/**
* 创建
*
* @param entity 实体对象
*/
void create(ModuleEntity entity);
/**
* 更新
*
* @param id 主键值
* @param entity 实体对象
* @return ignore
*/
boolean update(String id, ModuleEntity entity);
/**
* 导出数据
*
* @param id 主键
* @return DownloadVO ignore
*/
DownloadVO exportData(String id);
/**
* 导入数据
*
* @param exportModel 导出模型
* @param type
* @return ignore
* @throws DataException ignore
*/
ActionResult importData(ModuleExportModel exportModel, Integer type) throws DataException;
/**
* 功能设计发布功能自动创建app pc菜单
*
* @return
*/
List<ModuleEntity> getModuleList(String visualId);
/**
* 通过系统id获取菜单
*
* @param ids
* @param moduleAuthorize
* @param moduleUrlAddressAuthorize
* @return
*/
List<ModuleEntity> getModuleBySystemIds(List<String> ids, List<String> moduleAuthorize, List<String> moduleUrlAddressAuthorize);
/**
* 获取门户发布的菜单
*
* @param portalIds
* @return
*/
List<ModuleEntity> getModuleByPortal(List<String> portalIds);
/**
* 获取开发平台下的菜单
*
* @param moduleAuthorize
* @param moduleUrlAddressAuthorize
* @param singletonOrg
* @return
*/
List<ModuleEntity> getMainModule(List<String> moduleAuthorize, List<String> moduleUrlAddressAuthorize, boolean singletonOrg);
List<ModuleEntity> getModuleByIds(List<String> moduleIds, List<String> moduleAuthorize, List<String> moduleUrlAddressAuthorize, boolean singletonOrg);
/**
* 通过ids获取系统菜单
*
* @param enCodeList
* @return
*/
List<ModuleEntity> getListByEnCode(List<String> enCodeList);
/**
* @param mark
* @param id
* @param moduleAuthorize
* @param moduleUrlAddressAuthorize
* @return
*/
List<ModuleEntity> findModuleAdmin(int mark, String id, List<String> moduleAuthorize, List<String> moduleUrlAddressAuthorize);
void getParentModule(List<ModuleEntity> data, Map<String, ModuleEntity> moduleEntityMap);
/**
* 通过urlAddressList找id
*
* @param ids
* @param urlAddressList
* @return
*/
List<ModuleEntity> getListByUrlAddress(List<String> ids, List<String> urlAddressList);
/**
* 功能发布app pc菜单名称列表
*
* @return
*/
ModuleNameVO getModuleNameList(String visualId);
/**
* 获取表单关联的菜单数据列表
*
* @param page
* @return ignore
*/
List<ModuleSelectorVo> getFormMenuList(ModulePagination page);
/**
* 获取应用菜单列表
*
* @param type 3代表表单
* @param webType 页面类型1、纯表单2、表单加列表4、数据视图
* @param categorys 菜单类型webapp
* @return
*/
List<MenuSelectAllVO> getSystemMenu(Integer type, List<Integer> webType, List<String> categorys);
}

View File

@@ -0,0 +1,15 @@
package com.yunzhupaas.base.service;
import com.yunzhupaas.base.ActionResult;
import com.yunzhupaas.base.model.schedule.ScheduleNewCrForm;
/**
* 类的描述
*
* @author YUNZHUPAASYUNZHUPAAS开发组
* @version 5.0.x
* @since 2024/9/18 9:57
*/
public interface ScheduleNewApi {
ActionResult create(ScheduleNewCrForm scheduleCrForm);
}

View File

@@ -0,0 +1,18 @@
package com.yunzhupaas.base.service;
import com.yunzhupaas.base.ActionResult;
import com.yunzhupaas.base.model.systemconfig.SysConfigModel;
/**
* 类的描述
*
* @author YUNZHUPAASYUNZHUPAAS开发组
* @version 5.0.x
* @since 2024/8/28 10:36
*/
public interface SystemConfigApi {
/**
* 列表
*/
ActionResult<SysConfigModel> list();
}

View File

@@ -0,0 +1,121 @@
package com.yunzhupaas.base.service;
import com.yunzhupaas.base.entity.SystemEntity;
import java.util.List;
/**
* 系统
*
* @author 云筑产品开发平台组
* @version V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2023/09/27
*/
public interface SystemService extends SuperService<SystemEntity> {
/**
* 获取列表
* @return
*/
List<SystemEntity> getList();
/**
* 获取系统列表
*
* @param keyword
* @param filterMain
* @param isList
* @param moduleAuthorize
* @return
*/
List<SystemEntity> getList(String keyword, Boolean filterEnableMark, boolean verifyAuth, Boolean filterMain, boolean isList, List<String> moduleAuthorize);
/**
* 获取详情
*
* @param id
* @return
*/
SystemEntity getInfo(String id);
/**
* 判断系统名称是否重复
*
* @param id
* @param fullName
* @return
*/
Boolean isExistFullName(String id, String fullName);
/**
* 判断系统编码是否重复
*
* @param id
* @param enCode
* @return
*/
Boolean isExistEnCode(String id, String enCode);
/**
* 新建
*
* @param entity
* @return
*/
Boolean create(SystemEntity entity);
/**
* 新建
*
* @param entity
* @return
*/
Boolean update(String id, SystemEntity entity);
/**
* 删除
*
* @param id
* @return
*/
Boolean delete(String id);
/**
*
* 通过id获取系统列表
*
* @param list
* @param moduleAuthorize
* @return
*/
List<SystemEntity> getListByIds(List<String> list, List<String> moduleAuthorize);
/**
* 通过编码获取系统信息
*
* @param enCode
* @return
*/
SystemEntity getInfoByEnCode(String enCode);
/**
* 获取
*
* @param mark
* @param mainSystemCode
* @param moduleAuthorize
* @return
*/
List<SystemEntity> findSystemAdmin(int mark, String mainSystemCode, List<String> moduleAuthorize);
/**
* 获取
*
* @param mark
* @param mainSystemCode
* @return
*/
List<SystemEntity> findSystemAdmin(int mark, String mainSystemCode);
}

View File

@@ -0,0 +1,29 @@
package com.yunzhupaas.extend.service;
import com.yunzhupaas.model.document.FlowFileModel;
import java.util.List;
import java.util.Map;
/**
* 类的描述
*
* @author YUNZHUPAASYUNZHUPAAS开发组
* @version 5.0.x
* @since 2024/6/20 16:14
*/
public interface DocumentApi {
/**
* 判断是否存在归档文件
*
* @param taskId 流程任务主键
*/
Boolean checkFlowFile(String taskId);
/**
* 获取归档文件
*
* @param model 参数
*/
List<Map<String, Object>> getFlowFile(FlowFileModel model);
}

View File

@@ -0,0 +1,93 @@
package com.yunzhupaas.message.service;
import com.yunzhupaas.base.service.SuperService;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yunzhupaas.base.ActionResult;
import com.yunzhupaas.exception.DataException;
import com.yunzhupaas.message.entity.AccountConfigEntity;
import com.yunzhupaas.message.model.accountconfig.*;
/**
* 账号配置功能
* 版本: V3.2.0
* 版权: 深圳市乐程软件有限公司http://www.szlecheng.cn
* 作者: 云筑产品开发平台组
* 日期: 2022-08-18
*/
public interface AccountConfigService extends SuperService<AccountConfigEntity> {
List<AccountConfigEntity> getList(AccountConfigPagination accountConfigPagination);
List<AccountConfigEntity> getTypeList(AccountConfigPagination accountConfigPagination, String dataType);
AccountConfigEntity getInfo(String id);
void delete(AccountConfigEntity entity);
void create(AccountConfigEntity entity);
boolean update(String id, AccountConfigEntity entity);
/**
*
* @param type 配置类型 1站内信2邮件3短信4钉钉5企业微信6webhook
* @return
*/
List<AccountConfigEntity> getListByType(String type);
/**
* 验证名称
*
* @param fullName 名称
* @param id 主键值
* @return ignore
*/
boolean isExistByFullName(String fullName, String id);
/**
* 验证编码
*
* @param enCode 编码
* @param id 主键值
* @return ignore
*/
boolean isExistByEnCode(String enCode, String id,String type);
/**
* 账号配置导入
*
* @param entity 实体对象
* @return ignore
* @throws DataException ignore
*/
ActionResult ImportData(AccountConfigEntity entity) throws DataException;
// 子表方法
//列表子表数据方法
//验证表单
boolean checkForm(AccountConfigForm form, int i,String type,String id);
/**
* 验证微信公众号原始id唯一性
* @param gzhId 微信公众号原始id
* @param i
* @param type
* @param id
* @return
*/
boolean checkGzhId(String gzhId, int i,String type,String id);
AccountConfigEntity getInfoByType(String appKey, String type);
AccountConfigEntity getInfoByEnCode(String enCode,String type);
}

View File

@@ -0,0 +1,55 @@
package com.yunzhupaas.message.service;
import com.yunzhupaas.base.service.SuperService;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yunzhupaas.message.entity.MessageMonitorEntity;
import com.yunzhupaas.message.model.messagemonitor.*;
/**
* 消息监控
* 版本: V3.2.0
* 版权: 深圳市乐程软件有限公司http://www.szlecheng.cn
* 作者: 云筑产品开发平台组
* 日期: 2022-08-22
*/
public interface MessageMonitorService extends SuperService<MessageMonitorEntity> {
List<MessageMonitorEntity> getList(MessageMonitorPagination messageMonitorPagination);
List<MessageMonitorEntity> getTypeList(MessageMonitorPagination messageMonitorPagination, String dataType);
MessageMonitorEntity getInfo(String id);
void delete(MessageMonitorEntity entity);
void create(MessageMonitorEntity entity);
boolean update(String id, MessageMonitorEntity entity);
// 子表方法
//列表子表数据方法
//验证表单
boolean checkForm(MessageMonitorForm form, int i);
String userSelectValues(String ids);
/**
* 删除
* @param ids
* @return
*/
boolean delete(String[] ids);
void emptyMonitor();
}

View File

@@ -0,0 +1,228 @@
package com.yunzhupaas.message.service;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.yunzhupaas.base.Pagination;
import com.yunzhupaas.base.UserInfo;
import com.yunzhupaas.base.entity.MessageTemplateEntity;
import com.yunzhupaas.base.service.SuperService;
import com.yunzhupaas.message.entity.MessageEntity;
import com.yunzhupaas.message.entity.MessageReceiveEntity;
import com.yunzhupaas.message.model.NoticePagination;
import com.yunzhupaas.message.model.SentMessageForm;
import com.yunzhupaas.message.model.message.NoticeVO;
import com.yunzhupaas.message.model.message.PaginationMessage;
import java.util.List;
import java.util.Map;
/**
* 消息实例
*
* @author 云筑产品开发平台组
* @version V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2023/09/27
*/
public interface MessageService extends SuperService<MessageEntity> {
/**
* 列表(通知公告)
*
* @param pagination
* @return
*/
List<MessageEntity> getNoticeList(NoticePagination pagination);
/**
* 列表(通知公告)
*
* @return
*/
List<MessageEntity> getNoticeList();
/**
* 列表(通知公告)
* 门户专用
*
* @return
*/
List<MessageEntity> getDashboardNoticeList(List<String> typeList);
/**
* 获取全部数据
*
* @param pagination
* @param type 类别
* @return
*/
List<MessageReceiveEntity> getMessageList3(Pagination pagination, Integer type, String user, Integer isRead);
/**
* 获取消息列表(可选字段)
*
* @param pagination
* @return
*/
List<MessageReceiveEntity> getMessageColumnList(PaginationMessage pagination, SFunction<MessageReceiveEntity, ?>... columns);
/**
* 列表(通知公告/系统消息/私信消息)
*
* @param pagination
* @return
*/
List<MessageReceiveEntity> getMessageList(Pagination pagination);
/**
* 信息
*
* @param id 主键值
* @return
*/
MessageEntity getInfo(String id);
/**
* 默认消息
*
* @param type 类别:1-通知公告/2-系统消息
* @return
*/
MessageEntity getInfoDefault(int type);
/**
* 删除
*
* @param entity 实体对象
*/
void delete(MessageEntity entity);
/**
* 创建
*
* @param entity 实体对象
*/
void create(MessageEntity entity);
/**
* 更新
*
* @param entity 实体对象
*/
boolean update(String id, MessageEntity entity);
/**
* 消息已读(单条)
*
* @param messageId 消息主键
*/
MessageReceiveEntity messageRead(String messageId);
/**
* 消息已读(全部)
*/
void messageRead(List<String> idList);
/**
* 删除记录
*
* @param messageIds 消息Id
*/
void deleteRecord(List<String> messageIds);
/**
* 获取消息未读数量
*
* @param userId 用户主键
* @return
*/
int getUnreadCount(String userId, Integer type);
/**
* 发送公告
*
* @param toUserIds 发送用户
* @param entity 消息信息
*/
boolean sentNotice(List<String> toUserIds, MessageEntity entity);
/**
* 发送消息
*
* @param toUserIds 发送用户
* @param title 标题
*/
void sentMessage(List<String> toUserIds, String title);
/**
* 发送消息
*
* @param toUserIds 发送用户
* @param title 标题
* @param bodyText 内容
*/
void sentMessage(List<String> toUserIds, String title, String bodyText);
/**
* 发送消息
*
* @param toUserIds 发送用户
* @param title 标题
* @param bodyText 内容
* @param contentMsg 站内信息
*/
void sentMessage(List<String> toUserIds, String title, String bodyText, Map<String, String> contentMsg, UserInfo userInfo);
/**
* 发送消息
*
* @param toUserIds 发送用户
* @param title 标题
* @param bodyText 内容
*/
void sentMessage(List<String> toUserIds, String title, String bodyText, UserInfo userInfo, Integer source, Integer type);
/**
* 发送消息
*
* @param toUserIds 发送用户
* @param title 标题
* @param bodyText 内容
* @param testMessage 是否为测试消息
*/
void sentMessage(List<String> toUserIds, String title, String bodyText, UserInfo userInfo, Integer source, Integer type, boolean testMessage);
/**
* 发送消息
*
* @param toUserIds 发送用户
* @param entity 消息实体
* @param content 内容
*/
void sentFlowMessage(List<String> toUserIds, MessageTemplateEntity entity, String content);
/**
* 退出在线的WebSocket 可选参数
*
* @param token Token 精准退出用户
* @param userId 退出用户的全部会话
*/
void logoutWebsocketByToken(String token, String userId);
/**
* 日程发送消息
*/
List<String> sentScheduleMessage(SentMessageForm sentMessageForm, String type);
/**
* 通过过期时间刷新状态
*
* @return
*/
Boolean updateEnabledMark();
List<NoticeVO> getNoticeList(List<String> list);
}

View File

@@ -0,0 +1,96 @@
package com.yunzhupaas.message.service;
import com.yunzhupaas.base.service.SuperService;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.*;
import com.yunzhupaas.base.ActionResult;
import com.yunzhupaas.exception.DataException;
import com.yunzhupaas.message.entity.MessageTemplateConfigEntity;
import com.yunzhupaas.message.entity.SmsFieldEntity;
import com.yunzhupaas.message.entity.TemplateParamEntity;
import com.yunzhupaas.message.model.messagetemplateconfig.*;
/**
* 消息模板(新)
* 版本: V3.2.0
* 版权: 深圳市乐程软件有限公司http://www.szlecheng.cn
* 作者: 云筑产品开发平台组
* 日期: 2022-08-18
*/
public interface MessageTemplateConfigService extends SuperService<MessageTemplateConfigEntity> {
List<MessageTemplateConfigEntity> getList(MessageTemplateConfigPagination MessageTemplateConfigPagination);
List<MessageTemplateConfigEntity> getTypeList(MessageTemplateConfigPagination MessageTemplateConfigPagination, String dataType);
MessageTemplateConfigEntity getInfo(String id);
MessageTemplateConfigEntity getInfoByEnCode(String enCode,String messageType);
void delete(MessageTemplateConfigEntity entity);
void create(MessageTemplateConfigEntity entity);
boolean update(String id, MessageTemplateConfigEntity entity);
// 子表方法
List<TemplateParamEntity> getTemplateParamList(String id, MessageTemplateConfigPagination MessageTemplateConfigPagination);
List<TemplateParamEntity> getTemplateParamList(String id);
List<SmsFieldEntity> getSmsFieldList(String id, MessageTemplateConfigPagination MessageTemplateConfigPagination);
List<SmsFieldEntity> getSmsFieldList(String id);
//列表子表数据方法
//验证表单
boolean checkForm(MessageTemplateConfigForm form, int i,String id);
/**
* 验证名称
*
* @param fullName 名称
* @param id 主键值
* @return ignore
*/
boolean isExistByFullName(String fullName, String id);
/**
* 验证编码
*
* @param enCode 编码
* @param id 主键值
* @return ignore
*/
boolean isExistByEnCode(String enCode, String id);
/**
* 消息模板导入
*
* @param entity 实体对象
* @return ignore
* @throws DataException ignore
*/
ActionResult ImportData(MessageTemplateConfigEntity entity) throws DataException;
// /**
// * 获取模板被引用的参数用json格式存储参数数据
// * @param id 模板id
// * @return
// */
// List<BaseTemplateParamModel> getParamJson(String id);
/**
* 获取模板被引用的参数(消息模板参数数据用子表保存)
* @param id 模板id
* @return
*/
List<TemplateParamModel> getParamJson(String id);
}

View File

@@ -0,0 +1,19 @@
package com.yunzhupaas.message.service;
import com.yunzhupaas.base.service.SuperService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yunzhupaas.message.entity.MessageReceiveEntity;
/**
* 消息接收
*
* @author 云筑产品开发平台组
* @version V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2023/09/27
*/
public interface MessagereceiveService extends SuperService<MessageReceiveEntity> {
}

View File

@@ -0,0 +1,41 @@
package com.yunzhupaas.message.service;
import com.yunzhupaas.base.service.SuperService;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yunzhupaas.message.entity.SendConfigTemplateEntity;
import com.yunzhupaas.message.entity.TemplateParamEntity;
import com.yunzhupaas.message.model.sendmessageconfig.SendMessageConfigPagination;
/**
* 消息发送配置
* 版本: V3.2.0
* 版权: 深圳市乐程软件有限公司http://www.szlecheng.cn
* 作者: 云筑产品开发平台组
* 日期: 2022-08-19
*/
public interface SendConfigTemplateService extends SuperService<SendConfigTemplateEntity> {
QueryWrapper<SendConfigTemplateEntity> getChild(SendMessageConfigPagination pagination, QueryWrapper<SendConfigTemplateEntity> sendConfigTemplateQueryWrapper);
SendConfigTemplateEntity getInfo(String id);
List<SendConfigTemplateEntity> getDetailListByParentId(String id);
/**
* 根据消息发送配置id获取启用的配置模板
* @param id
* @return
*/
List<SendConfigTemplateEntity> getConfigTemplateListByConfigId(String id);
boolean isUsedAccount(String accountId);
boolean isUsedTemplate(String templateId);
}

View File

@@ -0,0 +1,110 @@
package com.yunzhupaas.message.service;
import com.yunzhupaas.base.service.SuperService;
import java.util.*;
import com.yunzhupaas.base.ActionResult;
import com.yunzhupaas.exception.DataException;
import com.yunzhupaas.message.entity.SendConfigTemplateEntity;
import com.yunzhupaas.message.entity.SendMessageConfigEntity;
import com.yunzhupaas.message.model.sendmessageconfig.*;
/**
* 消息发送配置
* 版本: V3.2.0
* 版权: 深圳市乐程软件有限公司http://www.szlecheng.cn
* 作者: 云筑产品开发平台组
* 日期: 2022-08-19
*/
public interface SendMessageConfigService extends SuperService<SendMessageConfigEntity> {
List<SendMessageConfigEntity> getList(SendMessageConfigPagination sendMessageConfigPagination, String dataType);
/**
* 获取列表
*
* @return
*/
List<SendMessageConfigEntity> getSelectorList(SendMessageConfigPagination sendMessageConfigPagination);
SendMessageConfigEntity getInfo(String id);
SendMessageConfigEntity getInfoByEnCode(String enCode);
SendMessageConfigEntity getSysConfig(String enCode,String type);
void delete(SendMessageConfigEntity entity);
void create(SendMessageConfigEntity entity);
boolean update(String id, SendMessageConfigEntity entity);
// 子表方法
List<SendConfigTemplateEntity> getSendConfigTemplateList(String id, SendMessageConfigPagination sendMessageConfigPagination);
List<SendConfigTemplateEntity> getSendConfigTemplateList(String id);
//列表子表数据方法
//验证表单
boolean checkForm(SendMessageConfigForm form, int i,String id);
/**
* 验证名称
*
* @param fullName 名称
* @param id 主键值
* @return ignore
*/
boolean isExistByFullName(String fullName, String id);
/**
* 验证编码
*
* @param enCode 编码
* @param id 主键值
* @return ignore
*/
boolean isExistByEnCode(String enCode, String id);
/**
* 消息发送配置导入
*
* @param entity 实体对象
* @return ignore
* @throws DataException ignore
*/
ActionResult ImportData(SendMessageConfigEntity entity) throws DataException;
List<SendMessageConfigEntity> getList(List<String> idList);
/**
* 更新配置被调用idusedId
* @param id
* @param idList
*/
void updateUsed(String id,List<String> idList);
/**
* 删除配置被调用idusedId
* @param id
* @param sendConfigIdList
*/
void removeUsed(String id,List<String> sendConfigIdList);
/**
* 差集(基于常规解法优化解法1 适用于中等数据量
* 求List1中有的但是List2中没有的元素
* 空间换时间降低时间复杂度
* 时间复杂度O(Max(list1.size(),list2.size()))
*/
List<String> subList(List<String> list1, List<String> list2);
boolean idUsed(String id);
}

View File

@@ -0,0 +1,26 @@
package com.yunzhupaas.message.service;
import com.yunzhupaas.base.service.SuperService;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yunzhupaas.message.entity.ShortLinkEntity;
import com.yunzhupaas.message.entity.SmsFieldEntity;
import com.yunzhupaas.message.model.messagetemplateconfig.*;
/**
*
* 消息模板(新)
* 版本: V3.2.0
* 版权: 深圳市乐程软件有限公司http://www.szlecheng.cn
* 作者: 云筑产品开发平台组
* 日期: 2022-08-18
*/
public interface ShortLinkService extends SuperService<ShortLinkEntity> {
String shortLink (String link);
ShortLinkEntity getInfoByLink(String link);
}

View File

@@ -0,0 +1,31 @@
package com.yunzhupaas.message.service;
import com.yunzhupaas.base.service.SuperService;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yunzhupaas.message.entity.SmsFieldEntity;
import com.yunzhupaas.message.model.messagetemplateconfig.*;
/**
*
* 消息模板(新)
* 版本: V3.2.0
* 版权: 深圳市乐程软件有限公司http://www.szlecheng.cn
* 作者: 云筑产品开发平台组
* 日期: 2022-08-18
*/
public interface SmsFieldService extends SuperService<SmsFieldEntity> {
QueryWrapper<SmsFieldEntity> getChild(MessageTemplateConfigPagination pagination, QueryWrapper<SmsFieldEntity> smsFieldQueryWrapper);
SmsFieldEntity getInfo(String id);
List<SmsFieldEntity> getDetailListByParentId(String id);
List<SmsFieldEntity> getParamList(String id,List<String> params);
Map<String,Object> getParamMap(String templateId,Map<String,Object> map);
}

View File

@@ -0,0 +1,245 @@
package com.yunzhupaas.message.service;
import com.alibaba.fastjson.JSONObject;
import com.dingtalk.api.response.OapiV2UserListResponse;
import com.yunzhupaas.message.model.message.DingTalkDeptModel;
import com.yunzhupaas.message.model.message.DingTalkUserModel;
import com.yunzhupaas.model.BaseSystemInfo;
import com.yunzhupaas.permission.entity.OrganizeEntity;
import com.yunzhupaas.permission.entity.UserEntity;
import java.text.ParseException;
import java.util.List;
/**
* 钉钉组织-部门-用户的同步业务
*
* @版本: V3.1.0
* @版权: 深圳市乐程软件有限公司http://www.szlecheng.cn
* @作者: 云筑产品开发平台组
* @日期: 2021/5/7 8:42
*/
public interface SynThirdDingTalkService {
/**
* 获取钉钉的配置信息
* @return
*/
BaseSystemInfo getDingTalkConfig();
//------------------------------------本系统同步公司、部门到钉钉-------------------------------------
/**
* 本地同步单个公司或部门到钉钉(供调用)
* 带错误定位判断的功能代码,只获取调用接口的返回信息 20210604
* @param isBatch 是否批量(批量不受开关限制)
* @param deptEntity
* @param dingDeptListPara 单条执行时为null
* @return
*/
// JSONObject createDepartmentSysToDing(boolean isBatch, OrganizeEntity deptEntity, List<DingTalkDeptModel> dingDeptListPara);
/**
* 本地更新单个公司或部门到钉钉(供调用)
* 带错误定位判断的功能代码,只获取调用接口的返回信息 20210604
* @param isBatch 是否批量(批量不受开关限制)
* @param deptEntity
* @param dingDeptListPara 单条执行时为null
* @return
*/
// JSONObject updateDepartmentSysToDing(boolean isBatch, OrganizeEntity deptEntity, List<DingTalkDeptModel> dingDeptListPara);
/**
* 本地删除单个公司或部门,同步到钉钉(供调用)
* 带错误定位判断的功能代码,只获取调用接口的返回信息 20210604
* @param isBatch 是否批量(批量不受开关限制)
* @param id 本系统的公司或部门ID
* @param dingDeptListPara 单条执行时为null
* @return
*/
// JSONObject deleteDepartmentSysToDing(boolean isBatch, String id, List<DingTalkDeptModel> dingDeptListPara);
/**
* 本地同步单个公司或部门到钉钉(供调用)
* 不带错误定位判断的功能代码,只获取调用接口的返回信息 20210604
* @param isBatch 是否批量(批量不受开关限制)
* @param deptEntity
* @param accessToken (单条调用时为空)
* @return
*/
JSONObject createDepartmentSysToDing(boolean isBatch, OrganizeEntity deptEntity,String accessToken);
/**
* 本地更新单个公司或部门到钉钉(供调用)
* 不带错误定位判断的功能代码,只获取调用接口的返回信息 20210604
* @param isBatch 是否批量(批量不受开关限制)
* @param deptEntity
* @param accessToken (单条调用时为空)
* @return
*/
JSONObject updateDepartmentSysToDing(boolean isBatch, OrganizeEntity deptEntity,String accessToken);
/**
* 本地删除单个公司或部门,同步到钉钉(供调用)
* 不带错误定位判断的功能代码,只获取调用接口的返回信息 20210604
* @param isBatch 是否批量(批量不受开关限制)
* @param id 本系统的公司或部门ID
* @param accessToken (单条调用时为空)
* @return
*/
JSONObject deleteDepartmentSysToDing(boolean isBatch, String id,String accessToken);
//------------------------------------本系统同步用户到钉钉-------------------------------------
/**
* 本地用户创建同步到钉钉的用户(单个)
* 带第三方错误定位判断的功能代码,只获取调用接口的返回信息 20210604
* @param isBatch 是否批量(批量不受开关限制)
* @param userEntity
* @param dingDeptListPara 单条执行时为null
* @param dingUserListPara 单条执行时为null
* @return
*/
// JSONObject createUserSysToDing(boolean isBatch, UserEntity userEntity, List<DingTalkDeptModel> dingDeptListPara,
// List<DingTalkUserModel> dingUserListPara) throws ParseException;
/**
* 本地更新用户信息或部门到钉钉的成员用户(单个)
* 带第三方错误定位判断的功能代码,只获取调用接口的返回信息 20210604
* @param isBatch 是否批量(批量不受开关限制)
* @param userEntity
* @param dingDeptListPara 单条执行时为null
* @param dingUserListPara 单条执行时为null
* @return
*/
// JSONObject updateUserSysToDing(boolean isBatch, UserEntity userEntity, List<DingTalkDeptModel> dingDeptListPara,
// List<DingTalkUserModel> dingUserListPara) throws ParseException;
/**
* 本地删除单个用户,同步到钉钉用户
* 带第三方错误定位判断的功能代码,只获取调用接口的返回信息 20210604
* @param isBatch 是否批量(批量不受开关限制)
* @param id 本系统的公司或部门ID
* @param dingDeptListPara 单条执行时为null
* @param dingUserListPara 单条执行时为null
* @return
*/
// JSONObject deleteUserSysToDing(boolean isBatch, String id, List<DingTalkDeptModel> dingDeptListPara,
// List<DingTalkUserModel> dingUserListPara);
/**
* 本地用户创建同步到钉钉的用户(单个)
* 不带第三方错误定位判断的功能代码,只获取调用接口的返回信息 20210604
* @param isBatch 是否批量(批量不受开关限制)
* @param userEntity
* @param accessToken (单条调用时为空)
* @return
*/
JSONObject createUserSysToDing(boolean isBatch, UserEntity userEntity,String accessToken) throws ParseException;
/**
* 本地更新用户信息或部门到钉钉的成员用户(单个)
* 不带第三方错误定位判断的功能代码,只获取调用接口的返回信息 20210604
* @param isBatch 是否批量(批量不受开关限制)
* @param userEntity
* @param accessToken (单条调用时为空)
* @return
*/
JSONObject updateUserSysToDing(boolean isBatch, UserEntity userEntity,String accessToken) throws ParseException;
/**
* 本地删除单个用户,同步到钉钉用户
* 不带第三方错误定位判断的功能代码,只获取调用接口的返回信息 20210604
* @param isBatch 是否批量(批量不受开关限制)
* @param id 本系统的公司或部门ID
* @param accessToken (单条调用时为空)
* @return
*/
JSONObject deleteUserSysToDing(boolean isBatch, String id,String accessToken);
//------------------------------------钉钉同步公司、部门到本系统20220330-------------------------------------
/**
* 钉钉同步单个公司或部门到本地(供调用)
* 不带错误定位判断的功能代码,只获取调用接口的返回信息 20220331
* @param isBatch 是否批量(批量不受开关限制)
* @param deptEntity
* @param accessToken (单条调用时为空)
* @return
*/
JSONObject createDepartmentDingToSys(boolean isBatch, DingTalkDeptModel deptEntity,String accessToken);
/**
* 本地更新单个公司或部门到钉钉(供调用)
* 不带错误定位判断的功能代码,只获取调用接口的返回信息 20220331
* @param isBatch 是否批量(批量不受开关限制)
* @param deptEntity
* @param accessToken (单条调用时为空)
* @return
*/
JSONObject updateDepartmentDingToSys(boolean isBatch, DingTalkDeptModel deptEntity,String accessToken);
/**
* 本地删除单个公司或部门,同步到钉钉(供调用)
* 不带错误定位判断的功能代码,只获取调用接口的返回信息 20220331
* @param isBatch 是否批量(批量不受开关限制)
* @param id 第三方的公司或部门ID
* @return
*/
JSONObject deleteDepartmentDingToSys(boolean isBatch, String id);
//------------------------------------钉钉同步用户到本系统20220331-------------------------------------
/**
* 本地用户创建同步到钉钉的用户(单个)
* 不带第三方错误定位判断的功能代码,只获取调用接口的返回信息 20220331
* @param isBatch 是否批量(批量不受开关限制)
* @param dingUserModel
* @param accessToken (单条调用时为空)
* @return
*/
JSONObject createUserDingToSys(boolean isBatch, OapiV2UserListResponse.ListUserResponse dingUserModel, String accessToken) throws Exception;
/**
* 本地更新用户信息或部门到钉钉的成员用户(单个)
* 不带第三方错误定位判断的功能代码,只获取调用接口的返回信息 20220331
* @param isBatch 是否批量(批量不受开关限制)
* @param userEntity
* @param accessToken (单条调用时为空)
* @return
*/
JSONObject updateUserDingToSys(boolean isBatch, UserEntity userEntity,String accessToken) throws ParseException;
/**
* 本地删除用户、中间表
* 不带第三方错误定位判断的功能代码,只获取调用接口的返回信息 20220331
* @param isBatch 是否批量(批量不受开关限制)
* @param id 钉钉的用户ID
* @return
*/
JSONObject deleteUserDingToSys(boolean isBatch, String id) throws Exception;
JSONObject updateUserDingToSystem(boolean isBatch, OapiV2UserListResponse.ListUserResponse dingUserModel) throws Exception;
void deleteSyncByBothWay(String thirdTypeDing, String id);
}

View File

@@ -0,0 +1,83 @@
package com.yunzhupaas.message.service;
import com.yunzhupaas.base.service.SuperService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yunzhupaas.message.entity.SynThirdInfoEntity;
import com.yunzhupaas.message.util.SynThirdTotal;
import java.util.List;
/**
* 第三方工具的公司-部门-用户同步表模型
*
* @版本: V3.1.0
* @版权: 深圳市乐程软件有限公司http://www.szlecheng.cn
* @作者: 云筑产品开发平台组
* @日期: 2021/4/23 17:29
*/
public interface SynThirdInfoService extends SuperService<SynThirdInfoEntity> {
/**
* 获取指定第三方工具、指定数据类型的数据列表
* @param thirdType
* @param dataType
* @return
*/
List<SynThirdInfoEntity> getList(String thirdType,String dataType);
/**
* 获取同步的详细信息
* @param id
* @return
*/
SynThirdInfoEntity getInfo(String id);
void create(SynThirdInfoEntity entity);
boolean update(String id,SynThirdInfoEntity entity);
void delete(SynThirdInfoEntity entity);
/**
* 获取指定第三方工具、指定数据类型、对象ID的同步信息
* @param thirdType
* @param dataType
* @param id
* @return
*/
SynThirdInfoEntity getInfoBySysObjId(String thirdType,String dataType,String id);
/**
* 获取指定第三方工具、指定数据类型的同步统计信息
* @param thirdType
* @param dataType
* @return
*/
SynThirdTotal getSynTotal(String thirdType,String dataType);
/**
*
* @param thirdToSysType
* @param dataTypeOrg
* @param SysToThirdType
* @return
*/
List<SynThirdInfoEntity> syncThirdInfoByType(String thirdToSysType, String dataTypeOrg, String SysToThirdType);
boolean getBySysObjId(String id);
String getSysByThird(String valueOf);
void initBaseDept(Long dingRootDeptId, String access_token, String thirdType);
/**
* 获取指定第三方工具、指定数据类型、第三方对象ID的同步信息 20220331
* @param thirdType
* @param dataType
* @param thirdObjId
* @return
*/
SynThirdInfoEntity getInfoByThirdObjId(String thirdType,String dataType,String thirdObjId);
}

View File

@@ -0,0 +1,125 @@
package com.yunzhupaas.message.service;
import com.alibaba.fastjson.JSONObject;
import com.dingtalk.api.response.OapiV2UserListResponse;
import com.yunzhupaas.exception.WxErrorException;
import com.yunzhupaas.message.model.message.DingTalkDeptModel;
import com.yunzhupaas.message.model.message.QyWebChatDeptModel;
import com.yunzhupaas.message.model.message.QyWebChatUserModel;
import com.yunzhupaas.model.BaseSystemInfo;
import com.yunzhupaas.permission.entity.OrganizeEntity;
import com.yunzhupaas.permission.entity.UserEntity;
/**
* 本系统的公司、部门、用户与企业微信的同步
*
* @版本: V3.1.0
* @版权: 深圳市乐程软件有限公司http://www.szlecheng.cn
* @作者: 云筑产品开发平台组
* @日期: 2021/4/27 11:12
*/
public interface SynThirdQyService {
/**
* 获取企业微信的配置信息
* @return
*/
BaseSystemInfo getQyhConfig();
//------------------------------------本系统同步公司、部门到企业微信-------------------------------------
/**
* 本地同步单个公司或部门到企业微信(供调用)
* @param isBatch 是否批量(批量不受开关限制)
* @param deptEntity
* @param accessToken (单条调用时为空)
* @return
* @throws WxErrorException
*/
JSONObject createDepartmentSysToQy(boolean isBatch, OrganizeEntity deptEntity,String accessToken) throws WxErrorException;
/**
* 本地更新单个公司或部门到企业微信(供调用)
* @param isBatch 是否批量(批量不受开关限制)
* @param deptEntity
* @param accessToken (单条调用时为空)
* @return
* @throws WxErrorException
*/
JSONObject updateDepartmentSysToQy(boolean isBatch, OrganizeEntity deptEntity,String accessToken) throws WxErrorException;
/**
* 本地删除单个公司或部门,同步到企业微信(供调用)
* @param isBatch 是否批量(批量不受开关限制)
* @param id 本系统的公司或部门ID
* @param accessToken (单条调用时为空)
* @return
* @throws WxErrorException
*/
JSONObject deleteDepartmentSysToQy(boolean isBatch, String id,String accessToken) throws WxErrorException;
//------------------------------------本系统同步用户到企业微信-------------------------------------
/**
* 本地用户创建同步到企业微信的成员(单个)
* @param isBatch 是否批量(批量不受开关限制)
* @param userEntity
* @param accessToken (单条调用时为空)
* @return
* @throws WxErrorException
*/
JSONObject createUserSysToQy(boolean isBatch, UserEntity userEntity,String accessToken) throws WxErrorException;
/**
* 本地更新用户信息或部门到企业微信的成员信息(单个)
* @param isBatch 是否批量(批量不受开关限制)
* @param userEntity
* @param accessToken (单条调用时为空)
* @return
* @throws WxErrorException
*/
JSONObject updateUserSysToQy(boolean isBatch, UserEntity userEntity,String accessToken) throws WxErrorException;
/**
* 本地删除单个用户,同步到企业微信成员
* @param isBatch 是否批量(批量不受开关限制)
* @param id 本系统的公司或部门ID
* @param accessToken (单条调用时为空)
* @return
* @throws WxErrorException
*/
JSONObject deleteUserSysToQy(boolean isBatch, String id,String accessToken) throws WxErrorException;
//------------------------------------企业微信同步公司、部门到本系统20220613-------------------------------------
/**
* 企业微信同步公司或部门到本地(供调用)
* @param isBatch 是否批量(批量不受开关限制)
* @param deptEntity
* @param accessToken (单条调用时为空)
* @return
*/
JSONObject createDepartmentQyToSys(boolean isBatch, QyWebChatDeptModel deptEntity, String accessToken);
/**
* 企业微信同步更新公司或部门到本地(供调用)
* @param isBatch 是否批量(批量不受开关限制)
* @param deptEntity
* @param accessToken (单条调用时为空)
* @return
*/
JSONObject updateDepartmentQyToSys(boolean isBatch, QyWebChatDeptModel deptEntity,String accessToken);
/**
* 企业微信往本地同步用户
* @param isBatch 是否批量(批量不受开关限制)
* @param qyWebChatUserModel
* @return
*/
JSONObject createUserQyToSys(boolean isBatch, QyWebChatUserModel qyWebChatUserModel,String access_token)throws Exception;
JSONObject updateUserQyToSystem(boolean isBatch, QyWebChatUserModel qyWebChatUserModel,String access_token) throws Exception;
}

View File

@@ -0,0 +1,28 @@
package com.yunzhupaas.message.service;
import com.yunzhupaas.base.service.SuperService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yunzhupaas.message.entity.TemplateParamEntity;
import com.yunzhupaas.message.model.messagetemplateconfig.*;
import java.util.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
/**
*
* 消息模板(新)
* 版本: V3.2.0
* 版权: 深圳市乐程软件有限公司http://www.szlecheng.cn
* 作者: 云筑产品开发平台组
* 日期: 2022-08-18
*/
public interface TemplateParamService extends SuperService<TemplateParamEntity> {
QueryWrapper<TemplateParamEntity> getChild(MessageTemplateConfigPagination pagination, QueryWrapper<TemplateParamEntity> templateParamQueryWrapper);
TemplateParamEntity getInfo(String id);
List<TemplateParamEntity> getDetailListByParentId(String id);
List<TemplateParamEntity> getParamList(String id,List<String> params);
}

View File

@@ -0,0 +1,29 @@
package com.yunzhupaas.message.service;
import com.yunzhupaas.base.service.SuperService;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yunzhupaas.message.entity.WechatUserEntity;
/**
*
* 消息模板(新)
* 版本: V3.2.0
* 版权: 深圳市乐程软件有限公司http://www.szlecheng.cn
* 作者: 云筑产品开发平台组
* 日期: 2022-08-18
*/
public interface WechatUserService extends SuperService<WechatUserEntity> {
WechatUserEntity getInfoByGzhId(String userId,String gzhId);
void create(WechatUserEntity entity);
boolean update(String id, WechatUserEntity entity);
void delete(WechatUserEntity entity);
}

View File

@@ -0,0 +1,161 @@
package com.yunzhupaas.permission.service;
import com.yunzhupaas.base.UserInfo;
import com.yunzhupaas.base.entity.SystemEntity;
import com.yunzhupaas.base.model.portalManage.PortalModel;
import com.yunzhupaas.base.model.portalManage.SavePortalAuthModel;
import com.yunzhupaas.base.service.SuperService;
import com.yunzhupaas.database.model.superQuery.SuperJsonModel;
import com.yunzhupaas.model.login.UserSystemVO;
import com.yunzhupaas.permission.entity.AuthorizeEntity;
import com.yunzhupaas.permission.model.authorize.AuthorizeDataUpForm;
import com.yunzhupaas.permission.model.authorize.AuthorizeVO;
import com.yunzhupaas.permission.model.authorize.SaveBatchForm;
import java.util.List;
/**
* 操作权限
*
* @author 云筑产品开发平台组
* @version V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2024-09-26 上午9:18
*/
public interface AuthorizeService extends SuperService<AuthorizeEntity> {
/**
* 获取权限(菜单、按钮、列表)
*
* @param isCache 是否存在redis
* @param singletonOrg
* @return
*/
AuthorizeVO getAuthorize(boolean isCache, boolean singletonOrg);
/**
* 获取权限(菜单、按钮、列表)
*
* @param isCache 是否存在redis
* @param singletonOrg
* @return
*/
AuthorizeVO getAuthorize(boolean isCache, boolean singletonOrg, boolean isMainSystem);
/**
* 创建
*
* @param objectId 对象主键
* @param authorizeList 实体对象
*/
void save(String objectId, AuthorizeDataUpForm authorizeList);
/**
* 创建
*
* @param saveBatchForm 对象主键
*/
void saveBatch(SaveBatchForm saveBatchForm, boolean isBatch);
/**
* 根据用户id获取列表
*
* @param isAdmin 是否管理员
* @param userId 用户主键
* @return
*/
List<AuthorizeEntity> getListByUserId(boolean isAdmin, String userId);
/**
* 根据对象Id获取列表
*
* @param objectId 对象主键
* @return
*/
List<AuthorizeEntity> getListByObjectId(List<String> objectId);
/**
* 判断当前角色是否有权限
*
* @param roleId
* @param systemId
* @return
*/
Boolean existAuthorize(String roleId, String systemId);
/**
* 判断当前角色是否有权限
*
* @param roleId
* @return
*/
List<AuthorizeEntity> getListByRoleId(String roleId);
/**
* 根据对象Id获取列表
*
* @param objectId 对象主键
* @param itemType 对象主键
* @return
*/
List<AuthorizeEntity> getListByObjectId(String objectId, String itemType);
/**
* 根据对象Id获取列表
*
* @param objectType 对象主键
* @return
*/
List<AuthorizeEntity> getListByObjectAndItem(String itemId, String objectType);
/**
* 根据对象Id获取列表
*
* @param itemId 对象主键
* @param itemType 对象类型
* @return
*/
List<AuthorizeEntity> getListByObjectAndItemIdAndType(String itemId, String itemType);
void getPortal(List<SystemEntity> systemList, List<PortalModel> portalList, Long dateTime, List<String> collect);
void saveItemAuth(SavePortalAuthModel portalAuthModel);
void saveObjectAuth(SavePortalAuthModel portalAuthModel);
List<SuperJsonModel> getConditionSql(String moduleId);
/**
* 通过Item获取权限列表
*
* @param itemType
* @param itemId
* @return
*/
List<AuthorizeEntity> getAuthorizeByItem(String itemType, String itemId);
AuthorizeVO getAuthorizeByUser(boolean singletonOrg);
AuthorizeVO getMainSystemAuthorize(List<String> moduleIds, List<String> moduleAuthorize, List<String> moduleUrlAddressAuthorize, boolean singletonOrg);
List<AuthorizeEntity> getListByRoleIdsAndItemType(List<String> roleIds, String itemType);
List<UserSystemVO> getUserStanding(boolean isLogin, String userId);
List<UserSystemVO> getUserStanding(boolean isLogin, String userId, String loginDevice);
AuthorizeVO getAuthorize(UserInfo userInfo, boolean singletonOrg, Integer stand, boolean isMainSystem);
void removeAuthByUserOrMenu(List<String> userIds, List<String> menuIds);
/**
* 获取用户当前身份
*
* @param userId 用户id
* @param standType 身份类型1-超级管理员2-管理员3普通用户
* @return
*/
boolean getUserCurrentStanding(String userId, Integer standType);
}

View File

@@ -0,0 +1,110 @@
package com.yunzhupaas.permission.service;
import com.yunzhupaas.base.service.SuperService;
import com.yunzhupaas.permission.entity.GroupEntity;
import com.yunzhupaas.permission.model.usergroup.PaginationGroup;
import java.util.List;
import java.util.Map;
/**
* 用户管理业务层
*
* @author :云筑产品开发平台组
* @version: V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2022/3/10 17:59
*/
public interface GroupService extends SuperService<GroupEntity> {
/**
* 获取用户列表
*
* @param pagination 关键字
* @return
*/
List<GroupEntity> getList(PaginationGroup pagination);
/**
* 获取所有格分组信息
*
* @return
*/
List<GroupEntity> list();
Map<String,Object> getGroupMap();
/**
* fullName/encode,id
* @return
*/
Map<String,Object> getGroupEncodeMap();
Map<String, Object> getGroupEncodeMap(boolean enabledMark);
/**
* 获取用户详情
*
* @param id
* @return
*/
GroupEntity getInfo(String id);
/**
* 获取分组详情
*
* @param fullName
* @param encode
* @return
*/
GroupEntity getInfo(String fullName, String encode);
/**
* 添加
*
* @param entity
*/
void crete(GroupEntity entity);
/**
* 修改
*
* @param id
* @param entity
*/
Boolean update(String id, GroupEntity entity);
/**
* 删除
*
* @param entity
*/
void delete(GroupEntity entity);
/**
* 判断名称是否重复
*
* @param fullName
* @param id
* @return
*/
Boolean isExistByFullName(String fullName, String id);
/**
* 判断编码是否重复
*
* @param enCode
* @param id
* @return
*/
Boolean isExistByEnCode(String enCode, String id);
/**
* 通过分组id获取分组集合
*
* @param list
* @return
*/
List<GroupEntity> getListByIds(List<String> list, Boolean filter);
}

View File

@@ -0,0 +1,139 @@
package com.yunzhupaas.permission.service;
import com.yunzhupaas.base.service.SuperService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yunzhupaas.base.Pagination;
import com.yunzhupaas.permission.entity.OrganizeAdministratorEntity;
import com.yunzhupaas.permission.entity.OrganizeEntity;
import com.yunzhupaas.permission.model.organizeadministrator.OrganizeAdministratorListVo;
import com.yunzhupaas.permission.model.organizeadministrator.OrganizeAdministratorModel;
import java.util.List;
/**
*
* 机构分级管理员
* @author 云筑产品开发平台组
* @version V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2024-09-26 上午9:18
*/
public interface OrganizeAdministratorService extends SuperService<OrganizeAdministratorEntity> {
/**
* 获取 机构分级管理员信息
* @param userId
* @param organizeId
* @return
*/
OrganizeAdministratorEntity getOne(String userId, String organizeId);
/**
* 根据userId获取列表
* @param userId
* @return
*/
List<OrganizeAdministratorEntity> getOrganizeAdministratorEntity(String userId);
/**
* 根据userId获取列表
* @param userId
* @param type 分管对象类型 PermissionConst.ORGANIZE、PermissionConst.SYSTEM {@link com.yunzhupaas.constant.PermissionConst}
* @param filterMain
* @return
*/
List<OrganizeAdministratorEntity> getOrganizeAdministratorEntity(String userId, String type, boolean filterMain);
/**
* 根据userId获取列表
* @param userId
* @param type 分管对象类型 PermissionConst.ORGANIZE、PermissionConst.SYSTEM {@link com.yunzhupaas.constant.PermissionConst}
* @return
*/
List<OrganizeAdministratorEntity> getOrganizeAdministratorEntity(String userId, String type);
/**
* 新建
* @param entity 实体对象
*/
void create(OrganizeAdministratorEntity entity);
/**
* 新建
* @param list
*/
void createList(List<OrganizeAdministratorEntity> list, String userId);
/**
* 更新
* @param id 主键值
* @param entity 实体对象
*/
boolean update(String id, OrganizeAdministratorEntity entity);
/**
* 删除
* @param userId 用户id
*/
boolean deleteByUserId(String userId);
/**
* 删除
* @param entity 实体对象
*/
void delete(OrganizeAdministratorEntity entity);
/**
* 通过UserId获取权限组名称
*
* @param userId 主键值
* @return
*/
String getManagerGroupByUserId(String userId);
/**
* 获取 OrganizeAdminIsTratorEntity 信息
* @param userId 主键值
* @return
*/
List<OrganizeAdministratorEntity> getInfoByUserId(String userId);
/**
* 获取 OrganizeAdminIsTratorEntity 信息
* @param id 主键值
* @return
*/
OrganizeAdministratorEntity getInfo(String id);
/**
* 获取 OrganizeAdminIsTratorEntity 信息
* @param organizeId 机构主键值
* @return
*/
OrganizeAdministratorEntity getInfoByOrganizeId(String organizeId);
/**
* 获取 OrganizeAdminIsTratorEntity 列表
* @param organizeIdList 机构主键值
* @return
*/
List<OrganizeAdministratorEntity> getListByOrganizeId(List<String> organizeIdList);
/**
* 获取二级管理员列表
*
* @param pagination 分页参数
* @return
*/
List<OrganizeAdministratorListVo> getList(Pagination pagination);
List<String> getOrganizeUserList(String type);
List<OrganizeEntity> getListByAuthorize();
OrganizeAdministratorModel getOrganizeAdministratorList();
}

View File

@@ -0,0 +1,148 @@
package com.yunzhupaas.permission.service;
import com.yunzhupaas.base.service.SuperService;
import com.yunzhupaas.permission.entity.OrganizeRelationEntity;
import com.yunzhupaas.permission.entity.PermissionGroupEntity;
import com.yunzhupaas.permission.model.organize.OrganizeConditionModel;
import com.yunzhupaas.permission.model.organize.OrganizeModel;
import java.util.List;
/**
* <p>
* 组织关系 服务类
* </p>
*
* @author
* @since 2022-01-19
*/
public interface OrganizeRelationService extends SuperService<OrganizeRelationEntity> {
/**
* 获取组织关联对象
*
* @param organizeIds 组织id集合
*/
List<OrganizeRelationEntity> getRelationListByOrganizeId(List<String> organizeIds);
/**
* 获取组织关联对象
*
* @param organizeIds 组织id集合
*/
List<OrganizeRelationEntity> getRelationListByOrganizeId(List<String> organizeIds, String objectType);
/**
* 获取组织关联对象
*
* @param organizeIds 组织id集合
*/
List<String> getPositionListByOrganizeId(List<String> organizeIds);
/**
* 获取组织角色关联对象
*
* @param roleId 角色ID
* @return 关联对象集合
*/
List<OrganizeRelationEntity> getRelationListByRoleId(String roleId);
/**
* 获取组织角色关联对象
*
* @param roleId 角色ID
* @return 关联对象集合
*/
List<OrganizeRelationEntity> getRelationListByRoleIdList(List<String> roleId);
/**
* 通过对象id获取组织关系
*
* @param objectType 关系
* @param objectId 对象id
* @return 关联对象集合
*/
List<OrganizeRelationEntity> getRelationListByObjectIdAndType(String objectType, String objectId);
/**
* 是否存在组织角色关联关系
* @param roleId
* @param organizeId
* @return
*/
Boolean existByRoleIdAndOrgId(String roleId, String organizeId);
Boolean existByObjTypeAndOrgId(String objectType, String organizeId);
Boolean existByObjAndOrgId(String objectType, String objId , String organizeId);
/**
* 获取关联对象根据类型
*
* @return 关联对象集合
*/
List<OrganizeRelationEntity> getRelationListByType(String objectType);
List<OrganizeRelationEntity> getListByTypeAndOrgId(String objectType,String orgId);
Boolean deleteAllByRoleId(String roleId);
/*================ 切换组织后 -> 自动切换岗位 ===============*/
/**
* 自动获取当前组织下的默认岗位
* @param userId 用户ID
* @param changeToMajorOrgId 切换组织ID
* @param currentMajorPosId 原本的岗位ID
* @return 岗位ID
*/
String autoGetMajorPositionId(String userId, String changeToMajorOrgId, String currentMajorPosId);
/**
* 自动获取有权限的组织ID
* @param userId 用户ID
* @param orgIds 组织ID集合
* @param currentMajorOrgId 当前默认组织ID
* @param systemId
* @return 组织ID
*/
String autoGetMajorOrganizeId(String userId, List<String> orgIds, String currentMajorOrgId, String systemId);
/**
* 自动切换有权限的
* @param userIds 用户ID集合
*/
void autoSetOrganize(List<String> userIds);
/**
* 自动切换岗位
* @param userIds 用户ID集合
*/
void autoSetPosition(List<String> userIds);
/**
* 检查组织是否有权限
* @param userId 用户ID
* @param orgId 组织ID
* @param systemId
* @return true:存在
*/
List<PermissionGroupEntity> checkBasePermission(String userId, String orgId, String systemId);
/**
* 通过组织id获取组织关系
*
* @param departIds
* @param type
* @return
*/
List<String> getOrgIds(List<String> departIds, String type);
/**
* 通过组织id获取组织关系
* @return
*/
List<OrganizeModel> getOrgIdsList(OrganizeConditionModel organizeConditionModel);
}

View File

@@ -0,0 +1,448 @@
package com.yunzhupaas.permission.service;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.yunzhupaas.base.ActionResult;
import com.yunzhupaas.base.service.SuperService;
import com.yunzhupaas.permission.entity.OrganizeEntity;
import com.yunzhupaas.permission.model.authorize.AuthorizeConditionEnum;
import com.yunzhupaas.permission.model.organize.OrganizeConditionModel;
import com.yunzhupaas.permission.model.organize.PaginationOrganize;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* 组织机构
*
* @author 云筑产品开发平台组
* @version V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2024-09-26 上午9:18
*/
public interface OrganizeService extends SuperService<OrganizeEntity> {
/**
* 列表
*
* @return
*/
List<OrganizeEntity> getListAll(List<String> idAll, String keyWord);
/**
* 列表
*
* @return
*/
List<OrganizeEntity> getDepsByParentId(String id);
/**
* 列表
*
* @param filterEnabledMark
* @return
*/
List<OrganizeEntity> getList(boolean filterEnabledMark);
/**
* 列表
*
* @return
*/
List<OrganizeEntity> getList(String keyword, boolean filterEnabledMark);
/**
* 获取组织信息
*
* @param keyword
* @param filterEnabledMark
* @param type
* @return OrgId, OrgEntity
*/
Map<String, OrganizeEntity> getOrgMaps(String keyword, boolean filterEnabledMark, String type, SFunction<OrganizeEntity, ?>... columns);
/**
* 获取组织信息
*
* @return OrgId, OrgEntity
*/
Map<String, OrganizeEntity> getOrgMapsAll(SFunction<OrganizeEntity, ?>... columns);
/**
* 列表(有效的组织)
*
* @return
*/
List<OrganizeEntity> getListByEnabledMark(Boolean enable);
/**
* 列表
*
* @param fullName 组织名称
* @return
*/
OrganizeEntity getInfoByFullName(String fullName);
/**
* 获取部门名列表
*
* @return
*/
List<OrganizeEntity> getOrgEntityList(List<String> idList, Boolean enable);
/**
* 获取部门名列表(在线开发转换数据使用)
*
* @return
*/
List<OrganizeEntity> getOrgEntityList(Set<String> idList);
/**
* 全部组织id : name
*
* @return
*/
Map<String, Object> getOrgMap();
/**
* 全部组织Encode/name : id
*
* @param type
* @return
*/
Map<String, Object> getOrgEncodeAndName(String type);
/**
* 全部组织name : id
*
* @param type
* @return
*/
Map<String, Object> getOrgNameAndId(String type);
/**
* 获取redis存储的部门信息
*
* @return
*/
List<OrganizeEntity> getOrgRedisList();
/**
* 信息
*
* @param id 主键值
* @return
*/
OrganizeEntity getInfo(String id);
/**
* 通过名称查询id
*
* @param fullName 名称
* @return
*/
OrganizeEntity getByFullName(String fullName);
/**
* 通过名称 组织类型 查询id
*
* @param fullName 名称
* @param category 类别
* @param enCode 编码
* @return
*/
OrganizeEntity getByFullName(String fullName, String category, String enCode);
/**
* 验证名称
*
* @param entity
* @param isCheck 组织名称是否不分级判断
* @param isFilter 是否需要过滤id
* @return
*/
boolean isExistByFullName(OrganizeEntity entity, boolean isCheck, boolean isFilter);
/**
* 获取父级id
*
* @param organizeId 组织id
* @param organizeParentIdList 父级id集合
*/
void getOrganizeIdTree(String organizeId, List<String> organizeParentIdList);
/**
* 获取父级id
*
* @param organizeId 组织id
* @param organizeParentIdList 父级id集合
*/
void getOrganizeId(String organizeId, List<OrganizeEntity> organizeParentIdList);
/**
* 验证编码
*
* @param enCode
* @param id
* @return
*/
boolean isExistByEnCode(String enCode, String id);
/**
* 创建
*
* @param entity 实体对象
*/
void create(OrganizeEntity entity);
/**
* 更新
*
* @param id 主键值
* @param entity 实体对象
*/
boolean update(String id, OrganizeEntity entity);
/**
* 通过父级id修改父级组织树
*
* @param entity
* @param category
*/
void update(OrganizeEntity entity, String category);
/**
* 删除
*
* @param orgId 实体对象
*/
ActionResult<String> delete(String orgId);
/**
* 上移
*
* @param id 主键值
*/
boolean first(String id);
/**
* 下移
*
* @param id 主键值
*/
boolean next(String id);
/**
* 判断是否允许删除
*
* @param orgId 主键值
* @return
*/
String allowDelete(String orgId);
/**
* 获取名称
*
* @return
*/
List<OrganizeEntity> getOrganizeName(List<String> id);
/**
* 获取名称
*
* @return
*/
Map<String, OrganizeEntity> getOrganizeName(List<String> id, String keyword, boolean filterEnabledMark, String type);
/**
* 获取名称
*
* @return
*/
List<OrganizeEntity> getOrganizeNameSort(List<String> id);
/**
* @param organizeParentId 父id
* @return List<String> 接收子结构
*/
List<String> getOrganize(String organizeParentId);
/**
* @param organizeParentId 父id
* @return List<String> 接收子结构
*/
List<String> getOrganizeByOraParentId(String organizeParentId);
/**
* 获取所有当前用户的组织及子组织
*
* @param organizeId
* @param filterEnabledMark
* @return
*/
List<String> getUnderOrganizations(String organizeId, boolean filterEnabledMark);
/**
* 获取所有当前用户的组织及子组织 (有分级权限验证)
*
* @param organizeId
* @return
*/
List<String> getUnderOrganizationss(String organizeId);
/**
* 通过名称获取组织列表
*
* @param fullName
* @return
*/
List<OrganizeEntity> getListByFullName(String fullName);
/**
* 通过id判断是否有子集
*
* @param id 主键
* @return
*/
List<OrganizeEntity> getListByParentId(String id);
/**
* 获取用户所有所在组织
*
* @return 组织对象集合
*/
List<OrganizeEntity> getAllOrgByUserId(String userId);
/**
* 通过组织id树获取名称
*
* @param idNameMaps 预先获取的组织ID名称映射
* @param orgIdTree 组织id树
* @param regex 分隔符
* @return 组织对象集合
*/
String getFullNameByOrgIdTree(Map<String, String> idNameMaps, String orgIdTree, String regex);
/**
* 获取父级组织id
*
* @param entity
* @return
*/
String getOrganizeIdTree(OrganizeEntity entity);
/**
* 获取顶级组织
*
* @param parentId
* @return
*/
List<OrganizeEntity> getOrganizeByParentId(String parentId);
/**
* 获取子级
*
* @param id 组织id
*/
List<OrganizeEntity> getAllChild(String id);
/**
* 查询用户的所属公司下的部门
*
* @return
*/
List<OrganizeEntity> getDepartmentAll(String organizeId);
/**
* 获取所在公司
*
* @param organizeId
* @return
*/
OrganizeEntity getOrganizeCompany(String organizeId);
/**
* 获取所在公司下部门
*
* @return
*/
void getOrganizeDepartmentAll(String organize, List<OrganizeEntity> list);
/**
* 获取组织id树
*
* @param entity
* @return
*/
List<String> getOrgIdTree(OrganizeEntity entity);
/**
* 向上递归取组织id
*
* @param orgID
* @return
*/
List<String> upWardRecursion(List<String> orgIDs, String orgID);
/**
* 查询给定的条件是否有默认当前登录者的默认部门值
*
* @param organizeConditionModel
* @return
*/
String getDefaultCurrentValueDepartmentId(OrganizeConditionModel organizeConditionModel);
/**
* 获取名称及id组成map
*
* @return
*/
Map<String, String> getInfoList();
/**
* 列表(有效的组织)
*
* @return
*/
List<OrganizeEntity> getListById(Boolean enable);
/**
* 获取顶级组织
*
* @param parentId
* @return
*/
OrganizeEntity getInfoByParentId(String parentId);
/**
* 获取所有组织全路径名称
*
* @return
*/
Map<String, Object> getAllOrgsTreeName();
Map<String, Object> getAllOrgsTreeName(boolean enabledMark);
/**
* 列表
*
* @return
*/
List<OrganizeEntity> getPageList(List<String> orgIds, PaginationOrganize pagination, boolean filterEnabledMark);
/**
* 获取当前用户可见组织列表
*/
List<Map<String, Object>> getOrgTreeList(String category, String keyword);
/**
* 获取当前用户的组织数组
*/
String[] myOrgArray();
/**
* 获取当前用户的组织数组
*/
String getUserTreeOrgStr(AuthorizeConditionEnum conditionType);
}

View File

@@ -0,0 +1,149 @@
package com.yunzhupaas.permission.service;
import com.yunzhupaas.base.service.SuperService;
import com.yunzhupaas.permission.entity.PermissionGroupEntity;
import com.yunzhupaas.permission.model.permissiongroup.PaginationPermissionGroup;
import java.util.List;
public interface PermissionGroupService extends SuperService<PermissionGroupEntity> {
/**
* 列表
* @param pagination
* @return
*/
List<PermissionGroupEntity> list(PaginationPermissionGroup pagination);
/**
* 列表
* @param filterEnabledMark
* @param ids
* @return
*/
List<PermissionGroupEntity> list(boolean filterEnabledMark, List<String> ids);
/**
* 详情
* @param id
* @return
*/
PermissionGroupEntity info(String id);
/**
* 新建
* @param entity
* @return
*/
boolean create(PermissionGroupEntity entity);
/**
* 修改
* @param id 主键
* @param entity 实体
* @return
*/
boolean update(String id, PermissionGroupEntity entity);
/**
* 删除
* @param entity 实体
* @return
*/
boolean delete(PermissionGroupEntity entity);
/**
* 验证名称是否重复
* @param id
* @param entity
*/
boolean isExistByFullName(String id, PermissionGroupEntity entity);
/**
* 验证编码是否重复
* @param id
* @param entity
*/
boolean isExistByEnCode(String id, PermissionGroupEntity entity);
/**
* 获取权限成员
*
* @param id 主键
* @return
*/
PermissionGroupEntity permissionMember(String id);
/**
* 获取权限成员
*
* @param userId 用户主键
* @param orgId
* @param singletonOrg
* @param systemId
* @return
*/
List<PermissionGroupEntity> getPermissionGroupByUserId(String userId, String orgId, boolean singletonOrg, String systemId);
/**
* 获取权限成员
*
* @param userId 用户主键
* @return
*/
String getPermissionGroupByUserId(String userId);
/**
* 获取权限成员
*
* @param userId 用户主键
* @param systemId 应用主键
* @return
*/
String getOrgIdByUserIdAndSystemId(String userId, String systemId);
/**
* 通过用户id获取当前权限组只查用户
*
* @param userId 用户主键
* @return
*/
List<PermissionGroupEntity> getPermissionGroupAllByUserId(String userId);
/**
* 替换权限
*
* @param fromId
* @param toId
* @param permissionList
* @return
*/
boolean updateByUser(String fromId, String toId, List<String> permissionList);
/**
* 通过菜单获取权限组
*
* @param moduleId 菜单id
* @return
*/
List<PermissionGroupEntity> getPermissionGroupByModuleId(String moduleId);
/**
* 通过ids获取权限组列表
*
* @param ids
* @return
*/
List<PermissionGroupEntity> list(List<String> ids);
/**
* 通过对象id获取当前权限组
*
* @param objectId 对象主键
* @param objectType 对象类型
* @return
*/
List<PermissionGroupEntity> getPermissionGroupByObjectId(String objectId, String objectType);
}

View File

@@ -0,0 +1,213 @@
package com.yunzhupaas.permission.service;
import com.yunzhupaas.base.Pagination;
import com.yunzhupaas.base.service.SuperService;
import com.yunzhupaas.permission.entity.PositionEntity;
import com.yunzhupaas.permission.model.permission.PermissionModel;
import com.yunzhupaas.permission.model.position.PaginationPosition;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* 岗位信息
*
* @author 云筑产品开发平台组
* @version V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2024-09-26 上午9:18
*/
public interface PositionService extends SuperService<PositionEntity> {
/**
* 列表
*
* @return
* @param filterEnabledMark
*/
List<PositionEntity> getList(boolean filterEnabledMark);
/**
* 岗位名列表(在线开发)
*
* @param idList
* @return
*/
List<PositionEntity> getPosList(List<String> idList);
/**
* 岗位名列表(在线开发)
*
* @param idList
* @return
*/
List<PositionEntity> getPosList(Set<String> idList);
Map<String,Object> getPosMap();
Map<String,Object> getPosEncodeAndName();
Map<String,Object> getPosEncodeAndName(boolean enabledMark);
/**
* 获取redis存储的岗位信息
*
* @return
*/
List<PositionEntity> getPosRedisList();
/**
* 列表
*
* @param paginationPosition 条件
* @return
*/
List<PositionEntity> getList(PaginationPosition paginationPosition);
/**
* 列表
*
* @param userId 用户主键
* @return
*/
List<PositionEntity> getListByUserId(String userId);
/**
* 信息
*
* @param id 主键值
* @return
*/
PositionEntity getInfo(String id);
/**
* 通过名称查询id
*
* @param fullName 名称
* @return
*/
PositionEntity getByFullName(String fullName);
/**
* 通过名称查询id
*
* @param fullName 名称
* @return
*/
PositionEntity getByFullName(String fullName,String encode);
/**
* 验证名称
*
* @param entity
* @param isFilter 是否过滤
* @return
*/
boolean isExistByFullName(PositionEntity entity, boolean isFilter);
/**
* 验证编码
*
* @param entity
* @param isFilter 是否过滤
* @return
*/
boolean isExistByEnCode(PositionEntity entity, boolean isFilter);
/**
* 创建
*
* @param entity 实体对象
*/
void create(PositionEntity entity);
/**
* 更新
*
* @param id 主键值
* @param entity 实体对象
*/
boolean update(String id, PositionEntity entity);
/**
* 删除
*
* @param entity 实体对象
*/
void delete(PositionEntity entity);
/**
* 上移
*
* @param id 主键值
*/
boolean first(String id);
/**
* 下移
*
* @param id 主键值
*/
boolean next(String id);
/**
* 获取名称
*
* @return
*/
List<PositionEntity> getPositionName(List<String> id, boolean filterEnabledMark);
/**
* 获取名称
*
* @return
*/
List<PositionEntity> getPositionName(List<String> id, String keyword);
/**
* 获取岗位列表
*
* @param organizeIds 组织id
* @param enabledMark
* @return
*/
List<PositionEntity> getListByOrganizeId(List<String> organizeIds, boolean enabledMark);
/**
* 获取用户组织底下所有的岗位
* @param organizeId
* @param userId
* @return
*/
List<PositionEntity> getListByOrgIdAndUserId(String organizeId, String userId);
/**
* 通过名称获取岗位列表
*
* @param fullName 岗位名称
* @param enCode 编码
* @return
*/
List<PositionEntity> getListByFullName(String fullName, String enCode);
List<PositionEntity> getCurPositionsByOrgId(String orgId);
/**
* 根据id集合
*
* @param idList ID集合
* @param isPage
*/
List<PositionEntity> getList(List<String> idList, Pagination pagination, boolean isPage);
/**
* 根据组织列表获取
* @param organizeIds
* @return
*/
List<PermissionModel> getListByOrganizeIds(List<String> organizeIds, boolean needCode, boolean enabledMark);
}

View File

@@ -0,0 +1,234 @@
package com.yunzhupaas.permission.service;
import com.yunzhupaas.base.Pagination;
import com.yunzhupaas.base.service.SuperService;
import com.yunzhupaas.permission.entity.RoleEntity;
import com.yunzhupaas.permission.model.role.RoleModel;
import com.yunzhupaas.permission.model.role.RolePagination;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* 系统角色
*
* @author 云筑产品开发平台组
* @version V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2024-09-26 上午9:18
*/
public interface RoleService extends SuperService<RoleEntity> {
/*============================= get接口 ================================*/
/**
* 列表
*
* @param filterEnabledMark
* @return 角色对象集合
*/
List<RoleEntity> getList(boolean filterEnabledMark);
/**
* 获取全局角色集合
*
* @return 角色对象集合
*/
List<RoleEntity> getGlobalList();
List<RoleEntity> getGlobalList(boolean enabledMark);
/**
* 获取全局角色集合
*
* @return 角色对象集合
*/
List<RoleEntity> getGlobalList(List<String> ids);
/**
* 列表
*
* @param userId 用户ID
* @return 角色对象集合
*/
List<RoleEntity> getListByUserId(String userId);
/**
* 组织底下所有角色
*
* @param userId
* @return
*/
List<RoleEntity> getListByUserIdAndOrgId(String userId, String orgId);
/**
* 当前用户拥有的所有角色集合
*/
List<String> getRoleIdsByCurrentUser();
/**
* 当前用户拥有的所有角色集合
*/
List<String> getRoleIdsByCurrentUser(String orgId);
/**
* 获取用户组织底下,及全局的
*
* @param userId
* @param orgId
* @return
*/
List<String> getAllRoleIdsByUserIdAndOrgId(String userId, String orgId);
/**
* 信息
*
* @param roleId 角色ID
* @return 角色对象
*/
RoleEntity getInfo(String roleId);
/**
* 根据id集合返回角色对象集合
*
* @param roleIds 角色ID集合
* @param keyword
* @param filterEnabledMark
* @return 角色对象集合
*/
List<RoleEntity> getListByIds(List<String> roleIds, String keyword, boolean filterEnabledMark);
/**
* 根据id集合返回角色对象集合
*
* @param roleIds 角色ID集合
* @return 角色对象集合
*/
List<RoleEntity> getSwaptListByIds(Set<String> roleIds);
Map<String, Object> getRoleMap();
/**
* 角色编码/name.id
*
* @return
*/
Map<String, Object> getRoleNameAndIdMap();
Map<String, Object> getRoleNameAndIdMap(boolean enabledMark);
/**
* 获取角色实体
*
* @param fullName 角色名称
* @return 角色对象
*/
RoleEntity getInfoByFullName(String fullName);
/**
* 获取角色实体
*
* @param fullName 角色名称
* @return 角色对象
*/
RoleEntity getInfoByFullName(String fullName, String enCode);
/**
* 获取当前用户的默认组织下的所有角色集合
*
* @param orgId 组织ID
* @return 角色对象集合
*/
List<RoleEntity> getCurRolesByOrgId(String orgId);
/**
* 获取组织下的所有角色
*
* @param orgId 组织ID
* @return 角色对象集合
*/
List<RoleEntity> getRolesByOrgId(String orgId);
String getBindInfo(String roleId, List<String> reduceOrgIds);
/**
* 列表
*
* @param page 条件
*/
List<RoleEntity> getList(RolePagination page, Integer globalMark);
/*============================ exist存在判断接口 =================================*/
/**
* 验证名称
*
* @param fullName 名称
* @param id 主键值
*/
Boolean isExistByFullName(String fullName, String id, Integer globalMark);
/**
* 验证编码
*
* @param enCode 编码
* @param id 主键值
*/
Boolean isExistByEnCode(String enCode, String id);
/**
* 判断当前组织下是否存在角色
*
* @param orgId 组织ID
*/
Boolean existCurRoleByOrgId(String orgId);
/*============================ 存在判断接口 =================================*/
/**
* 创建
*
* @param entity 实体对象
*/
void create(RoleEntity entity);
/**
* 更新
*
* @param id 主键值
* @param entity 实体对象
*/
Boolean update(String id, RoleEntity entity);
/**
* 删除
*
* @param entity 实体对象
*/
void delete(RoleEntity entity);
/**
* 根据id集合
*
* @param idList ID集合
* @param filterEnabledMark
*/
List<RoleEntity> getList(List<String> idList, Pagination pagination, boolean filterEnabledMark);
/**
* 根据组织获取角色列表
*
* @param organizeIds
* @param needCode
* @return
*/
List<RoleModel> getListByOrganizeIds(List<String> organizeIds, boolean needCode, boolean enabledMark);
}

View File

@@ -0,0 +1,188 @@
package com.yunzhupaas.permission.service;
import com.yunzhupaas.base.service.SuperService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yunzhupaas.permission.entity.UserRelationEntity;
import com.yunzhupaas.permission.model.permission.PermissionModel;
import com.yunzhupaas.permission.model.permission.PermissionVoBase;
import com.yunzhupaas.permission.model.userrelation.UserRelationForm;
import java.util.List;
/**
* 用户关系
*
* @author 云筑产品开发平台组
* @version V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2024-09-26 上午9:18
*/
public interface UserRelationService extends SuperService<UserRelationEntity> {
/**
* 根据用户主键获取列表
*
* @param userId 用户主键
* @return
*/
List<UserRelationEntity> getListByUserId(String userId);
List<UserRelationEntity> getListByUserIdAndObjType(String userId, String objectType);
/**
* 根据用户主键获取列表
*
* @param userId 用户主键
* @return
*/
List<UserRelationEntity> getListByUserIdAll(List<String> userId);
/**
* 根据对象主键获取列表
*
* @param objectId 对象主键
* @return
*/
List<UserRelationEntity> getListByObjectId(String objectId);
/**
* 根据对象主键获取列表
*
* @param objectType
* @return
*/
List<UserRelationEntity> getListByObjectType(String objectType);
List<UserRelationEntity> getListByObjectId(String objectId, String objectType);
/**
* 根据对象主键获取列表
*
* @param objectId 对象主键
* @return
*/
List<UserRelationEntity> getListByObjectIdAll(List<String> objectId);
/**
* 根据对象主键删除数据
*
* @param objId 对象主键
* @return
*/
void deleteAllByObjId(String objId);
/**
* 删除用户所有的关联关系
* @param userId 用户ID
*/
void deleteAllByUserId(String userId);
/**
* 保存用户关系
* @param userRelationEntityList 用户关系集合
*/
void createByList(List<UserRelationEntity> userRelationEntityList);
/**
* 信息
*
* @param id 主键值
* @return
*/
UserRelationEntity getInfo(String id);
/**
* 创建
*
* @param objectId 对象主键
* @param entitys 实体对象
*/
void save(String objectId, List<UserRelationEntity> entitys);
/**
* 创建
*
* @param list 实体对象
*/
void save(List<UserRelationEntity> list);
/**
* 删除
*
* @param ids 主键值
*/
void delete(String[] ids);
/**
* 添加岗位、分组、角色成员
*/
void saveObjectId(String objectId, UserRelationForm userRelationForm);
/**
* 通过用户id查询用户组织关系
*
* @param userIds
*/
List<UserRelationEntity> getRelationByUserIds(List<String> userIds);
/**
* 获取用户组织/岗位/角色集合
* @param userId
* @return
*/
List<UserRelationEntity> getListByObjectType(String userId, String objectType);
/**
* 获取用户所有组织关系
*
* @param userId 用户id
* @return 组织关系集合
*/
List<UserRelationEntity> getAllOrgRelationByUserId(String userId);
/**
* 获取个人信息页面用户组织/岗位/角色集合
*
* @param objectType 归属类型
*/
List<PermissionModel> getObjectVoList(String objectType);
/**
* 判断岗位/角色与用户是否存在关联关系
*
* @param objectType 类型
* @param objectId 岗位/角色ID
* @return 存在判断
*/
Boolean existByObj(String objectType, String objectId);
/**
* 获取用户组织关联关系通过组织ID
*/
List<UserRelationEntity> getListByRoleId(String roleId);
/**
* 根据用户id获取关系
*
* @param userId 用户主键
* @param objectType 类型
* @return
*/
List<UserRelationEntity> getListByUserId(String userId, String objectType);
/**
* 判断组织下有哪些人
*
* @param orgIdList 组织id
* @return
*/
List<UserRelationEntity> getListByOrgId(List<String> orgIdList);
/**
* 把钉钉用户的组织关联生成
* @param sysObjId
* @param deptIdList
*/
void syncDingUserRelation(String sysObjId, List<Long> deptIdList);
}

View File

@@ -0,0 +1,419 @@
package com.yunzhupaas.permission.service;
import com.yunzhupaas.base.service.SuperService;
import com.yunzhupaas.base.Page;
import com.yunzhupaas.base.Pagination;
import com.yunzhupaas.base.vo.DownloadVO;
import com.yunzhupaas.permission.entity.UserEntity;
import com.yunzhupaas.permission.model.user.UserIdListVo;
import com.yunzhupaas.permission.model.user.mod.UserConditionModel;
import com.yunzhupaas.permission.model.user.page.PaginationUser;
import com.yunzhupaas.permission.model.user.vo.UserByRoleVO;
import com.yunzhupaas.permission.model.user.vo.UserExportExceptionVO;
import com.yunzhupaas.permission.model.user.vo.UserExportVO;
import com.yunzhupaas.permission.model.user.vo.UserImportVO;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* 用户信息
*
* @author 云筑产品开发平台组
* @version V3.1.0
* @copyright 深圳市乐程软件有限公司
* @date 2024-09-26 上午9:18
*/
public interface UserService extends SuperService<UserEntity> {
/*======================get接口========================*/
List<UserEntity> getAdminList();
/**
* 列表
*
* @param pagination 条件
* @param enabledMark
* @param gender
* @return
*/
List<UserEntity> getList(PaginationUser pagination, String organizeId, Boolean flag, Boolean filter, Integer enabledMark, String gender);
/**
* 列表
*
* @param pagination 条件
* @param filterCurrentUser
* @return
*/
List<UserEntity> getList(Pagination pagination, Boolean filterCurrentUser);
/**
* 通过关键字查询
*
* @param pagination
* @return
*/
List<UserEntity> getUserPage(Pagination pagination);
/**
* 通过组织id获取用户列表
*
* @param organizeId 组织id
* @param keyword 关键字
* @return
*/
List<UserEntity> getListByOrganizeId(String organizeId, String keyword);
/**
* 列表
*
* @return
* @param enabledMark
*/
List<UserEntity> getList(boolean enabledMark);
/**
* 用户名列表(在线开发)
*
* @param idList
* @return
*/
List<UserEntity> getUserNameList(List<String> idList);
/**
* 用户名列表(在线开发)
*
* @param idList
* @return
*/
List<UserEntity> getUserNameList(Set<String> idList);
/**
* id : name/account
* @return
*/
Map<String,Object> getUserMap();
/**
* name/account: id
* @return
*/
Map<String,Object> getUserNameAndIdMap();
Map<String, Object> getUserNameAndIdMap(boolean enabledMark);
/**
* 通过名称查询id
*
* @return
*/
UserEntity getByRealName(String realName);
/**
* 通过名称查询id
*
* @return
*/
UserEntity getByRealName(String realName,String account);
/**
* 列表
*
* @param managerId 主管Id
* @param keyword 关键字
* @return
*/
List<UserEntity> getListByManagerId(String managerId, String keyword);
/**
* 信息
*
* @param id 主键值
* @return
*/
UserEntity getInfo(String id);
/**
* 信息
*
* @param account 账户
* @return
*/
UserEntity getUserByAccount(String account);
/**
* 信息
*
* @param mobile 手机号码
* @return
*/
UserEntity getUserByMobile(String mobile);
/*==============================================*/
Boolean setAdminListByIds(List<String> adminIds);
/**
* 验证账户
*
* @param account 账户
* @return
*/
boolean isExistByAccount(String account);
/**
* 创建
*
* @param entity 实体对象
*/
Boolean create(UserEntity entity) throws Exception;
/**
* 判断用户额度
*/
void beforeCheck();
/**
* 更新
*
* @param id 主键值
* @param entity 实体对象
*/
Boolean update(String id, UserEntity entity) throws Exception;
/**
* 删除
*
* @param entity 实体对象
*/
void delete(UserEntity entity);
/**
* 修改密码
*
* @param entity 实体对象
*/
void updatePassword(UserEntity entity);
/**
* 查询用户名称
*
* @param id 主键值
* @return
*/
List<UserEntity> getUserName(List<String> id);
/**
* 查询用户名称
*
* @param id 主键值
* @return
*/
List<UserEntity> getUserName(List<String> id, boolean filterEnabledMark);
/**
* 查询用户名称
*
* @param id 主键值
* @return
*/
List<UserEntity> getListByUserIds(List<String> id);
/**
* 查询出分页被禁用的账号
*
* @param id 主键值
* @return
*/
List<UserEntity> getUserList(List<String> id);
/**
* 通过account返回user实体
*
* @param account 账户
* @return
*/
UserEntity getUserEntity(String account);
/**
* 获取用户id
*
* @return
*/
List<String> getListId();
/**
* 添加岗位或角色成员
*
* @param entity
*/
void update(UserEntity entity, String type);
/**
* 添加岗位或角色成员
*
* @param entity
*/
void updateLastTime(UserEntity entity, String type);
/**
* 判断是否为自己的下属
*
* @param id
* @param managerId
* @return
*/
boolean isSubordinate(String id, String managerId);
/**
* 导出Excel
*
* @param dataType
* @param selectKey
* @param pagination
* @return
*/
DownloadVO exportExcel(String dataType, String selectKey, PaginationUser pagination);
/**
* 导入预览
*
* @param personList
* @return
*/
Map<String, Object> importPreview(List<UserExportVO> personList);
/**
* 导入数据
*
* @param dataList 数据源
*/
UserImportVO importData(List<UserExportVO> dataList);
/**
* 通过组织id获取上级id集合
*
* @param organizeId
* @param organizeParentIdList
*/
void getOrganizeIdTree(String organizeId, StringBuffer organizeParentIdList);
/**
* 导出错误报告
*
* @param dataList
* @return
*/
DownloadVO exportExceptionData(List<UserExportExceptionVO> dataList);
/**
* 候选人分页查询
*
* @param id
* @param pagination
* @return
*/
List<UserEntity> getUserName(List<String> id, Pagination pagination);
/**
* 候选人分页查询
*
* @param id
* @param pagination
* @param flag 是否过滤自己
* @return
*/
List<UserEntity> getUserNames(List<String> id, PaginationUser pagination, Boolean flag, Boolean enabledMark);
/**
* 根据角色ID获取所在组织下的所有成员
* @param roleId 角色ID
* @return
*/
List<UserEntity> getListByRoleId(String roleId);
/**
* 删除在线的角色用户
*/
Boolean delCurRoleUser(String message,List<String> objectIdAll);
/**
* 获取用户信息
*
*
* @param orgIdList
* @param keyword
* @return
*/
List<UserEntity> getList(List<String> orgIdList, String keyword);
/**
* 得到用户关系
*
* @param userIds
* @param type
* @return
*/
List<String> getUserIdList(List<String> userIds, String type);
/**
* 得到用户关系
*
* @param userIds
* @return
*/
List<UserIdListVo> getObjList(List<String> userIds, Pagination pagination, String type);
/**
* 获取用户下拉框列表
*/
List<UserByRoleVO> getListByAuthorize(String organizeId, Page page);
/**
* 查询给定的条件是否有默认当前登录者的默认用户值
* @param userConditionModel
* @return
*/
String getDefaultCurrentValueUserId(UserConditionModel userConditionModel);
List<UserEntity> getListByRoleIds(List<String> roleIds);
/**
* 通过ids转换数据
*
* @param ids
* @return
*/
List<String> getFullNameByIds(List<String> ids);
/**
* 通过ids返回相应的数据
*
* @param ids
* @return
*/
List<UserIdListVo> selectedByIds(List<String> ids);
List<String> filterOrgAdministrator(List<String> listUser);
List<UserEntity> getUserAccount(List<String> ids);
void updateStand(List<String> ids,int standing);
/**
* 删除在线用户
*
* @param message
* @param userIds 用户IDs
* @return 执行结果
*/
Boolean delCurUser(String message, List<String> userIds, Integer stand);
}

View File

@@ -0,0 +1,86 @@
package com.yunzhupaas.visual.service;
import com.yunzhupaas.base.ActionResult;
import com.yunzhupaas.base.UserInfo;
import com.yunzhupaas.base.entity.VisualdevEntity;
import com.yunzhupaas.base.model.VisualDevJsonModel;
import com.yunzhupaas.base.model.flow.DataModel;
import com.yunzhupaas.base.model.flow.FlowFormDataModel;
import com.yunzhupaas.exception.WorkFlowException;
import com.yunzhupaas.onlinedev.model.PaginationModel;
import com.yunzhupaas.base.model.OnlineImport.VisualdevModelDataInfoVO;
import com.yunzhupaas.onlinedev.model.VisualParamModel;
import java.util.List;
import java.util.Map;
public interface VisualdevApi {
/**
* 流程表单数据保存
*
* @param flowFormDataModel
* @throws WorkFlowException
*/
ActionResult saveOrUpdate(FlowFormDataModel flowFormDataModel);
/**
* 流程表单数据删除
*
* @param formId
* @param id
* @return
* @throws Exception
*/
boolean delete(String formId, String id);
/**
* 流程表单数据详情
*
* @param formId
* @param id
* @return
*/
ActionResult info(String formId, String id);
/**
* 流程表单配置
*
* @param formId
* @return
*/
VisualdevEntity getFormConfig(String formId);
/**
* 表单列表
*
* @param formIds 表单主键集合
* @return
*/
List<VisualdevEntity> getFormConfigList(List<String> formIds);
/**
* 流程关联表单(一流程多表单)
*
* @param flowId
* @param formIds
*/
void saveFlowIdByFormIds(String flowId, List<String> formIds);
VisualdevEntity getReleaseInfo(String formId);
List<Map<String, Object>> getListWithTableList(VisualDevJsonModel visualDevJsonModel, PaginationModel pagination, UserInfo userInfo);
VisualdevModelDataInfoVO getEditDataInfo(String id, VisualdevEntity visualdevEntity);
DataModel visualCreate(VisualParamModel model) throws Exception;
DataModel visualUpdate(VisualParamModel model) throws Exception;
void visualDelete(VisualParamModel model) throws Exception;
/**
* 根据表名和规则删除功能表单数据
*/
void deleteByTableName(FlowFormDataModel model) throws Exception;
}

View File

@@ -0,0 +1,118 @@
package com.yunzhupaas.workflow.service;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.yunzhupaas.base.ActionResult;
import com.yunzhupaas.exception.WorkFlowException;
import com.yunzhupaas.flowable.entity.DelegateEntity;
import com.yunzhupaas.flowable.entity.RecordEntity;
import com.yunzhupaas.flowable.entity.TaskEntity;
import com.yunzhupaas.flowable.model.operator.OperatorVo;
import com.yunzhupaas.flowable.model.task.FileModel;
import com.yunzhupaas.flowable.model.task.FlowModel;
import com.yunzhupaas.flowable.model.task.TaskPagination;
import java.util.List;
/**
* 类的描述
*
* @author YUNZHUPAASYUNZHUPAAS开发组
* @version 5.0.x
* @since 2024/5/28 14:35
*/
public interface TaskApi {
/**
* 获取归档所需的信息
*
* @param taskId 任务主键
*/
FileModel getFileModel(String taskId) throws WorkFlowException;
/**
* 信息
*
* @param id 主键值
* @param columns 指定获取的列数据
*/
TaskEntity getInfoSubmit(String id, SFunction<TaskEntity, ?>... columns);
/**
* 信息
*
* @param ids 主键值
* @param columns 指定获取的列数据
*/
List<TaskEntity> getInfosSubmit(String[] ids, SFunction<TaskEntity, ?>... columns);
/**
* 删除
*
* @param taskEntity 任务实体
*/
void delete(TaskEntity taskEntity) throws Exception;
/**
* 发起流程
*
* @param flowModel
* @throws Exception
*/
void saveOrSubmit(FlowModel flowModel) throws Exception;
/**
* 根据任务主键获取记录集合
*
* @param taskId 任务主键
*/
List<RecordEntity> getRecordList(String taskId);
/**
* 更新归档状态
*
* @param taskId 任务主键
*/
void updateIsFile(String taskId);
/**
* 在办
*
* @param pagination 分页参数
*/
List<OperatorVo> getWaitList(TaskPagination pagination);
/**
* 已办
*
* @param pagination 分页参数
*/
List<OperatorVo> getTrialList(TaskPagination pagination);
/**
* 抄送
*
* @param pagination 分页参数
*/
List<OperatorVo> getCirculateList(TaskPagination pagination);
/**
* 委托列表
*/
List<DelegateEntity> getDelegateList();
/**
* 判断是否存在未签收的经办
*/
Boolean checkSign();
/**
* 判断是否存在未办理的经办
*/
Boolean checkTodo();
/**
* 发起流程
*
* @param flowModel 参数templateId、userIds、formDataList
*/
ActionResult launchFlow(FlowModel flowModel);
}

View File

@@ -0,0 +1,100 @@
package com.yunzhupaas.workflow.service;
import com.yunzhupaas.flowable.entity.TemplateEntity;
import com.yunzhupaas.flowable.entity.TemplateJsonEntity;
import com.yunzhupaas.flowable.model.template.FlowByFormModel;
import com.yunzhupaas.flowable.model.template.TemplateTreeListVo;
import com.yunzhupaas.model.FlowWorkListVO;
import com.yunzhupaas.permission.model.user.WorkHandoverModel;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
import java.util.Map;
/**
* 类的描述
*
* @author YUNZHUPAASYUNZHUPAAS开发组
* @version 5.0.x
* @since 2024/5/28 15:37
*/
public interface TemplateApi {
/**
* 根据表单主键获取流程
*
* @param formId 表单主键
* @param start 是否仅查询开始节点关联的表单
*/
FlowByFormModel getFlowByFormId(String formId, Boolean start);
/**
* 流程模板获取发起节点表单id
*
* @param templateId
* @return
*/
String getFormByFlowId(String templateId);
/**
* 根据流程主键获取版本主键集合
*
* @param templateId 流程主键大id
*/
List<String> getFlowIdsByTemplateId(String templateId);
/**
* 根据流程主键获取版本主键集合
*
* @param templateId 流程主键大id
*/
List<TemplateJsonEntity> getFlowIdsByTemplate(String templateId);
/**
* 根据流程版本获取流程基本信息
*
* @param flowId
* @return
*/
List<TemplateEntity> getListByFlowIds(List<String> flowId);
/**
* 获取流程权限
*
* @return
*/
List<TemplateTreeListVo> treeListWithPower();
/**
* 离职交接
*
* @param fromId
* @return
*/
FlowWorkListVO flowWork(String fromId);
/**
* 离职交接
*
* @param workHandoverModel
* @return
*/
boolean flowWork(WorkHandoverModel workHandoverModel);
/**
* 获取启用的流程版本的表单集合
*/
List<String> getFormList();
/**
* 根据流程版本id获取流程模板id
*
* @param flowId 流程模板主键
*/
String getTemplateByVersionId(@RequestParam("flowId") String flowId);
/**
* 获取流程templateId和表单formId组成的map
*/
Map<String, String> getFlowFormMap();
}

View File

@@ -0,0 +1,18 @@
package com.yunzhupaas.workflow.service;
import com.yunzhupaas.flowable.model.trigger.TriggerDataFo;
import com.yunzhupaas.flowable.model.trigger.TriggerDataModel;
import java.util.List;
/**
* 类的描述
*
* @author YUNZHUPAASYUNZHUPAAS开发组
* @version 5.0.x
* @since 2024/9/19 14:40
*/
public interface TriggerApi {
List<TriggerDataModel> getTriggerDataModel(TriggerDataFo fo);
}