连接器
This commit is contained in:
parent
0124e5898f
commit
17887cc8db
|
@ -22,4 +22,11 @@ public interface ISysDictionaryshopNewService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
SysDictionaryshopNew getDictionaryshopByValue(String tabName, String columnName, String columnValue);
|
SysDictionaryshopNew getDictionaryshopByValue(String tabName, String columnName, String columnValue);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
JsonResultEntity queryDictionaryList(JSONObject object);
|
||||||
}
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
package com.hzya.frame.sys.dictionaryshopNew.service.impl;
|
package com.hzya.frame.sys.dictionaryshopNew.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.hzya.frame.web.entity.BaseResult;
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.hzya.frame.serviceUtil.ServiceUtil;
|
import com.hzya.frame.serviceUtil.ServiceUtil;
|
||||||
|
@ -11,7 +12,7 @@ import org.slf4j.LoggerFactory;
|
||||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -49,4 +50,17 @@ public class SysDictionaryshopNewServiceImpl extends ServiceUtil implements ISy
|
||||||
sysDictionaryshopNew.setColumnValue(columnValue);
|
sysDictionaryshopNew.setColumnValue(columnValue);
|
||||||
return sysdictionaryshopnewMapper.entity_get_by_value(sysDictionaryshopNew);
|
return sysdictionaryshopnewMapper.entity_get_by_value(sysDictionaryshopNew);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表
|
||||||
|
*
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity queryDictionaryList(JSONObject object) {
|
||||||
|
SysDictionaryshopNew dictionary = getData("jsonStr", object, SysDictionaryshopNew.class);
|
||||||
|
List<SysDictionaryshopNew> dictionaryList = sysdictionaryshopnewMapper.entity_list_base(dictionary);
|
||||||
|
return BaseResult.getSuccessMessageEntity("查询列表成功", dictionaryList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,13 @@ import com.hzya.frame.web.entity.BaseEntity;
|
||||||
* @since 2025-04-29 10:16:27
|
* @since 2025-04-29 10:16:27
|
||||||
*/
|
*/
|
||||||
public class SysFlowStepAccountEntity extends BaseEntity {
|
public class SysFlowStepAccountEntity extends BaseEntity {
|
||||||
|
|
||||||
|
//流程id
|
||||||
|
private String flowId;
|
||||||
|
//流程步骤id
|
||||||
|
private String stepId;
|
||||||
|
//应用id
|
||||||
|
private String appId;
|
||||||
/** 账户名称 */
|
/** 账户名称 */
|
||||||
private String name;
|
private String name;
|
||||||
/** ip地址 */
|
/** ip地址 */
|
||||||
|
@ -122,5 +128,28 @@ public class SysFlowStepAccountEntity extends BaseEntity {
|
||||||
this.agentid = agentid;
|
this.agentid = agentid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getFlowId() {
|
||||||
|
return flowId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFlowId(String flowId) {
|
||||||
|
this.flowId = flowId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStepId() {
|
||||||
|
return stepId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStepId(String stepId) {
|
||||||
|
this.stepId = stepId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAppId() {
|
||||||
|
return appId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppId(String appId) {
|
||||||
|
this.appId = appId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,9 @@
|
||||||
<result property="dbName" column="db_name" jdbcType="VARCHAR"/>
|
<result property="dbName" column="db_name" jdbcType="VARCHAR"/>
|
||||||
<result property="userName" column="user_name" jdbcType="VARCHAR"/>
|
<result property="userName" column="user_name" jdbcType="VARCHAR"/>
|
||||||
<result property="password" column="password" jdbcType="VARCHAR"/>
|
<result property="password" column="password" jdbcType="VARCHAR"/>
|
||||||
|
<result property="flowId" column="flow_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="stepId" column="step_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="appId" column="app_id" jdbcType="VARCHAR"/>
|
||||||
<result property="dbType" column="db_type" jdbcType="VARCHAR"/>
|
<result property="dbType" column="db_type" jdbcType="VARCHAR"/>
|
||||||
<result property="appKey" column="app_key" jdbcType="VARCHAR"/>
|
<result property="appKey" column="app_key" jdbcType="VARCHAR"/>
|
||||||
<result property="appSecret" column="app_secret" jdbcType="VARCHAR"/>
|
<result property="appSecret" column="app_secret" jdbcType="VARCHAR"/>
|
||||||
|
@ -35,7 +38,10 @@
|
||||||
,db_name
|
,db_name
|
||||||
,user_name
|
,user_name
|
||||||
,password
|
,password
|
||||||
,db_type
|
,flow_id
|
||||||
|
,step_id
|
||||||
|
,app_id
|
||||||
|
,db_type
|
||||||
,app_key
|
,app_key
|
||||||
,app_secret
|
,app_secret
|
||||||
,corpId
|
,corpId
|
||||||
|
@ -59,6 +65,9 @@
|
||||||
<if test="dbName != null and dbName != ''"> and db_name = #{dbName} </if>
|
<if test="dbName != null and dbName != ''"> and db_name = #{dbName} </if>
|
||||||
<if test="userName != null and userName != ''"> and user_name = #{userName} </if>
|
<if test="userName != null and userName != ''"> and user_name = #{userName} </if>
|
||||||
<if test="password != null and password != ''"> and password = #{password} </if>
|
<if test="password != null and password != ''"> and password = #{password} </if>
|
||||||
|
<if test="flowId != null and flowId != ''"> and flow_id = #{flowId} </if>
|
||||||
|
<if test="stepId != null and stepId != ''"> and step_id = #{stepId} </if>
|
||||||
|
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
|
||||||
<if test="dbType != null and dbType != ''"> and db_type = #{dbType} </if>
|
<if test="dbType != null and dbType != ''"> and db_type = #{dbType} </if>
|
||||||
<if test="appKey != null and appKey != ''"> and app_key = #{appKey} </if>
|
<if test="appKey != null and appKey != ''"> and app_key = #{appKey} </if>
|
||||||
<if test="appSecret != null and appSecret != ''"> and app_secret = #{appSecret} </if>
|
<if test="appSecret != null and appSecret != ''"> and app_secret = #{appSecret} </if>
|
||||||
|
@ -86,6 +95,9 @@
|
||||||
<if test="dbName != null and dbName != ''"> and db_name = #{dbName} </if>
|
<if test="dbName != null and dbName != ''"> and db_name = #{dbName} </if>
|
||||||
<if test="userName != null and userName != ''"> and user_name = #{userName} </if>
|
<if test="userName != null and userName != ''"> and user_name = #{userName} </if>
|
||||||
<if test="password != null and password != ''"> and password = #{password} </if>
|
<if test="password != null and password != ''"> and password = #{password} </if>
|
||||||
|
<if test="flowId != null and flowId != ''"> and flow_id = #{flowId} </if>
|
||||||
|
<if test="stepId != null and stepId != ''"> and step_id = #{stepId} </if>
|
||||||
|
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
|
||||||
<if test="dbType != null and dbType != ''"> and db_type = #{dbType} </if>
|
<if test="dbType != null and dbType != ''"> and db_type = #{dbType} </if>
|
||||||
<if test="appKey != null and appKey != ''"> and app_key = #{appKey} </if>
|
<if test="appKey != null and appKey != ''"> and app_key = #{appKey} </if>
|
||||||
<if test="appSecret != null and appSecret != ''"> and app_secret = #{appSecret} </if>
|
<if test="appSecret != null and appSecret != ''"> and app_secret = #{appSecret} </if>
|
||||||
|
@ -115,6 +127,9 @@
|
||||||
<if test="dbName != null and dbName != ''"> and db_name like concat('%',#{dbName},'%') </if>
|
<if test="dbName != null and dbName != ''"> and db_name like concat('%',#{dbName},'%') </if>
|
||||||
<if test="userName != null and userName != ''"> and user_name like concat('%',#{userName},'%') </if>
|
<if test="userName != null and userName != ''"> and user_name like concat('%',#{userName},'%') </if>
|
||||||
<if test="password != null and password != ''"> and password like concat('%',#{password},'%') </if>
|
<if test="password != null and password != ''"> and password like concat('%',#{password},'%') </if>
|
||||||
|
<if test="flowId != null and flowId != ''"> and flow_id like concat('%',#{flowId},'%') </if>
|
||||||
|
<if test="stepId != null and stepId != ''"> and step_id like concat('%',#{stepId},'%') </if>
|
||||||
|
<if test="appId != null and appId != ''"> and app_id like concat('%',#{appId},'%') </if>
|
||||||
<if test="dbType != null and dbType != ''"> and db_type like concat('%',#{dbType},'%') </if>
|
<if test="dbType != null and dbType != ''"> and db_type like concat('%',#{dbType},'%') </if>
|
||||||
<if test="appKey != null and appKey != ''"> and app_key like concat('%',#{appKey},'%') </if>
|
<if test="appKey != null and appKey != ''"> and app_key like concat('%',#{appKey},'%') </if>
|
||||||
<if test="appSecret != null and appSecret != ''"> and app_secret like concat('%',#{appSecret},'%') </if>
|
<if test="appSecret != null and appSecret != ''"> and app_secret like concat('%',#{appSecret},'%') </if>
|
||||||
|
@ -144,6 +159,9 @@
|
||||||
<if test="dbName != null and dbName != ''"> or db_name = #{dbName} </if>
|
<if test="dbName != null and dbName != ''"> or db_name = #{dbName} </if>
|
||||||
<if test="userName != null and userName != ''"> or user_name = #{userName} </if>
|
<if test="userName != null and userName != ''"> or user_name = #{userName} </if>
|
||||||
<if test="password != null and password != ''"> or password = #{password} </if>
|
<if test="password != null and password != ''"> or password = #{password} </if>
|
||||||
|
<if test="flowId != null and flowId != ''"> or flow_id = #{flowId} </if>
|
||||||
|
<if test="stepId != null and stepId != ''"> or step_id = #{stepId} </if>
|
||||||
|
<if test="appId != null and appId != ''"> or app_id = #{appId} </if>
|
||||||
<if test="dbType != null and dbType != ''"> or db_type = #{dbType} </if>
|
<if test="dbType != null and dbType != ''"> or db_type = #{dbType} </if>
|
||||||
<if test="appKey != null and appKey != ''"> or app_key = #{appKey} </if>
|
<if test="appKey != null and appKey != ''"> or app_key = #{appKey} </if>
|
||||||
<if test="appSecret != null and appSecret != ''"> or app_secret = #{appSecret} </if>
|
<if test="appSecret != null and appSecret != ''"> or app_secret = #{appSecret} </if>
|
||||||
|
@ -171,6 +189,9 @@
|
||||||
<if test="dbName != null and dbName != ''"> db_name , </if>
|
<if test="dbName != null and dbName != ''"> db_name , </if>
|
||||||
<if test="userName != null and userName != ''"> user_name , </if>
|
<if test="userName != null and userName != ''"> user_name , </if>
|
||||||
<if test="password != null and password != ''"> password , </if>
|
<if test="password != null and password != ''"> password , </if>
|
||||||
|
<if test="flowId != null and flowId != ''"> flow_id , </if>
|
||||||
|
<if test="stepId != null and stepId != ''"> step_id , </if>
|
||||||
|
<if test="appId != null and appId != ''"> app_id , </if>
|
||||||
<if test="dbType != null and dbType != ''"> db_type , </if>
|
<if test="dbType != null and dbType != ''"> db_type , </if>
|
||||||
<if test="appKey != null and appKey != ''"> app_key , </if>
|
<if test="appKey != null and appKey != ''"> app_key , </if>
|
||||||
<if test="appSecret != null and appSecret != ''"> app_secret , </if>
|
<if test="appSecret != null and appSecret != ''"> app_secret , </if>
|
||||||
|
@ -193,6 +214,9 @@
|
||||||
<if test="dbName != null and dbName != ''"> #{dbName} ,</if>
|
<if test="dbName != null and dbName != ''"> #{dbName} ,</if>
|
||||||
<if test="userName != null and userName != ''"> #{userName} ,</if>
|
<if test="userName != null and userName != ''"> #{userName} ,</if>
|
||||||
<if test="password != null and password != ''"> #{password} ,</if>
|
<if test="password != null and password != ''"> #{password} ,</if>
|
||||||
|
<if test="flowId != null and flowId != ''"> #{flowId} ,</if>
|
||||||
|
<if test="stepId != null and stepId != ''"> #{stepId} ,</if>
|
||||||
|
<if test="appId != null and appId != ''"> #{appId} ,</if>
|
||||||
<if test="dbType != null and dbType != ''"> #{dbType} ,</if>
|
<if test="dbType != null and dbType != ''"> #{dbType} ,</if>
|
||||||
<if test="appKey != null and appKey != ''"> #{appKey} ,</if>
|
<if test="appKey != null and appKey != ''"> #{appKey} ,</if>
|
||||||
<if test="appSecret != null and appSecret != ''"> #{appSecret} ,</if>
|
<if test="appSecret != null and appSecret != ''"> #{appSecret} ,</if>
|
||||||
|
@ -205,18 +229,18 @@
|
||||||
</insert>
|
</insert>
|
||||||
<!-- 批量新增 -->
|
<!-- 批量新增 -->
|
||||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||||
insert into sys_flow_step_account(create_user_id, create_time, modify_user_id, modify_time, sts, name, ip_address, port, db_name, user_name, password, db_type, app_key, app_secret, corpId, agentId, sts)
|
insert into sys_flow_step_account(create_user_id, create_time, modify_user_id, modify_time, sts, name, ip_address, port, db_name, user_name, password,flow_id,step_id,app_id, db_type, app_key, app_secret, corpId, agentId, sts)
|
||||||
values
|
values
|
||||||
<foreach collection="entities" item="entity" separator=",">
|
<foreach collection="entities" item="entity" separator=",">
|
||||||
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.name},#{entity.ipAddress},#{entity.port},#{entity.dbName},#{entity.userName},#{entity.password},#{entity.dbType},#{entity.appKey},#{entity.appSecret},#{entity.corpid},#{entity.agentid}, 'Y')
|
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.name},#{entity.ipAddress},#{entity.port},#{entity.dbName},#{entity.userName},#{entity.password},#{entity.flowId},#{entity.stepId},#{entity.appId},#{entity.dbType},#{entity.appKey},#{entity.appSecret},#{entity.corpid},#{entity.agentid}, 'Y')
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
<!-- 批量新增或者修改-->
|
<!-- 批量新增或者修改-->
|
||||||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||||
insert into sys_flow_step_account(create_user_id, create_time, modify_user_id, modify_time, sts, name, ip_address, port, db_name, user_name, password, db_type, app_key, app_secret, corpId, agentId)
|
insert into sys_flow_step_account(create_user_id, create_time, modify_user_id, modify_time, sts, name, ip_address, port, db_name, user_name, password,flow_id,step_id,app_id, db_type, app_key, app_secret, corpId, agentId)
|
||||||
values
|
values
|
||||||
<foreach collection="entities" item="entity" separator=",">
|
<foreach collection="entities" item="entity" separator=",">
|
||||||
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.name},#{entity.ipAddress},#{entity.port},#{entity.dbName},#{entity.userName},#{entity.password},#{entity.dbType},#{entity.appKey},#{entity.appSecret},#{entity.corpid},#{entity.agentid})
|
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.name},#{entity.ipAddress},#{entity.port},#{entity.dbName},#{entity.userName},#{entity.password},#{entity.flowId},#{entity.stepId},#{entity.appId},#{entity.dbType},#{entity.appKey},#{entity.appSecret},#{entity.corpid},#{entity.agentid})
|
||||||
</foreach>
|
</foreach>
|
||||||
on duplicate key update
|
on duplicate key update
|
||||||
create_user_id = values(create_user_id),
|
create_user_id = values(create_user_id),
|
||||||
|
@ -230,6 +254,9 @@
|
||||||
db_name = values(db_name),
|
db_name = values(db_name),
|
||||||
user_name = values(user_name),
|
user_name = values(user_name),
|
||||||
password = values(password),
|
password = values(password),
|
||||||
|
flow_id = values(flow_id),
|
||||||
|
step_id = values(step_id),
|
||||||
|
app_id = values(app_id),
|
||||||
db_type = values(db_type),
|
db_type = values(db_type),
|
||||||
app_key = values(app_key),
|
app_key = values(app_key),
|
||||||
app_secret = values(app_secret),
|
app_secret = values(app_secret),
|
||||||
|
@ -250,6 +277,9 @@ update sys_flow_step_account set
|
||||||
<if test="dbName != null and dbName != ''"> db_name = #{dbName},</if>
|
<if test="dbName != null and dbName != ''"> db_name = #{dbName},</if>
|
||||||
<if test="userName != null and userName != ''"> user_name = #{userName},</if>
|
<if test="userName != null and userName != ''"> user_name = #{userName},</if>
|
||||||
<if test="password != null and password != ''"> password = #{password},</if>
|
<if test="password != null and password != ''"> password = #{password},</if>
|
||||||
|
<if test="flowId != null and flowId != ''"> flow_id = #{flowId},</if>
|
||||||
|
<if test="stepId != null and stepId != ''"> step_id = #{stepId},</if>
|
||||||
|
<if test="appId != null and appId != ''"> app_id = #{appId},</if>
|
||||||
<if test="dbType != null and dbType != ''"> db_type = #{dbType},</if>
|
<if test="dbType != null and dbType != ''"> db_type = #{dbType},</if>
|
||||||
<if test="appKey != null and appKey != ''"> app_key = #{appKey},</if>
|
<if test="appKey != null and appKey != ''"> app_key = #{appKey},</if>
|
||||||
<if test="appSecret != null and appSecret != ''"> app_secret = #{appSecret},</if>
|
<if test="appSecret != null and appSecret != ''"> app_secret = #{appSecret},</if>
|
||||||
|
@ -275,6 +305,9 @@ update sys_flow_step_account set sts= 'N' ,modify_time = #{modify_time},modify_
|
||||||
<if test="dbName != null and dbName != ''"> and db_name = #{dbName} </if>
|
<if test="dbName != null and dbName != ''"> and db_name = #{dbName} </if>
|
||||||
<if test="userName != null and userName != ''"> and user_name = #{userName} </if>
|
<if test="userName != null and userName != ''"> and user_name = #{userName} </if>
|
||||||
<if test="password != null and password != ''"> and password = #{password} </if>
|
<if test="password != null and password != ''"> and password = #{password} </if>
|
||||||
|
<if test="flowId != null and flowId != ''"> and flow_id = #{flowId} </if>
|
||||||
|
<if test="stepId != null and stepId != ''"> and step_id = #{stepId} </if>
|
||||||
|
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
|
||||||
<if test="dbType != null and dbType != ''"> and db_type = #{dbType} </if>
|
<if test="dbType != null and dbType != ''"> and db_type = #{dbType} </if>
|
||||||
<if test="appKey != null and appKey != ''"> and app_key = #{appKey} </if>
|
<if test="appKey != null and appKey != ''"> and app_key = #{appKey} </if>
|
||||||
<if test="appSecret != null and appSecret != ''"> and app_secret = #{appSecret} </if>
|
<if test="appSecret != null and appSecret != ''"> and app_secret = #{appSecret} </if>
|
||||||
|
|
|
@ -32,8 +32,10 @@ public class SysFlowStepEntity extends BaseEntity {
|
||||||
private String nifiApiId;
|
private String nifiApiId;
|
||||||
/** nifi应用排序模式;先进先出/先进后出 */
|
/** nifi应用排序模式;先进先出/先进后出 */
|
||||||
private String sortMode;
|
private String sortMode;
|
||||||
|
//定时任务 corn表达式
|
||||||
|
private String taskCorn;
|
||||||
|
//账户对象
|
||||||
|
private SysFlowStepAccountEntity account;
|
||||||
public Integer getStep() {
|
public Integer getStep() {
|
||||||
return step;
|
return step;
|
||||||
}
|
}
|
||||||
|
@ -121,5 +123,21 @@ public class SysFlowStepEntity extends BaseEntity {
|
||||||
public void setFlowId(String flowId) {
|
public void setFlowId(String flowId) {
|
||||||
this.flowId = flowId;
|
this.flowId = flowId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SysFlowStepAccountEntity getAccount() {
|
||||||
|
return account;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAccount(SysFlowStepAccountEntity account) {
|
||||||
|
this.account = account;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTaskCorn() {
|
||||||
|
return taskCorn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskCorn(String taskCorn) {
|
||||||
|
this.taskCorn = taskCorn;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,29 +17,31 @@
|
||||||
<result property="actionType" column="action_type" jdbcType="VARCHAR"/>
|
<result property="actionType" column="action_type" jdbcType="VARCHAR"/>
|
||||||
<result property="appId" column="app_id" jdbcType="VARCHAR"/>
|
<result property="appId" column="app_id" jdbcType="VARCHAR"/>
|
||||||
<result property="apiId" column="api_id" jdbcType="VARCHAR"/>
|
<result property="apiId" column="api_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="taskCorn" column="task_corn" jdbcType="VARCHAR"/>
|
||||||
<result property="nifiAppId" column="nifi_app_id" jdbcType="VARCHAR"/>
|
<result property="nifiAppId" column="nifi_app_id" jdbcType="VARCHAR"/>
|
||||||
<result property="nifiApiId" column="nifi_api_id" jdbcType="VARCHAR"/>
|
<result property="nifiApiId" column="nifi_api_id" jdbcType="VARCHAR"/>
|
||||||
<result property="sortMode" column="sort_mode" jdbcType="VARCHAR"/>
|
<result property="sortMode" column="sort_mode" jdbcType="VARCHAR"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<!-- 查询的字段-->
|
<!-- 查询的字段-->
|
||||||
<sql id="SysFlowStepEntity_Base_Column_List">
|
<sql id="SysFlowStepEntity_Base_Column_List">
|
||||||
id
|
id,
|
||||||
,create_user_id
|
create_user_id,
|
||||||
,create_time
|
create_time,
|
||||||
,modify_user_id
|
modify_user_id,
|
||||||
,modify_time
|
modify_time,
|
||||||
,sts
|
sts,
|
||||||
,step
|
step,
|
||||||
,step_type
|
step_type,
|
||||||
,flowId
|
flowId,
|
||||||
,description
|
description,
|
||||||
,api_name
|
api_name,
|
||||||
,action_type
|
action_type,
|
||||||
,app_id
|
app_id,
|
||||||
,api_id
|
api_id,
|
||||||
,nifi_app_id
|
taskCorn,
|
||||||
,nifi_api_id
|
nifi_app_id,
|
||||||
,sort_mode
|
nifi_api_id,
|
||||||
|
sort_mode
|
||||||
</sql>
|
</sql>
|
||||||
<!-- 查询 采用==查询 -->
|
<!-- 查询 采用==查询 -->
|
||||||
<select id="entity_list_base" resultMap="get-SysFlowStepEntity-result"
|
<select id="entity_list_base" resultMap="get-SysFlowStepEntity-result"
|
||||||
|
@ -182,6 +184,7 @@
|
||||||
<if test="actionType != null and actionType != ''">action_type ,</if>
|
<if test="actionType != null and actionType != ''">action_type ,</if>
|
||||||
<if test="appId != null and appId != ''">app_id ,</if>
|
<if test="appId != null and appId != ''">app_id ,</if>
|
||||||
<if test="apiId != null and apiId != ''">api_id ,</if>
|
<if test="apiId != null and apiId != ''">api_id ,</if>
|
||||||
|
<if test="taskCorn != null and taskCorn != ''">task_corn ,</if>
|
||||||
<if test="nifiAppId != null and nifiAppId != ''">nifi_app_id ,</if>
|
<if test="nifiAppId != null and nifiAppId != ''">nifi_app_id ,</if>
|
||||||
<if test="nifiApiId != null and nifiApiId != ''">nifi_api_id ,</if>
|
<if test="nifiApiId != null and nifiApiId != ''">nifi_api_id ,</if>
|
||||||
<if test="sortMode != null and sortMode != ''">sort_mode ,</if>
|
<if test="sortMode != null and sortMode != ''">sort_mode ,</if>
|
||||||
|
@ -204,6 +207,7 @@
|
||||||
<if test="actionType != null and actionType != ''">#{actionType} ,</if>
|
<if test="actionType != null and actionType != ''">#{actionType} ,</if>
|
||||||
<if test="appId != null and appId != ''">#{appId} ,</if>
|
<if test="appId != null and appId != ''">#{appId} ,</if>
|
||||||
<if test="apiId != null and apiId != ''">#{apiId} ,</if>
|
<if test="apiId != null and apiId != ''">#{apiId} ,</if>
|
||||||
|
<if test="taskCorn != null and taskCorn != ''">#{taskCorn} ,</if>
|
||||||
<if test="nifiAppId != null and nifiAppId != ''">#{nifiAppId} ,</if>
|
<if test="nifiAppId != null and nifiAppId != ''">#{nifiAppId} ,</if>
|
||||||
<if test="nifiApiId != null and nifiApiId != ''">#{nifiApiId} ,</if>
|
<if test="nifiApiId != null and nifiApiId != ''">#{nifiApiId} ,</if>
|
||||||
<if test="sortMode != null and sortMode != ''">#{sortMode} ,</if>
|
<if test="sortMode != null and sortMode != ''">#{sortMode} ,</if>
|
||||||
|
@ -267,6 +271,7 @@
|
||||||
<if test="actionType != null and actionType != ''">action_type = #{actionType},</if>
|
<if test="actionType != null and actionType != ''">action_type = #{actionType},</if>
|
||||||
<if test="appId != null and appId != ''">app_id = #{appId},</if>
|
<if test="appId != null and appId != ''">app_id = #{appId},</if>
|
||||||
<if test="apiId != null and apiId != ''">api_id = #{apiId},</if>
|
<if test="apiId != null and apiId != ''">api_id = #{apiId},</if>
|
||||||
|
<if test="taskCorn != null and taskCorn != ''">task_corn = #{taskCorn},</if>
|
||||||
<if test="nifiAppId != null and nifiAppId != ''">nifi_app_id = #{nifiAppId},</if>
|
<if test="nifiAppId != null and nifiAppId != ''">nifi_app_id = #{nifiAppId},</if>
|
||||||
<if test="nifiApiId != null and nifiApiId != ''">nifi_api_id = #{nifiApiId},</if>
|
<if test="nifiApiId != null and nifiApiId != ''">nifi_api_id = #{nifiApiId},</if>
|
||||||
<if test="sortMode != null and sortMode != ''">sort_mode = #{sortMode},</if>
|
<if test="sortMode != null and sortMode != ''">sort_mode = #{sortMode},</if>
|
||||||
|
@ -295,6 +300,7 @@
|
||||||
<if test="actionType != null and actionType != ''">and action_type = #{actionType}</if>
|
<if test="actionType != null and actionType != ''">and action_type = #{actionType}</if>
|
||||||
<if test="appId != null and appId != ''">and app_id = #{appId}</if>
|
<if test="appId != null and appId != ''">and app_id = #{appId}</if>
|
||||||
<if test="apiId != null and apiId != ''">and api_id = #{apiId}</if>
|
<if test="apiId != null and apiId != ''">and api_id = #{apiId}</if>
|
||||||
|
<if test="taskCorn != null and taskCorn != ''">and task_corn = #{taskCorn}</if>
|
||||||
<if test="nifiAppId != null and nifiAppId != ''">and nifi_app_id = #{nifiAppId}</if>
|
<if test="nifiAppId != null and nifiAppId != ''">and nifi_app_id = #{nifiAppId}</if>
|
||||||
<if test="nifiApiId != null and nifiApiId != ''">and nifi_api_id = #{nifiApiId}</if>
|
<if test="nifiApiId != null and nifiApiId != ''">and nifi_api_id = #{nifiApiId}</if>
|
||||||
<if test="sortMode != null and sortMode != ''">and sort_mode = #{sortMode}</if>
|
<if test="sortMode != null and sortMode != ''">and sort_mode = #{sortMode}</if>
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
package com.hzya.frame.sys.flow.service;
|
package com.hzya.frame.sys.flow.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowStepAccountEntity;
|
import com.hzya.frame.sys.flow.entity.SysFlowStepAccountEntity;
|
||||||
import com.hzya.frame.basedao.service.IBaseService;
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程步骤账户表(SysFlowStepAccount)表服务接口
|
* 流程步骤账户表(SysFlowStepAccount)表服务接口
|
||||||
*
|
*
|
||||||
|
@ -9,4 +12,53 @@ import com.hzya.frame.basedao.service.IBaseService;
|
||||||
* @since 2025-04-29 10:16:28
|
* @since 2025-04-29 10:16:28
|
||||||
*/
|
*/
|
||||||
public interface ISysFlowStepAccountService extends IBaseService<SysFlowStepAccountEntity, String>{
|
public interface ISysFlowStepAccountService extends IBaseService<SysFlowStepAccountEntity, String>{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存账户信息
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
JsonResultEntity saveAccount(JSONObject object);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新账户信息
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
JsonResultEntity updateAccount(JSONObject object);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除账户信息
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
JsonResultEntity deleteAccount(JSONObject object);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询账户详情
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
JsonResultEntity getAccount(JSONObject object);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询账户列表数据
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
JsonResultEntity queryAccountList(JSONObject object);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询账户分页数据
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
JsonResultEntity queryAccountPaged(JSONObject object);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证数据库账户
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
JsonResultEntity verifyDataBase(JSONObject object);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
package com.hzya.frame.sys.flow.service;
|
package com.hzya.frame.sys.flow.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowStepEntity;
|
import com.hzya.frame.sys.flow.entity.SysFlowStepEntity;
|
||||||
import com.hzya.frame.basedao.service.IBaseService;
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程步骤信息(SysFlowStep)表服务接口
|
* 流程步骤信息(SysFlowStep)表服务接口
|
||||||
*
|
*
|
||||||
|
@ -9,4 +12,39 @@ import com.hzya.frame.basedao.service.IBaseService;
|
||||||
* @since 2025-04-29 10:16:27
|
* @since 2025-04-29 10:16:27
|
||||||
*/
|
*/
|
||||||
public interface ISysFlowStepService extends IBaseService<SysFlowStepEntity, String>{
|
public interface ISysFlowStepService extends IBaseService<SysFlowStepEntity, String>{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存流程步骤
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
JsonResultEntity saveFlowStep(JSONObject object);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新流程步骤
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
JsonResultEntity updateFlowStep(JSONObject object);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除流程步骤
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
JsonResultEntity deleteFlowStep(JSONObject object);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
JsonResultEntity queryList(JSONObject object);
|
||||||
|
/**
|
||||||
|
* 步骤详情
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
JsonResultEntity getFlowStep(JSONObject object);
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class SysFlowServiceImpl extends BaseService<SysFlowEntity, String> imple
|
||||||
return BaseResult.getFailureMessageEntity(e.getMessage());
|
return BaseResult.getFailureMessageEntity(e.getMessage());
|
||||||
}
|
}
|
||||||
sysFlowDao.save(flowEntity);
|
sysFlowDao.save(flowEntity);
|
||||||
return BaseResult.getSuccessMessageEntity("保存成功");
|
return BaseResult.getSuccessMessageEntity("保存成功",flowEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,12 +1,27 @@
|
||||||
package com.hzya.frame.sys.flow.service.impl;
|
package com.hzya.frame.sys.flow.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.lang.Assert;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.datasource.DataSourceUtilProperties;
|
||||||
|
import com.hzya.frame.serviceUtil.DsDataSourceUtil;
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowStepAccountEntity;
|
import com.hzya.frame.sys.flow.entity.SysFlowStepAccountEntity;
|
||||||
import com.hzya.frame.sys.flow.dao.ISysFlowStepAccountDao;
|
import com.hzya.frame.sys.flow.dao.ISysFlowStepAccountDao;
|
||||||
import com.hzya.frame.sys.flow.service.ISysFlowStepAccountService;
|
import com.hzya.frame.sys.flow.service.ISysFlowStepAccountService;
|
||||||
import org.springframework.stereotype.Service;
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.DriverManager;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程步骤账户表(SysFlowStepAccount)表服务实现类
|
* 流程步骤账户表(SysFlowStepAccount)表服务实现类
|
||||||
*
|
*
|
||||||
|
@ -15,12 +30,217 @@ import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
*/
|
*/
|
||||||
@Service(value = "sysFlowStepAccountService")
|
@Service(value = "sysFlowStepAccountService")
|
||||||
public class SysFlowStepAccountServiceImpl extends BaseService<SysFlowStepAccountEntity, String> implements ISysFlowStepAccountService {
|
public class SysFlowStepAccountServiceImpl extends BaseService<SysFlowStepAccountEntity, String> implements ISysFlowStepAccountService {
|
||||||
|
|
||||||
private ISysFlowStepAccountDao sysFlowStepAccountDao;
|
private ISysFlowStepAccountDao sysFlowStepAccountDao;
|
||||||
|
@Resource
|
||||||
|
private DsDataSourceUtil dsDataSourceUtil;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public void setSysFlowStepAccountDao(ISysFlowStepAccountDao dao) {
|
public void setSysFlowStepAccountDao(ISysFlowStepAccountDao dao) {
|
||||||
this.sysFlowStepAccountDao = dao;
|
this.sysFlowStepAccountDao = dao;
|
||||||
this.dao = dao;
|
this.dao = dao;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存账户信息
|
||||||
|
*
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity saveAccount(JSONObject object) {
|
||||||
|
SysFlowStepAccountEntity entity = getData("jsonStr", object, SysFlowStepAccountEntity.class);
|
||||||
|
try {
|
||||||
|
checkParam(entity, "save");
|
||||||
|
} catch (Exception e) {
|
||||||
|
return BaseResult.getFailureMessageEntity(e.getMessage());
|
||||||
|
}
|
||||||
|
//控制一下名字不能重复
|
||||||
|
List<SysFlowStepAccountEntity> queryList = queryByName(entity);
|
||||||
|
if (CollectionUtils.isNotEmpty(queryList) && queryList.size() > 0) {
|
||||||
|
return BaseResult.getFailureMessageEntity(entity.getName() + "重复");
|
||||||
|
}
|
||||||
|
sysFlowStepAccountDao.save(entity);
|
||||||
|
return BaseResult.getSuccessMessageEntity("新增成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新账户信息
|
||||||
|
*
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity updateAccount(JSONObject object) {
|
||||||
|
SysFlowStepAccountEntity entity = getData("jsonStr", object, SysFlowStepAccountEntity.class);
|
||||||
|
try {
|
||||||
|
checkParam(entity, "update");
|
||||||
|
} catch (Exception e) {
|
||||||
|
return BaseResult.getFailureMessageEntity(e.getMessage());
|
||||||
|
}
|
||||||
|
//检查一下名字不能重复
|
||||||
|
List<SysFlowStepAccountEntity> queryList = queryByName(entity);
|
||||||
|
if (CollectionUtils.isNotEmpty(queryList) && queryList.size() > 0) {
|
||||||
|
for (SysFlowStepAccountEntity acc : queryList) {
|
||||||
|
if (!acc.getId().equals(entity.getId())) {
|
||||||
|
return BaseResult.getFailureMessageEntity(entity.getName() + "重复");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sysFlowStepAccountDao.update(entity);
|
||||||
|
return BaseResult.getSuccessMessageEntity("更新成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除账户信息
|
||||||
|
*
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity deleteAccount(JSONObject object) {
|
||||||
|
SysFlowStepAccountEntity entity = getData("jsonStr", object, SysFlowStepAccountEntity.class);
|
||||||
|
try {
|
||||||
|
checkParam(entity, "delete");
|
||||||
|
} catch (Exception e) {
|
||||||
|
return BaseResult.getFailureMessageEntity(e.getMessage());
|
||||||
|
}
|
||||||
|
sysFlowStepAccountDao.logicRemove(entity);
|
||||||
|
return BaseResult.getSuccessMessageEntity("删除成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询账户详情
|
||||||
|
*
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity getAccount(JSONObject object) {
|
||||||
|
SysFlowStepAccountEntity entity = getData("jsonStr", object, SysFlowStepAccountEntity.class);
|
||||||
|
try {
|
||||||
|
checkParam(entity, "get");
|
||||||
|
} catch (Exception e) {
|
||||||
|
return BaseResult.getFailureMessageEntity(e.getMessage());
|
||||||
|
}
|
||||||
|
SysFlowStepAccountEntity SysFlowStepAccountEntity = sysFlowStepAccountDao.get(entity.getId());
|
||||||
|
return BaseResult.getSuccessMessageEntity("查询账户详情成功", SysFlowStepAccountEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询账户列表数据
|
||||||
|
*
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity queryAccountList(JSONObject object) {
|
||||||
|
SysFlowStepAccountEntity entity = getData("jsonStr", object, SysFlowStepAccountEntity.class);
|
||||||
|
try {
|
||||||
|
checkParam(entity, "queryList");
|
||||||
|
} catch (Exception e) {
|
||||||
|
return BaseResult.getFailureMessageEntity(e.getMessage());
|
||||||
|
}
|
||||||
|
List<SysFlowStepAccountEntity> queryList = sysFlowStepAccountDao.query(entity);
|
||||||
|
return BaseResult.getSuccessMessageEntity("查询列表成功", queryList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询账户分页数据
|
||||||
|
*
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity queryAccountPaged(JSONObject object) {
|
||||||
|
SysFlowStepAccountEntity entity = getData("jsonStr", object, SysFlowStepAccountEntity.class);
|
||||||
|
try {
|
||||||
|
checkParam(entity, "queryPaged");
|
||||||
|
} catch (Exception e) {
|
||||||
|
return BaseResult.getFailureMessageEntity(e.getMessage());
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//根据账户名称查询
|
||||||
|
private List<SysFlowStepAccountEntity> queryByName(SysFlowStepAccountEntity entity) {
|
||||||
|
if (StrUtil.isNotEmpty(entity.getName())) {
|
||||||
|
SysFlowStepAccountEntity account = new SysFlowStepAccountEntity();
|
||||||
|
account.setName(entity.getName());
|
||||||
|
List<SysFlowStepAccountEntity> queryList = sysFlowStepAccountDao.query(account);
|
||||||
|
return queryList;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证账户
|
||||||
|
*
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity verifyDataBase(JSONObject object) {
|
||||||
|
SysFlowStepAccountEntity entity = getData("jsonStr", object, SysFlowStepAccountEntity.class);
|
||||||
|
try {
|
||||||
|
checkParam(entity, "verify");
|
||||||
|
String dbType = entity.getDbType();
|
||||||
|
String driveClass = "";
|
||||||
|
StringBuffer sourceUrl = new StringBuffer();
|
||||||
|
if (StrUtil.isNotEmpty(dbType)) {
|
||||||
|
if ("mysql".equals(dbType)) {
|
||||||
|
driveClass = DataSourceUtilProperties.MYSQLDRIVER_6;
|
||||||
|
sourceUrl.append("jdbc:mysql://").append(entity.getIpAddress()).append(":").append(entity.getPort()).append("/").append(entity.getDbName()).append("?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true");
|
||||||
|
} else if ("oracle".equals(dbType)) {
|
||||||
|
driveClass = DataSourceUtilProperties.ORACLEDRIVER;
|
||||||
|
sourceUrl.append("jdbc:oracle:thin:@").append(entity.getIpAddress()).append(":").append(entity.getPort()).append(":").append(entity.getDbName());
|
||||||
|
} else if ("sqlserver2000".equals(dbType)) {
|
||||||
|
driveClass = DataSourceUtilProperties.SQL2000DRIVER;
|
||||||
|
sourceUrl.append("jdbc:sqlserver://").append(entity.getIpAddress()).append(":").append(entity.getPort()).append(";DatabaseName=").append(entity.getDbName()).append(";encrypt=false;trustServerCertificate=true");
|
||||||
|
} else if ("sqlserver2005".equals(dbType)) {
|
||||||
|
driveClass = DataSourceUtilProperties.SQL2005DRIVER;
|
||||||
|
sourceUrl.append("jdbc:sqlserver://").append(entity.getIpAddress()).append(":").append(entity.getPort()).append(";DatabaseName=").append(entity.getDbName()).append(";encrypt=false;trustServerCertificate=true");
|
||||||
|
}
|
||||||
|
//测试连接
|
||||||
|
Class.forName(driveClass);
|
||||||
|
Connection connection = DriverManager.getConnection(sourceUrl.toString(), entity.getUserName(), entity.getPassword());// 相当于连接数据库
|
||||||
|
if (null != connection){
|
||||||
|
return BaseResult.getSuccessMessageEntity("验证成功");
|
||||||
|
}else {
|
||||||
|
return BaseResult.getFailureMessageEntity("验证失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
return BaseResult.getFailureMessageEntity(e.getMessage());
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
//数据检查
|
||||||
|
private void checkParam(SysFlowStepAccountEntity entity, String type) {
|
||||||
|
Assert.notNull(entity, "参数不能为空");
|
||||||
|
if ("save".equals(type)) {
|
||||||
|
Assert.notEmpty(entity.getFlowId(), "flowId不能为空");
|
||||||
|
Assert.notEmpty(entity.getAppId(), "appId不能为空");
|
||||||
|
Assert.notEmpty(entity.getName(), "账户名称不能为空");
|
||||||
|
} else if ("update".equals(type)) {
|
||||||
|
Assert.notEmpty(entity.getId(), "id不能为空");
|
||||||
|
} else if ("delete".equals(type)) {
|
||||||
|
Assert.notEmpty(entity.getId(), "id不能为空");
|
||||||
|
} else if ("get".equals(type)) {
|
||||||
|
Assert.notEmpty(entity.getId(), "id不能为空");
|
||||||
|
} else if ("queryList".equals(type)) {
|
||||||
|
Assert.notEmpty(entity.getFlowId(), "flowId不能为空");
|
||||||
|
Assert.notEmpty(entity.getStepId(), "stepId不能为空");
|
||||||
|
Assert.notEmpty(entity.getAppId(), "appId不能为空");
|
||||||
|
} else if ("queryPaged".equals(type)) {
|
||||||
|
Assert.notNull(entity.getPageNum(), "pageNum不能为空");
|
||||||
|
Assert.notNull(entity.getPageSize(), "pageSize不能为空");
|
||||||
|
} else if ("verify".equals(type)) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,21 @@
|
||||||
package com.hzya.frame.sys.flow.service.impl;
|
package com.hzya.frame.sys.flow.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.lang.Assert;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.sys.flow.dao.ISysFlowStepAccountDao;
|
||||||
|
import com.hzya.frame.sys.flow.entity.SysFlowStepAccountEntity;
|
||||||
import com.hzya.frame.sys.flow.entity.SysFlowStepEntity;
|
import com.hzya.frame.sys.flow.entity.SysFlowStepEntity;
|
||||||
import com.hzya.frame.sys.flow.dao.ISysFlowStepDao;
|
import com.hzya.frame.sys.flow.dao.ISysFlowStepDao;
|
||||||
|
import com.hzya.frame.sys.flow.service.ISysFlowStepAccountService;
|
||||||
import com.hzya.frame.sys.flow.service.ISysFlowStepService;
|
import com.hzya.frame.sys.flow.service.ISysFlowStepService;
|
||||||
import org.springframework.stereotype.Service;
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import javax.annotation.Resource;
|
|
||||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程步骤信息(SysFlowStep)表服务实现类
|
* 流程步骤信息(SysFlowStep)表服务实现类
|
||||||
*
|
*
|
||||||
|
@ -15,12 +24,137 @@ import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
*/
|
*/
|
||||||
@Service(value = "sysFlowStepService")
|
@Service(value = "sysFlowStepService")
|
||||||
public class SysFlowStepServiceImpl extends BaseService<SysFlowStepEntity, String> implements ISysFlowStepService {
|
public class SysFlowStepServiceImpl extends BaseService<SysFlowStepEntity, String> implements ISysFlowStepService {
|
||||||
|
|
||||||
private ISysFlowStepDao sysFlowStepDao;
|
private ISysFlowStepDao sysFlowStepDao;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public void setSysFlowStepDao(ISysFlowStepDao dao) {
|
private ISysFlowStepAccountService sysFlowStepAccountService;
|
||||||
this.sysFlowStepDao = dao;
|
|
||||||
this.dao = dao;
|
@Autowired
|
||||||
}
|
public void setSysFlowStepDao(ISysFlowStepDao dao) {
|
||||||
|
this.sysFlowStepDao = dao;
|
||||||
|
this.dao = dao;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存流程步骤
|
||||||
|
*
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity saveFlowStep(JSONObject object) {
|
||||||
|
SysFlowStepEntity sysFlowStep = getData("jsonStr", object, SysFlowStepEntity.class);
|
||||||
|
try {
|
||||||
|
checkParams(sysFlowStep, "save");
|
||||||
|
} catch (Exception e) {
|
||||||
|
return BaseResult.getFailureMessageEntity(e.getMessage());
|
||||||
|
}
|
||||||
|
sysFlowStepDao.save(sysFlowStep);
|
||||||
|
return BaseResult.getSuccessMessageEntity("保存成功", sysFlowStep);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新流程步骤
|
||||||
|
*
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity updateFlowStep(JSONObject object) {
|
||||||
|
SysFlowStepEntity sysFlowStep = getData("jsonStr", object, SysFlowStepEntity.class);
|
||||||
|
try {
|
||||||
|
checkParams(sysFlowStep, "update");
|
||||||
|
} catch (Exception e) {
|
||||||
|
return BaseResult.getFailureMessageEntity(e.getMessage());
|
||||||
|
}
|
||||||
|
sysFlowStepDao.update(sysFlowStep);
|
||||||
|
//保存账户信息
|
||||||
|
if (null != sysFlowStep.getAccount()) {
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
jsonObject.put("jsonStr", JSONObject.toJSONString(sysFlowStep.getAccount()));
|
||||||
|
sysFlowStepAccountService.saveAccount(jsonObject);
|
||||||
|
}
|
||||||
|
return BaseResult.getSuccessMessageEntity("保存成功", sysFlowStep);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除流程步骤
|
||||||
|
*
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity deleteFlowStep(JSONObject object) {
|
||||||
|
SysFlowStepEntity sysFlowStep = getData("jsonStr", object, SysFlowStepEntity.class);
|
||||||
|
try {
|
||||||
|
checkParams(sysFlowStep, "delete");
|
||||||
|
String id = sysFlowStep.getId();
|
||||||
|
SysFlowStepEntity step = sysFlowStepDao.get(id);
|
||||||
|
//删除流程步骤账户表
|
||||||
|
SysFlowStepAccountEntity stepAccount = new SysFlowStepAccountEntity();
|
||||||
|
stepAccount.setFlowId(step.getFlowId());
|
||||||
|
stepAccount.setStepId(id);
|
||||||
|
sysFlowStepAccountService.logicRemoveMultiCondition(stepAccount);
|
||||||
|
//删除流程步骤
|
||||||
|
sysFlowStepDao.logicRemove(step);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return BaseResult.getFailureMessageEntity(e.getMessage());
|
||||||
|
}
|
||||||
|
return BaseResult.getSuccessMessageEntity("删除成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表
|
||||||
|
*
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity queryList(JSONObject object) {
|
||||||
|
SysFlowStepEntity sysFlowStep = getData("jsonStr", object, SysFlowStepEntity.class);
|
||||||
|
try {
|
||||||
|
checkParams(sysFlowStep, "queryList");
|
||||||
|
} catch (Exception e) {
|
||||||
|
return BaseResult.getFailureMessageEntity(e.getMessage());
|
||||||
|
}
|
||||||
|
List<SysFlowStepEntity> list = sysFlowStepDao.query(sysFlowStep);
|
||||||
|
return BaseResult.getSuccessMessageEntity("查询数据成功", list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 步骤详情
|
||||||
|
*
|
||||||
|
* @param object
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity getFlowStep(JSONObject object) {
|
||||||
|
SysFlowStepEntity sysFlowStep = getData("jsonStr", object, SysFlowStepEntity.class);
|
||||||
|
try {
|
||||||
|
checkParams(sysFlowStep, "get");
|
||||||
|
} catch (Exception e) {
|
||||||
|
return BaseResult.getFailureMessageEntity(e.getMessage());
|
||||||
|
}
|
||||||
|
SysFlowStepEntity entity = sysFlowStepDao.get(sysFlowStep.getId());
|
||||||
|
return BaseResult.getSuccessMessageEntity("查询详情成功", entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void checkParams(SysFlowStepEntity entity, String type) {
|
||||||
|
Assert.notNull(entity, "参数不能为空");
|
||||||
|
if ("save".equals(type)) {
|
||||||
|
Assert.notEmpty(entity.getFlowId(), "flowId不能为空");
|
||||||
|
Assert.notNull(entity.getStep(), "步骤号不能为空");
|
||||||
|
Assert.notEmpty(entity.getStepType(), "stepType不能为空");
|
||||||
|
} else if ("update".equals(type)) {
|
||||||
|
Assert.notEmpty(entity.getAppId(), "appId不能为空");
|
||||||
|
Assert.notEmpty(entity.getNifiApiId(), "nifiApiId不能为空");
|
||||||
|
} else if ("delete".equals(type)) {
|
||||||
|
Assert.notEmpty(entity.getId(), "id不能为空");
|
||||||
|
}else if ("queryList".equals(type)){
|
||||||
|
Assert.notEmpty(entity.getFlowId(),"flowId不能为空");
|
||||||
|
}else if ("get".equals(type)){
|
||||||
|
Assert.notEmpty(entity.getId(),"id不能为空");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package com.hzya.frame.sysnew.application.appAcount.entity;
|
package com.hzya.frame.sysnew.application.appAcount.entity;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.hzya.frame.web.entity.BaseEntity;
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 应用账户表(SysApplicationAccount)实体类
|
* 应用账户表(SysApplicationAccount)实体类
|
||||||
|
@ -132,6 +134,5 @@ public class SysApplicationAccountEntity extends BaseEntity {
|
||||||
public void setAgentid(String agentid) {
|
public void setAgentid(String agentid) {
|
||||||
this.agentid = agentid;
|
this.agentid = agentid;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue