前后端分目录
This commit is contained in:
22
ddp/ddp-common/ddp-model/pom.xml
Normal file
22
ddp/ddp-common/ddp-model/pom.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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>ddp-common</artifactId>
|
||||
<groupId>com.fibo.ddp</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>ddp-common-model</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.fibo.ddp</groupId>
|
||||
<artifactId>ddp-common-utils</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.fibo.ddp.common.model.analyse;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@TableName("t_analyse_decision_result")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class AnalyseDecisionResult extends Model<AnalyseDecisionResult> {
|
||||
private static final long serialVersionUID = 6325269697026738836L;
|
||||
//主键id
|
||||
@TableId(type= IdType.AUTO)
|
||||
private Long id;
|
||||
//调用时间
|
||||
private Date callDate;
|
||||
//引擎id
|
||||
private Long engineId;
|
||||
//引擎名
|
||||
private String engineName;
|
||||
//引擎表述
|
||||
private String engineDescription;
|
||||
//引擎版本id
|
||||
private Long versionId;
|
||||
//引擎版本code
|
||||
private String versionCode;
|
||||
//结果
|
||||
private String result;
|
||||
//次数
|
||||
private Long resultCount;
|
||||
//组织id
|
||||
private Long organId;
|
||||
//创建者id
|
||||
private Long createUserId;
|
||||
//修改者id
|
||||
private Long updateUserId;
|
||||
//创建日期
|
||||
private Date createTime;
|
||||
//修改日期
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.fibo.ddp.common.model.analyse;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@TableName("t_analyse_decision_tables")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class AnalyseDecisionTables extends Model<AnalyseDecisionTables> {
|
||||
private static final long serialVersionUID = 4429199843501593792L;
|
||||
//主键id
|
||||
@TableId(type= IdType.AUTO)
|
||||
private Long id;
|
||||
//调用时间
|
||||
private Date callDate;
|
||||
//引擎id
|
||||
private Long engineId;
|
||||
//引擎名
|
||||
private String engineName;
|
||||
//引擎表述
|
||||
private String engineDescription;
|
||||
//引擎版本id
|
||||
private Long versionId;
|
||||
//引擎版本code
|
||||
private String versionCode;
|
||||
//决策表id
|
||||
private Long decisonTablesId;
|
||||
//决策表名
|
||||
private String decisonTablesName;
|
||||
//决策表版本id
|
||||
private Long decisonTablesVersionId;
|
||||
//决策表版本code
|
||||
private String decisonTablesVersionCode;
|
||||
//结果
|
||||
private String result;
|
||||
//次数
|
||||
private Long resultCount;
|
||||
//组织id
|
||||
private Long organId;
|
||||
//创建者id
|
||||
private Long createUserId;
|
||||
//修改者id
|
||||
private Long updateUserId;
|
||||
//创建日期
|
||||
private Date createTime;
|
||||
//修改日期
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.fibo.ddp.common.model.analyse;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@TableName("t_analyse_engine_call")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class AnalyseEngineCall extends Model<AnalyseEngineCall> {
|
||||
private static final long serialVersionUID = -3102832011497003819L;
|
||||
//引擎调用表主键id
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
//调用时间
|
||||
private Date callDate;
|
||||
//引擎id
|
||||
private Long engineId;
|
||||
//引擎名
|
||||
private String engineName;
|
||||
//引擎表述
|
||||
private String engineDescription;
|
||||
//引擎版本id
|
||||
private Long versionId;
|
||||
//引擎版本code
|
||||
private String versionCode;
|
||||
//调用次数
|
||||
private Long callCount;
|
||||
//组织id
|
||||
private Long organId;
|
||||
//创建者id
|
||||
private Long createUserId;
|
||||
//修改者id
|
||||
private Long updateUserId;
|
||||
//创建日期
|
||||
private Date createTime;
|
||||
//修改日期
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.fibo.ddp.common.model.analyse;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@TableName("t_analyse_engine_node")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class AnalyseEngineNode extends Model<AnalyseEngineNode> {
|
||||
private static final long serialVersionUID = -4356487824076243721L;
|
||||
//主键id
|
||||
@TableId(type= IdType.AUTO)
|
||||
private Long id;
|
||||
//调用时间
|
||||
private Date callDate;
|
||||
//引擎id
|
||||
private Long engineId;
|
||||
//引擎名
|
||||
private String engineName;
|
||||
//引擎表述
|
||||
private String engineDescription;
|
||||
//引擎版本id
|
||||
private Long versionId;
|
||||
//引擎版本code
|
||||
private String versionCode;
|
||||
//节点id
|
||||
private Long nodeId;
|
||||
//节点名
|
||||
private String nodeName;
|
||||
//经过次数
|
||||
private Long passCount;
|
||||
//组织id
|
||||
private Long organId;
|
||||
//创建者id
|
||||
private Long createUserId;
|
||||
//修改者id
|
||||
private Long updateUserId;
|
||||
//创建日期
|
||||
private Date createTime;
|
||||
//修改日期
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.fibo.ddp.common.model.analyse;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* t_analyse_engine_summary
|
||||
*/
|
||||
@Data
|
||||
@TableName("t_analyse_engine_summary")
|
||||
public class AnalyseEngineSummary implements Serializable {
|
||||
/**
|
||||
* 引擎概况主键id
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 引擎版本id
|
||||
*/
|
||||
private Long engineVersionId;
|
||||
|
||||
/**
|
||||
* 引擎名称
|
||||
*/
|
||||
private String engineName;
|
||||
|
||||
/**
|
||||
* 统计维度(1.调用次数 engine_call,2.决策结果 decision_result,3规则命中 rule_hit 4.评分卡 scorecard 5.决策表 decision_tables6.名单库 list_db)
|
||||
*/
|
||||
private String statisticsDimension;
|
||||
|
||||
/**
|
||||
* 统计数量(截至创建日期的当天的总数)
|
||||
*/
|
||||
private Long statisticsCount;
|
||||
|
||||
/**
|
||||
* 组织id
|
||||
*/
|
||||
private Long organId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.fibo.ddp.common.model.analyse;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@TableName("t_analyse_rule")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class AnalyseRule extends Model<AnalyseRule> {
|
||||
private static final long serialVersionUID = -3167163273701099335L;
|
||||
//主键id
|
||||
@TableId(type= IdType.AUTO)
|
||||
private Long id;
|
||||
//调用时间
|
||||
private Date callDate;
|
||||
//引擎id
|
||||
private Long engineId;
|
||||
//引擎名
|
||||
private String engineName;
|
||||
//引擎表述
|
||||
private String engineDescription;
|
||||
//引擎版本id
|
||||
private Long versionId;
|
||||
//引擎版本code
|
||||
private String versionCode;
|
||||
//规则id
|
||||
private Long ruleId;
|
||||
//规则名
|
||||
private String ruleName;
|
||||
//规则版本id
|
||||
private Long ruleVersionId;
|
||||
//规则版本code
|
||||
private String ruleVersionCode;
|
||||
//命中次数
|
||||
private Long hitCount;
|
||||
//组织id
|
||||
private Long organId;
|
||||
//创建者id
|
||||
private Long createUserId;
|
||||
//修改者id
|
||||
private Long updateUserId;
|
||||
//创建日期
|
||||
private Date createTime;
|
||||
//修改日期
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.fibo.ddp.common.model.analyse;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@TableName("t_analyse_scorecard")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class AnalyseScorecard extends Model<AnalyseScorecard> {
|
||||
private static final long serialVersionUID = 5482147204283754208L;
|
||||
//主键id
|
||||
@TableId(type= IdType.AUTO)
|
||||
private Long id;
|
||||
//调用时间
|
||||
private Date callDate;
|
||||
//引擎id
|
||||
private Long engineId;
|
||||
//引擎名
|
||||
private String engineName;
|
||||
//引擎表述
|
||||
private String engineDescription;
|
||||
//引擎版本id
|
||||
private Long versionId;
|
||||
//引擎版本code
|
||||
private String versionCode;
|
||||
//评分卡id
|
||||
private Long scorecardId;
|
||||
//评分卡名
|
||||
private String scorecardName;
|
||||
//评分卡版本id
|
||||
private Long scorecardVersionId;
|
||||
//评分卡版本code
|
||||
private String scorecardVersionCode;
|
||||
//结果
|
||||
private String result;
|
||||
//次数
|
||||
private Long resultCount;
|
||||
//组织id
|
||||
private Long organId;
|
||||
//创建者id
|
||||
private Long createUserId;
|
||||
//修改者id
|
||||
private Long updateUserId;
|
||||
//创建日期
|
||||
private Date createTime;
|
||||
//修改日期
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.fibo.ddp.common.model.analyse.vo;
|
||||
|
||||
import com.fibo.ddp.common.model.analyse.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class AnalyseData {
|
||||
private List<AnalyseEngineCall> callCountList;
|
||||
private List<List<AnalyseRule>> ruleList;
|
||||
private List<List<List<AnalyseScorecard>>> scorecardList;
|
||||
private List<List<List<AnalyseDecisionTables>>> decisionTablesList;
|
||||
private List<List<AnalyseDecisionResult>> decisionResultList;
|
||||
private List<List<AnalyseEngineNode>> engineNodeList;
|
||||
private Map<String,AnalyseEngineSummaryVo> engineSummary;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.fibo.ddp.common.model.analyse.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class AnalyseEngineSummaryVo {
|
||||
//昨天数据
|
||||
private Long yesterdayData;
|
||||
//今天数据
|
||||
private Long todayData;
|
||||
//今天预测数据
|
||||
private Long predictData;
|
||||
//增长率
|
||||
private Float growthRate;
|
||||
|
||||
public AnalyseEngineSummaryVo( long todayData, long lastData,long yesterdayData) {
|
||||
this.yesterdayData = yesterdayData;
|
||||
this.todayData = todayData;
|
||||
if (lastData!=0L){
|
||||
DecimalFormat df = new DecimalFormat("0.00");
|
||||
this.growthRate = Float.valueOf(df.format((float)todayData/lastData));
|
||||
this.predictData = new Float(yesterdayData*growthRate).longValue();
|
||||
}else {
|
||||
this.growthRate = Float.valueOf(0);
|
||||
this.predictData = 0L;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.fibo.ddp.common.model.analyse.vo;
|
||||
|
||||
import com.fibo.ddp.common.model.authx.system.SysUser;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class AnalyseRequestParam {
|
||||
private Date start;
|
||||
private Date end;
|
||||
private Long engineId;
|
||||
private Long versionId;
|
||||
private SysUser user;
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.fibo.ddp.common.model.approval;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* (Approval)实体类
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("t_approval")
|
||||
public class Approval implements Serializable {
|
||||
private static final long serialVersionUID = 132808868864524091L;
|
||||
/**
|
||||
* 自增主键
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
private String applyType;
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long createUserId;
|
||||
/**
|
||||
* 创建人名称
|
||||
*/
|
||||
private String createUserName;
|
||||
/**
|
||||
* 修改人id
|
||||
*/
|
||||
private Long updateUserId;
|
||||
/**
|
||||
* 修改人名称
|
||||
*/
|
||||
private String updateUserName;
|
||||
/**
|
||||
* 组织id
|
||||
*/
|
||||
private Long organId;
|
||||
/**
|
||||
* 申请单的状态:(-1取消申请。 0 待审批,1 审批通过,2 审批不通过)
|
||||
*/
|
||||
private Integer applyStatus;
|
||||
/**
|
||||
* 状态:0冻结 -1 删除 1正常
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 审批人id
|
||||
*/
|
||||
private Long approvalUserId;
|
||||
/**
|
||||
* 审批人名称
|
||||
*/
|
||||
private String approvalUserName;
|
||||
/**
|
||||
* 审批时间
|
||||
*/
|
||||
private Date approvalTime;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 申请详情
|
||||
*/
|
||||
private String applyDetail;
|
||||
/**
|
||||
* 申请描述
|
||||
*/
|
||||
private String applyDesc;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Date queryStartTime;
|
||||
@TableField(exist = false)
|
||||
private Date queryEndTime;
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.fibo.ddp.common.model.approval;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* (ApprovalConfig)实体类
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("t_approval_config")
|
||||
public class ApprovalConfig implements Serializable {
|
||||
private static final long serialVersionUID = -66040749788313604L;
|
||||
/**
|
||||
* 自增主键
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
/**
|
||||
* 审批类型
|
||||
*/
|
||||
private String approvalType;
|
||||
/**
|
||||
* 审批名称
|
||||
*/
|
||||
private String approvalName;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String approvalDesc;
|
||||
/**
|
||||
* 审批状态(1开启,0关闭,-1删除)
|
||||
*/
|
||||
private Integer approvalStatus;
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long createUserId;
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long organId;
|
||||
/**
|
||||
* 修改人id
|
||||
*/
|
||||
private Long updateUserId;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.fibo.ddp.common.model.authx.dictionary;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* (Dictionary)实体类
|
||||
*
|
||||
* @author jgp
|
||||
* @since 2021-12-15 15:08:04
|
||||
*/
|
||||
@Data
|
||||
@TableName("t_dictionary")
|
||||
public class Dictionary implements Serializable {
|
||||
private static final long serialVersionUID = 958209037339913842L;
|
||||
/**
|
||||
* 自增主键
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
/**
|
||||
* 字典key
|
||||
*/
|
||||
private String dictKey;
|
||||
/**
|
||||
* 字典value
|
||||
*/
|
||||
private String dictValue;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.fibo.ddp.common.model.authx.dictionary;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@Component
|
||||
public class DictionaryCacheManager {
|
||||
|
||||
private final static Map<String, Dictionary> CACHE_KEY_MAP = new TreeMap<>();
|
||||
private final static Map<Long, Dictionary> CACHE_ID_MAP = new TreeMap<>();
|
||||
|
||||
public synchronized static void clearCache() {
|
||||
CACHE_KEY_MAP.clear();
|
||||
CACHE_ID_MAP.clear();
|
||||
}
|
||||
|
||||
public synchronized static void addCache(Collection<Dictionary> collection) {
|
||||
Map<String, Dictionary> temp = new HashMap<>();
|
||||
Map<Long, Dictionary> idTemp = new HashMap<>();
|
||||
if (CollectionUtils.isNotEmpty(collection)) {
|
||||
for (Dictionary dictionary : collection) {
|
||||
if (dictionary.getId() != null && StringUtils.isNotBlank(dictionary.getDictKey())) {
|
||||
temp.put(dictionary.getDictKey(), dictionary);
|
||||
idTemp.put(dictionary.getId(), dictionary);
|
||||
}
|
||||
}
|
||||
CACHE_KEY_MAP.putAll(temp);
|
||||
CACHE_ID_MAP.putAll(idTemp);
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized static void deleteCacheByIds(Collection<Long> ids) {
|
||||
if (CollectionUtils.isNotEmpty(ids)) {
|
||||
for (Long key : ids) {
|
||||
Dictionary remove = CACHE_ID_MAP.remove(key);
|
||||
CACHE_KEY_MAP.remove(remove.getDictKey());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized static void updateOrAddCache(Dictionary dictionary) {
|
||||
Dictionary remove = CACHE_ID_MAP.put(dictionary.getId(), dictionary);
|
||||
if (remove != null) {
|
||||
CACHE_KEY_MAP.remove(remove.getDictKey());
|
||||
}
|
||||
CACHE_KEY_MAP.put(dictionary.getDictKey(), dictionary);
|
||||
}
|
||||
|
||||
public synchronized static Map<String, Dictionary> getAllCache() {
|
||||
return CACHE_KEY_MAP;
|
||||
}
|
||||
|
||||
public synchronized static PageInfo<Dictionary> getByPage(int pageSize, int pageNum) {
|
||||
PageInfo<Dictionary> pageInfo = new PageInfo<>();
|
||||
int size = CACHE_ID_MAP.values().size();
|
||||
int start = 0;
|
||||
int end = size;
|
||||
if (pageSize > 0 && pageNum > 0) {
|
||||
start = pageSize * (pageNum - 1);
|
||||
end = start + pageSize;
|
||||
if (end >= size) {
|
||||
end = size;
|
||||
}
|
||||
}
|
||||
List<Dictionary> dictionaries = new ArrayList<>(CACHE_ID_MAP.values()).subList(start, end);
|
||||
pageInfo.setList(dictionaries);
|
||||
pageInfo.setTotal(size);
|
||||
pageInfo.setPageNum(pageNum);
|
||||
pageInfo.setPageSize(pageSize);
|
||||
pageInfo.setStartRow(start + 1);
|
||||
pageInfo.setEndRow(end + 1);
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
public synchronized static Dictionary getByKey(String key) {
|
||||
return CACHE_KEY_MAP.get(key);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.fibo.ddp.common.model.authx.system;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("t_resource")
|
||||
public class SysMenu implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -1L;
|
||||
@TableId(value = "resource_id",type = IdType.AUTO)
|
||||
private Long resourceId;
|
||||
private Long userId;//分配者
|
||||
private String name; //资源名称
|
||||
private String code;//资源代号
|
||||
private String url;//路径
|
||||
private Long parentId;//父节点
|
||||
private String des;
|
||||
private String resourceSystem;
|
||||
private Date birth;//创建时间
|
||||
private String icon;//图标
|
||||
private Integer sort; // 菜单顺序
|
||||
private Integer status;//状态
|
||||
private Long roleId;//角色id
|
||||
private Boolean checked;//菜单默认选中
|
||||
private Boolean chkDisabled;//节点是否禁用
|
||||
private Boolean hidden;//节点是否隐藏
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
|
||||
package com.fibo.ddp.common.model.authx.system;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("t_organization")
|
||||
public class SysOrganization implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -1L;
|
||||
@TableId(value = "organ_id",type = IdType.AUTO)
|
||||
private Long organId;//组织编号
|
||||
private String name;//组织名称
|
||||
private String code;//组织代号
|
||||
private String email;
|
||||
private String telephone;
|
||||
private Integer status;//0禁用1启用
|
||||
private String author;//创建者
|
||||
private Date birth;//创建时间
|
||||
private String token;//唯一标识
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
|
||||
package com.fibo.ddp.common.model.authx.system;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("t_role")
|
||||
public class SysRole implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -1L;
|
||||
@TableId(value = "role_id",type = IdType.AUTO)
|
||||
private Long roleId;
|
||||
private Long organId;
|
||||
private String roleName;
|
||||
private String roleCode;//角色代号
|
||||
private String roleDesc;
|
||||
private String author;//创建者
|
||||
private Date birth;//创建时间
|
||||
private Integer status; //状态0禁用1启用
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.fibo.ddp.common.model.authx.system;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@ToString
|
||||
@TableName("t_user")
|
||||
public class SysUser implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -1L;
|
||||
@TableId(value = "user_id",type = IdType.AUTO)
|
||||
private Long userId;//用户(主键)
|
||||
private Long organId;//组织编号
|
||||
private String employeeId;//员工编号
|
||||
private String account;//账户
|
||||
private String password;
|
||||
private String nickName;//昵称
|
||||
private String email;
|
||||
private String cellphone;
|
||||
private String qq;
|
||||
private String latestTime;
|
||||
private String latestIp;
|
||||
private String remark;
|
||||
private Integer status;
|
||||
private Date birth;//创建时间
|
||||
private String author;//创建人
|
||||
@TableField(exist = false)
|
||||
private SysRole sysRole;//角色对象
|
||||
@TableField(exist = false)
|
||||
private SysOrganization sysOrgan;//公司对象
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.fibo.ddp.common.model.authx.system.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class LoginInfoParam {
|
||||
private String account;// 账号
|
||||
private String password;// 密码
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.fibo.ddp.common.model.authx.system.request;
|
||||
|
||||
import com.fibo.ddp.common.model.authx.system.SysMenu;
|
||||
import com.fibo.ddp.common.model.common.BaseParam;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MenuParam extends BaseParam {
|
||||
private SysMenu entity = new SysMenu();//查询实体条件
|
||||
private Long roleId;//角色id
|
||||
private Long parentId;//父id
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.fibo.ddp.common.model.authx.system.response;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 系统菜单返回对象
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ToString(callSuper = true)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class SysMenuVo implements Serializable {
|
||||
private static final long serialVersionUID = 621966254529550199L;
|
||||
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 菜单地址
|
||||
*/
|
||||
private String index;
|
||||
|
||||
/**
|
||||
* 菜单图标
|
||||
*/
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 子菜单
|
||||
*/
|
||||
private List<SysMenuVo> subs;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.fibo.ddp.common.model.cignacmb;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 事件调用记录(BusinessEventLog)实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName("t_business_event_log")
|
||||
public class BusinessEventLog implements Serializable {
|
||||
private static final long serialVersionUID = 766848314346971098L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
private String batchNo;
|
||||
/**
|
||||
* 事件流水id
|
||||
*/
|
||||
private String eventRequestId;
|
||||
/**
|
||||
* 事件ID
|
||||
*/
|
||||
private String eventId;
|
||||
/**
|
||||
* 事件名称
|
||||
*/
|
||||
private String eventName;
|
||||
/**
|
||||
* 业务类型名称
|
||||
*/
|
||||
private String businessName;
|
||||
/**
|
||||
* 业务类型编码
|
||||
*/
|
||||
private String businessCode;
|
||||
/**
|
||||
* 业务子类型名称
|
||||
*/
|
||||
private String businessChildName;
|
||||
/**
|
||||
* 业务子类型编码
|
||||
*/
|
||||
private String businessChildCode;
|
||||
/**
|
||||
* 模板ID
|
||||
*/
|
||||
private String templateId;
|
||||
/**
|
||||
* 模板名称
|
||||
*/
|
||||
private String templateName;
|
||||
/**
|
||||
* 客户姓名
|
||||
*/
|
||||
private String customerName;
|
||||
/**
|
||||
* 客户手机号
|
||||
*/
|
||||
private String customerMobile;
|
||||
/**
|
||||
* 保单号
|
||||
*/
|
||||
private String policyNo;
|
||||
/**
|
||||
* 发送平台
|
||||
*/
|
||||
private String sendPlatform;
|
||||
/**
|
||||
* 规则执行开始时间
|
||||
*/
|
||||
private Date callStartTime;
|
||||
/**
|
||||
* 规则执行结束时间
|
||||
*/
|
||||
private Date callEndTime;
|
||||
/**
|
||||
* 耗时(批次耗时),单位毫秒
|
||||
*/
|
||||
private Integer callTime;
|
||||
/**
|
||||
* 执行结果 1:成功,0:失败
|
||||
*/
|
||||
private Integer callStatus;
|
||||
/**
|
||||
* 规则执行记录表ids
|
||||
*/
|
||||
private String ruleLogIds;
|
||||
/**
|
||||
* 企业编号
|
||||
*/
|
||||
private Integer organId;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.fibo.ddp.common.model.cignacmb;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 规则执行记录(BusinessRuleLog)实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName("t_business_rule_log")
|
||||
public class BusinessRuleLog implements Serializable {
|
||||
private static final long serialVersionUID = -63243451024796542L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
private String batchNo;
|
||||
/**
|
||||
* 规则名称
|
||||
*/
|
||||
private String ruleName;
|
||||
/**
|
||||
* 规则编号
|
||||
*/
|
||||
private String ruleCode;
|
||||
/**
|
||||
* 规则类型
|
||||
*/
|
||||
private String ruleType;
|
||||
/**
|
||||
* 业务类型名称
|
||||
*/
|
||||
private String businessName;
|
||||
/**
|
||||
* 业务类型编码
|
||||
*/
|
||||
private String businessCode;
|
||||
/**
|
||||
* 业务子类型名称
|
||||
*/
|
||||
private String businessChildName;
|
||||
/**
|
||||
* 业务子类型编码
|
||||
*/
|
||||
private String businessChildCode;
|
||||
/**
|
||||
* 规则输出结果
|
||||
*/
|
||||
private String ruleResult;
|
||||
/**
|
||||
* 规则描述
|
||||
*/
|
||||
private String ruleDescription;
|
||||
/**
|
||||
* 执行开关 1:开启,0:关闭
|
||||
*/
|
||||
private Integer executeSwitch;
|
||||
/**
|
||||
* 执行有效期,开始时间
|
||||
*/
|
||||
private Date validStartTime;
|
||||
/**
|
||||
* 执行有效期,结束时间
|
||||
*/
|
||||
private Date validEndTime;
|
||||
/**
|
||||
* 企业编号
|
||||
*/
|
||||
private Integer organId;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.fibo.ddp.common.model.cignacmb;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 业务类型与规则关联表
|
||||
* </p>
|
||||
*
|
||||
* @author oldRose
|
||||
* @since 2021-11-10
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="TBusinessRuleRel对象", description="业务类型与规则关联表")
|
||||
public class TBusinessRuleRel implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "业务类型名称")
|
||||
private String businessName;
|
||||
|
||||
@ApiModelProperty(value = "业务类型编码")
|
||||
private String businessCode;
|
||||
|
||||
@ApiModelProperty(value = "业务子类型名称")
|
||||
private String businessChildName;
|
||||
|
||||
@ApiModelProperty(value = "业务子类型编码")
|
||||
private String businessChildCode;
|
||||
|
||||
@ApiModelProperty(value = "发送方式:自动/手动")
|
||||
private String sendType;
|
||||
|
||||
@ApiModelProperty(value = "是否取消订阅")
|
||||
private String isUnsubscribe;
|
||||
|
||||
@ApiModelProperty(value = "事件类型:通知/待办/系统类")
|
||||
private String eventType;
|
||||
|
||||
@ApiModelProperty(value = "待办任务")
|
||||
private String backlog;
|
||||
|
||||
@ApiModelProperty(value = "是否需人工干预")
|
||||
private String isManualIntervention;
|
||||
|
||||
@ApiModelProperty(value = "5大类规则信息")
|
||||
private String ruleInfo;
|
||||
|
||||
@ApiModelProperty(value = "状态 0:无效,1:有效")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private Long creator;
|
||||
|
||||
@ApiModelProperty(value = "修改人")
|
||||
private Long modifier;
|
||||
|
||||
@ApiModelProperty(value = "企业编号")
|
||||
private Long organId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.fibo.ddp.common.model.cignacmb.req;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.fibo.ddp.common.model.common.BaseParam;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Created by niuge on 2021/11/10.
|
||||
*/
|
||||
@Data
|
||||
public class BusinessRuleRelReq extends BaseParam {
|
||||
//业务类型和规则关系
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "业务类型名称")
|
||||
private String businessName;
|
||||
|
||||
@ApiModelProperty(value = "业务类型编码")
|
||||
private String businessCode;
|
||||
|
||||
@ApiModelProperty(value = "业务子类型名称")
|
||||
private String businessChildName;
|
||||
|
||||
@ApiModelProperty(value = "业务子类型编码")
|
||||
private String businessChildCode;
|
||||
|
||||
@ApiModelProperty(value = "发送方式:自动/手动")
|
||||
private String sendType;
|
||||
|
||||
@ApiModelProperty(value = "是否取消订阅")
|
||||
private String isUnsubscribe;
|
||||
|
||||
@ApiModelProperty(value = "事件类型:通知/待办/系统类")
|
||||
private String eventType;
|
||||
|
||||
@ApiModelProperty(value = "待办任务")
|
||||
private String backlog;
|
||||
|
||||
@ApiModelProperty(value = "是否需人工干预")
|
||||
private String isManualIntervention;
|
||||
|
||||
@ApiModelProperty(value = "5大类规则信息")
|
||||
private String ruleInfo;
|
||||
/**
|
||||
* {"blacklist":[1,2],"threshold":[5,6],"mutex":[7,8],"merge":[10,20],"intercept":[30,40]}
|
||||
*/
|
||||
/**
|
||||
* 黑名单
|
||||
*/
|
||||
private JSONArray blacklist;
|
||||
/**
|
||||
* 阈值规则
|
||||
*/
|
||||
private JSONArray threshold;
|
||||
/**
|
||||
* 互斥规则
|
||||
*/
|
||||
private JSONArray mutex;
|
||||
/**
|
||||
* 合并规则
|
||||
*/
|
||||
private JSONArray merge;
|
||||
/**
|
||||
* 拦截规则
|
||||
*/
|
||||
private JSONArray intercept;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.fibo.ddp.common.model.cignacmb.request;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class EventLogDetailParam implements Serializable {
|
||||
private static final long serialVersionUID = 6175292951569720477L;
|
||||
/**
|
||||
* 规则执行记录表ids
|
||||
*/
|
||||
private String ruleLogIds;
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.fibo.ddp.common.model.cignacmb.request;
|
||||
|
||||
import com.fibo.ddp.common.model.common.BaseParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class EventLogParam extends BaseParam implements Serializable {
|
||||
private static final long serialVersionUID = -5236456602152208690L;
|
||||
/**
|
||||
* 事件流水id
|
||||
*/
|
||||
private String eventRequestId;
|
||||
/**
|
||||
* 业务类型名称
|
||||
*/
|
||||
private String businessName;
|
||||
/**
|
||||
* 业务子类型名称
|
||||
*/
|
||||
private String businessChildName;
|
||||
/**
|
||||
* 模板ID
|
||||
*/
|
||||
private String templateId;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Date startTime;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
/**
|
||||
* 组织id
|
||||
*/
|
||||
Long organId;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.fibo.ddp.common.model.cignacmb.request;
|
||||
|
||||
import com.fibo.ddp.common.model.common.BaseParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class RuleLogParam extends BaseParam implements Serializable {
|
||||
private static final long serialVersionUID = 1302021068405380361L;
|
||||
/**
|
||||
* 规则名称
|
||||
*/
|
||||
private String ruleName;
|
||||
/**
|
||||
* 规则编号
|
||||
*/
|
||||
private String ruleCode;
|
||||
/**
|
||||
* 规则类型
|
||||
*/
|
||||
private String ruleType;
|
||||
/**
|
||||
* 业务类型名称
|
||||
*/
|
||||
private String businessName;
|
||||
/**
|
||||
* 业务子类型名称
|
||||
*/
|
||||
private String businessChildName;
|
||||
/**
|
||||
* 规则执行开始时间
|
||||
*/
|
||||
private Date startTime;
|
||||
/**
|
||||
* 规则执行结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
/**
|
||||
* 组织id
|
||||
*/
|
||||
private Long organId;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.fibo.ddp.common.model.cignacmb.response;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class EventLogDetailResponse {
|
||||
/**
|
||||
* 规则名称
|
||||
*/
|
||||
private String ruleName;
|
||||
/**
|
||||
* 规则编号
|
||||
*/
|
||||
private String ruleCode;
|
||||
/**
|
||||
* 规则类型
|
||||
*/
|
||||
private String ruleType;
|
||||
/**
|
||||
* 规则描述
|
||||
*/
|
||||
private String ruleDescription;
|
||||
/**
|
||||
* 执行开关 1:开启,0:关闭
|
||||
*/
|
||||
private Integer executeSwitch;
|
||||
/**
|
||||
* 执行有效期,开始时间
|
||||
*/
|
||||
private Date validStartTime;
|
||||
/**
|
||||
* 执行有效期,结束时间
|
||||
*/
|
||||
private Date validEndTime;
|
||||
/**
|
||||
* 规则输出结果
|
||||
*/
|
||||
private String ruleResult;
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.fibo.ddp.common.model.cignacmb.response;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class EventLogResponse {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
private String batchNo;
|
||||
/**
|
||||
* 事件流水id
|
||||
*/
|
||||
private String eventRequestId;
|
||||
/**
|
||||
* 事件ID
|
||||
*/
|
||||
private String eventId;
|
||||
/**
|
||||
* 事件名称
|
||||
*/
|
||||
private String eventName;
|
||||
/**
|
||||
* 业务类型名称
|
||||
*/
|
||||
private String businessName;
|
||||
/**
|
||||
* 业务子类型名称
|
||||
*/
|
||||
private String businessChildName;
|
||||
/**
|
||||
* 模板ID
|
||||
*/
|
||||
private String templateId;
|
||||
/**
|
||||
* 模板名称
|
||||
*/
|
||||
private String templateName;
|
||||
/**
|
||||
* 客户姓名
|
||||
*/
|
||||
private String customerName;
|
||||
/**
|
||||
* 客户手机号
|
||||
*/
|
||||
private String customerMobile;
|
||||
/**
|
||||
* 保单号
|
||||
*/
|
||||
private String policyNo;
|
||||
/**
|
||||
* 发送平台
|
||||
*/
|
||||
private String sendPlatform;
|
||||
/**
|
||||
* 规则执行开始时间
|
||||
*/
|
||||
private Date callStartTime;
|
||||
/**
|
||||
* 耗时(批次耗时),单位毫秒
|
||||
*/
|
||||
private Integer callTime;
|
||||
/**
|
||||
* 执行结果 1:成功,0:失败
|
||||
*/
|
||||
private Integer callStatus;
|
||||
/**
|
||||
* 规则执行记录表ids
|
||||
*/
|
||||
private String ruleLogIds;
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.fibo.ddp.common.model.cignacmb.response;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class RuleLogResponse {
|
||||
/**
|
||||
* 执行次数
|
||||
*/
|
||||
private Integer executeNum;
|
||||
/**
|
||||
* 规则名称
|
||||
*/
|
||||
private String ruleName;
|
||||
/**
|
||||
* 规则编号
|
||||
*/
|
||||
private String ruleCode;
|
||||
/**
|
||||
* 规则类型
|
||||
*/
|
||||
private String ruleType;
|
||||
/**
|
||||
* 业务类型名称
|
||||
*/
|
||||
private String businessName;
|
||||
/**
|
||||
* 业务类型编码
|
||||
*/
|
||||
private String businessCode;
|
||||
/**
|
||||
* 业务子类型名称
|
||||
*/
|
||||
private String businessChildName;
|
||||
/**
|
||||
* 业务子类型编码
|
||||
*/
|
||||
private String businessChildCode;
|
||||
/**
|
||||
* 规则描述
|
||||
*/
|
||||
private String ruleDescription;
|
||||
/**
|
||||
* 执行开关 1:开启,0:关闭
|
||||
*/
|
||||
private Integer executeSwitch;
|
||||
/**
|
||||
* 执行有效期,开始时间
|
||||
*/
|
||||
private Date validStartTime;
|
||||
/**
|
||||
* 执行有效期,结束时间
|
||||
*/
|
||||
private Date validEndTime;
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.fibo.ddp.common.model.cignacmb.vo;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Created by niuge on 2021/11/11.
|
||||
*/
|
||||
@Data
|
||||
public class BusinessRuleRelVO {
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "业务类型名称")
|
||||
private String businessName;
|
||||
|
||||
@ApiModelProperty(value = "业务类型编码")
|
||||
private String businessCode;
|
||||
|
||||
@ApiModelProperty(value = "业务子类型名称")
|
||||
private String businessChildName;
|
||||
|
||||
@ApiModelProperty(value = "业务子类型编码")
|
||||
private String businessChildCode;
|
||||
|
||||
@ApiModelProperty(value = "发送方式:自动/手动")
|
||||
private String sendType;
|
||||
|
||||
@ApiModelProperty(value = "是否取消订阅")
|
||||
private String isUnsubscribe;
|
||||
|
||||
@ApiModelProperty(value = "事件类型:通知/待办/系统类")
|
||||
private String eventType;
|
||||
|
||||
@ApiModelProperty(value = "待办任务")
|
||||
private String backlog;
|
||||
|
||||
@ApiModelProperty(value = "是否需人工干预")
|
||||
private String isManualIntervention;
|
||||
|
||||
@ApiModelProperty(value = "5大类规则信息")
|
||||
private String ruleInfo;
|
||||
/**
|
||||
* {"blacklist":[1,2],"threshold":[5,6],"mutex":[7,8],"merge":[10,20],"intercept":[30,40]}
|
||||
*/
|
||||
/**
|
||||
* 黑名单
|
||||
*/
|
||||
private JSONArray blackList;
|
||||
/**
|
||||
* 阈值规则
|
||||
*/
|
||||
private JSONArray thresholdList;
|
||||
/**
|
||||
* 互斥规则
|
||||
*/
|
||||
private JSONArray mutexList;
|
||||
/**
|
||||
* 合并规则
|
||||
*/
|
||||
private JSONArray mergeList;
|
||||
/**
|
||||
* 拦截规则
|
||||
*/
|
||||
private JSONArray interceptList;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.fibo.ddp.common.model.common;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: BasePageVo <br/>
|
||||
* @Description: 分页公共基础bean. <br/>
|
||||
*/
|
||||
@Data
|
||||
public class BasePage {
|
||||
|
||||
/**
|
||||
* 当前页数
|
||||
*/
|
||||
private int page;
|
||||
|
||||
/**
|
||||
* 每页显示的行数
|
||||
*/
|
||||
private int rows;
|
||||
|
||||
/**
|
||||
* 开始行数
|
||||
*/
|
||||
private Integer curRow;
|
||||
|
||||
/**
|
||||
* 结束行数
|
||||
*/
|
||||
private Integer endRow;
|
||||
|
||||
/**
|
||||
* 总行数
|
||||
*/
|
||||
private Integer total;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.fibo.ddp.common.model.common;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BaseParam extends PageDto {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.fibo.ddp.common.model.common;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ExcelModel {
|
||||
private String name;//excel文件名
|
||||
private String type;//类型:xlsx,xls
|
||||
private List<ExcelSheetModel> sheets;//工作簿
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.fibo.ddp.common.model.common;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ExcelSheetModel {
|
||||
private String sheetName;//sheet名
|
||||
private List<String> headers;//sheet中第一行内容
|
||||
private List<List> data;//sheet数据
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.fibo.ddp.common.model.common;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class PageDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer pageNo = 1;
|
||||
|
||||
private Integer pageSize = 10;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
package com.fibo.ddp.common.model.common;
|
||||
|
||||
import com.fibo.ddp.common.model.common.enums.ErrorCodeEnum;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public final class ResponseEntityBuilder {
|
||||
/**
|
||||
* 返回成功.
|
||||
*/
|
||||
public static final String RESPONSE_OK = "1";
|
||||
/**
|
||||
* 返回失败.
|
||||
*/
|
||||
public static final String RESPONSE_FAIL = "0";
|
||||
|
||||
/**
|
||||
* 构造一个失败响应.<br>
|
||||
* 用于构造一个比较用见或是常用的失败响应。<br>
|
||||
*
|
||||
* @param enums
|
||||
* 常见错误枚举类的一个实例.<br>
|
||||
* @return
|
||||
*/
|
||||
public static <T> ResponseEntityDto<T> buildErrorResponse(ErrorCodeEnum enums) {
|
||||
ResponseEntityDto<T> entity = new ResponseEntityDto<>();
|
||||
entity.setStatus(RESPONSE_FAIL);
|
||||
entity.setError(String.valueOf(enums.getCode()));
|
||||
entity.setMsg(enums.getMessage());
|
||||
return entity;
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 构造一个失败响应.<br>
|
||||
// *
|
||||
// * @inputParam enums
|
||||
// * @return
|
||||
// */
|
||||
// @Deprecated
|
||||
// public static ResponseEntity<String> buildErrorResponse(ErrorCodeEnum enums) {
|
||||
// ResponseEntity<String> model = new ResponseEntity<String>();
|
||||
// model.setStatus(RESPONSE_FAIL);
|
||||
// model.setError(String.valueOf(enums.getVersionCode()));
|
||||
// model.setMsg(enums.getMessage());
|
||||
// return model;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 构造一个失败响应.<br>
|
||||
*
|
||||
* @param error
|
||||
* 失败错误编码.<br>
|
||||
* @param message
|
||||
* 失败错误说明.<br>
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
public static <T> ResponseEntityDto<T> buildErrorResponse(String error, String message) {
|
||||
ResponseEntityDto<T> entity = new ResponseEntityDto<>();
|
||||
entity.setStatus(RESPONSE_FAIL);
|
||||
if(StringUtils.isBlank(error) || !StringUtils.isNumeric(error)){
|
||||
error = "401";
|
||||
}
|
||||
entity.setError(error);
|
||||
entity.setMsg(message);
|
||||
return entity;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造一个正常响应.<br>
|
||||
*
|
||||
* 响应数据.<br>
|
||||
* @return
|
||||
*/
|
||||
public static <T> ResponseEntityDto<T> buildNormalResponse() {
|
||||
//规范:所有正常请求(status="1",error="01000000"),code与pageCount属性被废弃.
|
||||
return new ResponseEntityDto<T>(RESPONSE_OK, "00000000");
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造一个正常响应.<br>
|
||||
*
|
||||
* @param data
|
||||
* 响应数据.<br>
|
||||
* @return
|
||||
*/
|
||||
public static <T> ResponseEntityDto<T> buildNormalResponse(T data) {
|
||||
ResponseEntityDto<T> entity = buildNormalResponse();
|
||||
entity.setData(data);
|
||||
return entity;
|
||||
}
|
||||
/**
|
||||
* 构造一个错误响应.<br>
|
||||
*
|
||||
* @param data
|
||||
* 响应数据.<br>
|
||||
* @return
|
||||
*/
|
||||
public static <T> ResponseEntityDto<T> buildUnNormalResponse(T data,ErrorCodeEnum enums) {
|
||||
ResponseEntityDto<T> entity = buildErrorResponse(enums);
|
||||
entity.setData(data);
|
||||
return entity;
|
||||
}
|
||||
// public static <T> ResponseEntityDto<Map<String,T>> buildNormalResponse(String dictKey,T data) {
|
||||
// Map<String,T> result = new HashMap<>();
|
||||
// result.put(dictKey, data);
|
||||
//
|
||||
// ResponseEntityDto<Map<String,T>> model = buildNormalResponse();
|
||||
// model.setData(result);
|
||||
// return model;
|
||||
// }
|
||||
|
||||
public static <T> Boolean isSuccess(ResponseEntityDto<T> entity){
|
||||
return entity.getStatus().equals(RESPONSE_OK);
|
||||
}
|
||||
|
||||
public static <T> Boolean isSuccess2(ResponseEntityDto<T> entity){
|
||||
return entity.getStatus().equals(RESPONSE_OK) && entity.getError().equals("00000000");
|
||||
}
|
||||
|
||||
/**
|
||||
* 适用于接口返回data为null时业务不成功的场景
|
||||
*/
|
||||
public static <T> Boolean isSuccess3(ResponseEntityDto<T> entity){
|
||||
return entity.getStatus().equals(RESPONSE_OK) && entity.getError().equals("200") && entity.getData() != null;
|
||||
}
|
||||
|
||||
public static <T extends Serializable> T getEntity(ResponseEntityDto<T> entity){
|
||||
if(isSuccess(entity)){
|
||||
return (T) entity.getData();
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package com.fibo.ddp.common.model.common;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@ApiModel("返回对象统一封装")
|
||||
public class ResponseEntityDto<T> implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -720807478055084231L;
|
||||
|
||||
@ApiModelProperty("状态:1成功, 0失败")
|
||||
private String status;
|
||||
@ApiModelProperty("错误码")
|
||||
private String error;
|
||||
@ApiModelProperty("错误消息")
|
||||
private String msg;
|
||||
@ApiModelProperty("返回数据")
|
||||
private T data;
|
||||
|
||||
public ResponseEntityDto() {
|
||||
|
||||
}
|
||||
|
||||
public ResponseEntityDto(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public ResponseEntityDto(String status, String error) {
|
||||
this.status = status;
|
||||
this.error = error;
|
||||
}
|
||||
|
||||
public ResponseEntityDto(String status, T data) {
|
||||
this.status = status;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public ResponseEntityDto(String status, String error, String msg, T data) {
|
||||
this.status = status;
|
||||
this.error = error;
|
||||
this.msg = msg;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public ResponseEntityDto<T> setStatus(String status) {
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getError() {
|
||||
return error;
|
||||
}
|
||||
|
||||
public ResponseEntityDto<T> setError(String error) {
|
||||
this.error = error;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public ResponseEntityDto<T> setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
return this;
|
||||
}
|
||||
|
||||
public T getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public ResponseEntityDto<T> setData(T data) {
|
||||
this.data = data;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.fibo.ddp.common.model.common.enums;
|
||||
|
||||
public enum ErrorCodeEnum {
|
||||
|
||||
SERVER_ERROR(ErrorCodeEnum.ERROR_CODE + 101, "服务繁忙,请稍后再试!"),
|
||||
LOGIN_ERROR(ErrorCodeEnum.ERROR_CODE + 102, "登录失败"),
|
||||
ERROR_TOKEN_EXPIRE(ErrorCodeEnum.ERROR_CODE + 103, "登录授权码已过期"),
|
||||
FIELD_TYPE_REPEAT(ErrorCodeEnum.ERROR_CODE + 104, "字段类型已存在"),
|
||||
FIELD_EN_REPEAT(ErrorCodeEnum.ERROR_CODE + 105, "字段英文名已存在"),
|
||||
FIELD_CN_REPEAT(ErrorCodeEnum.ERROR_CODE + 106, "字段中文名已存在"),
|
||||
FIELD_BE_USERD(ErrorCodeEnum.ERROR_CODE + 107, "字段被使用,无法修改"),
|
||||
LIST_DB_NAME_REPEAT(ErrorCodeEnum.ERROR_CODE + 108, "黑白名单名称已存在"),
|
||||
RULE_NAME_REPEAT(ErrorCodeEnum.ERROR_CODE + 109, "规则名称已存在"),
|
||||
RULE_CODE_REPEAT(ErrorCodeEnum.ERROR_CODE + 110, "规则代码已存在"),
|
||||
SCORECARD_NAME_REPEAT(ErrorCodeEnum.ERROR_CODE + 111, "评分卡名称已存在"),
|
||||
SCORECARD_CODE_REPEAT(ErrorCodeEnum.ERROR_CODE + 112, "评分卡代码已存在"),
|
||||
UN_PERMISSION(ErrorCodeEnum.ERROR_CODE + 113, "没有访问权限"),
|
||||
CREATE_USER_NAME_ERROR(ErrorCodeEnum.ERROR_CODE + 114, "姓名不能为超级管理员"),
|
||||
CREATE_USER_NAME_REPEAT(ErrorCodeEnum.ERROR_CODE + 115, "账号或员工编号已存在"),
|
||||
CREATE_ROLE_ADMIN_REPEAT(ErrorCodeEnum.ERROR_CODE + 116, "每个公司只能创建一个公司管理员"),
|
||||
CREATE_ROLE_NAME_REPEAT(ErrorCodeEnum.ERROR_CODE + 117, "角色名已存在"),
|
||||
CREATE_MENU_NAME_REPEAT(ErrorCodeEnum.ERROR_CODE + 118, "名称或编号已存在"),
|
||||
CREATE_ORGAN_NAME_REPEAT(ErrorCodeEnum.ERROR_CODE + 119, "名称或编号已存在"),
|
||||
|
||||
UPDATE_RULE_ERROR(ErrorCodeEnum.ERROR_CODE+120,"修改规则内容失败"),
|
||||
RULE_CONDITION_TYPE_ERROR(ErrorCodeEnum.ERROR_CODE+121,"规则条件类型错误"),
|
||||
RULE_SAVE_ERROR(ErrorCodeEnum.ERROR_CODE+122,"规则保存失败"),
|
||||
|
||||
RULE_UPLOAD_ERROR(ErrorCodeEnum.ERROR_CODE+123,"规则导入失败"),
|
||||
DECISION_TABLES_CODE_REPEAT(ErrorCodeEnum.ERROR_CODE + 124, "决策表代码已存在"),
|
||||
DECISION_TABLES_SAVE_ERROR(ErrorCodeEnum.ERROR_CODE+125,"决策表保存失败"),
|
||||
DECISION_TABLES_UPDATE_ERROR(ErrorCodeEnum.ERROR_CODE+126,"决策表修改状态失败"),
|
||||
DECISION_TABLES_NAME_REPEAT(ErrorCodeEnum.ERROR_CODE + 127, "决策表名称已存在"),
|
||||
DECISION_TREE_SAVE_ERROR(ErrorCodeEnum.ERROR_CODE+130,"决策树保存失败"),
|
||||
DECISION_TREE_UPDATE_ERROR(ErrorCodeEnum.ERROR_CODE+131,"决策树修改状态失败"),
|
||||
LIST_OPERATION_NAME_REPEAT(ErrorCodeEnum.ERROR_CODE+132,"集合操作名称重复"),
|
||||
LIST_OPERATION_Code_REPEAT(ErrorCodeEnum.ERROR_CODE+133,"集合操作代码重复"),
|
||||
TAG_SAVE_ERROR(ErrorCodeEnum.ERROR_CODE+134,"标签保存失败"),
|
||||
TAG_UPDATE_ERROR(ErrorCodeEnum.ERROR_CODE+135,"标签修改状态失败"),
|
||||
|
||||
|
||||
PARAMS_EXCEPTION(ErrorCodeEnum.ERROR_CODE + 555, "参数异常"),
|
||||
CLASS_CAST_EXCEPTION(ErrorCodeEnum.ERROR_CODE + 556, "类型转换异常"),
|
||||
JSON_CAST_EXCEPTION(ErrorCodeEnum.ERROR_CODE + 557, "JSON转换异常"),
|
||||
NULL_POINT_EREXCEPTION(ErrorCodeEnum.ERROR_CODE + 558, "NPE问题,请联系管理员"),
|
||||
DATA_IS_NOT_EXIST(ErrorCodeEnum.ERROR_CODE + 559, "数据不存在"),
|
||||
SECTION_ERROR(ErrorCodeEnum.ERROR_CODE + 560, "区间有误"),
|
||||
|
||||
SCORECARD_NOT_SESECT(ErrorCodeEnum.ERROR_CODE + 561, "在本条路径上,评分卡节点有空值"),
|
||||
NODECHILD_NOT_SESECT(ErrorCodeEnum.ERROR_CODE + 562, "在本条路径上,子引擎节点有空值"),
|
||||
DECISION_TABLES_NOT_SELECT(ErrorCodeEnum.ERROR_CODE + 563, "在本条路径上,决策表节点有空值"),
|
||||
FOLDER_NOT_EXIST(ErrorCodeEnum.ERROR_CODE+564,"文件夹不存在"),
|
||||
|
||||
UPDATE_INTERFACE_ERROR(ErrorCodeEnum.ERROR_CODE+565,"修改接口内容失败"),
|
||||
INTERFACE_CONDITION_TYPE_ERROR(ErrorCodeEnum.ERROR_CODE+566,"接口条件类型错误"),
|
||||
INTERFACE_SAVE_ERROR(ErrorCodeEnum.ERROR_CODE+567,"接口保存失败"),
|
||||
INTERFACE_NAME_REPEAT(ErrorCodeEnum.ERROR_CODE + 568, "接口名称已存在"),
|
||||
FAIL_IN_LINK(ErrorCodeEnum.ERROR_CODE+600,"失败"),
|
||||
SQL_FIELD_HAVE_RISK(ErrorCodeEnum.ERROR_CODE+601,"存在有风险sql关键词" ),
|
||||
|
||||
FILE_UPLOAD_ERROR(ErrorCodeEnum.ERROR_CODE+602,"导入失败"),
|
||||
|
||||
|
||||
|
||||
// runner
|
||||
SUCCESS("00000000", "执行成功"),
|
||||
GET_REDIS_SOURCE_ERROR(ErrorCodeEnum.ERROR_CODE + 401, "获取Redis数据源失败"),
|
||||
GET_DATABASE_FIELD_ERROR(ErrorCodeEnum.ERROR_CODE + 402, "获取数据库指标失败"),
|
||||
RUNNER_CUSTOM_ERROR(ErrorCodeEnum.ERROR_CODE + 403, "执行自定义失败"),
|
||||
GET_INTERFACE_FIELD_ERROR(ErrorCodeEnum.ERROR_CODE + 410, "获取接口指标错误")
|
||||
;
|
||||
|
||||
/**
|
||||
* 默认ERROR_CODE.<br>
|
||||
* 按公司要求8位长度,前两位产品。
|
||||
*/
|
||||
public static final String ERROR_CODE = "01000";
|
||||
|
||||
private String code;
|
||||
private String message;
|
||||
|
||||
private ErrorCodeEnum(String code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.fibo.ddp.common.model.common.message.template.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* APP推送模板表(AppTemplate)实体类
|
||||
*
|
||||
* @author andy.wang
|
||||
* @since 2022-01-07 18:11:16
|
||||
*/
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("t_app_template")
|
||||
public class AppTemplate implements Serializable {
|
||||
private static final long serialVersionUID = -45372445008267253L;
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 模板名称
|
||||
*/
|
||||
private String templateName;
|
||||
/**
|
||||
* 模板编码
|
||||
*/
|
||||
private String templateCode;
|
||||
/**
|
||||
* 推送标题
|
||||
*/
|
||||
private String pushSubject;
|
||||
/**
|
||||
* 推送内容
|
||||
*/
|
||||
private String pushContent;
|
||||
/**
|
||||
* 点击推送后动作 1:唤醒应用,2:打开指定链接,3:自定义跳转
|
||||
*/
|
||||
private Integer clickAction;
|
||||
/**
|
||||
* 点击推送后跳转地址
|
||||
*/
|
||||
private String jumpUrl;
|
||||
/**
|
||||
* 状态 0:无效,1:有效
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Integer creator;
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private Integer modifier;
|
||||
/**
|
||||
* 组织编号
|
||||
*/
|
||||
private Integer organId;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.fibo.ddp.common.model.common.message.template.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 消息发送记录表(MessageSendRecord)实体类
|
||||
*
|
||||
* @author andy.wang
|
||||
* @since 2022-01-07 18:13:24
|
||||
*/
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("t_message_send_record")
|
||||
public class MessageSendRecord implements Serializable {
|
||||
private static final long serialVersionUID = -61995719748090236L;
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 触达方式 Sms、App、WebHook、WeChat
|
||||
*/
|
||||
private String touchType;
|
||||
/**
|
||||
* 触达用户id
|
||||
*/
|
||||
private Integer userId;
|
||||
/**
|
||||
* 模板名称
|
||||
*/
|
||||
private String templateName;
|
||||
/**
|
||||
* 模板编码
|
||||
*/
|
||||
private String templateCode;
|
||||
/**
|
||||
* 发送状态 0:未处理,1:已发送,2:发送成功,-1:发送失败
|
||||
*/
|
||||
private Integer sendStatus;
|
||||
/**
|
||||
* 发送内容
|
||||
*/
|
||||
private String sendContent;
|
||||
/**
|
||||
* 组织编号
|
||||
*/
|
||||
private Integer organId;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.fibo.ddp.common.model.common.message.template.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 短信模板表(SmsTemplate)实体类
|
||||
*
|
||||
* @author andy.wang
|
||||
* @since 2022-01-07 18:11:16
|
||||
*/
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("t_sms_template")
|
||||
public class SmsTemplate implements Serializable {
|
||||
private static final long serialVersionUID = 598560753825752798L;
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 模板名称
|
||||
*/
|
||||
private String templateName;
|
||||
/**
|
||||
* 模板编码
|
||||
*/
|
||||
private String templateCode;
|
||||
/**
|
||||
* 短信类型
|
||||
*/
|
||||
private String smsType;
|
||||
/**
|
||||
* 短信签名
|
||||
*/
|
||||
private String smsSign;
|
||||
/**
|
||||
* 模板内容
|
||||
*/
|
||||
private String templateContent;
|
||||
/**
|
||||
* 状态 0:无效,1:有效
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Integer creator;
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private Integer modifier;
|
||||
/**
|
||||
* 组织编号
|
||||
*/
|
||||
private Integer organId;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.fibo.ddp.common.model.common.message.template.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* webhook模板表(WebhookTemplate)实体类
|
||||
*
|
||||
* @author andy.wang
|
||||
* @since 2022-01-07 18:12:03
|
||||
*/
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("t_webhook_template")
|
||||
public class WebhookTemplate implements Serializable {
|
||||
private static final long serialVersionUID = 995549116937541459L;
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 模板名称
|
||||
*/
|
||||
private String templateName;
|
||||
/**
|
||||
* 模板编码
|
||||
*/
|
||||
private String templateCode;
|
||||
/**
|
||||
* 请求地址
|
||||
*/
|
||||
private String requestUrl;
|
||||
/**
|
||||
* 请求参数(json格式)
|
||||
*/
|
||||
private String requestParams;
|
||||
/**
|
||||
* 状态 0:无效,1:有效
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Integer creator;
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private Integer modifier;
|
||||
/**
|
||||
* 组织编号
|
||||
*/
|
||||
private Integer organId;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.fibo.ddp.common.model.common.message.template.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 微信服务号模板表(WechatTemplate)实体类
|
||||
*
|
||||
* @author andy.wang
|
||||
* @since 2022-01-07 18:11:16
|
||||
*/
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("t_wechat_template")
|
||||
public class WechatTemplate implements Serializable {
|
||||
private static final long serialVersionUID = 958482371535782917L;
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 模板名称
|
||||
*/
|
||||
private String templateName;
|
||||
/**
|
||||
* 模板编码
|
||||
*/
|
||||
private String templateCode;
|
||||
/**
|
||||
* 模板内容
|
||||
*/
|
||||
private String templateContent;
|
||||
/**
|
||||
* 状态 0:无效,1:有效
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Integer creator;
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private Integer modifier;
|
||||
/**
|
||||
* 组织编号
|
||||
*/
|
||||
private Integer organId;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.fibo.ddp.common.model.common.message.template.vo;
|
||||
|
||||
import com.fibo.ddp.common.model.common.BaseParam;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class AppTemplateReqVo extends BaseParam {
|
||||
private static final long serialVersionUID = 8763922600627529473L;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.fibo.ddp.common.model.common.requestParam;
|
||||
|
||||
import com.fibo.ddp.common.model.common.enums.ErrorCodeEnum;
|
||||
import com.fibo.ddp.common.utils.exception.ApiException;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class QueryListParam<T> {
|
||||
private Integer pageNum = 1; // 第几页
|
||||
private Integer pageSize = 10; // 每页的数量
|
||||
private T entity;//查询实体对象
|
||||
|
||||
public static boolean checkIsPage(QueryListParam<?> param) {
|
||||
if (param == null) {
|
||||
throw new ApiException(ErrorCodeEnum.PARAMS_EXCEPTION.getCode(), "分页查询参数异常");
|
||||
}
|
||||
if (param.getPageNum() != null && param.getPageSize() != null && param.getPageSize() > 0 && param.getPageNum() > 0){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.fibo.ddp.common.model.common.requestParam;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class StatusParam<T> {
|
||||
private static final long serialVersionUID = 8131487634836541557L;
|
||||
|
||||
private Integer status;//状态
|
||||
|
||||
private List<Long> ids;//主键id
|
||||
|
||||
private Long strategyId;//相关策略id
|
||||
|
||||
private List<T> list;//针对需要指定类型的需要传入实体类
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.fibo.ddp.common.model.common.requestParam;
|
||||
|
||||
import com.fibo.ddp.common.model.common.enums.ErrorCodeEnum;
|
||||
import com.fibo.ddp.common.utils.exception.ApiException;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Accessors
|
||||
public class UpdateFolderParam {
|
||||
private List<Long> ids;//规则id
|
||||
private Long folderId;//文件夹id
|
||||
|
||||
public static boolean checkNotNull(UpdateFolderParam param){
|
||||
if (param==null||param.ids==null||param.ids.isEmpty()||param.folderId==null){
|
||||
throw new ApiException(ErrorCodeEnum.PARAMS_EXCEPTION.getCode(),"id或者文件夹id为空");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.fibo.ddp.common.model.common.requestParam;
|
||||
|
||||
import com.fibo.ddp.common.model.common.enums.ErrorCodeEnum;
|
||||
import com.fibo.ddp.common.utils.exception.ApiException;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Accessors
|
||||
public class UpdateStatusParam {
|
||||
private String ids;
|
||||
private Integer status;
|
||||
private List<Long> list;
|
||||
|
||||
public static boolean checkParam(UpdateStatusParam param) {
|
||||
try {
|
||||
String[] split = param.getIds().split(",");
|
||||
Integer status = param.getStatus();
|
||||
if (split == null || split.length == 0 || status == null) {
|
||||
throw new ApiException(ErrorCodeEnum.PARAMS_EXCEPTION.getCode(), ErrorCodeEnum.PARAMS_EXCEPTION.getMessage());
|
||||
}
|
||||
param.list = new ArrayList<>();
|
||||
for (String s : split) {
|
||||
param.list.add(Long.valueOf(s));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new ApiException(ErrorCodeEnum.PARAMS_EXCEPTION.getCode(), ErrorCodeEnum.PARAMS_EXCEPTION.getMessage());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.fibo.ddp.common.model.datax.common;
|
||||
|
||||
public class ExcelHeader {
|
||||
|
||||
public static final String[] fieldExcelHeader = { "字段编号", "字段名", "字段中文名", "字段类型", "字段值类型", "字段值范围", "是否衍生", "是否输出", "创建人" };
|
||||
|
||||
public static final String[] fieldExcelClass = { "userId", "fieldEn", "fieldCn", "fieldType", "valueTypeName", "valueScope", "isDerivativeName", "isOutputName", "nickName" };
|
||||
}
|
||||
@@ -0,0 +1,660 @@
|
||||
package com.fibo.ddp.common.model.datax.common;
|
||||
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.lang.reflect.Field;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
public class ExcelUtil<T> {
|
||||
|
||||
public static <T> void exportFieldExcel(OutputStream out ,String exlType,String[] headers,String[] classNames, List<T> list ) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException{
|
||||
Workbook workbook;
|
||||
if (exlType.equalsIgnoreCase("xlsx")) {
|
||||
// 2007以上
|
||||
workbook = new SXSSFWorkbook(200);
|
||||
} else {
|
||||
// 97-2003
|
||||
workbook = new HSSFWorkbook();
|
||||
}
|
||||
Sheet sheet = workbook.createSheet("title");
|
||||
sheet.setColumnWidth((short)0, 10* 256);
|
||||
sheet.setColumnWidth((short)1, 20* 256);
|
||||
sheet.setColumnWidth((short)2, 20* 256);
|
||||
sheet.setColumnWidth((short)3, 10* 256);
|
||||
sheet.setColumnWidth((short)4, 10* 256);
|
||||
sheet.setColumnWidth((short)5, 75* 256);
|
||||
// sheet.setColumnWidth((short)6, 75* 256);
|
||||
|
||||
|
||||
CellStyle cellStyle = workbook.createCellStyle();
|
||||
CellStyle cellStyle1 = workbook.createCellStyle();
|
||||
|
||||
Font font = workbook.createFont();
|
||||
Font font1 = workbook.createFont();
|
||||
|
||||
//微软雅黑,字体10,加粗,背景灰色
|
||||
font.setFontName("微软雅黑");
|
||||
font.setFontHeight((short) 240);
|
||||
font.setBoldweight(Font.BOLDWEIGHT_BOLD);
|
||||
cellStyle.setFont(font);
|
||||
cellStyle.setAlignment(CellStyle.ALIGN_CENTER); // 指定单元格居中对齐
|
||||
cellStyle.setVerticalAlignment(CellStyle.VERTICAL_CENTER);
|
||||
cellStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
|
||||
cellStyle.setFillPattern(CellStyle.SOLID_FOREGROUND);
|
||||
cellStyle.setWrapText(true);
|
||||
cellStyle.setBorderBottom(CellStyle.BORDER_THIN); // 设置单无格的边框为粗体
|
||||
cellStyle.setBorderLeft(CellStyle.BORDER_THIN);
|
||||
cellStyle.setBorderRight(CellStyle.BORDER_THIN);
|
||||
cellStyle.setBorderTop(CellStyle.BORDER_THIN);
|
||||
|
||||
//微软雅黑,字体10,加粗,背景灰色
|
||||
font1.setFontName("微软雅黑");
|
||||
font1.setFontHeight((short) 240);
|
||||
cellStyle1.setFont(font1);
|
||||
cellStyle1.setAlignment(CellStyle.ALIGN_LEFT); // 指定单元格居中对齐
|
||||
cellStyle1.setVerticalAlignment(CellStyle.VERTICAL_CENTER);
|
||||
cellStyle1.setWrapText(true);
|
||||
cellStyle1.setBorderBottom(CellStyle.BORDER_THIN); // 设置单无格的边框为粗体
|
||||
cellStyle1.setBorderLeft(CellStyle.BORDER_THIN);
|
||||
cellStyle1.setBorderRight(CellStyle.BORDER_THIN);
|
||||
cellStyle1.setBorderTop(CellStyle.BORDER_THIN);
|
||||
|
||||
Row row = sheet.createRow(0);
|
||||
row.setHeight((short) 400);
|
||||
|
||||
for (short i = 0; i < headers.length; i++) {
|
||||
Cell cell = row.createCell(i);
|
||||
cell.setCellStyle(cellStyle);
|
||||
cell.setCellValue(headers[i]);
|
||||
}
|
||||
Iterator<T> it = list.iterator();
|
||||
int index = 0;
|
||||
while (it.hasNext()) {
|
||||
index++;
|
||||
row = sheet.createRow(index);
|
||||
row.setHeight((short) 400);
|
||||
T t = it.next();
|
||||
if(null!=t){
|
||||
for (int j = 0; j < headers.length; j++) {
|
||||
Cell cell = row.createCell(j);
|
||||
Field field = t.getClass().getDeclaredField(classNames[j]);
|
||||
field.setAccessible(true);
|
||||
Class valType = field.getType();
|
||||
cell.setCellStyle(cellStyle1);
|
||||
//数据转类型
|
||||
if("java.lang.String".equalsIgnoreCase( valType.getName())){
|
||||
cell.setCellValue((String) field.get(t));
|
||||
}else if("java.lang.Integer".equalsIgnoreCase(valType.getName())||"int".equalsIgnoreCase(valType.getName())){
|
||||
cell.setCellValue((Integer) field.get(t));
|
||||
}else if("java.lang.Double".equalsIgnoreCase(valType.getName())||"double".equalsIgnoreCase(valType.getName())){
|
||||
cell.setCellValue((Double) field.get(t)==null?0:(Double) field.get(t));
|
||||
}else if("java.lang.Long".equalsIgnoreCase(valType.getName())||"long".equalsIgnoreCase(valType.getName())){
|
||||
cell.setCellValue((Long) field.get(t)==null?0:(Long) field.get(t));
|
||||
}else if("java.util.Date".equalsIgnoreCase(valType.getName())) {
|
||||
if(null==field.get(t)){
|
||||
cell.setCellValue("");
|
||||
}else {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
|
||||
cell.setCellValue(sdf.format((Date) field.get(t)));
|
||||
}
|
||||
}
|
||||
field.setAccessible(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
workbook.write(out);
|
||||
out.flush();
|
||||
out.close();
|
||||
out = null;
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
if (out != null)
|
||||
out.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出黑白名单库里的客户列表到excel(兼容黑白名单库的导入模版)
|
||||
*
|
||||
* @param sheet
|
||||
* @param row
|
||||
* @param column
|
||||
* @return
|
||||
*/
|
||||
public static <T> void exportCustListExcel(OutputStream out ,String exlType,String[] headers,String[] classNames, List<T> list ) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException{
|
||||
Workbook workbook;
|
||||
if (exlType.equalsIgnoreCase("xlsx")) {
|
||||
// 2007以上
|
||||
workbook = new SXSSFWorkbook(200);
|
||||
} else {
|
||||
// 97-2003
|
||||
workbook = new HSSFWorkbook();
|
||||
}
|
||||
Sheet sheet = workbook.createSheet("title");
|
||||
//默认20列
|
||||
sheet.setColumnWidth((short)0, 10* 256);
|
||||
sheet.setColumnWidth((short)1, 10* 256);
|
||||
sheet.setColumnWidth((short)2, 10* 256);
|
||||
sheet.setColumnWidth((short)3, 10* 256);
|
||||
sheet.setColumnWidth((short)4, 10* 256);
|
||||
sheet.setColumnWidth((short)5, 10* 256);
|
||||
sheet.setColumnWidth((short)6, 10* 256);
|
||||
sheet.setColumnWidth((short)7, 10* 256);
|
||||
sheet.setColumnWidth((short)8, 10* 256);
|
||||
sheet.setColumnWidth((short)9, 10* 256);
|
||||
sheet.setColumnWidth((short)10, 10* 256);
|
||||
sheet.setColumnWidth((short)11, 10* 256);
|
||||
sheet.setColumnWidth((short)12, 10* 256);
|
||||
sheet.setColumnWidth((short)13, 10* 256);
|
||||
sheet.setColumnWidth((short)14, 10* 256);
|
||||
sheet.setColumnWidth((short)15, 10* 256);
|
||||
sheet.setColumnWidth((short)16, 10* 256);
|
||||
sheet.setColumnWidth((short)17, 10* 256);
|
||||
sheet.setColumnWidth((short)18, 10* 256);
|
||||
sheet.setColumnWidth((short)19, 10* 256);
|
||||
|
||||
CellStyle cellStyle = workbook.createCellStyle();
|
||||
CellStyle cellStyle1 = workbook.createCellStyle();
|
||||
|
||||
Font font = workbook.createFont();
|
||||
Font font1 = workbook.createFont();
|
||||
|
||||
//微软雅黑,字体10,加粗,背景灰色
|
||||
font.setFontName("微软雅黑");
|
||||
font.setFontHeight((short) 240);
|
||||
font.setBoldweight(Font.BOLDWEIGHT_BOLD);
|
||||
cellStyle.setFont(font);
|
||||
cellStyle.setAlignment(CellStyle.ALIGN_CENTER); // 指定单元格居中对齐
|
||||
cellStyle.setVerticalAlignment(CellStyle.VERTICAL_CENTER);
|
||||
cellStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
|
||||
cellStyle.setFillPattern(CellStyle.SOLID_FOREGROUND);
|
||||
cellStyle.setWrapText(true);
|
||||
cellStyle.setBorderBottom(CellStyle.BORDER_THIN); // 设置单无格的边框为粗体
|
||||
cellStyle.setBorderLeft(CellStyle.BORDER_THIN);
|
||||
cellStyle.setBorderRight(CellStyle.BORDER_THIN);
|
||||
cellStyle.setBorderTop(CellStyle.BORDER_THIN);
|
||||
|
||||
//微软雅黑,字体10,加粗,背景灰色
|
||||
font1.setFontName("微软雅黑");
|
||||
font1.setFontHeight((short) 240);
|
||||
cellStyle1.setFont(font1);
|
||||
cellStyle1.setAlignment(CellStyle.ALIGN_LEFT); // 指定单元格居中对齐
|
||||
cellStyle1.setVerticalAlignment(CellStyle.VERTICAL_CENTER);
|
||||
cellStyle1.setWrapText(true);
|
||||
cellStyle1.setBorderBottom(CellStyle.BORDER_THIN); // 设置单无格的边框为粗体
|
||||
cellStyle1.setBorderLeft(CellStyle.BORDER_THIN);
|
||||
cellStyle1.setBorderRight(CellStyle.BORDER_THIN);
|
||||
cellStyle1.setBorderTop(CellStyle.BORDER_THIN);
|
||||
|
||||
Row row = sheet.createRow(0);
|
||||
row.setHeight((short) 400);
|
||||
|
||||
for (short i = 0; i < headers.length; i++) {
|
||||
Cell cell = row.createCell(i);
|
||||
cell.setCellStyle(cellStyle);
|
||||
cell.setCellValue(headers[i]);
|
||||
}
|
||||
Iterator<T> it = list.iterator();
|
||||
int index = 0;
|
||||
while (it.hasNext()) {
|
||||
index++;
|
||||
row = sheet.createRow(index);
|
||||
row.setHeight((short) 400);
|
||||
T t = it.next();
|
||||
if(null!=t){
|
||||
for (int j = 0; j < headers.length; j++) {
|
||||
Cell cell = row.createCell(j);
|
||||
Field field = t.getClass().getDeclaredField(classNames[j]);
|
||||
field.setAccessible(true);
|
||||
Class valType = field.getType();
|
||||
cell.setCellStyle(cellStyle1);
|
||||
//数据转类型
|
||||
if("java.lang.String".equalsIgnoreCase( valType.getName())){
|
||||
cell.setCellValue((String) field.get(t));
|
||||
}else if("java.lang.Integer".equalsIgnoreCase(valType.getName())||"int".equalsIgnoreCase(valType.getName())){
|
||||
cell.setCellValue((Integer) field.get(t));
|
||||
}else if("java.lang.Double".equalsIgnoreCase(valType.getName())||"double".equalsIgnoreCase(valType.getName())){
|
||||
cell.setCellValue((Double) field.get(t)==null?0:(Double) field.get(t));
|
||||
}else if("java.lang.Long".equalsIgnoreCase(valType.getName())||"long".equalsIgnoreCase(valType.getName())){
|
||||
cell.setCellValue((Long) field.get(t)==null?0:(Long) field.get(t));
|
||||
}else if("java.util.Date".equalsIgnoreCase(valType.getName())) {
|
||||
if(null==field.get(t)){
|
||||
cell.setCellValue("");
|
||||
}else {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
|
||||
cell.setCellValue(sdf.format((Date) field.get(t)));
|
||||
}
|
||||
}
|
||||
field.setAccessible(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
workbook.write(out);
|
||||
out.flush();
|
||||
out.close();
|
||||
out = null;
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
if (out != null)
|
||||
out.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出黑白名单库里的客户列表到excel(兼容黑白名单库的导入模版)
|
||||
*
|
||||
* @param sheet
|
||||
* @param row
|
||||
* @param column
|
||||
* @return
|
||||
*/
|
||||
public static <T> void createCustListExcel(String path, String exlType,String[] headers,String[] classNames, List<T> list ) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException{
|
||||
Workbook workbook;
|
||||
if (exlType.equalsIgnoreCase("xlsx")) {
|
||||
// 2007以上
|
||||
workbook = new SXSSFWorkbook(200);
|
||||
} else {
|
||||
// 97-2003
|
||||
workbook = new HSSFWorkbook();
|
||||
}
|
||||
Sheet sheet = workbook.createSheet("title");
|
||||
//默认20列
|
||||
sheet.setColumnWidth((short)0, 10* 256);
|
||||
sheet.setColumnWidth((short)1, 10* 256);
|
||||
sheet.setColumnWidth((short)2, 10* 256);
|
||||
sheet.setColumnWidth((short)3, 10* 256);
|
||||
sheet.setColumnWidth((short)4, 10* 256);
|
||||
sheet.setColumnWidth((short)5, 10* 256);
|
||||
sheet.setColumnWidth((short)6, 10* 256);
|
||||
sheet.setColumnWidth((short)7, 10* 256);
|
||||
sheet.setColumnWidth((short)8, 10* 256);
|
||||
sheet.setColumnWidth((short)9, 10* 256);
|
||||
sheet.setColumnWidth((short)10, 10* 256);
|
||||
sheet.setColumnWidth((short)11, 10* 256);
|
||||
sheet.setColumnWidth((short)12, 10* 256);
|
||||
sheet.setColumnWidth((short)13, 10* 256);
|
||||
sheet.setColumnWidth((short)14, 10* 256);
|
||||
sheet.setColumnWidth((short)15, 10* 256);
|
||||
sheet.setColumnWidth((short)16, 10* 256);
|
||||
sheet.setColumnWidth((short)17, 10* 256);
|
||||
sheet.setColumnWidth((short)18, 10* 256);
|
||||
sheet.setColumnWidth((short)19, 10* 256);
|
||||
|
||||
CellStyle cellStyle = workbook.createCellStyle();
|
||||
CellStyle cellStyle1 = workbook.createCellStyle();
|
||||
|
||||
Font font = workbook.createFont();
|
||||
Font font1 = workbook.createFont();
|
||||
|
||||
//微软雅黑,字体10,加粗,背景灰色
|
||||
font.setFontName("微软雅黑");
|
||||
font.setFontHeight((short) 240);
|
||||
font.setBoldweight(Font.BOLDWEIGHT_BOLD);
|
||||
cellStyle.setFont(font);
|
||||
cellStyle.setAlignment(CellStyle.ALIGN_CENTER); // 指定单元格居中对齐
|
||||
cellStyle.setVerticalAlignment(CellStyle.VERTICAL_CENTER);
|
||||
cellStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
|
||||
cellStyle.setFillPattern(CellStyle.SOLID_FOREGROUND);
|
||||
cellStyle.setWrapText(true);
|
||||
cellStyle.setBorderBottom(CellStyle.BORDER_THIN); // 设置单无格的边框为粗体
|
||||
cellStyle.setBorderLeft(CellStyle.BORDER_THIN);
|
||||
cellStyle.setBorderRight(CellStyle.BORDER_THIN);
|
||||
cellStyle.setBorderTop(CellStyle.BORDER_THIN);
|
||||
|
||||
//微软雅黑,字体10,加粗,背景灰色
|
||||
font1.setFontName("微软雅黑");
|
||||
font1.setFontHeight((short) 240);
|
||||
cellStyle1.setFont(font1);
|
||||
cellStyle1.setAlignment(CellStyle.ALIGN_LEFT); // 指定单元格居中对齐
|
||||
cellStyle1.setVerticalAlignment(CellStyle.VERTICAL_CENTER);
|
||||
cellStyle1.setWrapText(true);
|
||||
cellStyle1.setBorderBottom(CellStyle.BORDER_THIN); // 设置单无格的边框为粗体
|
||||
cellStyle1.setBorderLeft(CellStyle.BORDER_THIN);
|
||||
cellStyle1.setBorderRight(CellStyle.BORDER_THIN);
|
||||
cellStyle1.setBorderTop(CellStyle.BORDER_THIN);
|
||||
|
||||
Row row = sheet.createRow(0);
|
||||
row.setHeight((short) 400);
|
||||
|
||||
for (short i = 0; i < headers.length; i++) {
|
||||
Cell cell = row.createCell(i);
|
||||
cell.setCellStyle(cellStyle);
|
||||
cell.setCellValue(headers[i]);
|
||||
}
|
||||
Iterator<T> it = list.iterator();
|
||||
int index = 0;
|
||||
while (it.hasNext()) {
|
||||
index++;
|
||||
row = sheet.createRow(index);
|
||||
row.setHeight((short) 400);
|
||||
T t = it.next();
|
||||
if(null!=t){
|
||||
for (int j = 0; j < headers.length; j++) {
|
||||
Cell cell = row.createCell(j);
|
||||
Field field = t.getClass().getDeclaredField(classNames[j]);
|
||||
field.setAccessible(true);
|
||||
Class valType = field.getType();
|
||||
cell.setCellStyle(cellStyle1);
|
||||
//数据转类型
|
||||
if("java.lang.String".equalsIgnoreCase( valType.getName())){
|
||||
cell.setCellValue((String) field.get(t));
|
||||
}else if("java.lang.Integer".equalsIgnoreCase(valType.getName())||"int".equalsIgnoreCase(valType.getName())){
|
||||
cell.setCellValue((Integer) field.get(t));
|
||||
}else if("java.lang.Double".equalsIgnoreCase(valType.getName())||"double".equalsIgnoreCase(valType.getName())){
|
||||
cell.setCellValue((Double) field.get(t)==null?0:(Double) field.get(t));
|
||||
}else if("java.lang.Long".equalsIgnoreCase(valType.getName())||"long".equalsIgnoreCase(valType.getName())){
|
||||
cell.setCellValue((Long) field.get(t)==null?0:(Long) field.get(t));
|
||||
}else if("java.util.Date".equalsIgnoreCase(valType.getName())) {
|
||||
if(null==field.get(t)){
|
||||
cell.setCellValue("");
|
||||
}else {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
|
||||
cell.setCellValue(sdf.format((Date) field.get(t)));
|
||||
}
|
||||
}
|
||||
field.setAccessible(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
FileOutputStream output=new FileOutputStream(path);
|
||||
workbook.write(output);
|
||||
output.close();
|
||||
output = null;
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出引擎批量测试结果到excel
|
||||
*
|
||||
* @param sheet
|
||||
* @param row
|
||||
* @param column
|
||||
* @return
|
||||
*/
|
||||
public static <T> void exportEngineTestResultExcel(OutputStream out ,String exlType,String[] headers,String[] classNames, List<T> list ) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException{
|
||||
Workbook workbook;
|
||||
if (exlType.equalsIgnoreCase("xlsx")) {
|
||||
// 2007以上
|
||||
workbook = new SXSSFWorkbook(200);
|
||||
} else {
|
||||
// 97-2003
|
||||
workbook = new HSSFWorkbook();
|
||||
}
|
||||
Sheet sheet = workbook.createSheet("title");
|
||||
|
||||
sheet.setColumnWidth((short)0, 10* 256);
|
||||
sheet.setColumnWidth((short)1, 15* 256);
|
||||
sheet.setColumnWidth((short)2, 15* 256);
|
||||
sheet.setColumnWidth((short)3, 15* 256);
|
||||
sheet.setColumnWidth((short)4, 15* 256);
|
||||
sheet.setColumnWidth((short)5, 15* 256);
|
||||
sheet.setColumnWidth((short)6, 20* 256);
|
||||
sheet.setColumnWidth((short)7, 20* 256);
|
||||
|
||||
CellStyle cellStyle = workbook.createCellStyle();
|
||||
CellStyle cellStyle1 = workbook.createCellStyle();
|
||||
|
||||
Font font = workbook.createFont();
|
||||
Font font1 = workbook.createFont();
|
||||
|
||||
//微软雅黑,字体10,加粗,背景灰色
|
||||
font.setFontName("微软雅黑");
|
||||
font.setFontHeight((short) 240);
|
||||
font.setBoldweight(Font.BOLDWEIGHT_BOLD);
|
||||
cellStyle.setFont(font);
|
||||
cellStyle.setAlignment(CellStyle.ALIGN_CENTER); // 指定单元格居中对齐
|
||||
cellStyle.setVerticalAlignment(CellStyle.VERTICAL_CENTER);
|
||||
cellStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
|
||||
cellStyle.setFillPattern(CellStyle.SOLID_FOREGROUND);
|
||||
cellStyle.setWrapText(true);
|
||||
cellStyle.setBorderBottom(CellStyle.BORDER_THIN); // 设置单无格的边框为粗体
|
||||
cellStyle.setBorderLeft(CellStyle.BORDER_THIN);
|
||||
cellStyle.setBorderRight(CellStyle.BORDER_THIN);
|
||||
cellStyle.setBorderTop(CellStyle.BORDER_THIN);
|
||||
|
||||
//微软雅黑,字体10,加粗,背景灰色
|
||||
font1.setFontName("微软雅黑");
|
||||
font1.setFontHeight((short) 240);
|
||||
cellStyle1.setFont(font1);
|
||||
cellStyle1.setAlignment(CellStyle.ALIGN_LEFT); // 指定单元格居中对齐
|
||||
cellStyle1.setVerticalAlignment(CellStyle.VERTICAL_CENTER);
|
||||
cellStyle1.setWrapText(true);
|
||||
cellStyle1.setBorderBottom(CellStyle.BORDER_THIN); // 设置单无格的边框为粗体
|
||||
cellStyle1.setBorderLeft(CellStyle.BORDER_THIN);
|
||||
cellStyle1.setBorderRight(CellStyle.BORDER_THIN);
|
||||
cellStyle1.setBorderTop(CellStyle.BORDER_THIN);
|
||||
|
||||
Row row = sheet.createRow(0);
|
||||
row.setHeight((short) 400);
|
||||
|
||||
for (short i = 0; i < headers.length; i++) {
|
||||
Cell cell = row.createCell(i);
|
||||
cell.setCellStyle(cellStyle);
|
||||
cell.setCellValue(headers[i]);
|
||||
}
|
||||
Iterator<T> it = list.iterator();
|
||||
int index = 0;
|
||||
while (it.hasNext()) {
|
||||
index++;
|
||||
row = sheet.createRow(index);
|
||||
row.setHeight((short) 400);
|
||||
T t = it.next();
|
||||
if(null!=t){
|
||||
for (int j = 0; j < headers.length; j++) {
|
||||
Cell cell = row.createCell(j);
|
||||
Field field = t.getClass().getDeclaredField(classNames[j]);
|
||||
field.setAccessible(true);
|
||||
Class valType = field.getType();
|
||||
cell.setCellStyle(cellStyle1);
|
||||
//数据转类型
|
||||
if("java.lang.String".equalsIgnoreCase( valType.getName())){
|
||||
cell.setCellValue((String) field.get(t));
|
||||
}else if("java.lang.Integer".equalsIgnoreCase(valType.getName())||"int".equalsIgnoreCase(valType.getName())){
|
||||
cell.setCellValue((Integer) field.get(t));
|
||||
}else if("java.lang.Double".equalsIgnoreCase(valType.getName())||"double".equalsIgnoreCase(valType.getName())){
|
||||
cell.setCellValue((Double) field.get(t)==null?0:(Double) field.get(t));
|
||||
}else if("java.lang.Long".equalsIgnoreCase(valType.getName())||"long".equalsIgnoreCase(valType.getName())){
|
||||
cell.setCellValue((Long) field.get(t)==null?0:(Long) field.get(t));
|
||||
}else if("java.util.Date".equalsIgnoreCase(valType.getName())) {
|
||||
if(null==field.get(t)){
|
||||
cell.setCellValue("");
|
||||
}else {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
|
||||
cell.setCellValue(sdf.format((Date) field.get(t)));
|
||||
}
|
||||
}
|
||||
field.setAccessible(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
workbook.write(out);
|
||||
out.flush();
|
||||
out.close();
|
||||
out = null;
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
if (out != null)
|
||||
out.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取合并单元格的值
|
||||
*
|
||||
* @param sheet
|
||||
* @param row
|
||||
* @param column
|
||||
* @return
|
||||
*/
|
||||
public static String getMergedRegionValue(Sheet sheet, int row, int column) {
|
||||
int sheetMergeCount = sheet.getNumMergedRegions();
|
||||
|
||||
for (int i = 0; i < sheetMergeCount; i++) {
|
||||
CellRangeAddress ca = sheet.getMergedRegion(i);
|
||||
int firstColumn = ca.getFirstColumn();
|
||||
int lastColumn = ca.getLastColumn();
|
||||
int firstRow = ca.getFirstRow();
|
||||
int lastRow = ca.getLastRow();
|
||||
|
||||
if (row >= firstRow && row <= lastRow) {
|
||||
|
||||
if (column >= firstColumn && column <= lastColumn) {
|
||||
Row fRow = sheet.getRow(firstRow);
|
||||
Cell fCell = fRow.getCell(firstColumn);
|
||||
return getCellValue(fCell);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断合并行
|
||||
*
|
||||
* @param sheet
|
||||
* @param row
|
||||
* @param column
|
||||
* @return
|
||||
*/
|
||||
public static boolean isMergedRow(Sheet sheet, int row, int column) {
|
||||
int sheetMergeCount = sheet.getNumMergedRegions();
|
||||
for (int i = 0; i < sheetMergeCount; i++) {
|
||||
CellRangeAddress range = sheet.getMergedRegion(i);
|
||||
int firstColumn = range.getFirstColumn();
|
||||
int lastColumn = range.getLastColumn();
|
||||
int firstRow = range.getFirstRow();
|
||||
int lastRow = range.getLastRow();
|
||||
if (row == firstRow && row == lastRow) {
|
||||
if (column >= firstColumn && column <= lastColumn) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断合并列
|
||||
*
|
||||
* @param sheet
|
||||
* @param row
|
||||
* @param column
|
||||
* @return
|
||||
*/
|
||||
public static boolean isMergedCol(Sheet sheet, int row, int column) {
|
||||
int sheetMergeCount = sheet.getNumMergedRegions();
|
||||
for (int i = 0; i < sheetMergeCount; i++) {
|
||||
CellRangeAddress range = sheet.getMergedRegion(i);
|
||||
int firstColumn = range.getFirstColumn();
|
||||
int lastColumn = range.getLastColumn();
|
||||
int firstRow = range.getFirstRow();
|
||||
int lastRow = range.getLastRow();
|
||||
if(column== firstColumn && column==lastColumn){
|
||||
if (row>=firstRow&& row<=lastRow){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断指定的单元格是否是合并单元格
|
||||
*
|
||||
* @param sheet
|
||||
* @param row
|
||||
* 行下标
|
||||
* @param column
|
||||
* 列下标
|
||||
* @return
|
||||
*/
|
||||
public static boolean isMergedRegion(Sheet sheet, int row, int column) {
|
||||
int sheetMergeCount = sheet.getNumMergedRegions();
|
||||
for (int i = 0; i < sheetMergeCount; i++) {
|
||||
CellRangeAddress range = sheet.getMergedRegion(i);
|
||||
int firstColumn = range.getFirstColumn();
|
||||
int lastColumn = range.getLastColumn();
|
||||
int firstRow = range.getFirstRow();
|
||||
int lastRow = range.getLastRow();
|
||||
if (row >= firstRow && row <= lastRow) {
|
||||
if (column >= firstColumn && column <= lastColumn) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单元格的值
|
||||
*
|
||||
* @param cell
|
||||
* @return
|
||||
*/
|
||||
public static String getCellValue(Cell cell) {
|
||||
|
||||
if (cell == null)
|
||||
return "";
|
||||
|
||||
if (cell.getCellType() == Cell.CELL_TYPE_STRING) {
|
||||
|
||||
return cell.getStringCellValue();
|
||||
|
||||
} else if (cell.getCellType() == Cell.CELL_TYPE_BOOLEAN) {
|
||||
|
||||
return String.valueOf(cell.getBooleanCellValue());
|
||||
|
||||
} else if (cell.getCellType() == Cell.CELL_TYPE_FORMULA) {
|
||||
|
||||
return cell.getCellFormula();
|
||||
|
||||
} else if (cell.getCellType() == Cell.CELL_TYPE_NUMERIC) {
|
||||
|
||||
return String.valueOf(cell.getNumericCellValue());
|
||||
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.fibo.ddp.common.model.datax.common;
|
||||
|
||||
public enum Status {
|
||||
|
||||
enable(1), disable(0), delete(-1), yes(1), no(0);
|
||||
public final int value;
|
||||
|
||||
private Status(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.fibo.ddp.common.model.datax.common;
|
||||
|
||||
public enum ValueType {
|
||||
|
||||
// 待选:0, 数值型:1, 字符型:2, 枚举型:3, 小数型:4, 数组型:5
|
||||
Unknown(0), Num(1), Char(2), Enum(3), Dec(4), Array(5);
|
||||
|
||||
public final int value;
|
||||
|
||||
private ValueType(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public int getValue(){
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.fibo.ddp.common.model.datax.consts;
|
||||
|
||||
|
||||
public class DataXCacheConst {
|
||||
//web端需要的缓存更新时间信息
|
||||
public static final String DATAX_WEB_CACHE_REDIS_KEY = "DATAX:WEB:CACHE";
|
||||
//发布订阅的key
|
||||
public static final String DATAX_PUBSUB_CACHE_REDIS_CHANNEL = "DATAX:PUBSUB:CACHE";
|
||||
//返回给前端的改变列表名
|
||||
public static final String DATAX_CACHE_CHANGE_LIST_KEY = "changeList";
|
||||
//返回给前端的缓存信息
|
||||
public static final String DATAX_CACHE_INFO_KEY = "cacheInfo";
|
||||
|
||||
public static class Type{
|
||||
public static final String[] TYPE_LIST= new String[]{Type.DATA_SOURCE, Type.MQ_SOURCE, Type.FIELD, Type.INTERFACE};
|
||||
public static final String DATA_SOURCE = "data_source";
|
||||
public static final String MQ_SOURCE = "mq_source";
|
||||
public static final String FIELD = "field";
|
||||
public static final String INTERFACE = "interface";
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.fibo.ddp.common.model.datax.datainterface;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Accessors
|
||||
@TableName("t_field_interface")
|
||||
public class InterfaceInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer id; //接口id
|
||||
|
||||
private String name; //接口名称
|
||||
|
||||
private String url; //请求地址
|
||||
|
||||
private String method; //请求方法
|
||||
|
||||
private String requestHeaders; //请求体类型
|
||||
|
||||
private String requestBody; //请求参数体
|
||||
|
||||
private String bindParam; //绑定参数
|
||||
|
||||
private String responseBody; //请求响应体
|
||||
|
||||
private Long creator; //创建者
|
||||
|
||||
private Long modifier; //修改者
|
||||
|
||||
private Long organId; //企业编号
|
||||
|
||||
private Integer status; //请求状态
|
||||
|
||||
private Date createTime; //创建时间
|
||||
|
||||
private Date updateTime; //更新时间
|
||||
|
||||
private String requestType;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String username; //用户名
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.fibo.ddp.common.model.datax.datainterface.request;
|
||||
|
||||
|
||||
import com.fibo.ddp.common.model.datax.datainterface.InterfaceInfo;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class InterfaceListParam {
|
||||
protected Integer pageNo = 1; // 第几页
|
||||
protected Integer pageSize = 10; // 每页的数量
|
||||
|
||||
|
||||
// protected Boolean search = false; // 是否搜索
|
||||
|
||||
protected InterfaceInfo interfaceInfo;//查询实体对象
|
||||
|
||||
// protected Integer parentId = 0; // 文件夹的id
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.fibo.ddp.common.model.datax.datainterface.request;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Accessors
|
||||
public class InterfaceUpdateParent {
|
||||
private Long[] ids;//规则id
|
||||
private Long parentId;//文件夹id
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.fibo.ddp.common.model.datax.datainterface.request;
|
||||
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Accessors
|
||||
public class InterfaceUpdateStatusParam {
|
||||
private Long[] ids;//userId
|
||||
private Integer status;//状态
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.fibo.ddp.common.model.datax.datainterface.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Accessors
|
||||
@TableName("t_field_interface")
|
||||
public class InterfaceVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer id; //接口id
|
||||
|
||||
private String name; //接口名称
|
||||
|
||||
private String url; //请求地址
|
||||
|
||||
private String method; //请求方法
|
||||
|
||||
private String requestHeaders; //请求体类型
|
||||
|
||||
private String requestBody; //请求参数体
|
||||
|
||||
private String bindParam; //绑定参数
|
||||
|
||||
private String responseBody; //请求响应体
|
||||
|
||||
private Long creator; //创建者
|
||||
|
||||
private Long modifier; //修改者
|
||||
|
||||
private Long organId; //企业编号
|
||||
|
||||
private Long status; //请求状态
|
||||
|
||||
private Date createTime; //创建时间
|
||||
|
||||
private Date updateTime; //更新时间
|
||||
|
||||
private String requestType;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String username; //用户名
|
||||
|
||||
@TableField(exist = false)
|
||||
private String creatorName; //创建者姓名
|
||||
|
||||
@TableField(exist = false)
|
||||
private String modifierName; //修改者姓名
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,236 @@
|
||||
package com.fibo.ddp.common.model.datax.datamanage;
|
||||
|
||||
import com.fibo.ddp.common.model.common.BasePage;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class CustList extends BasePage implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
* */
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 以下20个t开头为匿名字段
|
||||
* */
|
||||
private String t0;
|
||||
private String t1;
|
||||
private String t2;
|
||||
private String t3;
|
||||
private String t4;
|
||||
private String t5;
|
||||
private String t6;
|
||||
private String t7;
|
||||
private String t8;
|
||||
private String t9;
|
||||
private String t10;
|
||||
private String t11;
|
||||
private String t12;
|
||||
private String t13;
|
||||
private String t14;
|
||||
private String t15;
|
||||
private String t16;
|
||||
private String t17;
|
||||
private String t18;
|
||||
private String t19;
|
||||
|
||||
/**
|
||||
* 创建人编号
|
||||
* */
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 创建人昵称
|
||||
* */
|
||||
private String nickName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
* */
|
||||
private Date created;
|
||||
|
||||
/**
|
||||
* 检索客户信息是否存在的定制条件
|
||||
*/
|
||||
private String checkCol;
|
||||
|
||||
/**
|
||||
* 检索名单库的表名称
|
||||
*/
|
||||
private String tableName;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
public String getT0() {
|
||||
return t0;
|
||||
}
|
||||
public void setT0(String t0) {
|
||||
this.t0 = t0;
|
||||
}
|
||||
public String getT1() {
|
||||
return t1;
|
||||
}
|
||||
public void setT1(String t1) {
|
||||
this.t1 = t1;
|
||||
}
|
||||
public String getT2() {
|
||||
return t2;
|
||||
}
|
||||
public void setT2(String t2) {
|
||||
this.t2 = t2;
|
||||
}
|
||||
public String getT3() {
|
||||
return t3;
|
||||
}
|
||||
public void setT3(String t3) {
|
||||
this.t3 = t3;
|
||||
}
|
||||
public String getT4() {
|
||||
return t4;
|
||||
}
|
||||
public void setT4(String t4) {
|
||||
this.t4 = t4;
|
||||
}
|
||||
public String getT5() {
|
||||
return t5;
|
||||
}
|
||||
public void setT5(String t5) {
|
||||
this.t5 = t5;
|
||||
}
|
||||
public String getT6() {
|
||||
return t6;
|
||||
}
|
||||
public void setT6(String t6) {
|
||||
this.t6 = t6;
|
||||
}
|
||||
public String getT7() {
|
||||
return t7;
|
||||
}
|
||||
public void setT7(String t7) {
|
||||
this.t7 = t7;
|
||||
}
|
||||
public String getT8() {
|
||||
return t8;
|
||||
}
|
||||
public void setT8(String t8) {
|
||||
this.t8 = t8;
|
||||
}
|
||||
public String getT9() {
|
||||
return t9;
|
||||
}
|
||||
public void setT9(String t9) {
|
||||
this.t9 = t9;
|
||||
}
|
||||
public String getT10() {
|
||||
return t10;
|
||||
}
|
||||
public void setT10(String t10) {
|
||||
this.t10 = t10;
|
||||
}
|
||||
public String getT11() {
|
||||
return t11;
|
||||
}
|
||||
public void setT11(String t11) {
|
||||
this.t11 = t11;
|
||||
}
|
||||
public String getT12() {
|
||||
return t12;
|
||||
}
|
||||
public void setT12(String t12) {
|
||||
this.t12 = t12;
|
||||
}
|
||||
public String getT13() {
|
||||
return t13;
|
||||
}
|
||||
public void setT13(String t13) {
|
||||
this.t13 = t13;
|
||||
}
|
||||
public String getT14() {
|
||||
return t14;
|
||||
}
|
||||
public void setT14(String t14) {
|
||||
this.t14 = t14;
|
||||
}
|
||||
public String getT15() {
|
||||
return t15;
|
||||
}
|
||||
public void setT15(String t15) {
|
||||
this.t15 = t15;
|
||||
}
|
||||
public String getT16() {
|
||||
return t16;
|
||||
}
|
||||
public void setT16(String t16) {
|
||||
this.t16 = t16;
|
||||
}
|
||||
public String getT17() {
|
||||
return t17;
|
||||
}
|
||||
public void setT17(String t17) {
|
||||
this.t17 = t17;
|
||||
}
|
||||
public String getT18() {
|
||||
return t18;
|
||||
}
|
||||
public void setT18(String t18) {
|
||||
this.t18 = t18;
|
||||
}
|
||||
public String getT19() {
|
||||
return t19;
|
||||
}
|
||||
public void setT19(String t19) {
|
||||
this.t19 = t19;
|
||||
}
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
public Date getCreated() {
|
||||
return created;
|
||||
}
|
||||
public void setCreated(Date created) {
|
||||
this.created = created;
|
||||
}
|
||||
public String getNickName() {
|
||||
return nickName;
|
||||
}
|
||||
public void setNickName(String nickName) {
|
||||
this.nickName = nickName;
|
||||
}
|
||||
public String getCheckCol() {
|
||||
return checkCol;
|
||||
}
|
||||
public void setCheckCol(String checkCol) {
|
||||
this.checkCol = checkCol;
|
||||
}
|
||||
public String getTableName() {
|
||||
return tableName;
|
||||
}
|
||||
public void setTableName(String tableName) {
|
||||
this.tableName = tableName;
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CustList [userId=" + id + ", t0=" + t0 + ", t1=" + t1 + ", t2=" + t2
|
||||
+ ", t3=" + t3 + ", t4=" + t4 + ", t5=" + t5 + ", t6=" + t6
|
||||
+ ", t7=" + t7 + ", t8=" + t8 + ", t9=" + t9 + ", t10=" + t10
|
||||
+ ", t11=" + t11 + ", t12=" + t12 + ", t13=" + t13 + ", t14="
|
||||
+ t14 + ", t15=" + t15 + ", t16=" + t16 + ", t17=" + t17
|
||||
+ ", t18=" + t18 + ", t19=" + t19 + ", userId=" + userId
|
||||
+ ", nickName=" + nickName + ", created=" + created
|
||||
+ ", checkCol=" + checkCol + ", tableName=" + tableName + "]";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,222 @@
|
||||
package com.fibo.ddp.common.model.datax.datamanage;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fibo.ddp.common.model.common.BasePage;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@TableName("t_field")
|
||||
public class Field extends BasePage implements Serializable {
|
||||
private static final long serialVersionUID = 7113453776727511877L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
* */
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 字段英文名
|
||||
* */
|
||||
private String fieldEn;
|
||||
|
||||
/**
|
||||
* 字段中文名
|
||||
* */
|
||||
private String fieldCn;
|
||||
|
||||
/**
|
||||
* 字段类型编号
|
||||
* */
|
||||
@TableField("field_typeid")
|
||||
private Long fieldTypeId;
|
||||
|
||||
/**
|
||||
* 字段类型名
|
||||
* */
|
||||
@TableField(exist = false)
|
||||
private String fieldType;
|
||||
|
||||
/**
|
||||
* 字段存值类型
|
||||
* */
|
||||
private Integer valueType;
|
||||
|
||||
/**
|
||||
* 字段存值类型中文
|
||||
* */
|
||||
@TableField(exist = false)
|
||||
private String valueTypeName;
|
||||
|
||||
/**
|
||||
* 字段约束范围
|
||||
* */
|
||||
private String valueScope;
|
||||
|
||||
/**
|
||||
* 是否衍生字段
|
||||
* */
|
||||
private Integer isDerivative;
|
||||
|
||||
/**
|
||||
* 是否衍生字段
|
||||
* */
|
||||
@TableField(exist = false)
|
||||
private String isDerivativeName;
|
||||
|
||||
/**
|
||||
* 是否输出字段
|
||||
* */
|
||||
private Integer isOutput;
|
||||
|
||||
/**
|
||||
* 是否输出字段
|
||||
* */
|
||||
@TableField(exist = false)
|
||||
private String isOutputName;
|
||||
|
||||
/**
|
||||
* 是否组织定义的通用字段
|
||||
* */
|
||||
private Integer isCommon;
|
||||
|
||||
/**
|
||||
* 衍生字段公式
|
||||
* */
|
||||
private String formula;
|
||||
|
||||
/**
|
||||
* 衍生字段公式回显信息
|
||||
* */
|
||||
private String formulaShow;
|
||||
|
||||
/**
|
||||
* 衍生字段引用的字段id
|
||||
* */
|
||||
@TableField("used_fieldid")
|
||||
private String usedFieldId;
|
||||
|
||||
/**
|
||||
* 衍生字段引用的原生字段id
|
||||
* */
|
||||
@TableField("orig_fieldid")
|
||||
private String origFieldId;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
* */
|
||||
private Long author;
|
||||
|
||||
/**
|
||||
* 创建人昵称
|
||||
* */
|
||||
@TableField(exist = false)
|
||||
private String nickName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
* */
|
||||
private Date created;
|
||||
|
||||
/**
|
||||
* 归属的引擎ID
|
||||
* */
|
||||
@TableField(exist = false)
|
||||
private Long engineId;
|
||||
|
||||
/**
|
||||
* 归属的引擎名称
|
||||
* */
|
||||
@TableField(exist = false)
|
||||
private String engineName;
|
||||
|
||||
/**
|
||||
* 字段状态(启用、停用、删除、未知)
|
||||
* */
|
||||
@TableField(exist = false)
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 字段条件设置集合
|
||||
* */
|
||||
@TableField(exist = false)
|
||||
private List<FieldCond> fieldCondList;
|
||||
|
||||
/**
|
||||
* 字段用户关系编号
|
||||
* */
|
||||
@TableField(exist = false)
|
||||
private Long fieldRelId;
|
||||
|
||||
/**
|
||||
* 是否使用sql获取指标
|
||||
*/
|
||||
private Boolean isUseSql;
|
||||
|
||||
/**
|
||||
* 使用sql获取指标时对应的数据源
|
||||
*/
|
||||
private Integer dataSourceId;
|
||||
|
||||
/**
|
||||
* 使用sql获取指标时对应的sql语句
|
||||
*/
|
||||
private String sqlStatement;
|
||||
|
||||
/**
|
||||
* sql变量配置
|
||||
*/
|
||||
private String sqlVariable;
|
||||
|
||||
/**
|
||||
* 是否使用接口
|
||||
*/
|
||||
private Boolean isInterface;
|
||||
|
||||
/**
|
||||
* 接口id
|
||||
*/
|
||||
private Integer interfaceId;
|
||||
|
||||
/**
|
||||
* 接口解析指标
|
||||
*/
|
||||
private String interfaceParseField;
|
||||
|
||||
/**
|
||||
* json类型对应的json值
|
||||
*/
|
||||
private String jsonValue;
|
||||
/**
|
||||
* 字典变量例如 日期:date
|
||||
*/
|
||||
private String dictVariable;
|
||||
|
||||
/**
|
||||
* 该字段归属的组织编号
|
||||
* */
|
||||
private Long organId;
|
||||
|
||||
/**
|
||||
* 指标类型
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 指标源类型
|
||||
*/
|
||||
private Integer sourceType;
|
||||
|
||||
/**
|
||||
* 消息队列源id
|
||||
*/
|
||||
private Long mqSourceId;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.fibo.ddp.common.model.datax.datamanage;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class FieldCall extends Field {
|
||||
private Long callCount;
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.fibo.ddp.common.model.datax.datamanage;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* (FieldCallLog)实体类
|
||||
*
|
||||
* @author jgp
|
||||
* @since 2021-12-08 14:18:29
|
||||
*/
|
||||
@Data
|
||||
@TableName("t_field_call_log")
|
||||
public class FieldCallLog implements Serializable {
|
||||
private static final long serialVersionUID = -22326067411898498L;
|
||||
/**
|
||||
* 自增主键
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
/**
|
||||
* 指标id
|
||||
*/
|
||||
private Long fieldId;
|
||||
/**
|
||||
* 指标类型
|
||||
*/
|
||||
private String fieldType;
|
||||
/**
|
||||
* 数据源类型
|
||||
*/
|
||||
private String sourceType;
|
||||
/**
|
||||
* 数据源或者接口源的id
|
||||
*/
|
||||
private Long sourceId;
|
||||
/**
|
||||
* 入参
|
||||
*/
|
||||
private String inputParam;
|
||||
/**
|
||||
* 获取到的指标值
|
||||
*/
|
||||
private String fieldValue;
|
||||
/**
|
||||
* 组织id
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Long organId;
|
||||
/**
|
||||
* 消耗时长,单位:毫秒
|
||||
*/
|
||||
private Long duration;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
public FieldCallLog(Long fieldId, String fieldType,String sourceType,Long sourceId, String inputParam, String fieldValue, Long duration, Long organId) {
|
||||
this.fieldId = fieldId;
|
||||
this.fieldType = fieldType;
|
||||
this.sourceType = sourceType;
|
||||
this.sourceId = sourceId;
|
||||
this.inputParam = inputParam;
|
||||
this.fieldValue = fieldValue;
|
||||
this.duration = duration;
|
||||
this.organId = organId;
|
||||
this.createTime = new Date();
|
||||
this.updateTime = new Date();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.fibo.ddp.common.model.datax.datamanage;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fibo.ddp.common.model.common.BasePage;
|
||||
import com.fibo.ddp.common.model.datax.datamanage.vo.FieldSubCondVo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@TableName("t_field_condition")
|
||||
public class FieldCond extends BasePage implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 条件编号
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 字段编号
|
||||
*/
|
||||
private Long fieldId;
|
||||
|
||||
/**
|
||||
* 字段条件值
|
||||
*/
|
||||
private String conditionValue;
|
||||
|
||||
/**
|
||||
* 字段条件区域设置json格式
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 条件字段编号
|
||||
*/
|
||||
private Long condFieldId;
|
||||
|
||||
/**
|
||||
* 条件字段的运算符
|
||||
*/
|
||||
private String condFieldOperator;
|
||||
|
||||
/**
|
||||
* 条件字段的条件设置值
|
||||
*/
|
||||
private String condFieldValue;
|
||||
|
||||
/**
|
||||
* 条件字段间的逻辑符
|
||||
*/
|
||||
private String condFieldLogical;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date created;
|
||||
@TableField(exist = false)
|
||||
private List<FieldSubCondVo> fieldSubCond;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.fibo.ddp.common.model.datax.datamanage;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fibo.ddp.common.model.common.BasePage;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@TableName("t_field_type")
|
||||
public class FieldType extends BasePage implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 字段类型名
|
||||
*/
|
||||
private String fieldType;
|
||||
|
||||
/**
|
||||
* 父节点编号
|
||||
*/
|
||||
private Integer parentId;
|
||||
|
||||
/**
|
||||
* 是否组织定义的通用字段类型
|
||||
*/
|
||||
private Integer isCommon;
|
||||
|
||||
private Integer type;
|
||||
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
* 字段类型的子类集合
|
||||
*/
|
||||
private FieldType[] children;
|
||||
|
||||
/**
|
||||
* 是否为父类
|
||||
*/
|
||||
private String isParent = "true";
|
||||
|
||||
/**
|
||||
* 引擎编号
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Integer engineId;
|
||||
|
||||
/**
|
||||
* 文件夹图片路径
|
||||
*/
|
||||
private String icon;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.fibo.ddp.common.model.datax.datamanage;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fibo.ddp.common.model.common.BasePage;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("t_field_type_user_rel")
|
||||
public class FieldTypeUser extends BasePage implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
* */
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 字段类型编号(表主键)
|
||||
* */
|
||||
private Long fieldTypeId;
|
||||
|
||||
/**
|
||||
* 该字段类型归属的组织编号
|
||||
* */
|
||||
private Long organId;
|
||||
|
||||
/**
|
||||
* 该字段类型归属的引擎id(表主键)
|
||||
* */
|
||||
private Long engineId;
|
||||
|
||||
/**
|
||||
* 创建或修改该字段的用户编号
|
||||
* */
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
* */
|
||||
private Date created;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.fibo.ddp.common.model.datax.datamanage;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fibo.ddp.common.model.common.BasePage;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("t_field_user_rel")
|
||||
public class FieldUser extends BasePage implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
* */
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 字段编号(表主键)
|
||||
* */
|
||||
private Long fieldId;
|
||||
|
||||
/**
|
||||
* 该字段归属的组织编号
|
||||
* */
|
||||
private Long organId;
|
||||
|
||||
/**
|
||||
* 该字段归属的引擎id(表主键)
|
||||
* */
|
||||
private Long engineId;
|
||||
|
||||
/**
|
||||
* 创建或修改该字段的用户编号
|
||||
* */
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 启用停用删除标志
|
||||
* */
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
* */
|
||||
private Date created;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
* */
|
||||
private Date updated;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.fibo.ddp.common.model.datax.datamanage.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class FieldCallParam {
|
||||
private Long organId;
|
||||
private Date queryTimeStart;
|
||||
private Date queryTimeEnd;
|
||||
private Integer fieldType;
|
||||
private String searchKey;
|
||||
private Long fieldId;
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.fibo.ddp.common.model.datax.datamanage.request;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class FieldSaveParam implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// http://47.102.125.25/apidoc/index.html#api-field-PostV2DatamanageFieldSave
|
||||
|
||||
private String searchKey; //
|
||||
private Long id;
|
||||
private String formula;
|
||||
private String formulaShow;
|
||||
private Long engineId;
|
||||
private String fieldEn;
|
||||
private String fieldCn;
|
||||
private Long fieldTypeId;
|
||||
private Integer valueType;
|
||||
private Integer isDerivative;
|
||||
private Integer isOutput;
|
||||
private String valueScope;
|
||||
private String fieldCondList; //
|
||||
private String formulaHidden; //
|
||||
private Boolean isUseSql;
|
||||
private Integer dataSourceId;
|
||||
private String sqlStatement;
|
||||
private String sqlVariable;
|
||||
private Boolean isInterface;
|
||||
private Integer interfaceId;
|
||||
private String interfaceParseField;
|
||||
private String jsonValue;
|
||||
private String dictVariable;
|
||||
private Integer sourceType;
|
||||
private Long mqSourceId;
|
||||
|
||||
//
|
||||
// public Field toField() {
|
||||
// Field datamanage = new Field();
|
||||
//
|
||||
// datamanage.setUserId(this.getUserId());
|
||||
// datamanage.setFormula(this.getFormula());
|
||||
// datamanage.setFormulaShow(this.getFormulaShow());
|
||||
// datamanage.setEngineId(this.getEngineId());
|
||||
// datamanage.setFieldEn(this.getFieldEn());
|
||||
// datamanage.setFieldCn(this.getFieldCn());
|
||||
// datamanage.setFieldTypeId(this.getFieldTypeId());
|
||||
// datamanage.setValueType(this.getValueType());
|
||||
// datamanage.setIsDerivative(this.getIsDerivative());
|
||||
// datamanage.setIsOutput(this.getIsOutput());
|
||||
// datamanage.setValueScope(this.getValueScope());
|
||||
//
|
||||
// datamanage.setUseSql(this.getIsUseSql());
|
||||
// datamanage.setDataSourceId(this.getDataSourceId());
|
||||
// datamanage.setSqlStatement(this.getSqlStatement());
|
||||
//
|
||||
// return datamanage;
|
||||
// }
|
||||
//
|
||||
// public Map toMap() {
|
||||
// HashMap<String, Object> hashMap = new HashMap<>();
|
||||
// hashMap.put("searchKey", this.getSearchKey());
|
||||
// hashMap.put("userId", this.getUserId());
|
||||
// hashMap.put("formula", this.getFormula());
|
||||
// hashMap.put("formulaShow", this.getFormulaShow());
|
||||
// hashMap.put("engineId", this.getEngineId());
|
||||
// hashMap.put("formulaFields", this.getFormulaFields());
|
||||
// hashMap.put("fieldEn", this.getFieldEn());
|
||||
// hashMap.put("fieldCn", this.getFieldCn());
|
||||
// hashMap.put("fieldTypeId", this.getFieldId());
|
||||
// hashMap.put("valueType", this.getValueType());
|
||||
// hashMap.put("isDerivative", this.getIsDerivative());
|
||||
// hashMap.put("isOutput", this.getIsOutput());
|
||||
// hashMap.put("valueScope", this.getValueScope());
|
||||
// hashMap.put("fieldContent", this.getFieldContent());
|
||||
// hashMap.put("formulaHidden", this.getFormulaHidden());
|
||||
// hashMap.put("derType", this.getDerType());
|
||||
// hashMap.put("fieldContent2", this.getFieldContent2());
|
||||
// hashMap.put("conditionValue", this.getConditionValue());
|
||||
// hashMap.put("fieldId", this.getFieldId());
|
||||
// hashMap.put("operator", this.getOperator());
|
||||
// hashMap.put("fieldValue", this.getFieldValue());
|
||||
// hashMap.put("idx", this.getIdx());
|
||||
//
|
||||
// hashMap.put("isUseSql", this.getIsUseSql());
|
||||
// hashMap.put("dataSourceId", this.getDataSourceId());
|
||||
// hashMap.put("sqlStatement", this.getSqlStatement());
|
||||
//
|
||||
// return hashMap;
|
||||
// }
|
||||
//
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.fibo.ddp.common.model.datax.datamanage.request;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class FieldTreeParam {
|
||||
//获取需要
|
||||
private Integer type;//指标类型 1. 基础指标 2. sql指标 3.衍生指标 4.接口指标
|
||||
//删除需要
|
||||
private Long id;//文件夹的id
|
||||
private String fieldType;//文件夹名字
|
||||
private Integer status;//状态 -1 删除
|
||||
//新建时需要
|
||||
private String parentId;//上层文件夹id
|
||||
private Integer isCommon;//
|
||||
|
||||
private Long organId;//指标相关的组织id
|
||||
private Long userId;//用户id
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.fibo.ddp.common.model.datax.datamanage.vo;
|
||||
|
||||
import com.fibo.ddp.common.model.datax.datamanage.Field;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 字段枚举包装类
|
||||
* 主要用于决策选项中,选择字段要加载字段对应的枚举值(如果字段是枚举的话)
|
||||
*/
|
||||
public class FieldEnumVo {
|
||||
|
||||
private Field field;
|
||||
|
||||
private List<String> enums;
|
||||
|
||||
public Field getField() {
|
||||
return field;
|
||||
}
|
||||
|
||||
public void setField(Field field) {
|
||||
this.field = field;
|
||||
}
|
||||
|
||||
public List<String> getEnums() {
|
||||
return enums;
|
||||
}
|
||||
|
||||
public void setEnums(List<String> enums) {
|
||||
this.enums = enums;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.fibo.ddp.common.model.datax.datamanage.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class FieldFormulaVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// [{fvalue: "0",formula: "a",farr: [{fieldCN:"引擎字段1-1",fieldCond:[{"inputOne":"c","inputThree":"5"},{"inputOne":"b","inputThree":"12"}]},{fieldCN:"通用字段2贷前",fieldCond:[{"inputOne":"(30,40]","inputThree":"5"},{"inputOne":"[45,51)","inputThree":"12"}]}]}];
|
||||
|
||||
/**
|
||||
* 衍生字段公式设置对应的值
|
||||
* */
|
||||
private String fvalue;
|
||||
|
||||
/**
|
||||
* 衍生字段公式
|
||||
* */
|
||||
private String formula;
|
||||
|
||||
/**
|
||||
* 衍生字段公式里字段的条件区域设置
|
||||
* */
|
||||
private Integer idx;
|
||||
|
||||
/**
|
||||
* 衍生字段公式里字段的条件区域设置
|
||||
* */
|
||||
private String farr;
|
||||
|
||||
/**
|
||||
* 衍生字段公式里条件区域设置的某个字段中文名
|
||||
* */
|
||||
private String fieldCN;
|
||||
|
||||
/**
|
||||
* 衍生字段公式里条件区域设置的某个字段的具体设置
|
||||
* */
|
||||
private String fieldCond;
|
||||
|
||||
public String getFvalue() {
|
||||
return fvalue;
|
||||
}
|
||||
|
||||
public void setFvalue(String fvalue) {
|
||||
this.fvalue = fvalue;
|
||||
}
|
||||
|
||||
public String getFormula() {
|
||||
return formula;
|
||||
}
|
||||
|
||||
public void setFormula(String formula) {
|
||||
this.formula = formula;
|
||||
}
|
||||
|
||||
public Integer getIdx() {
|
||||
return idx;
|
||||
}
|
||||
|
||||
public void setIdx(Integer idx) {
|
||||
this.idx = idx;
|
||||
}
|
||||
|
||||
public String getFarr() {
|
||||
return farr;
|
||||
}
|
||||
|
||||
public void setFarr(String farr) {
|
||||
this.farr = farr;
|
||||
}
|
||||
|
||||
public String getFieldCN() {
|
||||
return fieldCN;
|
||||
}
|
||||
|
||||
public void setFieldCN(String fieldCN) {
|
||||
this.fieldCN = fieldCN;
|
||||
}
|
||||
|
||||
public String getFieldCond() {
|
||||
return fieldCond;
|
||||
}
|
||||
|
||||
public void setFieldCond(String fieldCond) {
|
||||
this.fieldCond = fieldCond;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
package com.fibo.ddp.common.model.datax.datamanage.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class FieldSubCondVo implements Serializable{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
//[{"fieldId":"43","operator":"in","fieldValue":"b","logical":"and"}]
|
||||
|
||||
/**
|
||||
* 条件字段编号
|
||||
* */
|
||||
private Integer fieldId;
|
||||
|
||||
/**
|
||||
* 条件字段的运算符
|
||||
* */
|
||||
private String operator;
|
||||
|
||||
/**
|
||||
* 条件字段的条件设置值
|
||||
* */
|
||||
private String fieldValue;
|
||||
|
||||
/**
|
||||
* 条件字段间的逻辑符
|
||||
* */
|
||||
private String logical;
|
||||
|
||||
/**
|
||||
* 条件字段的值类型
|
||||
* */
|
||||
private Integer valueType;
|
||||
|
||||
/**
|
||||
* 条件字段的取值范围
|
||||
* */
|
||||
private String valueScope;
|
||||
|
||||
/**
|
||||
* 条件字段的取值范围拆解后的数组
|
||||
* */
|
||||
private String[] values;
|
||||
|
||||
/**
|
||||
* 条件字段的字段名
|
||||
*/
|
||||
private String fieldCn;
|
||||
|
||||
|
||||
public Integer getFieldId() {
|
||||
return fieldId;
|
||||
}
|
||||
public void setFieldId(Integer fieldId) {
|
||||
this.fieldId = fieldId;
|
||||
}
|
||||
public String getOperator() {
|
||||
return operator;
|
||||
}
|
||||
public void setOperator(String operator) {
|
||||
this.operator = operator;
|
||||
}
|
||||
public String getFieldValue() {
|
||||
return fieldValue;
|
||||
}
|
||||
public void setFieldValue(String fieldValue) {
|
||||
this.fieldValue = fieldValue;
|
||||
}
|
||||
public String getLogical() {
|
||||
return logical;
|
||||
}
|
||||
public void setLogical(String logical) {
|
||||
this.logical = logical;
|
||||
}
|
||||
public Integer getValueType() {
|
||||
return valueType;
|
||||
}
|
||||
public void setValueType(Integer valueType) {
|
||||
this.valueType = valueType;
|
||||
}
|
||||
public String getValueScope() {
|
||||
return valueScope;
|
||||
}
|
||||
public void setValueScope(String valueScope) {
|
||||
this.valueScope = valueScope;
|
||||
}
|
||||
public String[] getValues() {
|
||||
if(valueType == 3){
|
||||
values = valueScope.split(",");
|
||||
}else{
|
||||
values = new String[]{valueScope};
|
||||
}
|
||||
return values;
|
||||
}
|
||||
public void setValues(String[] values) {
|
||||
this.values = values;
|
||||
}
|
||||
public String getFieldCn() {
|
||||
return fieldCn;
|
||||
}
|
||||
public void setFieldCn(String fieldCn) {
|
||||
this.fieldCn = fieldCn;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package com.fibo.ddp.common.model.datax.datasource;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("t_field_data_source")
|
||||
public class DataSource implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 连接名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 数据源类型:MySQL、Oracle、SQLServer、Hive、Spark、Redis
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 主机地址
|
||||
*/
|
||||
private String host;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 端口
|
||||
*/
|
||||
private String port;
|
||||
|
||||
/**
|
||||
* 数据库名称
|
||||
*/
|
||||
private String dbName;
|
||||
|
||||
/**
|
||||
* 状态 0:无效,1:有效
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private Long modifier;
|
||||
|
||||
/**
|
||||
* 企业编号
|
||||
*/
|
||||
private Long organId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 连接地址
|
||||
*/
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* spark路径
|
||||
*/
|
||||
private String sparkHome;
|
||||
|
||||
/**
|
||||
* spark应用程序的名称
|
||||
*/
|
||||
private String appName;
|
||||
|
||||
/**
|
||||
* spark地址
|
||||
*/
|
||||
private String masterUrl;
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.fibo.ddp.common.model.datax.datasource;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* (MqSource)实体类
|
||||
*
|
||||
* @author jgp
|
||||
* @since 2021-12-20 13:31:51
|
||||
*/
|
||||
@Data
|
||||
@TableName("t_field_mq_source")
|
||||
public class MqSource implements Serializable {
|
||||
private static final long serialVersionUID = 775853739970128659L;
|
||||
/**
|
||||
* 自增主键
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
/**
|
||||
* 消息队列连接名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 消息队列类型:kafka
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 连接地址
|
||||
*/
|
||||
private String serverAddrs;
|
||||
/**
|
||||
* 数据库地址
|
||||
*/
|
||||
private String topic;
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
private String groupId;
|
||||
/**
|
||||
* offset设置:earliest,latest,none
|
||||
*/
|
||||
private String autoOffsetReset;
|
||||
/**
|
||||
* 自动提交0:false 1:true
|
||||
*/
|
||||
private Boolean enableAutoCommit;
|
||||
/**
|
||||
* 超时时间
|
||||
*/
|
||||
private Long timeout;
|
||||
/**
|
||||
* 自动提交延时
|
||||
*/
|
||||
private Long autoCommitInterval;
|
||||
/**
|
||||
* 消费线程数
|
||||
*/
|
||||
private Integer concurrency;
|
||||
/**
|
||||
* key解析器默认:StringDeserializer
|
||||
*/
|
||||
private String keyDeserializer;
|
||||
/**
|
||||
* value解码器默认:StringDeserializer
|
||||
*/
|
||||
private String valueDeserializer;
|
||||
/**
|
||||
* 消息体
|
||||
*/
|
||||
private String messageBody;
|
||||
/**
|
||||
* 状态 0:无效,1:有效,-1删除
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Long creator;
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private Long modifier;
|
||||
/**
|
||||
* 企业编号
|
||||
*/
|
||||
private Long organId;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.fibo.ddp.common.model.datax.datasource.request;
|
||||
|
||||
|
||||
import com.fibo.ddp.common.model.common.PageDto;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class DataSourceListParam extends PageDto {
|
||||
|
||||
/**
|
||||
* 数据源类型
|
||||
*/
|
||||
private List<String> typeList;
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.fibo.ddp.common.model.datax.datasource.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class DataSourceVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 连接名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 数据源类型:MySQL、Oracle、SQLServer、Hive、Spark、Redis
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 主机地址
|
||||
*/
|
||||
private String host;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 端口
|
||||
*/
|
||||
private String port;
|
||||
|
||||
/**
|
||||
* 数据库名称
|
||||
*/
|
||||
private String dbName;
|
||||
|
||||
/**
|
||||
* 状态 0:无效,1:有效
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Integer creator;
|
||||
|
||||
/**
|
||||
* 创建人名称
|
||||
*/
|
||||
private String creatorName;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private Integer modifier;
|
||||
|
||||
/**
|
||||
* 修改人名称
|
||||
*/
|
||||
private String modifierName;
|
||||
|
||||
/**
|
||||
* 企业编号
|
||||
*/
|
||||
private Integer organId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 连接地址
|
||||
*/
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* spark路径
|
||||
*/
|
||||
private String sparkHome;
|
||||
|
||||
/**
|
||||
* spark应用程序的名称
|
||||
*/
|
||||
private String appName;
|
||||
|
||||
/**
|
||||
* spark地址
|
||||
*/
|
||||
private String masterUrl;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.fibo.ddp.common.model.datax.home;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class BusinessCallVo {
|
||||
private String dayTime;
|
||||
private Integer useNum;
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.fibo.ddp.common.model.enginex.dataflow;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* (EngineVersionContent)实体类
|
||||
*
|
||||
* @author jgp
|
||||
* @since 2021-12-23 10:21:07
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("t_engine_version_content")
|
||||
public class EngineVersionContent implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 501475813219875839L;
|
||||
|
||||
/**
|
||||
* 引擎版本id
|
||||
*/
|
||||
@TableId(type = IdType.INPUT)
|
||||
private Long engineVersionId;
|
||||
/**
|
||||
* 引擎类型
|
||||
*/
|
||||
private String engineType;
|
||||
/**
|
||||
* 引擎内容
|
||||
*/
|
||||
private String engineContent;
|
||||
/**
|
||||
* 引擎执行内容
|
||||
*/
|
||||
private String engineScript;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 修改人id
|
||||
*/
|
||||
private Long updateUserId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.fibo.ddp.common.model.enginex.dataflow.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.checkerframework.checker.units.qual.A;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class DataFlowEngineContentVo {
|
||||
/**
|
||||
* 资源id
|
||||
*/
|
||||
private Long sourceId = 0L;
|
||||
/**
|
||||
* 节点列表
|
||||
*/
|
||||
private List<DataFlowNodeVo> nodeList = new ArrayList<>();
|
||||
/**
|
||||
* 事件匹配处理
|
||||
*/
|
||||
private EventDispose eventDispose = new EventDispose("","",new HashMap<>());
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.fibo.ddp.common.model.enginex.dataflow.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.fibo.ddp.common.model.strategyx.baserule.BaseRule;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DataFlowNodeVo {
|
||||
/**
|
||||
* 节点名
|
||||
*/
|
||||
private String nodeName;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String nodeType;
|
||||
/**
|
||||
* 规则部分
|
||||
*/
|
||||
private BaseRule baseRule;
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long baseRuleId;
|
||||
/**
|
||||
* 时间值
|
||||
*/
|
||||
private Long fixedValue;
|
||||
/**
|
||||
* 时间单位
|
||||
*/
|
||||
private String timeUnit;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.fibo.ddp.common.model.enginex.dataflow.vo;
|
||||
|
||||
import com.fibo.ddp.common.model.enginex.dataflow.EngineVersionContent;
|
||||
import com.fibo.ddp.common.model.enginex.marketing.vo.MarketingEngineContentVo;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class EngineVersionContentVo extends EngineVersionContent {
|
||||
/**
|
||||
* 数据流引擎参数
|
||||
*/
|
||||
private DataFlowEngineContentVo dataFlowEngineContentVo;
|
||||
|
||||
/**
|
||||
* 营销引擎参数
|
||||
*/
|
||||
private MarketingEngineContentVo marketingEngineContentVo;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.fibo.ddp.common.model.enginex.dataflow.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class EventDispose {
|
||||
/**
|
||||
* 触达方式 Sms、App、WebHook、WeChat
|
||||
*/
|
||||
private String touchType ;
|
||||
/**
|
||||
* 模板编码
|
||||
*/
|
||||
private String templateCode;
|
||||
/**
|
||||
* 变量配置
|
||||
*/
|
||||
private Map<String, String> params ;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.fibo.ddp.common.model.enginex.marketing.dto;
|
||||
|
||||
import com.fibo.ddp.common.model.strategyx.baserule.BaseRule;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 受众用户节点dto
|
||||
*/
|
||||
@Data
|
||||
public class AudienceNodeDto implements Serializable {
|
||||
private static final long serialVersionUID = 1546466126108481180L;
|
||||
/**
|
||||
* 节点id
|
||||
*/
|
||||
private Long nodeId;
|
||||
/**
|
||||
* 受众用户需要满足的条件
|
||||
*/
|
||||
private BaseRule baseRule;
|
||||
/**
|
||||
* 条件id
|
||||
*/
|
||||
private Long baseRuleId;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.fibo.ddp.common.model.enginex.marketing.dto;
|
||||
|
||||
import com.fibo.ddp.common.model.strategyx.baserule.BaseRule;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 目标设置节点dto
|
||||
*/
|
||||
@Data
|
||||
public class TargetSettingNodeDto implements Serializable {
|
||||
private static final long serialVersionUID = -2245329320399100660L;
|
||||
/**
|
||||
* 节点id
|
||||
*/
|
||||
private Long nodeId;
|
||||
/**
|
||||
* 首要目标
|
||||
*/
|
||||
// 目标时间
|
||||
private int primaryTime;
|
||||
// 目标时间对应的单位(分钟、小时、天)
|
||||
private String primaryTimeUnit;
|
||||
// 目标对应的条件
|
||||
private BaseRule primaryRule;
|
||||
// 条件id
|
||||
private Long primaryRuleId;
|
||||
|
||||
/**
|
||||
* 次要目标(选填)
|
||||
*/
|
||||
// 目标时间
|
||||
private int secondaryTime;
|
||||
// 目标时间对应的单位(分钟、小时、天)
|
||||
private String secondaryTimeUnit;
|
||||
// 目标对应的条件
|
||||
private BaseRule secondaryRule;
|
||||
// 条件id
|
||||
private Long secondaryRuleId;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.fibo.ddp.common.model.enginex.marketing.dto;
|
||||
|
||||
import com.fibo.ddp.common.model.strategyx.baserule.BaseRule;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 触达配置节点dto
|
||||
*/
|
||||
@Data
|
||||
public class TouchConfigNodeDto implements Serializable {
|
||||
private static final long serialVersionUID = -3512433227550450679L;
|
||||
/**
|
||||
* 节点id
|
||||
*/
|
||||
private Long nodeId;
|
||||
/**
|
||||
* 用户筛选规则
|
||||
*/
|
||||
private BaseRule userSelectRule;
|
||||
/**
|
||||
* 条件id
|
||||
*/
|
||||
private Long userSelectRuleId;
|
||||
/**
|
||||
* 触达方式 Sms、App、WebHook、WeChat
|
||||
*/
|
||||
private String touchType;
|
||||
/**
|
||||
* 模板编码
|
||||
*/
|
||||
private String templateCode;
|
||||
/**
|
||||
* 变量配置
|
||||
*/
|
||||
private Map<String, String> params;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.fibo.ddp.common.model.enginex.marketing.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 触发设置节点dto
|
||||
*/
|
||||
@Data
|
||||
public class TriggerSettingNodeDto implements Serializable {
|
||||
private static final long serialVersionUID = 1025007759237888120L;
|
||||
|
||||
/**
|
||||
* 节点id
|
||||
*/
|
||||
private Long nodeId;
|
||||
/**
|
||||
* 触发时间单位(每天、每周、每月)
|
||||
*/
|
||||
private String triggerUnit;
|
||||
/**
|
||||
* 触发时间,精确到时分
|
||||
*/
|
||||
private String triggerTime;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Date startDate;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Date endDate;
|
||||
/**
|
||||
* 参与类型 1:参与一次,2:参与多次
|
||||
*/
|
||||
private int joinType;
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.fibo.ddp.common.model.enginex.marketing.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 营销引擎节点当天结果表(MarketingEngineNodeDateResult)实体类
|
||||
*
|
||||
* @author andy.wang
|
||||
* @since 2022-01-07 18:13:24
|
||||
*/
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("t_marketing_engine_node_date_result")
|
||||
public class MarketingEngineNodeDateResult implements Serializable {
|
||||
private static final long serialVersionUID = -26970339169147139L;
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 引擎id
|
||||
*/
|
||||
private Integer engineId;
|
||||
/**
|
||||
* 引擎版本id
|
||||
*/
|
||||
private Integer engineVersionId;
|
||||
/**
|
||||
* 引擎名称
|
||||
*/
|
||||
private String engineName;
|
||||
/**
|
||||
* 节点id
|
||||
*/
|
||||
private Integer nodeId;
|
||||
/**
|
||||
* 当前日期
|
||||
*/
|
||||
private Date currentDate;
|
||||
/**
|
||||
* 累计进入数
|
||||
*/
|
||||
private Integer enterNum;
|
||||
/**
|
||||
* 累计触发数
|
||||
*/
|
||||
private Integer touchNum;
|
||||
/**
|
||||
* 累计目标完成数
|
||||
*/
|
||||
private Integer completeNum;
|
||||
/**
|
||||
* 目标完成率
|
||||
*/
|
||||
private Float completeRate;
|
||||
/**
|
||||
* 组织编号
|
||||
*/
|
||||
private Integer organId;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.fibo.ddp.common.model.enginex.marketing.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 营销引擎节点结果表(MarketingEngineNodeResult)实体类
|
||||
*
|
||||
* @author andy.wang
|
||||
* @since 2022-01-07 18:13:24
|
||||
*/
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("t_marketing_engine_node_result")
|
||||
public class MarketingEngineNodeResult implements Serializable {
|
||||
private static final long serialVersionUID = -78375198011828784L;
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 引擎id
|
||||
*/
|
||||
private Integer engineId;
|
||||
/**
|
||||
* 引擎版本id
|
||||
*/
|
||||
private Integer engineVersionId;
|
||||
/**
|
||||
* 引擎名称
|
||||
*/
|
||||
private String engineName;
|
||||
/**
|
||||
* 节点id
|
||||
*/
|
||||
private Integer nodeId;
|
||||
/**
|
||||
* 累计进入数
|
||||
*/
|
||||
private Integer enterNum;
|
||||
/**
|
||||
* 累计触发数
|
||||
*/
|
||||
private Integer touchNum;
|
||||
/**
|
||||
* 累计目标完成数
|
||||
*/
|
||||
private Integer completeNum;
|
||||
/**
|
||||
* 目标完成率
|
||||
*/
|
||||
private Float completeRate;
|
||||
/**
|
||||
* 组织编号
|
||||
*/
|
||||
private Integer organId;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.fibo.ddp.common.model.enginex.marketing.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 营销引擎结果表(MarketingEngineResult)实体类
|
||||
*
|
||||
* @author andy.wang
|
||||
* @since 2022-01-07 18:13:24
|
||||
*/
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("t_marketing_engine_result")
|
||||
public class MarketingEngineResult implements Serializable {
|
||||
private static final long serialVersionUID = -51516273891374154L;
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 引擎id
|
||||
*/
|
||||
private Integer engineId;
|
||||
/**
|
||||
* 引擎版本id
|
||||
*/
|
||||
private Integer engineVersionId;
|
||||
/**
|
||||
* 引擎名称
|
||||
*/
|
||||
private String engineName;
|
||||
/**
|
||||
* 累计进入数
|
||||
*/
|
||||
private Integer enterNum;
|
||||
/**
|
||||
* 累计触发数
|
||||
*/
|
||||
private Integer touchNum;
|
||||
/**
|
||||
* 累计目标完成数
|
||||
*/
|
||||
private Integer completeNum;
|
||||
/**
|
||||
* 目标完成率
|
||||
*/
|
||||
private Float completeRate;
|
||||
/**
|
||||
* 组织编号
|
||||
*/
|
||||
private Integer organId;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.fibo.ddp.common.model.enginex.marketing.vo;
|
||||
|
||||
import com.fibo.ddp.common.model.common.BaseParam;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 营销引擎数据详情请求VO
|
||||
*/
|
||||
@Data
|
||||
public class MarketingDataResultReqVo extends BaseParam {
|
||||
private static final long serialVersionUID = -221159747546752923L;
|
||||
// 详情页
|
||||
/**
|
||||
* 引擎版本id
|
||||
*/
|
||||
private Integer engineVersionId;
|
||||
/**
|
||||
* 搜索开始时间
|
||||
*/
|
||||
private Date startDate;
|
||||
/**
|
||||
* 搜索结束时间
|
||||
*/
|
||||
private Date endDate;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.fibo.ddp.common.model.enginex.marketing.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 营销引擎数据详情响应VO
|
||||
*/
|
||||
@Data
|
||||
public class MarketingDataResultRspVo implements Serializable {
|
||||
private static final long serialVersionUID = -221159747546752923L;
|
||||
/**
|
||||
* 引擎版本id
|
||||
*/
|
||||
private Integer engineVersionId;
|
||||
/**
|
||||
* 累计进入数
|
||||
*/
|
||||
private Integer enterNum;
|
||||
/**
|
||||
* 累计触发数
|
||||
*/
|
||||
private Integer touchNum;
|
||||
/**
|
||||
* 累计目标完成数
|
||||
*/
|
||||
private Integer completeNum;
|
||||
/**
|
||||
* 目标完成率
|
||||
*/
|
||||
private Float completeRate;
|
||||
|
||||
List<MarketingNodeResultRspVo> nodeResultRspVoList;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.fibo.ddp.common.model.enginex.marketing.vo;
|
||||
|
||||
import com.fibo.ddp.common.model.enginex.marketing.dto.AudienceNodeDto;
|
||||
import com.fibo.ddp.common.model.enginex.marketing.dto.TargetSettingNodeDto;
|
||||
import com.fibo.ddp.common.model.enginex.marketing.dto.TouchConfigNodeDto;
|
||||
import com.fibo.ddp.common.model.enginex.marketing.dto.TriggerSettingNodeDto;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 营销引擎节点配置VO
|
||||
*/
|
||||
@Data
|
||||
public class MarketingEngineContentVo {
|
||||
|
||||
/**
|
||||
* 触发设置节点
|
||||
*/
|
||||
private TriggerSettingNodeDto triggerSettingNodeDto;
|
||||
/**
|
||||
* 受众用户节点
|
||||
*/
|
||||
private AudienceNodeDto audienceNodeDto;
|
||||
/**
|
||||
* 触达配置节点(暂时只支持多个触达节点串行方式)
|
||||
*/
|
||||
private List<TouchConfigNodeDto> touchConfigNodeDtoList;
|
||||
/**
|
||||
* 目标设置节点
|
||||
*/
|
||||
private TargetSettingNodeDto targetSettingNodeDto;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.fibo.ddp.common.model.enginex.marketing.vo;
|
||||
|
||||
import com.fibo.ddp.common.model.common.BaseParam;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 营销引擎结果列表请求VO
|
||||
*/
|
||||
@Data
|
||||
public class MarketingListResultReqVo extends BaseParam {
|
||||
private static final long serialVersionUID = -221159747546752923L;
|
||||
// 列表页
|
||||
/**
|
||||
* 搜索关键字(引擎id或者引擎名称)
|
||||
*/
|
||||
private String searchKey;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.fibo.ddp.common.model.enginex.marketing.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 营销引擎节点当天结果VO
|
||||
*/
|
||||
@Data
|
||||
public class MarketingNodeDateResultRspVo implements Serializable {
|
||||
private static final long serialVersionUID = 1874380391698401062L;
|
||||
/**
|
||||
* 当前日期
|
||||
*/
|
||||
private Date currentDate;
|
||||
/**
|
||||
* 累计进入数
|
||||
*/
|
||||
private Integer enterNum;
|
||||
/**
|
||||
* 累计触发数
|
||||
*/
|
||||
private Integer touchNum;
|
||||
/**
|
||||
* 累计目标完成数
|
||||
*/
|
||||
private Integer completeNum;
|
||||
/**
|
||||
* 目标完成率
|
||||
*/
|
||||
private Float completeRate;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.fibo.ddp.common.model.enginex.marketing.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 营销引擎节点结果VO
|
||||
*/
|
||||
@Data
|
||||
public class MarketingNodeResultRspVo implements Serializable {
|
||||
private static final long serialVersionUID = -4870605020047702174L;
|
||||
/**
|
||||
* 节点id
|
||||
*/
|
||||
private Integer nodeId;
|
||||
/**
|
||||
* 累计进入数
|
||||
*/
|
||||
private Integer enterNum;
|
||||
/**
|
||||
* 累计触发数
|
||||
*/
|
||||
private Integer touchNum;
|
||||
/**
|
||||
* 累计目标完成数
|
||||
*/
|
||||
private Integer completeNum;
|
||||
/**
|
||||
* 目标完成率
|
||||
*/
|
||||
private Float completeRate;
|
||||
|
||||
List<MarketingNodeDateResultRspVo> nodeDateResultRspVoList;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.fibo.ddp.common.model.enginex.personas;
|
||||
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* (PersonasEngineResult)实体类
|
||||
*
|
||||
* @author jgp
|
||||
* @since 2022-01-06 14:23:07
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("t_personas_engine_result")
|
||||
public class PersonasEngineResult implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -31398229059101813L;
|
||||
|
||||
/**
|
||||
* 自增主键
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 引擎id
|
||||
*/
|
||||
private Long engineId;
|
||||
|
||||
/**
|
||||
* 引擎版本id
|
||||
*/
|
||||
private Long engineVersionId;
|
||||
|
||||
/**
|
||||
* 引擎名称
|
||||
*/
|
||||
private String engineName;
|
||||
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
private Long batchNo;
|
||||
|
||||
/**
|
||||
* 批次数据量
|
||||
*/
|
||||
private Long batchNum;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
@TableField(exist = false)
|
||||
private Date queryStartTime;
|
||||
@TableField(exist = false)
|
||||
private Date queryEndTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.fibo.ddp.common.model.enginex.personas;
|
||||
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* (PersonasEngineResultDetail)实体类
|
||||
*
|
||||
* @author jgp
|
||||
* @since 2022-01-06 14:24:57
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("t_personas_engine_result_detail")
|
||||
public class PersonasEngineResultDetail implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 921135339454407581L;
|
||||
|
||||
/**
|
||||
* 自增主键
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 引擎id
|
||||
|
||||
|
||||
*/
|
||||
private Long engineId;
|
||||
|
||||
/**
|
||||
* 引擎版本id
|
||||
|
||||
*/
|
||||
private Long engineVersionId;
|
||||
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
private Long batchNo;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 标签id
|
||||
*/
|
||||
private Long tagId;
|
||||
/**
|
||||
* 标签版本id
|
||||
*
|
||||
*/
|
||||
private Long tagVersionId;
|
||||
|
||||
/**
|
||||
* 标签值
|
||||
*/
|
||||
private String tagValue;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
@TableField(exist = false)
|
||||
private Date queryStartTime;
|
||||
@TableField(exist = false)
|
||||
private Date queryEndTime;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user