Merge remote-tracking branch 'origin/yuecheng-project' into yuecheng-project

This commit is contained in:
yuqh 2024-06-21 09:31:16 +08:00
commit 06cb8e5a4d
61 changed files with 2152 additions and 666 deletions

View File

@ -210,7 +210,7 @@
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.plugin.masterData.org.entity.MdmOrgEntity" keyProperty="id" useGeneratedKeys="true">
<insert id="entity_insert" parameterType = "com.hzya.frame.plugin.masterData.org.entity.MdmOrgEntity" >
insert into mdm_org(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
@ -276,7 +276,7 @@
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertBatch" >
insert into mdm_org(document_rule, document_rule_num, org_code, org_name, org_address, org_countryzone, org_innercode, org_memo, org_mnecode, org_ncindustry, org_fatherorg, org_principal, org_tel, data_status, add_status, update_status, delete_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
@ -284,7 +284,7 @@
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertOrUpdateBatch" >
insert into mdm_org(document_rule, document_rule_num, org_code, org_name, org_address, org_countryzone, org_innercode, org_memo, org_mnecode, org_ncindustry, org_fatherorg, org_principal, org_tel, data_status, add_status, update_status, delete_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
values
<foreach collection="entities" item="entity" separator=",">

View File

@ -204,7 +204,7 @@
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.plugin.masterData.project.entity.MdmProjectEntity" keyProperty="id" useGeneratedKeys="true">
<insert id="entity_insert" parameterType = "com.hzya.frame.plugin.masterData.project.entity.MdmProjectEntity" >
insert into mdm_project(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
@ -268,7 +268,7 @@
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertBatch" >
insert into mdm_project(document_rule, document_rule_num, project_code, project_name, project_bill_type, project_memo, project_currtype, project_dutier, project_duty_dept, project_org, project_parentpro, project_sh_name, data_status, add_status, update_status, delete_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
@ -276,7 +276,7 @@
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertOrUpdateBatch" >
insert into mdm_project(document_rule, document_rule_num, project_code, project_name, project_bill_type, project_memo, project_currtype, project_dutier, project_duty_dept, project_org, project_parentpro, project_sh_name, data_status, add_status, update_status, delete_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
values
<foreach collection="entities" item="entity" separator=",">

View File

@ -258,7 +258,7 @@
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.plugin.masterData.user.entity.MdmUserEntity" keyProperty="id" useGeneratedKeys="true">
<insert id="entity_insert" parameterType = "com.hzya.frame.plugin.masterData.user.entity.MdmUserEntity" >
insert into mdm_user(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
@ -340,7 +340,7 @@
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertBatch" >
insert into mdm_user(document_rule, document_rule_num, data_status, add_status, update_status, delete_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, user_name, user_code, user_password, pwdlevelcode, pwdparam, user_note, abledate, disabledate, islocked, user_type, base_doc_type, pk_base_doc, identityverifycode, pk_org, format, isca, enablestate, contentlang, user_code_q, sts)
values
<foreach collection="entities" item="entity" separator=",">
@ -348,7 +348,7 @@
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertOrUpdateBatch" >
insert into mdm_user(document_rule, document_rule_num, data_status, add_status, update_status, delete_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, user_name, user_code, user_password, pwdlevelcode, pwdparam, user_note, abledate, disabledate, islocked, user_type, base_doc_type, pk_base_doc, identityverifycode, pk_org, format, isca, enablestate, contentlang, user_code_q)
values
<foreach collection="entities" item="entity" separator=",">

View File

@ -2,7 +2,6 @@ package com.hzya.frame.plugin.mdmDistribute.plugin;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.mdm.mdmModule.dao.IMdmModuleDao;
@ -13,6 +12,10 @@ import com.hzya.frame.mdm.mdmModuleDbFiledsRule.dao.IMdmModuleDbFiledsRuleDao;
import com.hzya.frame.mdm.mdmModuleDbFiledsRule.entity.MdmModuleDbFiledsRuleEntity;
import com.hzya.frame.mdm.mdmModuleDistribute.dao.IMdmModuleDistributeDao;
import com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity;
import com.hzya.frame.mdm.mdmModuleDistributeDetail.dao.IMdmModuleDistributeDetailDao;
import com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity;
import com.hzya.frame.mdm.mdmModuleSendLog.dao.IMdmModuleSendLogDao;
import com.hzya.frame.mdm.mdmModuleSendLog.entity.MdmModuleSendLogEntity;
import com.hzya.frame.mdm.service.IMdmServiceCache;
import com.hzya.frame.sysnew.application.api.dao.ISysApplicationApiDao;
import com.hzya.frame.sysnew.application.api.entity.SysApplicationApiEntity;
@ -22,10 +25,9 @@ import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
import com.hzya.frame.sysnew.application.script.dao.ISysApplicationScriptDao;
import com.hzya.frame.sysnew.application.script.entity.SysApplicationScriptEntity;
import com.hzya.frame.sysnew.grovy.service.IGroovyIntegrationService;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
import com.hzya.frame.sysnew.messageManageLog.entity.SysMessageManageLogEntity;
import com.hzya.frame.uuid.UUIDUtils;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.apache.http.HttpEntity;
@ -38,12 +40,12 @@ import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import javax.annotation.Resource;
import java.io.IOException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -57,7 +59,7 @@ import java.util.Map;
public class MdmModulePluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(MdmModulePluginInitializer.class);
@Resource
private IIntegrationTaskLivingDetailsDao integrationTaskLivingDetailsDao;
private IMdmModuleDistributeDetailDao mdmModuleDistributeDetailDao;
@Resource
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
@Resource
@ -76,6 +78,8 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
private IMdmModuleDao mdmModuleDao;
@Resource
private IMdmServiceCache mdmServiceCache;
@Resource
private IMdmModuleSendLogDao mdmModuleSendLogDao;
@Value("${ax.url}")
private String url ;
@ -176,6 +180,11 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
return BaseResult.getFailureMessageEntity("分发已停用");
}
MdmModuleDistributeDetailEntity mdmModuleDistributeDetailEntity = new MdmModuleDistributeDetailEntity() ;
mdmModuleDistributeDetailEntity.setDistributeId(distributeId);
mdmModuleDistributeDetailEntity.setSts("Y");
List<MdmModuleDistributeDetailEntity> mdmModuleDistributeDetailEntities = mdmModuleDistributeDetailDao.queryBase(mdmModuleDistributeDetailEntity);
// 启用停用 0停用
//if("1".equals(mdmModuleDistributeEntity.getEnabledType())){
// taskDetailEntity.setResult("分发为手动下发");
@ -221,7 +230,6 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
taskDetailEntity.setResult("应用不存在");
taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
return BaseResult.getFailureMessageEntity("应用不存在");
}
//获取主数据db字段以及字段的规则
@ -232,11 +240,12 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
queryFildRule.setMdmId(mdmModuleEntity.getId());
queryFildRule.setRuleCode("service");
List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRuleEntities = mdmModuleDbFiledsRuleDao.queryBase(queryFildRule);
//获取主数据db对应的实体表的数据
JSONObject object = new JSONObject();
for (int i = 0; i < mdmModuleDbEntities.size(); i++) {
if("1".equals(mdmModuleDbEntities.get(i).getDbType())){
Map<String,String> map = new HashMap<>();
Map<String,Object> map = new HashMap<>();
map.put("tableName",mdmModuleDbEntities.get(i).getDbName());
map.put("documentRule",documentRule);
object = mdmModuleDao.queryMdmST(map);
@ -245,6 +254,18 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
return BaseResult.getFailureMessageEntity("当前数据不存在");
}
if(mdmModuleDistributeDetailEntities != null && mdmModuleDistributeDetailEntities.size() > 0){
Map<String,Object> checkData = new HashMap<>();
checkData.put("tableName",mdmModuleDbEntities.get(i).getDbName());
checkData.put("documentRule",documentRule);
checkData.put("mdmModuleDistributeDetailEntities",mdmModuleDistributeDetailEntities);
JSONObject object1 = mdmModuleDao.queryMdmST(checkData);
if(object1.getString("id") == null || "".equals(object1.getString("id")) ){
taskDetailEntity.setResult("当前数据不符合规则不发送");
taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
return BaseResult.getFailureMessageEntity("当前数据不符合规则不发送");
}
}
//查看主表是否有字段是关联的
if(mdmModuleDbFiledsRuleEntities != null && mdmModuleDbFiledsRuleEntities.size() > 0){
for (int i1 = 0; i1 < mdmModuleDbFiledsRuleEntities.size(); i1++) {
@ -252,7 +273,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
if(mdmModuleDbFiledsEntities != null && mdmModuleDbFiledsEntities.size() > 0){
for (int i2 = 0; i2 < mdmModuleDbFiledsEntities.size(); i2++) {
if(mdmModuleDbFiledsRuleEntities.get(i1).getFiledId().equals(mdmModuleDbFiledsEntities.get(i2).getId())){
Map<String,String> mapDetail = new HashMap<>();
Map<String,Object> mapDetail = new HashMap<>();
mapDetail.put("tableName",mdmModuleDbFiledsRuleEntities.get(i1).getRuleValue());
mapDetail.put("id",object.getString(mdmModuleDbFiledsEntities.get(i2).getEnName()));
JSONObject objectDetail = mdmModuleDao.queryMdmST(mapDetail);
@ -281,7 +302,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
for (int i2 = 0; i2 < mdmModuleDbFiledsEntities.size(); i2++) {
if(mdmModuleDbFiledsRuleEntities.get(i1).getFiledId().equals(mdmModuleDbFiledsEntities.get(i2).getId())){
for (int i3 = 0; i3 < detail.size(); i3++) {
Map<String,String> mapDetail = new HashMap<>();
Map<String,Object> mapDetail = new HashMap<>();
mapDetail.put("tableName",mdmModuleDbFiledsRuleEntities.get(i1).getRuleValue());
mapDetail.put("id",detail.get(i3).getString(mdmModuleDbFiledsEntities.get(i2).getEnName()));
JSONObject objectDetail = mdmModuleDao.queryMdmST(mapDetail);
@ -326,7 +347,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
}catch (Exception e){
taskDetailEntity.setResult("分发脚本转换错误");
taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
//return BaseResult.getFailureMessageEntity("分发脚本转换错误");
return BaseResult.getFailureMessageEntity("分发脚本转换错误");
}
}
Map<String, String> headers = new HashMap<>();
@ -349,9 +370,53 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
return BaseResult.getFailureMessageEntity("发送错误");
}
}
}else {
//执行正常下发
}else {//执行正常下发
//查询主数据
MdmModuleEntity queryMdmModuleEntity = new MdmModuleEntity();
queryMdmModuleEntity.setSts("Y");
List<MdmModuleEntity> mdmModuleEntities = mdmModuleDao.queryBase(queryMdmModuleEntity);
if(mdmModuleEntities == null || mdmModuleEntities.size() == 0){
return BaseResult.getSuccessMessageEntity("主数据未设置,不需要下发");
}
//查询下发的配置 没有直接跳过
for (int i = 0; i < mdmModuleEntities.size(); i++) {
MdmModuleDistributeEntity queryMdmModuleDistributeEntity = new MdmModuleDistributeEntity();
queryMdmModuleDistributeEntity.setMdmId(mdmModuleEntities.get(i).getId());
queryMdmModuleDistributeEntity.setEnabledType("1");
queryMdmModuleDistributeEntity.setEnabledState("1");
List<MdmModuleDistributeEntity> mdmModuleDistributeEntities = mdmModuleDistributeDao.queryBase(queryMdmModuleDistributeEntity);
if(mdmModuleDistributeEntities == null || mdmModuleDistributeEntities.size() == 0){
continue;
}
//查询主数据db
MdmModuleDbEntity queryMdmModuleDbEntity = new MdmModuleDbEntity();
queryMdmModuleDbEntity.setMdmId(mdmModuleEntities.get(i).getId());
List<MdmModuleDbEntity> mdmModuleDbEntities = mdmServiceCache.queryMdmModuleDb(queryMdmModuleDbEntity);
if(mdmModuleDbEntities == null || mdmModuleDbEntities.size() == 0){
continue;
}
//查询主数据字段
MdmModuleDbFiledsEntity queryFild = new MdmModuleDbFiledsEntity();
queryFild.setMdmId(mdmModuleEntities.get(i).getId());
List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntities = mdmServiceCache.queryMdmModuleDbFileds(queryFild);
if(mdmModuleDbFiledsEntities == null || mdmModuleDbFiledsEntities.size() == 0){
continue;
}
//字段的规则
MdmModuleDbFiledsRuleEntity queryFildRule = new MdmModuleDbFiledsRuleEntity();
queryFildRule.setMdmId(mdmModuleEntities.get(i).getId());
queryFildRule.setRuleCode("service");
List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRuleEntities = mdmModuleDbFiledsRuleDao.queryBase(queryFildRule);
//新增
doAdd(mdmModuleDbEntities,mdmModuleDistributeEntities,mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
//修改
doUpdate(mdmModuleDbEntities,mdmModuleDistributeEntities,mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
//删除
doDelete(mdmModuleDbEntities,mdmModuleDistributeEntities,mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
}
}
}
@ -363,6 +428,515 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
return BaseResult.getSuccessMessageEntity("执行成功");
}
private void doDelete(List<MdmModuleDbEntity> mdmModuleDbEntities, List<MdmModuleDistributeEntity> mdmModuleDistributeEntities, List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRuleEntities, List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntities) {
//查询一千条数据
String mainDb = null;
List<JSONObject> objects = new ArrayList<>();
for (int i2 = 0; i2 < mdmModuleDbEntities.size(); i2++) {
if("1".equals(mdmModuleDbEntities.get(i2).getDbType())) {
mainDb = mdmModuleDbEntities.get(i2).getDbName();
}
}
if(mainDb == null){
return;
}
Map<String, Object> map1 = new HashMap<>();
map1.put("tableName",mainDb);
map1.put("dataStatus", "N");
map1.put("deleteStatus", "0");
map1.put("size", 1000);
objects = mdmModuleDao.queryMdmSTs(map1);
if(objects == null || objects.size() == 0){
return;
}
for (int i1 = 0; i1 < mdmModuleDistributeEntities.size(); i1++) {
//查询下发的配置
MdmModuleDistributeDetailEntity mdmModuleDistributeDetailEntity = new MdmModuleDistributeDetailEntity() ;
mdmModuleDistributeDetailEntity.setDistributeId(mdmModuleDistributeEntities.get(i1).getId());
mdmModuleDistributeDetailEntity.setSts("Y");
List<MdmModuleDistributeDetailEntity> mdmModuleDistributeDetailEntities = mdmModuleDistributeDetailDao.queryBase(mdmModuleDistributeDetailEntity);
//查询这一千条数据是否符合规则
Map<String, Object> map = new HashMap<>();
map.put("tableName", mainDb);
map.put("dataStatus", "N");
map.put("deleteStatus", "0");
map.put("mdmModuleDistributeDetailEntities", mdmModuleDistributeDetailEntities);
map.put("ids", objects);
List<JSONObject> doObjects = mdmModuleDao.queryMdmSTs(map);
if(doObjects == null || doObjects.size() == 0){
continue;
}
if(mdmModuleDistributeEntities.get(i1).getDeleteApi() == null || "".equals(mdmModuleDistributeEntities.get(i1).getDeleteApi())){
for (int i = 0; i < doObjects.size(); i++) {
saveMdmModuleSendLogEntity("2","删除接口未设置",mainDb,objects.get(i).getString("id"),null,null,doObjects.get(i).toJSONString(),"3");
}
return ;
}
SysApplicationApiEntity apiEntity = sysApplicationApiDao.get(mdmModuleDistributeEntities.get(i1).getDeleteApi());
if(apiEntity == null || apiEntity.getId() == null ){
for (int i = 0; i < doObjects.size(); i++) {
saveMdmModuleSendLogEntity("2","删除接口未找到",mainDb,objects.get(i).getString("id"),null,null,doObjects.get(i).toJSONString(),"3");
}
return ;
}
SysApplicationEntity sysApplicationEntity = sysApplicationDao.get(apiEntity.getAppId());
if(sysApplicationEntity == null || sysApplicationEntity.getId() == null ){
for (int i = 0; i < doObjects.size(); i++) {
saveMdmModuleSendLogEntity("2","删除接口的应用未找到",mainDb,objects.get(i).getString("id"),null,apiEntity.getApiName(),doObjects.get(i).toJSONString(),"3");
}
return ;
}
SysApplicationScriptEntity scriptEntity = null;
if(mdmModuleDistributeEntities.get(i1).getDeleteScript() != null && !"".equals(mdmModuleDistributeEntities.get(i1).getDeleteScript())){
scriptEntity = sysApplicationScriptDao.get(mdmModuleDistributeEntities.get(i1).getDeleteScript());
if(scriptEntity == null || scriptEntity.getId() == null ){
for (int i = 0; i < doObjects.size(); i++) {
saveMdmModuleSendLogEntity("2","删除接口脚本未找到",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"3");
}
return ;
}
}
for (int i = 0; i < doObjects.size(); i++) {
//查询发送日志是否已经有这条数据
MdmModuleSendLogEntity mdmModuleSendLogEntity = new MdmModuleSendLogEntity();
mdmModuleSendLogEntity.setTableName(mainDb+"_send_log");
mdmModuleSendLogEntity.setFormmainId(doObjects.get(i).getString("id"));
mdmModuleSendLogEntity.setSts("Y");
mdmModuleSendLogEntity.setOptionType("3");
Integer num = mdmModuleSendLogDao.getCount(mdmModuleSendLogEntity);
if(num > 0){//已经过不发送
continue;
}
getDetailData(mdmModuleDbEntities,doObjects.get(i),mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
//执行脚本
JSONObject groovy = new JSONObject();
JSONObject parameterJson = new JSONObject();
parameterJson.put("header",apiEntity.getHeaderIn());
parameterJson.put("body",apiEntity.getBodyIn());
parameterJson.put("query",apiEntity.getQueryIn());
parameterJson.put("data",doObjects.get(i));
/** head */
Map<String, String> header = null;
/** query */
String querys = null;
/** body */
String bodys = doObjects.get(i).toJSONString();
if(scriptEntity != null && scriptEntity.getId() != null ){
groovy.put("code",scriptEntity.getScriptCode());
groovy.put("className",scriptEntity.getClassName());
groovy.put("name",scriptEntity.getScriptName());
groovy.put("methodStr",scriptEntity.getScriptData());
groovy.put("parameterJson",parameterJson);
JSONObject groovyStr = new JSONObject();
groovyStr.put("jsonStr",groovy);
try {
SysExtensionApiEntity jsonResultEntity = groovyIntegrationService.groovyScriptExecution(groovy);
header = jsonResultEntity.getHeaders();
querys = jsonResultEntity.getQuerys();
bodys = jsonResultEntity.getBodys();
}catch (Exception e){
saveMdmModuleSendLogEntity("2","脚本处理失败",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"3");
continue;
}
}
Map<String, String> headers = new HashMap<>();
headers.put("publicKey","ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj");
headers.put("secretKey","fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=");
headers.put("appId",sysApplicationEntity.getAppId().toString());
headers.put("apiCode",apiEntity.getApiCode().toString());
if(header != null){
headers.putAll(header);
}
//组装数据发送
JsonResultEntity jsonResultEntity = sendData(apiEntity,headers,bodys,querys);
if(jsonResultEntity.isFlag()){
//保存日志
saveMdmModuleSendLogEntity("1","发送成功",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"3");
continue;
}else {
//保存日志
saveMdmModuleSendLogEntity("2","转发失败",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"3");
continue;
}
}
}
//所有下发发送完成修改数据状态
for (int i = 0; i < objects.size(); i++) {
Map<String, Object> updateMap = new HashMap<>();
updateMap.put("tableName",mainDb);
updateMap.put("dataStatus", "N");
updateMap.put("deleteStatus", "1");
updateMap.put("id", objects.get(i).getString("id"));
mdmModuleDao.updateMdmSTs(updateMap);
}
}
private void doUpdate(List<MdmModuleDbEntity> mdmModuleDbEntities, List<MdmModuleDistributeEntity> mdmModuleDistributeEntities, List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRuleEntities, List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntities) {
//查询一千条数据
String mainDb = null;
List<JSONObject> objects = new ArrayList<>();
for (int i2 = 0; i2 < mdmModuleDbEntities.size(); i2++) {
if("1".equals(mdmModuleDbEntities.get(i2).getDbType())) {
mainDb = mdmModuleDbEntities.get(i2).getDbName();
}
}
if(mainDb == null){
return;
}
Map<String, Object> map1 = new HashMap<>();
map1.put("tableName",mainDb);
map1.put("dataStatus", "F");
map1.put("updateStatus", "0");
map1.put("size", 1000);
objects = mdmModuleDao.queryMdmSTs(map1);
if(objects == null || objects.size() == 0){
return;
}
for (int i1 = 0; i1 < mdmModuleDistributeEntities.size(); i1++) {
//查询下发的配置
MdmModuleDistributeDetailEntity mdmModuleDistributeDetailEntity = new MdmModuleDistributeDetailEntity() ;
mdmModuleDistributeDetailEntity.setDistributeId(mdmModuleDistributeEntities.get(i1).getId());
mdmModuleDistributeDetailEntity.setSts("Y");
List<MdmModuleDistributeDetailEntity> mdmModuleDistributeDetailEntities = mdmModuleDistributeDetailDao.queryBase(mdmModuleDistributeDetailEntity);
//查询这一千条数据是否符合规则
Map<String, Object> map = new HashMap<>();
map.put("tableName", mainDb);
map.put("dataStatus", "F");
map.put("updateStatus", "0");
map.put("mdmModuleDistributeDetailEntities", mdmModuleDistributeDetailEntities);
map.put("ids", objects);
List<JSONObject> doObjects = mdmModuleDao.queryMdmSTs(map);
if(doObjects == null || doObjects.size() == 0){
continue;
}
if(mdmModuleDistributeEntities.get(i1).getUpdateApi() == null || "".equals(mdmModuleDistributeEntities.get(i1).getUpdateApi())){
for (int i = 0; i < doObjects.size(); i++) {
saveMdmModuleSendLogEntity("2","修改接口未设置",mainDb,objects.get(i).getString("id"),null,null,doObjects.get(i).toJSONString(),"2");
}
return ;
}
SysApplicationApiEntity apiEntity = sysApplicationApiDao.get(mdmModuleDistributeEntities.get(i1).getUpdateApi());
if(apiEntity == null || apiEntity.getId() == null ){
for (int i = 0; i < doObjects.size(); i++) {
saveMdmModuleSendLogEntity("2","修改接口未查找到",mainDb,objects.get(i).getString("id"),null,null,doObjects.get(i).toJSONString(),"2");
}
return ;
}
SysApplicationEntity sysApplicationEntity = sysApplicationDao.get(apiEntity.getAppId());
if(sysApplicationEntity == null || sysApplicationEntity.getId() == null ){
for (int i = 0; i < doObjects.size(); i++) {
saveMdmModuleSendLogEntity("2","应用未查找到",mainDb,objects.get(i).getString("id"),null,apiEntity.getApiName(),doObjects.get(i).toJSONString(),"2");
}
return ;
}
SysApplicationScriptEntity scriptEntity = null;
if(mdmModuleDistributeEntities.get(i1).getUpdateScript() != null && !"".equals(mdmModuleDistributeEntities.get(i1).getUpdateScript())){
scriptEntity = sysApplicationScriptDao.get(mdmModuleDistributeEntities.get(i1).getUpdateScript());
if(scriptEntity == null || scriptEntity.getId() == null ){
for (int i = 0; i < doObjects.size(); i++) {
saveMdmModuleSendLogEntity("2","脚本未查找到",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"2");
}
return ;
}
}
for (int i = 0; i < doObjects.size(); i++) {
getDetailData(mdmModuleDbEntities,doObjects.get(i),mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
//执行脚本
JSONObject groovy = new JSONObject();
JSONObject parameterJson = new JSONObject();
parameterJson.put("header",apiEntity.getHeaderIn());
parameterJson.put("body",apiEntity.getBodyIn());
parameterJson.put("query",apiEntity.getQueryIn());
parameterJson.put("data",doObjects.get(i));
/** head */
Map<String, String> header = null;
/** query */
String querys = null;
/** body */
String bodys = doObjects.get(i).toJSONString();
if(scriptEntity != null && scriptEntity.getId() != null ){
groovy.put("code",scriptEntity.getScriptCode());
groovy.put("className",scriptEntity.getClassName());
groovy.put("name",scriptEntity.getScriptName());
groovy.put("methodStr",scriptEntity.getScriptData());
groovy.put("parameterJson",parameterJson);
JSONObject groovyStr = new JSONObject();
groovyStr.put("jsonStr",groovy);
try {
SysExtensionApiEntity jsonResultEntity = groovyIntegrationService.groovyScriptExecution(groovy);
header = jsonResultEntity.getHeaders();
querys = jsonResultEntity.getQuerys();
bodys = jsonResultEntity.getBodys();
}catch (Exception e){
saveMdmModuleSendLogEntity("2","脚本处理失败",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"2");
continue;
}
}
Map<String, String> headers = new HashMap<>();
headers.put("publicKey","ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj");
headers.put("secretKey","fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=");
headers.put("appId",sysApplicationEntity.getAppId().toString());
headers.put("apiCode",apiEntity.getApiCode().toString());
if(header != null){
headers.putAll(header);
}
//组装数据发送
JsonResultEntity jsonResultEntity = sendData(apiEntity,headers,bodys,querys);
if(jsonResultEntity.isFlag()){
//保存日志
saveMdmModuleSendLogEntity("1","发送成功",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"2");
continue;
}else {
//保存日志
saveMdmModuleSendLogEntity("2","转发失败",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"2");
continue;
}
}
}
//所有下发发送完成修改数据状态
for (int i = 0; i < objects.size(); i++) {
Map<String, Object> updateMap = new HashMap<>();
updateMap.put("tableName",mainDb);
updateMap.put("dataStatus", "F");
updateMap.put("updateStatus", "1");
updateMap.put("id", objects.get(i).getString("id"));
mdmModuleDao.updateMdmSTs(updateMap);
}
}
/**
* @Author lvleigang
* @Description 处理新增数据
* @Date 1:55 下午 2024/6/19
* @param mdmModuleDbEntities
* @param mdmModuleDistributeEntities
* @return void
**/
private void doAdd(List<MdmModuleDbEntity> mdmModuleDbEntities, List<MdmModuleDistributeEntity> mdmModuleDistributeEntities,List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRuleEntities,List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntities ) {
//查询一千条数据
String mainDb = null;
List<JSONObject> objects = new ArrayList<>();
for (int i2 = 0; i2 < mdmModuleDbEntities.size(); i2++) {
if("1".equals(mdmModuleDbEntities.get(i2).getDbType())) {
mainDb = mdmModuleDbEntities.get(i2).getDbName();
}
}
if(mainDb == null){
return;
}
Map<String, Object> map1 = new HashMap<>();
map1.put("tableName",mainDb);
map1.put("dataStatus", "Y");
map1.put("addStatus", "0");
map1.put("size", 1000);
objects = mdmModuleDao.queryMdmSTs(map1);
if(objects == null || objects.size() == 0){
return;
}
for (int i1 = 0; i1 < mdmModuleDistributeEntities.size(); i1++) {
//查询下发的配置
MdmModuleDistributeDetailEntity mdmModuleDistributeDetailEntity = new MdmModuleDistributeDetailEntity() ;
mdmModuleDistributeDetailEntity.setDistributeId(mdmModuleDistributeEntities.get(i1).getId());
mdmModuleDistributeDetailEntity.setSts("Y");
List<MdmModuleDistributeDetailEntity> mdmModuleDistributeDetailEntities = mdmModuleDistributeDetailDao.queryBase(mdmModuleDistributeDetailEntity);
//查询这一千条数据是否符合规则
Map<String, Object> map = new HashMap<>();
map.put("tableName", mainDb);
map.put("dataStatus", "Y");
map.put("addStatus", "0");
map.put("mdmModuleDistributeDetailEntities", mdmModuleDistributeDetailEntities);
map.put("ids", objects);
List<JSONObject> doObjects = mdmModuleDao.queryMdmSTs(map);
if(doObjects == null || doObjects.size() == 0){
continue;
}
if(mdmModuleDistributeEntities.get(i1).getAddApi() == null || "".equals(mdmModuleDistributeEntities.get(i1).getAddApi())){
for (int i = 0; i < doObjects.size(); i++) {
saveMdmModuleSendLogEntity("2","新增接口未设置",mainDb,objects.get(i).getString("id"),null,null,doObjects.get(i).toJSONString(),"1");
}
return ;
}
SysApplicationApiEntity apiEntity = sysApplicationApiDao.get(mdmModuleDistributeEntities.get(i1).getAddApi());
if(apiEntity == null || apiEntity.getId() == null ){
for (int i = 0; i < doObjects.size(); i++) {
saveMdmModuleSendLogEntity("2","新增接口未查找到",mainDb,objects.get(i).getString("id"),null,null,doObjects.get(i).toJSONString(),"1");
}
return ;
}
SysApplicationEntity sysApplicationEntity = sysApplicationDao.get(apiEntity.getAppId());
if(sysApplicationEntity == null || sysApplicationEntity.getId() == null ){
for (int i = 0; i < doObjects.size(); i++) {
saveMdmModuleSendLogEntity("2","应用未查找到",mainDb,objects.get(i).getString("id"),null,apiEntity.getApiName(),doObjects.get(i).toJSONString(),"1");
}
return ;
}
SysApplicationScriptEntity scriptEntity = null;
if(mdmModuleDistributeEntities.get(i1).getAddScript() != null && !"".equals(mdmModuleDistributeEntities.get(i1).getAddScript())){
scriptEntity = sysApplicationScriptDao.get(mdmModuleDistributeEntities.get(i1).getAddScript());
if(scriptEntity == null || scriptEntity.getId() == null ){
for (int i = 0; i < doObjects.size(); i++) {
saveMdmModuleSendLogEntity("2","脚本未查找到",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"1");
}
return ;
}
}
for (int i = 0; i < doObjects.size(); i++) {
//查询是否已经手动发送过只有新增校验查询发送日志是否已经有这条数据
MdmModuleSendLogEntity mdmModuleSendLogEntity = new MdmModuleSendLogEntity();
mdmModuleSendLogEntity.setTableName(mainDb+"_send_log");
mdmModuleSendLogEntity.setFormmainId(doObjects.get(i).getString("id"));
mdmModuleSendLogEntity.setSts("Y");
mdmModuleSendLogEntity.setOptionType("1");
Integer num = mdmModuleSendLogDao.getCount(mdmModuleSendLogEntity);
if(num > 0){//已经新增过不发送
continue;
}
getDetailData(mdmModuleDbEntities,doObjects.get(i),mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
//执行脚本
JSONObject groovy = new JSONObject();
JSONObject parameterJson = new JSONObject();
parameterJson.put("header",apiEntity.getHeaderIn());
parameterJson.put("body",apiEntity.getBodyIn());
parameterJson.put("query",apiEntity.getQueryIn());
parameterJson.put("data",doObjects.get(i));
/** head */
Map<String, String> header = null;
/** query */
String querys = null;
/** body */
String bodys = doObjects.get(i).toJSONString();
if(scriptEntity != null && scriptEntity.getId() != null ){
groovy.put("code",scriptEntity.getScriptCode());
groovy.put("className",scriptEntity.getClassName());
groovy.put("name",scriptEntity.getScriptName());
groovy.put("methodStr",scriptEntity.getScriptData());
groovy.put("parameterJson",parameterJson);
JSONObject groovyStr = new JSONObject();
groovyStr.put("jsonStr",groovy);
try {
SysExtensionApiEntity jsonResultEntity = groovyIntegrationService.groovyScriptExecution(groovy);
header = jsonResultEntity.getHeaders();
querys = jsonResultEntity.getQuerys();
bodys = jsonResultEntity.getBodys();
}catch (Exception e){
saveMdmModuleSendLogEntity("2","脚本处理失败",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"1");
continue;
}
}
Map<String, String> headers = new HashMap<>();
headers.put("publicKey","ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj");
headers.put("secretKey","fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=");
headers.put("appId",sysApplicationEntity.getAppId().toString());
headers.put("apiCode",apiEntity.getApiCode().toString());
if(header != null){
headers.putAll(header);
}
//组装数据发送
JsonResultEntity jsonResultEntity = sendData(apiEntity,headers,bodys,querys);
if(jsonResultEntity.isFlag()){
//保存日志
saveMdmModuleSendLogEntity("1","发送成功",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"1");
continue;
}else {
//保存日志
saveMdmModuleSendLogEntity("2","转发失败",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),apiEntity.getApiName(),doObjects.get(i).toJSONString(),"1");
continue;
}
}
}
//所有下发发送完成修改数据状态
for (int i = 0; i < objects.size(); i++) {
Map<String, Object> updateMap = new HashMap<>();
updateMap.put("tableName",mainDb);
updateMap.put("dataStatus", "Y");
updateMap.put("addStatus", "1");
updateMap.put("id", objects.get(i).getString("id"));
mdmModuleDao.updateMdmSTs(updateMap);
}
}
private void saveMdmModuleSendLogEntity(String dataType,String remark,String dbname,String formmain_id, String target_app, String target_api, String source_data, String option_type) {
MdmModuleSendLogEntity mdmModuleSendLogEntity = new MdmModuleSendLogEntity();
mdmModuleSendLogEntity.setTableName(dbname+"_send_log");
mdmModuleSendLogEntity.setCreate();
mdmModuleSendLogEntity.setId(UUIDUtils.getUUID());
mdmModuleSendLogEntity.setSts("Y");
mdmModuleSendLogEntity.setCreate_user_id("1");
mdmModuleSendLogEntity.setModify_user_id("1");
mdmModuleSendLogEntity.setCreate_time(new Date());
mdmModuleSendLogEntity.setModify_time(new Date());
mdmModuleSendLogEntity.setOrg_id("0");
mdmModuleSendLogEntity.setCompanyId("0");
mdmModuleSendLogEntity.setFormmainId(formmain_id);
mdmModuleSendLogEntity.setTargetApp(target_app);
mdmModuleSendLogEntity.setTargetApi(target_api);
mdmModuleSendLogEntity.setSourceData(source_data);
mdmModuleSendLogEntity.setOptionType(option_type);
mdmModuleSendLogEntity.setDataType(dataType);
mdmModuleSendLogEntity.setRemark(remark);
mdmModuleSendLogDao.save(mdmModuleSendLogEntity);
}
private JSONObject getDetailData(List<MdmModuleDbEntity> mdmModuleDbEntities, JSONObject object, List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRuleEntities,List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntities) {
for (int i = 0; i < mdmModuleDbEntities.size(); i++) {
if("2".equals(mdmModuleDbEntities.get(i).getDbType())){
Map<String,String> map = new HashMap<>();
map.put("tableName",mdmModuleDbEntities.get(i).getDbName());
map.put("formmainId",object.getString("id"));
List<JSONObject> detail = mdmModuleDao.queryMdmSTDetail(map);
//查看主表是否有字段是关联的
if(detail != null && detail.size() > 0){
if(mdmModuleDbFiledsRuleEntities != null && mdmModuleDbFiledsRuleEntities.size() > 0){
for (int i1 = 0; i1 < mdmModuleDbFiledsRuleEntities.size(); i1++) {
if(mdmModuleDbFiledsRuleEntities.get(i1).getDbId().equals(mdmModuleDbEntities.get(i).getId())){
if(mdmModuleDbFiledsEntities != null && mdmModuleDbFiledsEntities.size() > 0){
for (int i2 = 0; i2 < mdmModuleDbFiledsEntities.size(); i2++) {
if(mdmModuleDbFiledsRuleEntities.get(i1).getFiledId().equals(mdmModuleDbFiledsEntities.get(i2).getId())){
for (int i3 = 0; i3 < detail.size(); i3++) {
Map<String,Object> mapDetail = new HashMap<>();
mapDetail.put("tableName",mdmModuleDbFiledsRuleEntities.get(i1).getRuleValue());
mapDetail.put("id",detail.get(i3).getString(mdmModuleDbFiledsEntities.get(i2).getEnName()));
JSONObject objectDetail = mdmModuleDao.queryMdmST(mapDetail);
detail.get(i3).put(mdmModuleDbFiledsEntities.get(i2).getEnName(),objectDetail);
}
}
}
}
}
}
}
}
object.put(mdmModuleDbEntities.get(i).getDbName(),detail);
}
}
return object;
}
private JsonResultEntity sendData(SysApplicationApiEntity applicationApiEntity, Map<String, String> headers ,String bodys ,String querys) {
StringBuffer urls = new StringBuffer(url);
if (querys != null) {

View File

@ -140,8 +140,8 @@ public class temButtom {
public void test01() {
String a = AESUtil.encrypt("hzya@1314");
System.out.println(a);
//String sa= "{\n \\"status\\": \\"success\\",\n \\"data\\": \\"[{\\\\"pk_corp\\\\":\\\\"1001\\\\",\\\\"unitcode\\\\":\\\\"01\\\\",\\\\"unitname\\\\":\\\\"临安奥星电子股份有限公司\\\\",\\\\"createdate\\\\":\\\\"2024-04-24\\\\",\\\\"deptattr\\\\":\\\\"1\\\\",\\\\"deptname\\\\":\\\\"DEV测试一级部门\\\\",\\\\"deptcode\\\\":\\\\"99\\\\",\\\\"pk_deptdoc\\\\":\\\\"1001F1100000000067AS\\\\"}]\\",\n \\"taskNumber\\": \\"202404250041\\"\n}";
String b = AESUtil.decrypt("62e4295b615a30dbf3b8ee96f41c820b");
System.out.println(b);
}

View File

@ -9,6 +9,8 @@ public class MdmQuery {
//分页
private Integer pageNum;
//分页
private Long mdmCode;
private Integer pageSize;
//表名
private String tableName;
@ -66,4 +68,12 @@ public class MdmQuery {
public void setDetailQueryCondition(List<MdmQuery> detailQueryCondition) {
this.detailQueryCondition = detailQueryCondition;
}
public Long getMdmCode() {
return mdmCode;
}
public void setMdmCode(Long mdmCode) {
this.mdmCode = mdmCode;
}
}

View File

@ -49,8 +49,11 @@ public interface IMdmModuleDao extends IBaseDao<MdmModuleEntity, String> {
Integer deleteTable(Map<String, Object> maps);
JSONObject queryMdmST(Map<String, String> maps);
JSONObject queryMdmST(Map<String, Object> maps);
List<JSONObject> queryMdmSTDetail(Map<String, String> maps);
List<JSONObject> queryMdmSTs(Map<String, Object> map);
void updateMdmSTs(Map<String, Object> updateMap);
}

View File

@ -150,10 +150,20 @@ public class MdmModuleDaoImpl extends MybatisGenericDao<MdmModuleEntity, String>
}
@Override
public JSONObject queryMdmST(Map<String, String> maps) {
public JSONObject queryMdmST(Map<String, Object> maps) {
JSONObject o = (JSONObject) super.selectOne(getSqlIdPrifx() + "queryMdmST", maps);
return o;
}
@Override
public List<JSONObject> queryMdmSTs(Map<String, Object> maps) {
List<JSONObject> o = (List<JSONObject>) super.selectList(getSqlIdPrifx() + "queryMdmST", maps);
return o;
}
@Override
public void updateMdmSTs(Map<String, Object> maps) {
super.update(getSqlIdPrifx() + "updateMdmSTs", maps);
}
@Override
public List<JSONObject> queryMdmSTDetail(Map<String, String> maps) {

View File

@ -397,6 +397,9 @@ where id = #{id}
<!--通过ID获取数据 -->
<select id="alterTable" resultType="java.lang.Integer">
ALTER TABLE ${tableName}
@ -551,7 +554,7 @@ where id = #{id}
${item.getValueByType('a.')}
</foreach>
</if>
and a.sts='Y'
and a.sts='Y' and a.data_status != 'N'
<if test="detailQueryCondition != null and detailQueryCondition.size>0">
<foreach collection="detailQueryCondition" item="item" index="index">
AND a.id IN (
@ -591,7 +594,7 @@ where id = #{id}
</trim>
)
</if>
and sts = 'Y'
and sts = 'Y' and data_status != 'N'
</trim>
order by sorts asc
</select>
@ -605,7 +608,7 @@ where id = #{id}
from ${tableName}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id !='' ">and id = #{id}</if>
and sts = 'Y'
and sts = 'Y' and data_status != 'N'
</trim>
order by sorts asc
</select>
@ -617,7 +620,7 @@ where id = #{id}
${label},
${upId}
from ${tableName}
where sts = 'Y'
where sts = 'Y' and data_status != 'N'
order by sorts asc
</select>
<!-- 查询符合条件的数量 -->
@ -748,7 +751,8 @@ where id = #{id}
</insert>
<update id="deleteTemplateById" parameterType="com.hzya.frame.sys.entity.FormmainDeleteDto">
update ${tableName} set
sts='N',modify_time = now(),modify_user_id = #{loginId}
data_status ='N',modify_time = now(),modify_user_id = #{loginId}
<if test="formmain_id == null ">,delete_status = '0' </if>
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id !='' ">and id = #{id}</if>
<if test="formmain_id != null and formmain_id !='' ">and formmain_id = #{formmain_id}</if>
@ -758,7 +762,7 @@ where id = #{id}
<update id="deleteChilder" parameterType="com.hzya.frame.sys.entity.FormmainDeleteDto">
update ${tableName} set
sts='N',modify_time = now(),modify_user_id = #{loginId}
data_status='N',modify_time = now(),modify_user_id = #{loginId},delete_status = '0'
<trim prefix="where" prefixOverrides="and">
<if test="upIdFiled != null and upIdFiled !='' and upIdFiledValue != null and upIdFiledValue !=''">
and ${upIdFiled} like concat(#{upIdFiledValue},'%')
@ -800,8 +804,65 @@ where id = #{id}
select * from ${tableName}
<trim prefix="where" prefixOverrides="and">
<if test="documentRule != null and documentRule !='' ">and document_rule = #{documentRule}</if>
<if test="dataStatus != null and dataStatus !='' ">and data_status = #{dataStatus}</if>
<if test="addStatus != null and addStatus !='' ">and add_status = #{addStatus}</if>
<if test="updateStatus != null and updateStatus !='' ">and update_status = #{updateStatus}</if>
<if test="deleteStatus != null and deleteStatus !='' ">and delete_status = #{deleteStatus}</if>
<if test="id != null and id !='' ">and id = #{id}</if>
<if test="mdmModuleDistributeDetailEntities != null and mdmModuleDistributeDetailEntities.size>0">
AND
<foreach collection="mdmModuleDistributeDetailEntities" item="item" index="index" open="(" close=")" >
${item.leftBracket} ${item.filedName}
<choose>
<when test="item.compareType == '1'.toString() ">
=
</when>
<when test="item.compareType == '2'.toString() ">
!=
</when>
<when test="item.compareType == '3'.toString() ">
&gt;
</when>
<when test="item.compareType == '4'.toString() ">
&lt;
</when>
</choose>
#{item.filedVaule}
<choose>
<when test="item.connectionSymbol == '1'.toString() ">
<choose>
<when test="item.rightParenthesis == ')'.toString() ">
${item.rightParenthesis} and
</when>
<otherwise>
${item.rightParenthesis}
</otherwise>
</choose>
</when>
<when test="item.connectionSymbol == '2'.toString() ">
<choose>
<when test="item.rightParenthesis == ')'.toString() ">
${item.rightParenthesis} or
</when>
<otherwise>
${item.rightParenthesis}
</otherwise>
</choose>
</when>
<otherwise>
${item.rightParenthesis}
</otherwise>
</choose>
</foreach>
</if>
<if test="ids != null and ids.size>0">
AND id in
<foreach collection="ids" item="item" index="index" open="(" close=")" separator=",">
#{item.id}
</foreach>
</if>
and sts = 'Y'
<if test="size != null and size !='' ">limit #{size}</if>
</trim>
</select>
@ -810,5 +871,17 @@ where id = #{id}
parameterType="java.util.HashMap">
select * from ${tableName} where sts='Y' and formmain_id = #{formmainId}
</select>
<update id="updateMdmSTs" parameterType="java.util.HashMap">
update ${tableName} set
<trim prefixOverrides=",">
<if test="addStatus != null and addStatus !='' ">, add_status = #{addStatus}</if>
,modify_time = now()
</trim>
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id !='' ">and id = #{id}</if>
<if test="dataStatus != null and dataStatus !='' ">and data_status = #{dataStatus}</if>
</trim>
</update>
</mapper>

View File

@ -388,4 +388,13 @@ public interface IMdmModuleService extends IBaseService<MdmModuleEntity, String>
* @return com.hzya.frame.web.entity.JsonResultEntity
**/
JsonResultEntity queryMdmMainDBField(JSONObject jsonObject);
/**
* @Author lvleigang
* @Description 主数据-分发设置-列表获取
* @Date 11:43 上午 2024/6/11
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
**/
JsonResultEntity queryMdmDistributeByMdmCode(JSONObject jsonObject);
}

View File

@ -311,6 +311,7 @@ public class MdmModuleServiceImpl extends BaseService<MdmModuleEntity, String> i
}
entity.setCreate();
mdmModuleDao.save(entity);
entity = mdmModuleDao.get(entity.getId());
return BaseResult.getSuccessMessageEntity("保存成功",entity);
}
@ -558,7 +559,7 @@ public class MdmModuleServiceImpl extends BaseService<MdmModuleEntity, String> i
documentRule.setShowType("1");
documentRule.setQueryType("1");
documentRule.setListType("1");
documentRule.setViewType("2");
documentRule.setViewType("1");
documentRule.setFiledLength("50");
documentRule.setCreate();
documentRule.setDataType("1");
@ -619,6 +620,40 @@ public class MdmModuleServiceImpl extends BaseService<MdmModuleEntity, String> i
source_name.setDataType("1");
mdmModuleDbFiledsEntities.add(source_name);
MdmModuleDbFiledsEntity data_type = new MdmModuleDbFiledsEntity();
data_type.setMdmId(entity.getMdmId());
data_type.setDbId(entity.getId());
data_type.setEnName("data_type");
data_type.setChName("状态");
data_type.setFiledType("3");
data_type.setAddType("1");
data_type.setUpdateType("1");
data_type.setShowType("1");
data_type.setQueryType("1");
data_type.setListType("1");
data_type.setViewType("1");
data_type.setFiledLength("50");
data_type.setCreate();
data_type.setDataType("1");
mdmModuleDbFiledsEntities.add(data_type);
MdmModuleDbFiledsEntity remark = new MdmModuleDbFiledsEntity();
remark.setMdmId(entity.getMdmId());
remark.setDbId(entity.getId());
remark.setEnName("remark");
remark.setChName("备注");
remark.setFiledType("3");
remark.setAddType("1");
remark.setUpdateType("1");
remark.setShowType("1");
remark.setQueryType("1");
remark.setListType("1");
remark.setViewType("1");
remark.setFiledLength("255");
remark.setCreate();
remark.setDataType("1");
mdmModuleDbFiledsEntities.add(remark);
MdmModuleDbFiledsEntity code = new MdmModuleDbFiledsEntity();
code.setMdmId(entity.getMdmId());
code.setDbId(entity.getId());
@ -757,13 +792,47 @@ public class MdmModuleServiceImpl extends BaseService<MdmModuleEntity, String> i
option_type.setCreate();
option_type.setDataType("1");
mdmModuleDbFiledsEntities.add(option_type);
MdmModuleDbFiledsEntity data_type = new MdmModuleDbFiledsEntity();
data_type.setMdmId(entity.getMdmId());
data_type.setDbId(entity.getId());
data_type.setEnName("data_type");
data_type.setChName("状态");
data_type.setFiledType("3");
data_type.setAddType("1");
data_type.setUpdateType("1");
data_type.setShowType("1");
data_type.setQueryType("1");
data_type.setListType("1");
data_type.setViewType("1");
data_type.setFiledLength("255");
data_type.setCreate();
data_type.setDataType("1");
mdmModuleDbFiledsEntities.add(data_type);
MdmModuleDbFiledsEntity remark = new MdmModuleDbFiledsEntity();
remark.setMdmId(entity.getMdmId());
remark.setDbId(entity.getId());
remark.setEnName("remark");
remark.setChName("备注");
remark.setFiledType("3");
remark.setAddType("1");
remark.setUpdateType("1");
remark.setShowType("1");
remark.setQueryType("1");
remark.setListType("1");
remark.setViewType("1");
remark.setFiledLength("255");
remark.setCreate();
remark.setDataType("1");
mdmModuleDbFiledsEntities.add(remark);
}
if ("2".equals(entity.getDbType()) || "1".equals(entity.getDbType())) {
MdmModuleDbFiledsEntity data_status = new MdmModuleDbFiledsEntity();
data_status.setMdmId(entity.getMdmId());
data_status.setDbId(entity.getId());
data_status.setEnName("data_status");
data_status.setChName("数据状态 Y正常 N删除 F修改");
data_status.setChName("数据状态");
data_status.setFiledType("3");
data_status.setAddType("2");
data_status.setUpdateType("2");
@ -2251,6 +2320,24 @@ public class MdmModuleServiceImpl extends BaseService<MdmModuleEntity, String> i
return BaseResult.getFailureMessageEntity("系统错误");
}
List<MdmModuleDistributeEntity> list = mdmModuleDistributeDao.queryBase(entity);
if(list != null && list.size() > 0){
MdmModuleDistributeDetailEntity mdmModuleDistributeDetailEntity = new MdmModuleDistributeDetailEntity();
mdmModuleDistributeDetailEntity.setMdmId(entity.getMdmId());
mdmModuleDistributeDetailEntity.setSts("Y");
List<MdmModuleDistributeDetailEntity> listDetail = mdmModuleDistributeDetailDao.queryBase(mdmModuleDistributeDetailEntity);
if(listDetail != null && listDetail.size() > 0){
for (int i = 0; i < list.size(); i++) {
List<MdmModuleDistributeDetailEntity> mdmModuleDistributeDetailEntities = new ArrayList<>();
for (int i1 = 0; i1 < listDetail.size(); i1++) {
if(listDetail.get(i1).getDistributeId().equals(list.get(i).getId())){
mdmModuleDistributeDetailEntities.add(listDetail.get(i1) );
}
}
list.get(i).setMdmModuleDistributeDetailEntities(mdmModuleDistributeDetailEntities);
}
}
}
return BaseResult.getSuccessMessageEntity("获取分发设置成功", list);
}
@ -2331,12 +2418,16 @@ public class MdmModuleServiceImpl extends BaseService<MdmModuleEntity, String> i
mdmModuleDistributeDetailDao.logicRemoveMultiCondition(mdmModuleDistributeDetailEntity);
if (entity.getMdmModuleDistributeDetailEntities() != null && entity.getMdmModuleDistributeDetailEntities().size() > 0) {
for (int i = 0; i < entity.getMdmModuleDistributeDetailEntities().size(); i++) {
entity.getMdmModuleDistributeDetailEntities().get(i).setSts("Y");
entity.getMdmModuleDistributeDetailEntities().get(i).setMdmId(entity.getMdmId());
entity.getMdmModuleDistributeDetailEntities().get(i).setSts("Y");
if (entity.getMdmModuleDistributeDetailEntities().get(i).getId() != null) {
entity.getMdmModuleDistributeDetailEntities().get(i).setUpdate();
entity.getMdmModuleDistributeDetailEntities().get(i).setDistributeId(entity.getId());
mdmModuleDistributeDetailDao.update(entity.getMdmModuleDistributeDetailEntities().get(i));
} else {
entity.getMdmModuleDistributeDetailEntities().get(i).setCreate();
entity.getMdmModuleDistributeDetailEntities().get(i).setDistributeId(entity.getId());
mdmModuleDistributeDetailDao.save(entity.getMdmModuleDistributeDetailEntities().get(i));
}
}
@ -2577,4 +2668,27 @@ public class MdmModuleServiceImpl extends BaseService<MdmModuleEntity, String> i
}
return BaseResult.getSuccessMessageEntity("查询数据成功", list);
}
/**
* @param object
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 主数据-分发设置-列表获取
* @Date 11:43 上午 2024/6/11
**/
@Override
public JsonResultEntity queryMdmDistributeByMdmCode(JSONObject object) {
MdmModuleDistributeEntity entity = getData("jsonStr", object, MdmModuleDistributeEntity.class);
if (entity == null) {
return BaseResult.getFailureMessageEntity("系统错误");
}
if (entity.getMdmCode() == null || "".equals(entity.getMdmCode())) {
return BaseResult.getFailureMessageEntity("系统错误");
}
MdmModuleEntity mdmModuleEntity = mdmServiceCache.getMdmModuleEntity(entity.getMdmCode());
entity.setMdmId(mdmModuleEntity.getId());
List<MdmModuleDistributeEntity> list = mdmModuleDistributeDao.queryBase(entity);
return BaseResult.getSuccessMessageEntity("获取分发设置成功", list);
}
}

View File

@ -76,6 +76,14 @@
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
<if test="roletype != null and roletype != ''">
and id in (
select
filed_id
from mdm_module_db_fileds_rule
where sts='Y' and rule_code = #{roletype} and rule_value = #{roleValue}
)
</if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>

View File

@ -11,5 +11,6 @@ import com.hzya.frame.basedao.dao.IBaseDao;
*/
public interface IMdmModuleDistributeDao extends IBaseDao<MdmModuleDistributeEntity, String> {
Integer queryCountUse(MdmModuleDistributeEntity mdmModuleDistributeEntity);
}

View File

@ -4,6 +4,9 @@ import com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity;
import com.hzya.frame.mdm.mdmModuleDistribute.dao.IMdmModuleDistributeDao;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import java.util.HashMap;
/**
* 主数据功能应用分发表(MdmModuleDistribute)表数据库访问层
*
@ -12,6 +15,11 @@ import com.hzya.frame.basedao.dao.MybatisGenericDao;
*/
@Repository(value = "MdmModuleDistributeDaoImpl")
public class MdmModuleDistributeDaoImpl extends MybatisGenericDao<MdmModuleDistributeEntity, String> implements IMdmModuleDistributeDao{
@Override
public Integer queryCountUse(MdmModuleDistributeEntity mdmModuleDistributeEntity) {
Integer o = (Integer) super.selectOne(getSqlIdPrifx() + "queryCountUse", mdmModuleDistributeEntity);
return o;
}
}

View File

@ -17,6 +17,8 @@ public class MdmModuleDistributeEntity extends BaseEntity {
private String mdmId;
/** 应用id */
private String appId;
/** 应用id */
private Long mdmCode;
/** 触发类型 0、手动1、自动 */
private String enabledType;
/** 修改接口 */
@ -40,6 +42,13 @@ public class MdmModuleDistributeEntity extends BaseEntity {
/** 公司id */
private List<MdmModuleDistributeDetailEntity> mdmModuleDistributeDetailEntities;
public Long getMdmCode() {
return mdmCode;
}
public void setMdmCode(Long mdmCode) {
this.mdmCode = mdmCode;
}
public String getMdmId() {
return mdmId;
@ -144,5 +153,7 @@ public class MdmModuleDistributeEntity extends BaseEntity {
public void setMdmModuleDistributeDetailEntities(List<MdmModuleDistributeDetailEntity> mdmModuleDistributeDetailEntities) {
this.mdmModuleDistributeDetailEntities = mdmModuleDistributeDetailEntities;
}
}

View File

@ -181,7 +181,7 @@
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity" keyProperty="id" useGeneratedKeys="true">
<insert id="entity_insert" parameterType = "com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity" >
insert into mdm_module_distribute(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
@ -235,7 +235,7 @@
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertBatch" >
insert into mdm_module_distribute(mdm_id, app_id, enabled_type, update_api, update_script, add_api, add_script, delete_api, delete_script, enabled_state, db_id, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
@ -243,7 +243,7 @@
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertOrUpdateBatch" >
insert into mdm_module_distribute(mdm_id, app_id, enabled_type, update_api, update_script, add_api, add_script, delete_api, delete_script, enabled_state, db_id, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
values
<foreach collection="entities" item="entity" separator=",">
@ -324,6 +324,16 @@ update mdm_module_distribute set sts= 'N' ,modify_time = #{modify_time},modify_
<delete id="entity_delete">
delete from mdm_module_distribute where id = #{id}
</delete>
<!-- 查询符合条件的数量 -->
<select id="queryCountUse" resultType="Integer" parameterType = "com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity">
select count(1) from mdm_module_distribute
where sts='Y' and (
<trim prefixOverrides="or" >
<if test="updateScript != null and updateScript != ''"> or update_script = #{updateScript} </if>
<if test="addScript != null and addScript != ''"> or add_script = #{addScript} </if>
<if test="deleteScript != null and deleteScript != ''"> or delete_script = #{deleteScript} </if>
</trim>
)
</select>
</mapper>

View File

@ -7,7 +7,7 @@ import com.hzya.frame.basedao.dao.IBaseDao;
* 主数据功能应用分发明细表(mdm_module_distribute_detail: table)表数据库访问层
*
* @author makejava
* @since 2024-06-14 10:03:50
* @since 2024-06-19 10:34:58
*/
public interface IMdmModuleDistributeDetailDao extends IBaseDao<MdmModuleDistributeDetailEntity, String> {

View File

@ -8,7 +8,7 @@ import com.hzya.frame.basedao.dao.MybatisGenericDao;
* 主数据功能应用分发明细表(MdmModuleDistributeDetail)表数据库访问层
*
* @author makejava
* @since 2024-06-14 10:03:50
* @since 2024-06-19 10:34:58
*/
@Repository(value = "MdmModuleDistributeDetailDaoImpl")
public class MdmModuleDistributeDetailDaoImpl extends MybatisGenericDao<MdmModuleDistributeDetailEntity, String> implements IMdmModuleDistributeDetailDao{

View File

@ -6,7 +6,7 @@ import com.hzya.frame.web.entity.BaseEntity;
* 主数据功能应用分发明细表(MdmModuleDistributeDetail)实体类
*
* @author makejava
* @since 2024-06-14 10:03:50
* @since 2024-06-19 10:34:58
*/
public class MdmModuleDistributeDetailEntity extends BaseEntity {
@ -20,6 +20,8 @@ public class MdmModuleDistributeDetailEntity extends BaseEntity {
private String dataType;
/** 左括号 */
private String leftBracket;
/** 字段id */
private String filedId;
/** 字段名 */
private String filedName;
/** 对比类型 1、等于 2、不等于 3、大于 4、小于 */
@ -74,6 +76,14 @@ public class MdmModuleDistributeDetailEntity extends BaseEntity {
this.leftBracket = leftBracket;
}
public String getFiledId() {
return filedId;
}
public void setFiledId(String filedId) {
this.filedId = filedId;
}
public String getFiledName() {
return filedName;
}

View File

@ -2,35 +2,38 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.mdm.mdmModuleDistributeDetail.dao.impl.MdmModuleDistributeDetailDaoImpl">
<resultMap id="get-MdmModuleDistributeDetailEntity-result" type="com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity" >
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
<result property="distributeId" column="distribute_id" jdbcType="VARCHAR"/>
<result property="apiId" column="api_id" jdbcType="VARCHAR"/>
<result property="dataType" column="data_type" jdbcType="VARCHAR"/>
<result property="leftBracket" column="left_bracket" jdbcType="VARCHAR"/>
<result property="filedName" column="filed_name" jdbcType="VARCHAR"/>
<result property="compareType" column="compare_type" jdbcType="VARCHAR"/>
<result property="filedVaule" column="filed_vaule" jdbcType="VARCHAR"/>
<result property="connectionSymbol" column="connection_symbol" jdbcType="VARCHAR"/>
<result property="rightParenthesis" column="right_parenthesis" jdbcType="VARCHAR"/>
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/>
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
</resultMap>
<resultMap id="get-MdmModuleDistributeDetailEntity-result"
type="com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity">
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
<result property="distributeId" column="distribute_id" jdbcType="VARCHAR"/>
<result property="apiId" column="api_id" jdbcType="VARCHAR"/>
<result property="dataType" column="data_type" jdbcType="VARCHAR"/>
<result property="leftBracket" column="left_bracket" jdbcType="VARCHAR"/>
<result property="filedId" column="filed_id" jdbcType="VARCHAR"/>
<result property="filedName" column="filed_name" jdbcType="VARCHAR"/>
<result property="compareType" column="compare_type" jdbcType="VARCHAR"/>
<result property="filedVaule" column="filed_vaule" jdbcType="VARCHAR"/>
<result property="connectionSymbol" column="connection_symbol" jdbcType="VARCHAR"/>
<result property="rightParenthesis" column="right_parenthesis" jdbcType="VARCHAR"/>
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/>
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id = "MdmModuleDistributeDetailEntity_Base_Column_List">
<sql id="MdmModuleDistributeDetailEntity_Base_Column_List">
id
,mdm_id
,distribute_id
,api_id
,data_type
,left_bracket
,filed_id
,filed_name
,compare_type
,filed_vaule
@ -45,269 +48,311 @@
,org_id
,company_id
</sql>
<!--通过ID获取数据 -->
<select id="entity_get" resultMap="get-MdmModuleDistributeDetailEntity-result">
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-MdmModuleDistributeDetailEntity-result"
parameterType="com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity">
select
<include refid="MdmModuleDistributeDetailEntity_Base_Column_List" />
from mdm_module_distribute_detail where id = #{ id } and sts='Y'
<include refid="MdmModuleDistributeDetailEntity_Base_Column_List"/>
from mdm_module_distribute_detail
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="distributeId != null and distributeId != ''">and distribute_id = #{distributeId}</if>
<if test="apiId != null and apiId != ''">and api_id = #{apiId}</if>
<if test="dataType != null and dataType != ''">and data_type = #{dataType}</if>
<if test="leftBracket != null and leftBracket != ''">and left_bracket = #{leftBracket}</if>
<if test="filedId != null and filedId != ''">and filed_id = #{filedId}</if>
<if test="filedName != null and filedName != ''">and filed_name = #{filedName}</if>
<if test="compareType != null and compareType != ''">and compare_type = #{compareType}</if>
<if test="filedVaule != null and filedVaule != ''">and filed_vaule = #{filedVaule}</if>
<if test="connectionSymbol != null and connectionSymbol != ''">and connection_symbol = #{connectionSymbol}
</if>
<if test="rightParenthesis != null and rightParenthesis != ''">and right_parenthesis = #{rightParenthesis}
</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
<if test="create_time != null">and create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="org_id != null and org_id != ''">and org_id = #{org_id}</if>
<if test="companyId != null and companyId != ''">and company_id = #{companyId}</if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-MdmModuleDistributeDetailEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity">
select
<include refid="MdmModuleDistributeDetailEntity_Base_Column_List" />
from mdm_module_distribute_detail
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
<if test="distributeId != null and distributeId != ''"> and distribute_id = #{distributeId} </if>
<if test="apiId != null and apiId != ''"> and api_id = #{apiId} </if>
<if test="dataType != null and dataType != ''"> and data_type = #{dataType} </if>
<if test="leftBracket != null and leftBracket != ''"> and left_bracket = #{leftBracket} </if>
<if test="filedName != null and filedName != ''"> and filed_name = #{filedName} </if>
<if test="compareType != null and compareType != ''"> and compare_type = #{compareType} </if>
<if test="filedVaule != null and filedVaule != ''"> and filed_vaule = #{filedVaule} </if>
<if test="connectionSymbol != null and connectionSymbol != ''"> and connection_symbol = #{connectionSymbol} </if>
<if test="rightParenthesis != null and rightParenthesis != ''"> and right_parenthesis = #{rightParenthesis} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer"
parameterType="com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity">
select count(1) from mdm_module_distribute_detail
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="distributeId != null and distributeId != ''">and distribute_id = #{distributeId}</if>
<if test="apiId != null and apiId != ''">and api_id = #{apiId}</if>
<if test="dataType != null and dataType != ''">and data_type = #{dataType}</if>
<if test="leftBracket != null and leftBracket != ''">and left_bracket = #{leftBracket}</if>
<if test="filedId != null and filedId != ''">and filed_id = #{filedId}</if>
<if test="filedName != null and filedName != ''">and filed_name = #{filedName}</if>
<if test="compareType != null and compareType != ''">and compare_type = #{compareType}</if>
<if test="filedVaule != null and filedVaule != ''">and filed_vaule = #{filedVaule}</if>
<if test="connectionSymbol != null and connectionSymbol != ''">and connection_symbol = #{connectionSymbol}
</if>
<if test="rightParenthesis != null and rightParenthesis != ''">and right_parenthesis = #{rightParenthesis}
</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
<if test="create_time != null">and create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="org_id != null and org_id != ''">and org_id = #{org_id}</if>
<if test="companyId != null and companyId != ''">and company_id = #{companyId}</if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity">
select count(1) from mdm_module_distribute_detail
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
<if test="distributeId != null and distributeId != ''"> and distribute_id = #{distributeId} </if>
<if test="apiId != null and apiId != ''"> and api_id = #{apiId} </if>
<if test="dataType != null and dataType != ''"> and data_type = #{dataType} </if>
<if test="leftBracket != null and leftBracket != ''"> and left_bracket = #{leftBracket} </if>
<if test="filedName != null and filedName != ''"> and filed_name = #{filedName} </if>
<if test="compareType != null and compareType != ''"> and compare_type = #{compareType} </if>
<if test="filedVaule != null and filedVaule != ''"> and filed_vaule = #{filedVaule} </if>
<if test="connectionSymbol != null and connectionSymbol != ''"> and connection_symbol = #{connectionSymbol} </if>
<if test="rightParenthesis != null and rightParenthesis != ''"> and right_parenthesis = #{rightParenthesis} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="entity_list_like" resultMap="get-MdmModuleDistributeDetailEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity">
select
<include refid="MdmModuleDistributeDetailEntity_Base_Column_List" />
from mdm_module_distribute_detail
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id like concat('%',#{mdmId},'%') </if>
<if test="distributeId != null and distributeId != ''"> and distribute_id like concat('%',#{distributeId},'%') </if>
<if test="apiId != null and apiId != ''"> and api_id like concat('%',#{apiId},'%') </if>
<if test="dataType != null and dataType != ''"> and data_type like concat('%',#{dataType},'%') </if>
<if test="leftBracket != null and leftBracket != ''"> and left_bracket like concat('%',#{leftBracket},'%') </if>
<if test="filedName != null and filedName != ''"> and filed_name like concat('%',#{filedName},'%') </if>
<if test="compareType != null and compareType != ''"> and compare_type like concat('%',#{compareType},'%') </if>
<if test="filedVaule != null and filedVaule != ''"> and filed_vaule like concat('%',#{filedVaule},'%') </if>
<if test="connectionSymbol != null and connectionSymbol != ''"> and connection_symbol like concat('%',#{connectionSymbol},'%') </if>
<if test="rightParenthesis != null and rightParenthesis != ''"> and right_parenthesis like concat('%',#{rightParenthesis},'%') </if>
<if test="sorts != null"> and sorts like concat('%',#{sorts},'%') </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id like concat('%',#{modify_user_id},'%') </if>
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
<if test="org_id != null and org_id != ''"> and org_id like concat('%',#{org_id},'%') </if>
<if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%') </if>
<select id="entity_list_like" resultMap="get-MdmModuleDistributeDetailEntity-result"
parameterType="com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity">
select
<include refid="MdmModuleDistributeDetailEntity_Base_Column_List"/>
from mdm_module_distribute_detail
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
<if test="mdmId != null and mdmId != ''">and mdm_id like concat('%',#{mdmId},'%')</if>
<if test="distributeId != null and distributeId != ''">and distribute_id like
concat('%',#{distributeId},'%')
</if>
<if test="apiId != null and apiId != ''">and api_id like concat('%',#{apiId},'%')</if>
<if test="dataType != null and dataType != ''">and data_type like concat('%',#{dataType},'%')</if>
<if test="leftBracket != null and leftBracket != ''">and left_bracket like concat('%',#{leftBracket},'%')
</if>
<if test="filedId != null and filedId != ''">and filed_id like concat('%',#{filedId},'%')</if>
<if test="filedName != null and filedName != ''">and filed_name like concat('%',#{filedName},'%')</if>
<if test="compareType != null and compareType != ''">and compare_type like concat('%',#{compareType},'%')
</if>
<if test="filedVaule != null and filedVaule != ''">and filed_vaule like concat('%',#{filedVaule},'%')</if>
<if test="connectionSymbol != null and connectionSymbol != ''">and connection_symbol like
concat('%',#{connectionSymbol},'%')
</if>
<if test="rightParenthesis != null and rightParenthesis != ''">and right_parenthesis like
concat('%',#{rightParenthesis},'%')
</if>
<if test="sorts != null">and sorts like concat('%',#{sorts},'%')</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id like
concat('%',#{create_user_id},'%')
</if>
<if test="create_time != null">and create_time like concat('%',#{create_time},'%')</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id like
concat('%',#{modify_user_id},'%')
</if>
<if test="modify_time != null">and modify_time like concat('%',#{modify_time},'%')</if>
<if test="sts != null and sts != ''">and sts like concat('%',#{sts},'%')</if>
<if test="org_id != null and org_id != ''">and org_id like concat('%',#{org_id},'%')</if>
<if test="companyId != null and companyId != ''">and company_id like concat('%',#{companyId},'%')</if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询列表 字段采用or格式 -->
<select id="MdmModuleDistributeDetailentity_list_or" resultMap="get-MdmModuleDistributeDetailEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity">
select
<include refid="MdmModuleDistributeDetailEntity_Base_Column_List" />
from mdm_module_distribute_detail
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> or id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> or mdm_id = #{mdmId} </if>
<if test="distributeId != null and distributeId != ''"> or distribute_id = #{distributeId} </if>
<if test="apiId != null and apiId != ''"> or api_id = #{apiId} </if>
<if test="dataType != null and dataType != ''"> or data_type = #{dataType} </if>
<if test="leftBracket != null and leftBracket != ''"> or left_bracket = #{leftBracket} </if>
<if test="filedName != null and filedName != ''"> or filed_name = #{filedName} </if>
<if test="compareType != null and compareType != ''"> or compare_type = #{compareType} </if>
<if test="filedVaule != null and filedVaule != ''"> or filed_vaule = #{filedVaule} </if>
<if test="connectionSymbol != null and connectionSymbol != ''"> or connection_symbol = #{connectionSymbol} </if>
<if test="rightParenthesis != null and rightParenthesis != ''"> or right_parenthesis = #{rightParenthesis} </if>
<if test="sorts != null"> or sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
<if test="create_time != null"> or create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> or modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> or org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> or company_id = #{companyId} </if>
<!-- 查询列表 字段采用or格式 -->
<select id="MdmModuleDistributeDetailentity_list_or" resultMap="get-MdmModuleDistributeDetailEntity-result"
parameterType="com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity">
select
<include refid="MdmModuleDistributeDetailEntity_Base_Column_List"/>
from mdm_module_distribute_detail
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">or id = #{id}</if>
<if test="mdmId != null and mdmId != ''">or mdm_id = #{mdmId}</if>
<if test="distributeId != null and distributeId != ''">or distribute_id = #{distributeId}</if>
<if test="apiId != null and apiId != ''">or api_id = #{apiId}</if>
<if test="dataType != null and dataType != ''">or data_type = #{dataType}</if>
<if test="leftBracket != null and leftBracket != ''">or left_bracket = #{leftBracket}</if>
<if test="filedId != null and filedId != ''">or filed_id = #{filedId}</if>
<if test="filedName != null and filedName != ''">or filed_name = #{filedName}</if>
<if test="compareType != null and compareType != ''">or compare_type = #{compareType}</if>
<if test="filedVaule != null and filedVaule != ''">or filed_vaule = #{filedVaule}</if>
<if test="connectionSymbol != null and connectionSymbol != ''">or connection_symbol = #{connectionSymbol}
</if>
<if test="rightParenthesis != null and rightParenthesis != ''">or right_parenthesis = #{rightParenthesis}
</if>
<if test="sorts != null">or sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">or create_user_id = #{create_user_id}</if>
<if test="create_time != null">or create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">or modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">or modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">or sts = #{sts}</if>
<if test="org_id != null and org_id != ''">or org_id = #{org_id}</if>
<if test="companyId != null and companyId != ''">or company_id = #{companyId}</if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity" >
insert into mdm_module_distribute_detail(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
<if test="mdmId != null and mdmId != ''"> mdm_id , </if>
<if test="distributeId != null and distributeId != ''"> distribute_id , </if>
<if test="apiId != null and apiId != ''"> api_id , </if>
<if test="dataType != null and dataType != ''"> data_type , </if>
<if test="leftBracket != null and leftBracket != ''"> left_bracket , </if>
<if test="filedName != null and filedName != ''"> filed_name , </if>
<if test="compareType != null and compareType != ''"> compare_type , </if>
<if test="filedVaule != null and filedVaule != ''"> filed_vaule , </if>
<if test="connectionSymbol != null and connectionSymbol != ''"> connection_symbol , </if>
<if test="rightParenthesis != null and rightParenthesis != ''"> right_parenthesis , </if>
<if test="sorts != null"> sorts , </if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
<if test="create_time != null"> create_time , </if>
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id , </if>
<if test="modify_time != null"> modify_time , </if>
<if test="sts != null and sts != ''"> sts , </if>
<if test="org_id != null and org_id != ''"> org_id , </if>
<if test="companyId != null and companyId != ''"> company_id , </if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> #{id} ,</if>
<if test="mdmId != null and mdmId != ''"> #{mdmId} ,</if>
<if test="distributeId != null and distributeId != ''"> #{distributeId} ,</if>
<if test="apiId != null and apiId != ''"> #{apiId} ,</if>
<if test="dataType != null and dataType != ''"> #{dataType} ,</if>
<if test="leftBracket != null and leftBracket != ''"> #{leftBracket} ,</if>
<if test="filedName != null and filedName != ''"> #{filedName} ,</if>
<if test="compareType != null and compareType != ''"> #{compareType} ,</if>
<if test="filedVaule != null and filedVaule != ''"> #{filedVaule} ,</if>
<if test="connectionSymbol != null and connectionSymbol != ''"> #{connectionSymbol} ,</if>
<if test="rightParenthesis != null and rightParenthesis != ''"> #{rightParenthesis} ,</if>
<if test="sorts != null"> #{sorts} ,</if>
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
<if test="create_time != null"> #{create_time} ,</if>
<if test="modify_user_id != null and modify_user_id != ''"> #{modify_user_id} ,</if>
<if test="modify_time != null"> #{modify_time} ,</if>
<if test="sts != null and sts != ''"> #{sts} ,</if>
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" >
insert into mdm_module_distribute_detail(mdm_id, distribute_id, api_id, data_type, left_bracket, filed_name, compare_type, filed_vaule, connection_symbol, right_parenthesis, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.distributeId},#{entity.apiId},#{entity.dataType},#{entity.leftBracket},#{entity.filedName},#{entity.compareType},#{entity.filedVaule},#{entity.connectionSymbol},#{entity.rightParenthesis},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" >
insert into mdm_module_distribute_detail(mdm_id, distribute_id, api_id, data_type, left_bracket, filed_name, compare_type, filed_vaule, connection_symbol, right_parenthesis, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.distributeId},#{entity.apiId},#{entity.dataType},#{entity.leftBracket},#{entity.filedName},#{entity.compareType},#{entity.filedVaule},#{entity.connectionSymbol},#{entity.rightParenthesis},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
</foreach>
on duplicate key update
mdm_id = values(mdm_id),
distribute_id = values(distribute_id),
api_id = values(api_id),
data_type = values(data_type),
left_bracket = values(left_bracket),
filed_name = values(filed_name),
compare_type = values(compare_type),
filed_vaule = values(filed_vaule),
connection_symbol = values(connection_symbol),
right_parenthesis = values(right_parenthesis),
create_user_id = values(create_user_id),
create_time = values(create_time),
modify_user_id = values(modify_user_id),
modify_time = values(modify_time),
sts = values(sts),
org_id = values(org_id),
company_id = values(company_id)</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity" >
update mdm_module_distribute_detail set
<trim suffix="" suffixOverrides=",">
<if test="mdmId != null and mdmId != ''"> mdm_id = #{mdmId},</if>
<if test="distributeId != null and distributeId != ''"> distribute_id = #{distributeId},</if>
<if test="apiId != null and apiId != ''"> api_id = #{apiId},</if>
<if test="dataType != null and dataType != ''"> data_type = #{dataType},</if>
<if test="leftBracket != null and leftBracket != ''"> left_bracket = #{leftBracket},</if>
<if test="filedName != null and filedName != ''"> filed_name = #{filedName},</if>
<if test="compareType != null and compareType != ''"> compare_type = #{compareType},</if>
<if test="filedVaule != null and filedVaule != ''"> filed_vaule = #{filedVaule},</if>
<if test="connectionSymbol != null and connectionSymbol != ''"> connection_symbol = #{connectionSymbol},</if>
<if test="rightParenthesis != null and rightParenthesis != ''"> right_parenthesis = #{rightParenthesis},</if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
<if test="create_time != null"> create_time = #{create_time},</if>
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
<if test="modify_time != null"> modify_time = #{modify_time},</if>
<if test="sts != null and sts != ''"> sts = #{sts},</if>
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
<if test="companyId != null and companyId != ''"> company_id = #{companyId},</if>
</trim>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity" >
<!--新增所有列-->
<insert id="entity_insert"
parameterType="com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity">
insert into mdm_module_distribute_detail(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">id ,</if>
<if test="mdmId != null and mdmId != ''">mdm_id ,</if>
<if test="distributeId != null and distributeId != ''">distribute_id ,</if>
<if test="apiId != null and apiId != ''">api_id ,</if>
<if test="dataType != null and dataType != ''">data_type ,</if>
<if test="leftBracket != null and leftBracket != ''">left_bracket ,</if>
<if test="filedId != null and filedId != ''">filed_id ,</if>
<if test="filedName != null and filedName != ''">filed_name ,</if>
<if test="compareType != null and compareType != ''">compare_type ,</if>
<if test="filedVaule != null and filedVaule != ''">filed_vaule ,</if>
<if test="connectionSymbol != null and connectionSymbol != ''">connection_symbol ,</if>
<if test="rightParenthesis != null and rightParenthesis != ''">right_parenthesis ,</if>
<if test="sorts != null">sorts ,</if>
<if test="create_user_id != null and create_user_id != ''">create_user_id ,</if>
<if test="create_time != null">create_time ,</if>
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id ,</if>
<if test="modify_time != null">modify_time ,</if>
<if test="sts != null and sts != ''">sts ,</if>
<if test="org_id != null and org_id != ''">org_id ,</if>
<if test="companyId != null and companyId != ''">company_id ,</if>
<if test="sorts == null ">sorts,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">#{id} ,</if>
<if test="mdmId != null and mdmId != ''">#{mdmId} ,</if>
<if test="distributeId != null and distributeId != ''">#{distributeId} ,</if>
<if test="apiId != null and apiId != ''">#{apiId} ,</if>
<if test="dataType != null and dataType != ''">#{dataType} ,</if>
<if test="leftBracket != null and leftBracket != ''">#{leftBracket} ,</if>
<if test="filedId != null and filedId != ''">#{filedId} ,</if>
<if test="filedName != null and filedName != ''">#{filedName} ,</if>
<if test="compareType != null and compareType != ''">#{compareType} ,</if>
<if test="filedVaule != null and filedVaule != ''">#{filedVaule} ,</if>
<if test="connectionSymbol != null and connectionSymbol != ''">#{connectionSymbol} ,</if>
<if test="rightParenthesis != null and rightParenthesis != ''">#{rightParenthesis} ,</if>
<if test="sorts != null">#{sorts} ,</if>
<if test="create_user_id != null and create_user_id != ''">#{create_user_id} ,</if>
<if test="create_time != null">#{create_time} ,</if>
<if test="modify_user_id != null and modify_user_id != ''">#{modify_user_id} ,</if>
<if test="modify_time != null">#{modify_time} ,</if>
<if test="sts != null and sts != ''">#{sts} ,</if>
<if test="org_id != null and org_id != ''">#{org_id} ,</if>
<if test="companyId != null and companyId != ''">#{companyId} ,</if>
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from mdm_module_distribute_detail
a WHERE a.sts = 'Y' ),
</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch">
insert into mdm_module_distribute_detail(mdm_id, distribute_id, api_id, data_type, left_bracket, filed_id,
filed_name, compare_type, filed_vaule, connection_symbol, right_parenthesis, create_user_id, create_time,
modify_user_id, modify_time, sts, org_id, company_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.distributeId},#{entity.apiId},#{entity.dataType},#{entity.leftBracket},#{entity.filedId},#{entity.filedName},#{entity.compareType},#{entity.filedVaule},#{entity.connectionSymbol},#{entity.rightParenthesis},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},
'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch">
insert into mdm_module_distribute_detail(mdm_id, distribute_id, api_id, data_type, left_bracket, filed_id,
filed_name, compare_type, filed_vaule, connection_symbol, right_parenthesis, create_user_id, create_time,
modify_user_id, modify_time, sts, org_id, company_id)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.distributeId},#{entity.apiId},#{entity.dataType},#{entity.leftBracket},#{entity.filedId},#{entity.filedName},#{entity.compareType},#{entity.filedVaule},#{entity.connectionSymbol},#{entity.rightParenthesis},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
</foreach>
on duplicate key update
mdm_id = values(mdm_id),
distribute_id = values(distribute_id),
api_id = values(api_id),
data_type = values(data_type),
left_bracket = values(left_bracket),
filed_id = values(filed_id),
filed_name = values(filed_name),
compare_type = values(compare_type),
filed_vaule = values(filed_vaule),
connection_symbol = values(connection_symbol),
right_parenthesis = values(right_parenthesis),
create_user_id = values(create_user_id),
create_time = values(create_time),
modify_user_id = values(modify_user_id),
modify_time = values(modify_time),
sts = values(sts),
org_id = values(org_id),
company_id = values(company_id)
</insert>
<!--通过主键修改方法-->
<update id="entity_update"
parameterType="com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity">
update mdm_module_distribute_detail set
<trim suffix="" suffixOverrides=",">
<if test="mdmId != null and mdmId != ''">mdm_id = #{mdmId},</if>
<if test="distributeId != null and distributeId != ''">distribute_id = #{distributeId},</if>
<if test="apiId != null and apiId != ''">api_id = #{apiId},</if>
<if test="dataType != null and dataType != ''">data_type = #{dataType},</if>
left_bracket = #{leftBracket},
filed_id = #{filedId},
filed_name = #{filedName},
compare_type = #{compareType},
filed_vaule = #{filedVaule},
connection_symbol = #{connectionSymbol},
right_parenthesis = #{rightParenthesis},
<if test="create_user_id != null and create_user_id != ''">create_user_id = #{create_user_id},</if>
<if test="create_time != null">create_time = #{create_time},</if>
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id = #{modify_user_id},</if>
<if test="modify_time != null">modify_time = #{modify_time},</if>
<if test="sts != null and sts != ''">sts = #{sts},</if>
<if test="org_id != null and org_id != ''">org_id = #{org_id},</if>
<if test="companyId != null and companyId != ''">company_id = #{companyId},</if>
</trim>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete"
parameterType="com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity">
update mdm_module_distribute_detail set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
where id = #{id}
</update>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity" >
update mdm_module_distribute_detail set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
<if test="distributeId != null and distributeId != ''"> and distribute_id = #{distributeId} </if>
<if test="apiId != null and apiId != ''"> and api_id = #{apiId} </if>
<if test="dataType != null and dataType != ''"> and data_type = #{dataType} </if>
<if test="leftBracket != null and leftBracket != ''"> and left_bracket = #{leftBracket} </if>
<if test="filedName != null and filedName != ''"> and filed_name = #{filedName} </if>
<if test="compareType != null and compareType != ''"> and compare_type = #{compareType} </if>
<if test="filedVaule != null and filedVaule != ''"> and filed_vaule = #{filedVaule} </if>
<if test="connectionSymbol != null and connectionSymbol != ''"> and connection_symbol = #{connectionSymbol} </if>
<if test="rightParenthesis != null and rightParenthesis != ''"> and right_parenthesis = #{rightParenthesis} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition"
parameterType="com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity">
update mdm_module_distribute_detail set sts= 'N' ,modify_time = #{modify_time},modify_user_id =
#{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
<if test="distributeId != null and distributeId != ''">and distribute_id = #{distributeId}</if>
<if test="apiId != null and apiId != ''">and api_id = #{apiId}</if>
<if test="dataType != null and dataType != ''">and data_type = #{dataType}</if>
<if test="leftBracket != null and leftBracket != ''">and left_bracket = #{leftBracket}</if>
<if test="filedId != null and filedId != ''">and filed_id = #{filedId}</if>
<if test="filedName != null and filedName != ''">and filed_name = #{filedName}</if>
<if test="compareType != null and compareType != ''">and compare_type = #{compareType}</if>
<if test="filedVaule != null and filedVaule != ''">and filed_vaule = #{filedVaule}</if>
<if test="connectionSymbol != null and connectionSymbol != ''">and connection_symbol = #{connectionSymbol}
</if>
<if test="rightParenthesis != null and rightParenthesis != ''">and right_parenthesis = #{rightParenthesis}
</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="companyId != null and companyId != ''">and company_id = #{companyId}</if>
and sts='Y'
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete from mdm_module_distribute_detail where id = #{id}
</delete>

View File

@ -6,7 +6,7 @@ import com.hzya.frame.basedao.service.IBaseService;
* 主数据功能应用分发明细表(MdmModuleDistributeDetail)表服务接口
*
* @author makejava
* @since 2024-06-14 10:03:50
* @since 2024-06-19 10:34:58
*/
public interface IMdmModuleDistributeDetailService extends IBaseService<MdmModuleDistributeDetailEntity, String>{
}

View File

@ -11,7 +11,7 @@ import com.hzya.frame.basedao.service.impl.BaseService;
* 主数据功能应用分发明细表(MdmModuleDistributeDetail)表服务实现类
*
* @author makejava
* @since 2024-06-14 10:03:50
* @since 2024-06-19 10:34:58
*/
@Service(value = "mdmModuleDistributeDetailService")
public class MdmModuleDistributeDetailServiceImpl extends BaseService<MdmModuleDistributeDetailEntity, String> implements IMdmModuleDistributeDetailService {

View File

@ -17,6 +17,10 @@ public class MdmModuleOptionLogEntity extends BaseEntity {
private String formmainId;
/** 来源名称 */
private String sourceName;
/** 状态 1、成功2、失败 */
private String dataType;
/** 备注 */
private String remark;
/** 编码 */
private String code;
/** source_data */
@ -29,6 +33,22 @@ public class MdmModuleOptionLogEntity extends BaseEntity {
private String companyId;
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getDataType() {
return dataType;
}
public void setDataType(String dataType) {
this.dataType = dataType;
}
public String getFormmainId() {
return formmainId;
}

View File

@ -6,7 +6,9 @@
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="formmainId" column="formmain_id" jdbcType="VARCHAR"/>
<result property="sourceName" column="source_name" jdbcType="VARCHAR"/>
<result property="dataType" column="data_type" jdbcType="VARCHAR"/>
<result property="code" column="code" jdbcType="VARCHAR"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
<result property="sourceData" column="source_data" jdbcType="VARCHAR"/>
<result property="optionType" column="option_type" jdbcType="VARCHAR"/>
<result property="optionName" column="option_name" jdbcType="VARCHAR"/>
@ -24,8 +26,10 @@
id
,formmain_id
,source_name
,code
,source_data
,data_type
,code
,remark
,source_data
,option_type
,option_name
,sorts
@ -51,7 +55,9 @@
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="formmainId != null and formmainId != ''"> and formmain_id = #{formmainId} </if>
<if test="sourceName != null and sourceName != ''"> and source_name = #{sourceName} </if>
<if test="dataType != null and dataType != ''"> and data_type = #{dataType} </if>
<if test="code != null and code != ''"> and code = #{code} </if>
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
<if test="sourceData != null and sourceData != ''"> and source_data = #{sourceData} </if>
<if test="optionType != null and optionType != ''"> and option_type = #{optionType} </if>
<if test="optionName != null and optionName != ''"> and option_name = #{optionName} </if>
@ -76,7 +82,9 @@
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="formmainId != null and formmainId != ''"> and formmain_id = #{formmainId} </if>
<if test="sourceName != null and sourceName != ''"> and source_name = #{sourceName} </if>
<if test="dataType != null and dataType != ''"> and data_type = #{dataType} </if>
<if test="code != null and code != ''"> and code = #{code} </if>
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
<if test="sourceData != null and sourceData != ''"> and source_data = #{sourceData} </if>
<if test="optionType != null and optionType != ''"> and option_type = #{optionType} </if>
<if test="optionName != null and optionName != ''"> and option_name = #{optionName} </if>
@ -103,7 +111,9 @@
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
<if test="formmainId != null and formmainId != ''"> and formmain_id like concat('%',#{formmainId},'%') </if>
<if test="sourceName != null and sourceName != ''"> and source_name like concat('%',#{sourceName},'%') </if>
<if test="dataType != null and dataType != ''"> and data_type like concat('%',#{dataType},'%') </if>
<if test="code != null and code != ''"> and code like concat('%',#{code},'%') </if>
<if test="remark != null and remark != ''"> and remark like concat('%',#{remark},'%') </if>
<if test="sourceData != null and sourceData != ''"> and source_data like concat('%',#{sourceData},'%') </if>
<if test="optionType != null and optionType != ''"> and option_type like concat('%',#{optionType},'%') </if>
<if test="optionName != null and optionName != ''"> and option_name like concat('%',#{optionName},'%') </if>
@ -117,7 +127,7 @@
<if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%') </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort == null or sort == ''.toString() "> order by sorts desc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
@ -130,7 +140,9 @@
<if test="id != null and id != ''"> or id = #{id} </if>
<if test="formmainId != null and formmainId != ''"> or formmain_id = #{formmainId} </if>
<if test="sourceName != null and sourceName != ''"> or source_name = #{sourceName} </if>
<if test="dataType != null and dataType != ''"> or data_type = #{dataType} </if>
<if test="code != null and code != ''"> or code = #{code} </if>
<if test="remark != null and remark != ''"> or remark = #{remark} </if>
<if test="sourceData != null and sourceData != ''"> or source_data = #{sourceData} </if>
<if test="optionType != null and optionType != ''"> or option_type = #{optionType} </if>
<if test="optionName != null and optionName != ''"> or option_name = #{optionName} </if>
@ -155,7 +167,9 @@
<if test="id != null and id != ''"> id , </if>
<if test="formmainId != null and formmainId != ''"> formmain_id , </if>
<if test="sourceName != null and sourceName != ''"> source_name , </if>
<if test="dataType != null and dataType != ''"> data_type , </if>
<if test="code != null and code != ''"> code , </if>
<if test="remark != null and remark != ''"> remark , </if>
<if test="sourceData != null and sourceData != ''"> source_data , </if>
<if test="optionType != null and optionType != ''"> option_type , </if>
<if test="optionName != null and optionName != ''"> option_name , </if>
@ -174,7 +188,9 @@
<if test="id != null and id != ''"> #{id} ,</if>
<if test="formmainId != null and formmainId != ''"> #{formmainId} ,</if>
<if test="sourceName != null and sourceName != ''"> #{sourceName} ,</if>
<if test="dataType != null and dataType != ''"> #{dataType} ,</if>
<if test="code != null and code != ''"> #{code} ,</if>
<if test="remark != null and remark != ''"> #{remark} ,</if>
<if test="sourceData != null and sourceData != ''"> #{sourceData} ,</if>
<if test="optionType != null and optionType != ''"> #{optionType} ,</if>
<if test="optionName != null and optionName != ''"> #{optionName} ,</if>
@ -192,23 +208,25 @@
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" >
insert into ${tableName}(formmain_id, source_name, code, source_data, option_type, option_name, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
insert into ${tableName}(formmain_id, source_name,data_type, code,remark, source_data, option_type, option_name, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.formmainId},#{entity.sourceName},#{entity.code},#{entity.sourceData},#{entity.optionType},#{entity.optionName},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
(#{entity.formmainId},#{entity.sourceName},#{entity.dataType},#{entity.code},#{entity.remark},#{entity.sourceData},#{entity.optionType},#{entity.optionName},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" >
insert into ${tableName}(formmain_id, source_name, code, source_data, option_type, option_name, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
insert into ${tableName}(formmain_id, source_name,data_type, code, remark, source_data, option_type, option_name, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.formmainId},#{entity.sourceName},#{entity.code},#{entity.sourceData},#{entity.optionType},#{entity.optionName},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
(#{entity.formmainId},#{entity.sourceName},#{entity.dataType},#{entity.code},#{entity.remark},#{entity.sourceData},#{entity.optionType},#{entity.optionName},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
</foreach>
on duplicate key update
formmain_id = values(formmain_id),
source_name = values(source_name),
data_type = values(data_type),
code = values(code),
remark = values(remark),
source_data = values(source_data),
option_type = values(option_type),
option_name = values(option_name),
@ -225,7 +243,9 @@ update ${tableName} set
<trim suffix="" suffixOverrides=",">
<if test="formmainId != null and formmainId != ''"> formmain_id = #{formmainId},</if>
<if test="sourceName != null and sourceName != ''"> source_name = #{sourceName},</if>
<if test="dataType != null and dataType != ''"> data_type = #{dataType},</if>
<if test="code != null and code != ''"> code = #{code},</if>
<if test="remark != null and remark != ''"> remark = #{remark},</if>
<if test="sourceData != null and sourceData != ''"> source_data = #{sourceData},</if>
<if test="optionType != null and optionType != ''"> option_type = #{optionType},</if>
<if test="optionName != null and optionName != ''"> option_name = #{optionName},</if>
@ -251,7 +271,9 @@ update ${tableName} set sts= 'N' ,modify_time = #{modify_time},modify_user_id =
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="formmainId != null and formmainId != ''"> and formmain_id = #{formmainId} </if>
<if test="sourceName != null and sourceName != ''"> and source_name = #{sourceName} </if>
<if test="dataType != null and dataType != ''"> and data_type = #{dataType} </if>
<if test="code != null and code != ''"> and code = #{code} </if>
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
<if test="sourceData != null and sourceData != ''"> and source_data = #{sourceData} </if>
<if test="optionType != null and optionType != ''"> and option_type = #{optionType} </if>
<if test="optionName != null and optionName != ''"> and option_name = #{optionName} </if>

View File

@ -21,11 +21,30 @@ public class MdmModuleSendLogEntity extends BaseEntity {
private String targetApi;
/** 源数据 */
private String sourceData;
/** 操作类型 */
/** 状态 1、成功2、失败 */
private String dataType;
/** 备注 */
private String remark;
/** 操作类型 1新增2、修改3、删除*/
private String optionType;
/** 公司id */
private String companyId;
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getDataType() {
return dataType;
}
public void setDataType(String dataType) {
this.dataType = dataType;
}
public String getFormmainId() {
return formmainId;

View File

@ -9,6 +9,8 @@
<result property="targetApi" column="target_api" jdbcType="VARCHAR"/>
<result property="sourceData" column="source_data" jdbcType="VARCHAR"/>
<result property="optionType" column="option_type" jdbcType="VARCHAR"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
<result property="dataType" column="data_type" jdbcType="VARCHAR"/>
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
@ -26,7 +28,9 @@
,target_api
,source_data
,option_type
,sorts
,remark
,data_type
,sorts
,create_user_id
,create_time
,modify_user_id
@ -53,6 +57,8 @@
<if test="targetApi != null and targetApi != ''"> and target_api = #{targetApi} </if>
<if test="sourceData != null and sourceData != ''"> and source_data = #{sourceData} </if>
<if test="optionType != null and optionType != ''"> and option_type = #{optionType} </if>
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
<if test="dataType != null and dataType != ''"> and data_type = #{dataType} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
@ -77,6 +83,8 @@
<if test="targetApi != null and targetApi != ''"> and target_api = #{targetApi} </if>
<if test="sourceData != null and sourceData != ''"> and source_data = #{sourceData} </if>
<if test="optionType != null and optionType != ''"> and option_type = #{optionType} </if>
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
<if test="dataType != null and dataType != ''"> and data_type = #{dataType} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
@ -103,6 +111,8 @@
<if test="targetApi != null and targetApi != ''"> and target_api like concat('%',#{targetApi},'%') </if>
<if test="sourceData != null and sourceData != ''"> and source_data like concat('%',#{sourceData},'%') </if>
<if test="optionType != null and optionType != ''"> and option_type like concat('%',#{optionType},'%') </if>
<if test="remark != null and remark != ''"> and remark like concat('%',#{remark},'%') </if>
<if test="dataType != null and dataType != ''"> and data_type like concat('%',#{dataType},'%') </if>
<if test="sorts != null"> and sorts like concat('%',#{sorts},'%') </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
@ -113,7 +123,7 @@
<if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%') </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort == null or sort == ''.toString() "> order by sorts desc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
@ -129,6 +139,8 @@
<if test="targetApi != null and targetApi != ''"> or target_api = #{targetApi} </if>
<if test="sourceData != null and sourceData != ''"> or source_data = #{sourceData} </if>
<if test="optionType != null and optionType != ''"> or option_type = #{optionType} </if>
<if test="remark != null and remark != ''"> or remark = #{remark} </if>
<if test="dataType != null and dataType != ''"> or data_type = #{dataType} </if>
<if test="sorts != null"> or sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
<if test="create_time != null"> or create_time = #{create_time} </if>
@ -153,6 +165,8 @@
<if test="targetApi != null and targetApi != ''"> target_api , </if>
<if test="sourceData != null and sourceData != ''"> source_data , </if>
<if test="optionType != null and optionType != ''"> option_type , </if>
<if test="remark != null and remark != ''"> remark , </if>
<if test="dataType != null and dataType != ''"> data_type , </if>
<if test="sorts != null"> sorts , </if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
<if test="create_time != null"> create_time , </if>
@ -171,6 +185,8 @@
<if test="targetApi != null and targetApi != ''"> #{targetApi} ,</if>
<if test="sourceData != null and sourceData != ''"> #{sourceData} ,</if>
<if test="optionType != null and optionType != ''"> #{optionType} ,</if>
<if test="remark != null and remark != ''"> #{remark} ,</if>
<if test="dataType != null and dataType != ''"> #{dataType} ,</if>
<if test="sorts != null"> #{sorts} ,</if>
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
<if test="create_time != null"> #{create_time} ,</if>
@ -185,18 +201,18 @@
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" >
insert into ${tableName}(formmain_id, target_app, target_api, source_data, option_type, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
insert into ${tableName}(formmain_id, target_app, target_api, source_data, option_type,remark,data_type, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.formmainId},#{entity.targetApp},#{entity.targetApi},#{entity.sourceData},#{entity.optionType},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
(#{entity.formmainId},#{entity.targetApp},#{entity.targetApi},#{entity.sourceData},#{entity.optionType},#{entity.remark},#{entity.dataType},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" >
insert into ${tableName}(formmain_id, target_app, target_api, source_data, option_type, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
insert into ${tableName}(formmain_id, target_app, target_api, source_data, option_type,remark,data_type, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.formmainId},#{entity.targetApp},#{entity.targetApi},#{entity.sourceData},#{entity.optionType},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
(#{entity.formmainId},#{entity.targetApp},#{entity.targetApi},#{entity.sourceData},#{entity.optionType},#{entity.remark},#{entity.dataType},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
</foreach>
on duplicate key update
formmain_id = values(formmain_id),
@ -204,6 +220,8 @@
target_api = values(target_api),
source_data = values(source_data),
option_type = values(option_type),
remark = values(remark),
data_type = values(data_type),
create_user_id = values(create_user_id),
create_time = values(create_time),
modify_user_id = values(modify_user_id),
@ -220,6 +238,8 @@ update ${tableName} set
<if test="targetApi != null and targetApi != ''"> target_api = #{targetApi},</if>
<if test="sourceData != null and sourceData != ''"> source_data = #{sourceData},</if>
<if test="optionType != null and optionType != ''"> option_type = #{optionType},</if>
<if test="remark != null and remark != ''"> remark = #{remark},</if>
<if test="dataType != null and dataType != ''"> data_type = #{dataType},</if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
<if test="create_time != null"> create_time = #{create_time},</if>
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
@ -245,6 +265,8 @@ update ${tableName} set sts= 'N' ,modify_time = #{modify_time},modify_user_id =
<if test="targetApi != null and targetApi != ''"> and target_api = #{targetApi} </if>
<if test="sourceData != null and sourceData != ''"> and source_data = #{sourceData} </if>
<if test="optionType != null and optionType != ''"> and option_type = #{optionType} </if>
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
<if test="dataType != null and dataType != ''"> and data_type = #{dataType} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>

View File

@ -9,19 +9,17 @@ import java.util.List;
* 主数据数据来源(mdm_module_source: table)表数据库访问层
*
* @author makejava
* @since 2024-06-05 11:42:56
* @since 2024-06-19 09:11:50
*/
public interface IMdmModuleSourceDao extends IBaseDao<MdmModuleSourceEntity, String> {
/**
*
*
* @content 根据数据来源内类型是插件的应用类型做分组
* @Param
* @Return
* @Author hecan
* @Param
* @Return
* @Author hecan
* @Date 2024/6/6 10:43
* **/
List<MdmModuleSourceEntity> MdmModuleSourceentityGroupByType();
}

View File

@ -11,10 +11,11 @@ import java.util.List;
* 主数据数据来源(MdmModuleSource)表数据库访问层
*
* @author makejava
* @since 2024-06-05 11:42:56
* @since 2024-06-19 09:11:50
*/
@Repository(value = "MdmModuleSourceDaoImpl")
public class MdmModuleSourceDaoImpl extends MybatisGenericDao<MdmModuleSourceEntity, String> implements IMdmModuleSourceDao{
//根据数据来源内类型是插件的应用类型做分组
@Override
public List<MdmModuleSourceEntity> MdmModuleSourceentityGroupByType() {
@ -22,7 +23,5 @@ public class MdmModuleSourceDaoImpl extends MybatisGenericDao<MdmModuleSourceEnt
return list;
}
}

View File

@ -6,7 +6,7 @@ import com.hzya.frame.web.entity.BaseEntity;
* 主数据数据来源(MdmModuleSource)实体类
*
* @author makejava
* @since 2024-06-05 11:42:57
* @since 2024-06-19 09:11:50
*/
public class MdmModuleSourceEntity extends BaseEntity {
@ -14,10 +14,20 @@ public class MdmModuleSourceEntity extends BaseEntity {
private String mdmId;
/** 来源类型1、插件2、api */
private String sourceType;
/** 来源名称 */
/** 来源应用 */
private String sourceName;
/** 触发类型 1、手动 2、自动 */
private String triggerType;
/** 来源编码 */
private String sourceCode;
/** 新增接口 */
private String addApi;
/** 修改接口 */
private String updateApi;
/** 删除接口 */
private String deleteApi;
/** 启用停用 0、停用1、启用 */
private String enabledState;
/** 公司id */
private String companyId;
private String pluginCode;//插件编码
@ -72,6 +82,14 @@ public class MdmModuleSourceEntity extends BaseEntity {
this.sourceName = sourceName;
}
public String getTriggerType() {
return triggerType;
}
public void setTriggerType(String triggerType) {
this.triggerType = triggerType;
}
public String getSourceCode() {
return sourceCode;
}
@ -80,6 +98,38 @@ public class MdmModuleSourceEntity extends BaseEntity {
this.sourceCode = sourceCode;
}
public String getAddApi() {
return addApi;
}
public void setAddApi(String addApi) {
this.addApi = addApi;
}
public String getUpdateApi() {
return updateApi;
}
public void setUpdateApi(String updateApi) {
this.updateApi = updateApi;
}
public String getDeleteApi() {
return deleteApi;
}
public void setDeleteApi(String deleteApi) {
this.deleteApi = deleteApi;
}
public String getEnabledState() {
return enabledState;
}
public void setEnabledState(String enabledState) {
this.enabledState = enabledState;
}
public String getCompanyId() {
return companyId;
}

View File

@ -7,7 +7,12 @@
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
<result property="sourceType" column="source_type" jdbcType="VARCHAR"/>
<result property="sourceName" column="source_name" jdbcType="VARCHAR"/>
<result property="triggerType" column="trigger_type" jdbcType="VARCHAR"/>
<result property="sourceCode" column="source_code" jdbcType="VARCHAR"/>
<result property="addApi" column="add_api" jdbcType="VARCHAR"/>
<result property="updateApi" column="update_api" jdbcType="VARCHAR"/>
<result property="deleteApi" column="delete_api" jdbcType="VARCHAR"/>
<result property="enabledState" column="enabled_state" jdbcType="VARCHAR"/>
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
@ -25,8 +30,13 @@
,mdm_id
,source_type
,source_name
,source_code
,sorts
,trigger_type
,source_code
,add_api
,update_api
,delete_api
,enabled_state
,sorts
,create_user_id
,create_time
,modify_user_id
@ -35,12 +45,13 @@
,org_id
,company_id
</sql>
<!-- 查询 采用==查询 -->
<!--通过ID获取数据 -->
<select id="entity_get" resultMap="get-MdmModuleSourceEntity-result">
select
<include refid="MdmModuleSourceEntity_Base_Column_List" />
from mdm_module_source where sts = 'Y' and id = #{id}
from mdm_module_source where id = #{ id } and sts='Y'
</select>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-MdmModuleSourceEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity">
select
<include refid="MdmModuleSourceEntity_Base_Column_List" />
@ -50,7 +61,12 @@
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
<if test="sourceType != null and sourceType != ''"> and source_type = #{sourceType} </if>
<if test="sourceName != null and sourceName != ''"> and source_name = #{sourceName} </if>
<if test="triggerType != null and triggerType != ''"> and trigger_type = #{triggerType} </if>
<if test="sourceCode != null and sourceCode != ''"> and source_code = #{sourceCode} </if>
<if test="addApi != null and addApi != ''"> and add_api = #{addApi} </if>
<if test="updateApi != null and updateApi != ''"> and update_api = #{updateApi} </if>
<if test="deleteApi != null and deleteApi != ''"> and delete_api = #{deleteApi} </if>
<if test="enabledState != null and enabledState != ''"> and enabled_state = #{enabledState} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
@ -73,7 +89,12 @@
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
<if test="sourceType != null and sourceType != ''"> and source_type = #{sourceType} </if>
<if test="sourceName != null and sourceName != ''"> and source_name = #{sourceName} </if>
<if test="triggerType != null and triggerType != ''"> and trigger_type = #{triggerType} </if>
<if test="sourceCode != null and sourceCode != ''"> and source_code = #{sourceCode} </if>
<if test="addApi != null and addApi != ''"> and add_api = #{addApi} </if>
<if test="updateApi != null and updateApi != ''"> and update_api = #{updateApi} </if>
<if test="deleteApi != null and deleteApi != ''"> and delete_api = #{deleteApi} </if>
<if test="enabledState != null and enabledState != ''"> and enabled_state = #{enabledState} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
@ -98,7 +119,12 @@
<if test="mdmId != null and mdmId != ''"> and mdm_id like concat('%',#{mdmId},'%') </if>
<if test="sourceType != null and sourceType != ''"> and source_type like concat('%',#{sourceType},'%') </if>
<if test="sourceName != null and sourceName != ''"> and source_name like concat('%',#{sourceName},'%') </if>
<if test="triggerType != null and triggerType != ''"> and trigger_type like concat('%',#{triggerType},'%') </if>
<if test="sourceCode != null and sourceCode != ''"> and source_code like concat('%',#{sourceCode},'%') </if>
<if test="addApi != null and addApi != ''"> and add_api like concat('%',#{addApi},'%') </if>
<if test="updateApi != null and updateApi != ''"> and update_api like concat('%',#{updateApi},'%') </if>
<if test="deleteApi != null and deleteApi != ''"> and delete_api like concat('%',#{deleteApi},'%') </if>
<if test="enabledState != null and enabledState != ''"> and enabled_state like concat('%',#{enabledState},'%') </if>
<if test="sorts != null"> and sorts like concat('%',#{sorts},'%') </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
@ -123,7 +149,12 @@
<if test="mdmId != null and mdmId != ''"> or mdm_id = #{mdmId} </if>
<if test="sourceType != null and sourceType != ''"> or source_type = #{sourceType} </if>
<if test="sourceName != null and sourceName != ''"> or source_name = #{sourceName} </if>
<if test="triggerType != null and triggerType != ''"> or trigger_type = #{triggerType} </if>
<if test="sourceCode != null and sourceCode != ''"> or source_code = #{sourceCode} </if>
<if test="addApi != null and addApi != ''"> or add_api = #{addApi} </if>
<if test="updateApi != null and updateApi != ''"> or update_api = #{updateApi} </if>
<if test="deleteApi != null and deleteApi != ''"> or delete_api = #{deleteApi} </if>
<if test="enabledState != null and enabledState != ''"> or enabled_state = #{enabledState} </if>
<if test="sorts != null"> or sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
<if test="create_time != null"> or create_time = #{create_time} </if>
@ -170,7 +201,12 @@ WHERE
<if test="mdmId != null and mdmId != ''"> mdm_id , </if>
<if test="sourceType != null and sourceType != ''"> source_type , </if>
<if test="sourceName != null and sourceName != ''"> source_name , </if>
<if test="triggerType != null and triggerType != ''"> trigger_type , </if>
<if test="sourceCode != null and sourceCode != ''"> source_code , </if>
<if test="addApi != null and addApi != ''"> add_api , </if>
<if test="updateApi != null and updateApi != ''"> update_api , </if>
<if test="deleteApi != null and deleteApi != ''"> delete_api , </if>
<if test="enabledState != null and enabledState != ''"> enabled_state , </if>
<if test="sorts != null"> sorts , </if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
<if test="create_time != null"> create_time , </if>
@ -179,6 +215,7 @@ WHERE
<if test="sts != null and sts != ''"> sts , </if>
<if test="org_id != null and org_id != ''"> org_id , </if>
<if test="companyId != null and companyId != ''"> company_id , </if>
<if test="sorts == null ">sorts,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
@ -187,7 +224,12 @@ WHERE
<if test="mdmId != null and mdmId != ''"> #{mdmId} ,</if>
<if test="sourceType != null and sourceType != ''"> #{sourceType} ,</if>
<if test="sourceName != null and sourceName != ''"> #{sourceName} ,</if>
<if test="triggerType != null and triggerType != ''"> #{triggerType} ,</if>
<if test="sourceCode != null and sourceCode != ''"> #{sourceCode} ,</if>
<if test="addApi != null and addApi != ''"> #{addApi} ,</if>
<if test="updateApi != null and updateApi != ''"> #{updateApi} ,</if>
<if test="deleteApi != null and deleteApi != ''"> #{deleteApi} ,</if>
<if test="enabledState != null and enabledState != ''"> #{enabledState} ,</if>
<if test="sorts != null"> #{sorts} ,</if>
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
<if test="create_time != null"> #{create_time} ,</if>
@ -196,30 +238,36 @@ WHERE
<if test="sts != null and sts != ''"> #{sts} ,</if>
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from mdm_module_source a WHERE a.sts = 'Y' ),</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" >
insert into mdm_module_source(mdm_id, source_type, source_name, source_code, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
insert into mdm_module_source(mdm_id, source_type, source_name, trigger_type, source_code, add_api, update_api, delete_api, enabled_state, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.sourceType},#{entity.sourceName},#{entity.sourceCode},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
(#{entity.mdmId},#{entity.sourceType},#{entity.sourceName},#{entity.triggerType},#{entity.sourceCode},#{entity.addApi},#{entity.updateApi},#{entity.deleteApi},#{entity.enabledState},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" >
insert into mdm_module_source(mdm_id, source_type, source_name, source_code, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
insert into mdm_module_source(mdm_id, source_type, source_name, trigger_type, source_code, add_api, update_api, delete_api, enabled_state, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.mdmId},#{entity.sourceType},#{entity.sourceName},#{entity.sourceCode},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
(#{entity.mdmId},#{entity.sourceType},#{entity.sourceName},#{entity.triggerType},#{entity.sourceCode},#{entity.addApi},#{entity.updateApi},#{entity.deleteApi},#{entity.enabledState},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
</foreach>
on duplicate key update
mdm_id = values(mdm_id),
source_type = values(source_type),
source_name = values(source_name),
trigger_type = values(trigger_type),
source_code = values(source_code),
add_api = values(add_api),
update_api = values(update_api),
delete_api = values(delete_api),
enabled_state = values(enabled_state),
create_user_id = values(create_user_id),
create_time = values(create_time),
modify_user_id = values(modify_user_id),
@ -234,7 +282,12 @@ update mdm_module_source set
<if test="mdmId != null and mdmId != ''"> mdm_id = #{mdmId},</if>
<if test="sourceType != null and sourceType != ''"> source_type = #{sourceType},</if>
<if test="sourceName != null and sourceName != ''"> source_name = #{sourceName},</if>
<if test="triggerType != null and triggerType != ''"> trigger_type = #{triggerType},</if>
<if test="sourceCode != null and sourceCode != ''"> source_code = #{sourceCode},</if>
<if test="addApi != null and addApi != ''"> add_api = #{addApi},</if>
<if test="updateApi != null and updateApi != ''"> update_api = #{updateApi},</if>
<if test="deleteApi != null and deleteApi != ''"> delete_api = #{deleteApi},</if>
<if test="enabledState != null and enabledState != ''"> enabled_state = #{enabledState},</if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
<if test="create_time != null"> create_time = #{create_time},</if>
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
@ -258,7 +311,12 @@ update mdm_module_source set sts= 'N' ,modify_time = #{modify_time},modify_user
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
<if test="sourceType != null and sourceType != ''"> and source_type = #{sourceType} </if>
<if test="sourceName != null and sourceName != ''"> and source_name = #{sourceName} </if>
<if test="triggerType != null and triggerType != ''"> and trigger_type = #{triggerType} </if>
<if test="sourceCode != null and sourceCode != ''"> and source_code = #{sourceCode} </if>
<if test="addApi != null and addApi != ''"> and add_api = #{addApi} </if>
<if test="updateApi != null and updateApi != ''"> and update_api = #{updateApi} </if>
<if test="deleteApi != null and deleteApi != ''"> and delete_api = #{deleteApi} </if>
<if test="enabledState != null and enabledState != ''"> and enabled_state = #{enabledState} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
@ -269,6 +327,13 @@ update mdm_module_source set sts= 'N' ,modify_time = #{modify_time},modify_user
<delete id="entity_delete">
delete from mdm_module_source where id = #{id}
</delete>
<!-- 根据数据来源内类型是插件的应用类型做分组 -->
<select id="queryMdmModuleSourceentityGroupByType" resultMap="get-MdmModuleSourceEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity">
select plugin_code,plugin_name,source_name,source_code
from mdm_module_source source
left join sys_application_plugin plug on plug.id=source.source_code
where source_type='1' and source.sts='Y' and plug.sts='Y'
</select>
</mapper>

View File

@ -6,7 +6,7 @@ import com.hzya.frame.basedao.service.IBaseService;
* 主数据数据来源(MdmModuleSource)表服务接口
*
* @author makejava
* @since 2024-06-05 11:42:57
* @since 2024-06-19 09:11:50
*/
public interface IMdmModuleSourceService extends IBaseService<MdmModuleSourceEntity, String>{
}

View File

@ -11,7 +11,7 @@ import com.hzya.frame.basedao.service.impl.BaseService;
* 主数据数据来源(MdmModuleSource)表服务实现类
*
* @author makejava
* @since 2024-06-05 11:42:57
* @since 2024-06-19 09:11:50
*/
@Service(value = "mdmModuleSourceService")
public class MdmModuleSourceServiceImpl extends BaseService<MdmModuleSourceEntity, String> implements IMdmModuleSourceService {

View File

@ -110,14 +110,14 @@ public interface IMdmService {
* @Date 9:40 上午 2023/10/18
**/
JsonResultEntity deleteMdmShowDetailsData(JSONObject jsonObject);
///**
// * @param jsonObject
// * @return com.hzya.frame.web.entity.JsonResultEntity
// * @Author lvleigang
// * @Description 处理分发数据
// * @Date 9:40 上午 2023/10/18
// **/
//JsonResultEntity doMdmDistribute(JSONObject jsonObject);
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 处理分发数据
* @Date 9:40 上午 2023/10/18
**/
JsonResultEntity doMdmDistribute(JSONObject jsonObject);
}

View File

@ -161,7 +161,7 @@
<!--新增所有列-->
<insert id="entity_insert" parameterType="com.hzya.frame.sys.contrastTask.entity.SysContrastTaskEntity"
keyProperty="" useGeneratedKeys="true">
keyProperty="">
insert into sys_contrast_task(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">id ,</if>
@ -209,7 +209,7 @@
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="" useGeneratedKeys="true">
<insert id="entityInsertBatch" keyProperty="">
insert into sys_contrast_task(id, service_name, left_app_id, left_api_id, right_app_id, right_api_id,
task_status, task_msg, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, match_mode,
sts)
@ -220,7 +220,7 @@
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="" useGeneratedKeys="true">
<insert id="entityInsertOrUpdateBatch" keyProperty="">
insert into sys_contrast_task(id, service_name, left_app_id, left_api_id, right_app_id, right_api_id,
task_status, task_msg, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, match_mode)
values

View File

@ -179,7 +179,7 @@
'Y'
</trim>
)
<selectKey keyProperty="id" resultType="Long" order="AFTER">
<selectKey resultType="Long" order="AFTER">
select
last_insert_id() as id
</selectKey>

View File

@ -272,7 +272,7 @@
'Y'
</trim>
)
<selectKey keyProperty="id" resultType="Long" order="AFTER">
<selectKey resultType="Long" order="AFTER">
select
last_insert_id() as id
</selectKey>

View File

@ -120,7 +120,7 @@
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.sys.serviceMethod.entity.SysServiceMethodEntity" keyProperty="id" useGeneratedKeys="true">
<insert id="entity_insert" parameterType = "com.hzya.frame.sys.serviceMethod.entity.SysServiceMethodEntity" >
insert into sys_service_method(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
@ -156,7 +156,7 @@
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertBatch" >
insert into sys_service_method(service_key, service_value, remark, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
@ -164,7 +164,7 @@
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertOrUpdateBatch" >
insert into sys_service_method(service_key, service_value, remark, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id)
values
<foreach collection="entities" item="entity" separator=",">

View File

@ -169,8 +169,8 @@
<!--新增所有列-->
<insert id="entity_insert"
parameterType="com.hzya.frame.sys.templateButton.entity.SysTemplateButtonEntity" keyProperty="id"
useGeneratedKeys="true">
parameterType="com.hzya.frame.sys.templateButton.entity.SysTemplateButtonEntity"
>
insert into sys_template_button(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">id ,</if>
@ -218,7 +218,7 @@
)
</insert>
<!-- 批量新增 -->
<insert id="SysTemplateButtonEntityInsertBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="SysTemplateButtonEntityInsertBatch" >
insert into sys_template_button(template_id, service_name, table_name, button_type, button_title, button_style,
button_sort, button_icon, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, sts)
values
@ -228,7 +228,7 @@
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="SysTemplateButtonEntityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="SysTemplateButtonEntityInsertOrUpdateBatch" >
insert into sys_template_button(template_id, service_name, table_name, button_type, button_title, button_style,
button_sort, button_icon, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id)
values

View File

@ -126,7 +126,7 @@
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.sys.userTemplateButton.entity.SysUserTemplateButtonEntity" keyProperty="id" useGeneratedKeys="true">
<insert id="entity_insert" parameterType = "com.hzya.frame.sys.userTemplateButton.entity.SysUserTemplateButtonEntity" >
insert into sys_user_template_button(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
@ -164,7 +164,7 @@
)
</insert>
<!-- 批量新增 -->
<insert id="SysUserTemplateButtonEntityInsertBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="SysUserTemplateButtonEntityInsertBatch" >
insert into sys_user_template_button(template_id, service_name, button_id, user_id, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
@ -172,7 +172,7 @@
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="SysUserTemplateButtonEntityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="SysUserTemplateButtonEntityInsertOrUpdateBatch" >
insert into sys_user_template_button(template_id, service_name, button_id, user_id, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id)
values
<foreach collection="entities" item="entity" separator=",">

View File

@ -354,7 +354,7 @@ WHERE
<!--新增所有列-->
<insert id="entity_insert" parameterType="com.hzya.frame.sysnew.application.api.entity.SysApplicationApiEntity"
keyProperty="id" useGeneratedKeys="true">
>
insert into sys_application_api(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">id ,</if>
@ -442,7 +442,7 @@ WHERE
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertBatch" >
insert into sys_application_api(api_status,api_code,api_path, app_id, catalogue_id, api_name, api_remark,
need_Login, authentication_port, parameter_passing_mode, destination_address, request_coding, request_method,
timeout_period, current_limiting, header_in, query_in, body_in_type, body_in, body_out, bean_name,return_msg,return_success_field,return_success_value, fun_name, extension_api, sorts, create_user_id,
@ -454,7 +454,7 @@ WHERE
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertOrUpdateBatch" >
insert into sys_application_api(api_status,api_code,api_path, app_id, catalogue_id, api_name, api_remark,
need_Login, authentication_port, parameter_passing_mode, destination_address, request_coding, request_method,
timeout_period, current_limiting, header_in, query_in, body_in_type, body_in, body_out,bean_name,return_msg,return_success_field,return_success_value,fun_name,extension_api, sorts, create_user_id,

View File

@ -132,7 +132,7 @@
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.sysnew.application.apiAuth.entity.SysApplicationApiAuthEntity" keyProperty="id" useGeneratedKeys="true">
<insert id="entity_insert" parameterType = "com.hzya.frame.sysnew.application.apiAuth.entity.SysApplicationApiAuthEntity" >
insert into sys_application_api_auth(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
@ -170,7 +170,7 @@
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertBatch" >
insert into sys_application_api_auth(app_id, system_status, name, system_address, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
@ -178,7 +178,7 @@
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertOrUpdateBatch" >
insert into sys_application_api_auth(app_id, system_status, name, system_address, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id)
values
<foreach collection="entities" item="entity" separator=",">

View File

@ -132,7 +132,7 @@
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.sysnew.application.apiAythDetail.entity.SysApplicationApiAuthDetailEntity" keyProperty="id" useGeneratedKeys="true">
<insert id="entity_insert" parameterType = "com.hzya.frame.sysnew.application.apiAythDetail.entity.SysApplicationApiAuthDetailEntity" >
insert into sys_application_api_auth_detail(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
@ -170,7 +170,7 @@
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertBatch" >
insert into sys_application_api_auth_detail(app_id, catalogue_id, api_id, tripartite_system_id, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
@ -178,7 +178,7 @@
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertOrUpdateBatch" >
insert into sys_application_api_auth_detail(app_id, catalogue_id, api_id, tripartite_system_id, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id)
values
<foreach collection="entities" item="entity" separator=",">

View File

@ -132,7 +132,7 @@
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.sysnew.application.apiPara.entity.SysApplicationApiParaEntity" keyProperty="id" useGeneratedKeys="true">
<insert id="entity_insert" parameterType = "com.hzya.frame.sysnew.application.apiPara.entity.SysApplicationApiParaEntity" >
insert into sys_application_api_para(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
@ -170,7 +170,7 @@
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertBatch" >
insert into sys_application_api_para(app_id, interface_key, interface_value, interface_type, sorts, org_id, sts, create_time, create_user_id, modify_time, modify_user_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
@ -178,7 +178,7 @@
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertOrUpdateBatch" >
insert into sys_application_api_para(app_id, interface_key, interface_value, interface_type, sorts, org_id, sts, create_time, create_user_id, modify_time, modify_user_id)
values
<foreach collection="entities" item="entity" separator=",">

View File

@ -138,7 +138,7 @@
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.sysnew.application.apiType.entity.SysApplicationApiTypeEntity" keyProperty="id" useGeneratedKeys="true">
<insert id="entity_insert" parameterType = "com.hzya.frame.sysnew.application.apiType.entity.SysApplicationApiTypeEntity" >
insert into sys_application_api_type(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
@ -172,7 +172,7 @@
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertBatch" >
insert into sys_application_api_type(app_id, name, sorts, org_id, sts, create_time, create_user_id, modify_time, modify_user_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
@ -180,7 +180,7 @@
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertOrUpdateBatch" >
insert into sys_application_api_type(app_id, name, sorts, org_id, sts, create_time, create_user_id, modify_time, modify_user_id)
values
<foreach collection="entities" item="entity" separator=",">

View File

@ -168,7 +168,7 @@
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.sysnew.application.database.entity.SysApplicationDatabaseEntity" keyProperty="id" useGeneratedKeys="true">
<insert id="entity_insert" parameterType = "com.hzya.frame.sysnew.application.database.entity.SysApplicationDatabaseEntity" >
insert into sys_application_database(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
@ -220,7 +220,7 @@
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertBatch" >
insert into sys_application_database(app_id, source_code, source_name, source_type, source_ip, source_port, login_name, password, db_name, service_name, db_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
@ -228,7 +228,7 @@
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertOrUpdateBatch" >
insert into sys_application_database(app_id, source_code, source_name, source_type, source_ip, source_port, login_name, password, db_name, service_name, db_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id)
values
<foreach collection="entities" item="entity" separator=",">

View File

@ -222,7 +222,7 @@
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.sysnew.application.entity.SysApplicationEntity" keyProperty="id" useGeneratedKeys="true">
<insert id="entity_insert" parameterType = "com.hzya.frame.sysnew.application.entity.SysApplicationEntity" >
insert into sys_application(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
@ -292,7 +292,7 @@
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertBatch" >
insert into sys_application(app_logo, app_status, name, version_number, app_id, system_address, access_mode, affiliation_field, manufacturer, app_introduction, client_path, web_path, program_path, public_key, secret_key, interface_address, interface_status, db_status,app_type, sorts, org_id, sts, create_time, create_user_id, modify_time, modify_user_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
@ -300,7 +300,7 @@
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertOrUpdateBatch" >
insert into sys_application(app_logo, app_status, name, version_number,app_id,system_address, access_mode, affiliation_field, manufacturer, app_introduction, client_path, web_path, program_path, public_key, secret_key, interface_address, interface_status, db_status,app_type, sorts, org_id, sts, create_time, create_user_id, modify_time, modify_user_id)
values
<foreach collection="entities" item="entity" separator=",">

View File

@ -150,7 +150,7 @@
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.sysnew.application.plugin.entity.SysApplicationPluginEntity" keyProperty="id" useGeneratedKeys="true">
<insert id="entity_insert" parameterType = "com.hzya.frame.sysnew.application.plugin.entity.SysApplicationPluginEntity" >
insert into sys_application_plugin(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
@ -194,7 +194,7 @@
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertBatch" >
insert into sys_application_plugin(app_id, plugin_name, plugin_code, plugin_version, plugin_remark, release_date, plugin_status, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
@ -202,7 +202,7 @@
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertOrUpdateBatch" >
insert into sys_application_plugin(app_id, plugin_name, plugin_code, plugin_version, plugin_remark, release_date, plugin_status, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id)
values
<foreach collection="entities" item="entity" separator=",">

View File

@ -11,6 +11,8 @@ import com.baomidou.dynamic.datasource.annotation.DSTransactional;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hzya.frame.basedao.service.impl.BaseService;
import com.hzya.frame.mdm.mdmModuleDistribute.dao.IMdmModuleDistributeDao;
import com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity;
import com.hzya.frame.serviceUtil.DsDataSourceUtil;
import com.hzya.frame.sysnew.application.api.dao.ISysApplicationApiDao;
import com.hzya.frame.sysnew.application.api.entity.SysApplicationApiDto;
@ -104,7 +106,8 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
private ISysMessageManageDao sysMessageManageDao;
@Resource
private ISysMessageManageDetailDao sysMessageManageDetailDao; //明细表
@Resource
private IMdmModuleDistributeDao mdmModuleDistributeDao;
@Resource
private IIntegrationTaskCacheableService iIntegrationTaskCacheableService;
@Resource
@ -631,6 +634,8 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
SysApplicationEntity sysApplicationEntity = new SysApplicationEntity();
sysApplicationEntity.setId(entity.getId());
/** 应用logo地址或者id */
sysApplicationEntity.setAppType(entity.getAppType());
/** 应用logo地址或者id */
sysApplicationEntity.setAppLogo(entity.getAppLogo());
/** 应用是否启用1、启用 2、停用 */
sysApplicationEntity.setAppStatus(entity.getAppStatus());
@ -2369,6 +2374,14 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
if (entity.getId() == null || "".equals(entity.getId())) {
return BaseResult.getFailureMessageEntity("系统错误");
}
MdmModuleDistributeEntity mdmModuleDistributeEntity = new MdmModuleDistributeEntity();
mdmModuleDistributeEntity.setAddScript(entity.getId());
mdmModuleDistributeEntity.setUpdateScript(entity.getId());
mdmModuleDistributeEntity.setDeleteScript(entity.getId());
Integer a = mdmModuleDistributeDao.queryCountUse(mdmModuleDistributeEntity);
if(a > 0){
return BaseResult.getFailureMessageEntity("脚本已经被使用,请先取消关联");
}
entity.setUpdate();
sysApplicationScriptDao.logicRemoveMultiCondition(entity);
return BaseResult.getSuccessMessageEntity("删除脚本成功");

View File

@ -142,7 +142,7 @@
<!--新增所有列-->
<insert id="entity_insert" parameterType="com.hzya.frame.sysnew.homeComponent.entity.SysHomeComponentEntity"
keyProperty="" useGeneratedKeys="true">
keyProperty="">
insert into sys_home_component(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">id ,</if>
@ -184,7 +184,7 @@
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="" useGeneratedKeys="true">
<insert id="entityInsertBatch" keyProperty="">
insert into sys_home_component(id, name, code, state, remark, sorts, create_user_id, create_time,
modify_user_id, modify_time, sts, org_id, company_id, sts)
values
@ -194,7 +194,7 @@
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="" useGeneratedKeys="true">
<insert id="entityInsertOrUpdateBatch" keyProperty="">
insert into sys_home_component(id, name, code, state, remark, sorts, create_user_id, create_time,
modify_user_id, modify_time, sts, org_id, company_id)
values

View File

@ -131,7 +131,7 @@
from sys_integrated_foreground_task where id = #{ id } and sts='Y'
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.sysnew.integratedForegroundTask.entity.SysIntegratedForegroundTaskEntity" keyProperty="id" useGeneratedKeys="true">
<insert id="entity_insert" parameterType = "com.hzya.frame.sysnew.integratedForegroundTask.entity.SysIntegratedForegroundTaskEntity" >
insert into sys_integrated_foreground_task(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
@ -169,7 +169,7 @@
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertBatch" >
insert into sys_integrated_foreground_task(workshop_name, plug_id, plug_name, remark, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
@ -177,7 +177,7 @@
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertOrUpdateBatch" >
insert into sys_integrated_foreground_task(workshop_name, plug_id, plug_name, remark, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id)
values
<foreach collection="entities" item="entity" separator=",">

View File

@ -138,7 +138,7 @@
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.sysnew.integratedForegroundTaskDetail.entity.SysIntegratedForegroundTaskDetailEntity" keyProperty="id" useGeneratedKeys="true">
<insert id="entity_insert" parameterType = "com.hzya.frame.sysnew.integratedForegroundTaskDetail.entity.SysIntegratedForegroundTaskDetailEntity" >
insert into sys_integrated_foreground_task_detail(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
@ -180,7 +180,7 @@
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertBatch" >
insert into sys_integrated_foreground_task_detail(formmain_id, arg_code, arg_name, arg_type, arg_value, remark, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
@ -188,7 +188,7 @@
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertOrUpdateBatch" >
insert into sys_integrated_foreground_task_detail(formmain_id, arg_code, arg_name, arg_type, arg_value, remark, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id)
values
<foreach collection="entities" item="entity" separator=",">

View File

@ -120,7 +120,7 @@
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.sysnew.integratedForegroundTaskParameter.entity.SysIntegratedForegroundTaskParameterEntity" keyProperty="id" useGeneratedKeys="true">
<insert id="entity_insert" parameterType = "com.hzya.frame.sysnew.integratedForegroundTaskParameter.entity.SysIntegratedForegroundTaskParameterEntity" >
insert into sys_integrated_foreground_task_parameter(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
@ -156,7 +156,7 @@
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertBatch" >
insert into sys_integrated_foreground_task_parameter(formmain_id, in_parameter, remark, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
@ -164,7 +164,7 @@
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertOrUpdateBatch" >
insert into sys_integrated_foreground_task_parameter(formmain_id, in_parameter, remark, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id)
values
<foreach collection="entities" item="entity" separator=",">

View File

@ -172,7 +172,7 @@
<!--新增所有列-->
<insert id="entity_insert" parameterType="com.hzya.frame.sysnew.messageManage.entity.SysMessageManageEntity"
keyProperty="id" useGeneratedKeys="true">
>
insert into sys_message_manage(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">id ,</if>
@ -216,7 +216,7 @@
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertBatch" >
insert into sys_message_manage(theme, code, send_app, send_api, data_type, remark, sorts, create_user_id,
create_time, modify_user_id, modify_time, sts, org_id, sts)
values
@ -226,7 +226,7 @@
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertOrUpdateBatch" >
insert into sys_message_manage(theme, code, send_app, send_api, data_type, remark, sorts, create_user_id,
create_time, modify_user_id, modify_time, sts, org_id)
values

View File

@ -162,8 +162,8 @@
<!--新增所有列-->
<insert id="entity_insert"
parameterType="com.hzya.frame.sysnew.messageManageDetail.entity.SysMessageManageDetailEntity" keyProperty="id"
useGeneratedKeys="true">
parameterType="com.hzya.frame.sysnew.messageManageDetail.entity.SysMessageManageDetailEntity"
>
insert into sys_message_manage_detail(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">id ,</if>
@ -211,7 +211,7 @@
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertBatch" >
insert into sys_message_manage_detail(formmain_id, receive_name, receive_code, receive_app, receive_api,
data_type, return_type, remark, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, sts)
values
@ -221,7 +221,7 @@
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertOrUpdateBatch" >
insert into sys_message_manage_detail(formmain_id, receive_name, receive_code, receive_app, receive_api,
data_type, return_type, remark, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id)
values

View File

@ -290,7 +290,7 @@
<!--新增所有列-->
<insert id="entity_insert" parameterType="com.hzya.frame.sysnew.messageManageLog.entity.SysMessageManageLogEntity"
keyProperty="id" useGeneratedKeys="true">
>
insert into
<choose>
<when test=" status != null and status.trim() != '' and status == 3">
@ -357,7 +357,7 @@
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertBatch" >
insert into sys_message_manage_log(message_manage_id, theme, message_code, send_app, send_api, receive_code,
receive_app, receive_api, source_data, target_data, return_data, return_type,error_status, status, remark,
sorts, create_user_id,
@ -369,7 +369,7 @@
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertOrUpdateBatch" >
insert into sys_message_manage_log(message_manage_id, theme, message_code, send_app, send_api, receive_code,
receive_app, receive_api, source_data, target_data, return_data, return_type,error_status, status, remark,
sorts, create_user_id,

View File

@ -140,7 +140,7 @@
<!--新增所有列-->
<insert id="entity_insert" parameterType="com.hzya.frame.sysnew.messageManageLogBack.detail.entity.SysMessageManageLogDetailBackEntity"
keyProperty="id" useGeneratedKeys="true">
>
insert into sys_message_manage_log_detail_back(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">id ,</if>
@ -180,7 +180,7 @@
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertBatch" >
insert into sys_message_manage_log_detail_back(id,message_manage_id, source_data, target_data, return_data,sorts, create_user_id,
create_time, modify_user_id, modify_time, sts, org_id)
values
@ -189,7 +189,7 @@
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertOrUpdateBatch" >
insert into sys_message_manage_log_detail_back(message_manage_id, source_data, target_data, return_data, sorts, create_user_id,
create_time, modify_user_id, modify_time, sts, org_id)
values

View File

@ -273,7 +273,7 @@
<!--新增所有列-->
<insert id="entity_insert" parameterType="com.hzya.frame.sysnew.messageManageLogBack.entity.SysMessageManageLogBackEntity"
keyProperty="id" useGeneratedKeys="true">
>
insert into sys_message_manage_log_back(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">id ,</if>
@ -335,7 +335,7 @@
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertBatch" >
insert into sys_message_manage_log_back(id,message_manage_id, theme, message_code, send_app, send_api, receive_code,
receive_app, receive_api, source_data, target_data, return_data, return_type,error_status, status, remark, sorts, create_user_id,
create_time, modify_user_id, modify_time, sts, org_id)
@ -345,7 +345,7 @@
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertOrUpdateBatch" >
insert into sys_message_manage_log_back(message_manage_id, theme, message_code, send_app, send_api, receive_code,
receive_app, receive_api, source_data, target_data, return_data, return_type,error_status, status, remark, sorts, create_user_id,
create_time, modify_user_id, modify_time, sts, org_id)

View File

@ -140,7 +140,7 @@
<!--新增所有列-->
<insert id="entity_insert" parameterType="com.hzya.frame.sysnew.messageManageLogDetail.entity.SysMessageManageLogDetailEntity"
keyProperty="id" useGeneratedKeys="true">
>
insert into sys_message_manage_log_detail(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">id ,</if>
@ -176,7 +176,7 @@
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertBatch" >
insert into sys_message_manage_log_detail(message_manage_id, source_data, target_data, return_data,sorts, create_user_id,
create_time, modify_user_id, modify_time, sts, org_id, sts)
values
@ -186,7 +186,7 @@
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertOrUpdateBatch" >
insert into sys_message_manage_log_detail(message_manage_id, source_data, target_data, return_data, sorts, create_user_id,
create_time, modify_user_id, modify_time, sts, org_id)
values

View File

@ -131,7 +131,7 @@
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.sysnew.plugArg.entity.SysPlugArgEntity" keyProperty="" useGeneratedKeys="true">
<insert id="entity_insert" parameterType = "com.hzya.frame.sysnew.plugArg.entity.SysPlugArgEntity" keyProperty="">
insert into sys_plug_arg(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
@ -169,7 +169,7 @@
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="" useGeneratedKeys="true">
<insert id="entityInsertBatch" keyProperty="">
insert into sys_plug_arg(id, plug_id, plug_code, plug_name, remark, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
@ -177,7 +177,7 @@
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="" useGeneratedKeys="true">
<insert id="entityInsertOrUpdateBatch" keyProperty="">
insert into sys_plug_arg(id, plug_id, plug_code, plug_name, remark, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id)
values
<foreach collection="entities" item="entity" separator=",">

View File

@ -142,7 +142,7 @@
<!--新增所有列-->
<insert id="entity_insert" parameterType="com.hzya.frame.sysnew.plugArgDeatil.entity.SysPlugArgDetailEntity"
keyProperty="id" useGeneratedKeys="true">
>
insert into sys_plug_arg_detail(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">id ,</if>
@ -184,7 +184,7 @@
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertBatch" >
insert into sys_plug_arg_detail(formmain_id, arg_code, arg_name, arg_type, remark, sorts, create_user_id,
create_time, modify_user_id, modify_time, sts, org_id, sts)
values
@ -194,7 +194,7 @@
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
<insert id="entityInsertOrUpdateBatch" >
insert into sys_plug_arg_detail(formmain_id, arg_code, arg_name, arg_type, remark, sorts, create_user_id,
create_time, modify_user_id, modify_time, sts, org_id)
values