Merge branch 'dev' of http://192.168.2.237:3000/root/kangarooDataCenterV3 into hecan
# Conflicts: # service/src/main/java/com/hzya/frame/sysnew/application/service/impl/SysApplicationServiceImpl.java
This commit is contained in:
commit
e94581d805
.gitignoreREADME.md
buildpackage
pom.xml
src
main
java/com/hzya/frame
resources
test/java/com/hzya/frame
common
core
pom.xml
pom.xmlsrc/main/java/com/hzya/frame
service
pom.xml
src/main/java/com/hzya/frame
bip/v3/v2207/service/impl
home
dao
entity
service
mdm
entity
DbFiledsDto.javaMdmDataDto.javaMdmDataFiledDto.javaMdmDbFiledVo.javaMdmDbVo.javaMdmDetailViewVo.javaMdmDistributeDto.javaMdmDistributeVo.javaMdmDto.javaMdmModuleViewDto.javaMdmModuleViewVo.javaMdmQuery.javaMdmRoleDto.javaMdmViewButtonVo.javaMdmViewFiledVo.javaMdmViewVo.javaMdmVo.java
mdmModule
dao
entity
service
mdmModuleDb
dao
entity
service
mdmModuleDbFileds
dao
entity
service
mdmModuleDbFiledsRule
dao
entity
service
mdmModuleDbFiledsRuleFiles
dao
entity
service
mdmModuleDistribute
dao
entity
service
mdmModuleDistributeDetail
dao
entity
service
mdmModuleRole
|
@ -54,3 +54,9 @@ $RECYCLE.BIN/
|
|||
*.lnk
|
||||
|
||||
/buildpackage/src/main/resources/banner.txt
|
||||
/webapp/target/
|
||||
/service/target/
|
||||
/core/target/
|
||||
/common/target/
|
||||
/buildpackage/target/
|
||||
/webapp/target/
|
||||
|
|
32
README.md
32
README.md
|
@ -10,4 +10,34 @@
|
|||
获取单个对象 getEntity
|
||||
修改 updateEntity
|
||||
删除 deleteEntity
|
||||
启用停用 enableDisableEntity
|
||||
启用停用 enableDisableEntity
|
||||
|
||||
|
||||
Flyway
|
||||
|
||||
比较文件先后顺序规则:左对齐原则,缺位用0代替
|
||||
1.0.0.1 比 1.0.0 版本高。
|
||||
1.0.10 比 1.0.9.4 版本高。
|
||||
1.0.0_1 比 1.0.0 版本高。
|
||||
1_0_0_1 比 1_0_0 版本高。
|
||||
1.0.10 和 1.0.010 版本号一样高,这是因为每个版本号部分的前导 0 会被忽略。
|
||||
|
||||
Flyway 将 SQL 文件分为 Versioned 、Repeatable 和 Undo 三种:
|
||||
Versioned 用于版本升级,每个版本有唯一的版本号并只能执行一次。
|
||||
Repeatable 可重复执行,当 Flyway 检测到 Repeatable 类型的 SQL 脚本的 checksum 有变动,Flyway 就会重新执行该脚本,它并不用于版本更新,这类的 migration 总是在 Versioned 执行之后才被执行。
|
||||
Undo 用于撤销具有相同版本的版本化迁移带来的影响。但是该回滚过于粗暴,过于机械化,一般不推荐使用。一般建议使用 Versioned 模式来解决。
|
||||
|
||||
Prefix 可配置,前缀标识,默认值 V 表示 Versioned, R 表示 Repeatable, U 表示 Undo。
|
||||
Version 标识版本号, 由一个或多个数字构成,数字之间的分隔符可用点 . 或下划线 _。
|
||||
Separator 可配置,用于分隔版本标识与描述信息,默认为两个下划线 __。
|
||||
Description 描述信息,文字之间可以用下划线 _ 或空格 分隔。
|
||||
Suffix 可配置,后续标识,默认为 .sql。
|
||||
|
||||
例如:
|
||||
V3.0.1__initialize.sql 只执行一次
|
||||
V3.0.2__test_insert.sql 这个文件会在V3.0.1__initialize.sql之后执行,且只执行一次
|
||||
R__TRUNCATE_bd_app.sql 这个文件会执行多次,但是会校验是否checksum,一般不使用用:注意因为多次执行所以不能有版本号
|
||||
**校验checksum,简单来说就是文件的行数据发生改变时候会执行,如果内容不变也是不会去执行的**
|
||||
|
||||
表flyway_schema_history会记录sql执行的情况
|
||||
本项目需要的sql统一放置到resources/flyway下
|
|
@ -69,6 +69,24 @@
|
|||
<profile.active>llg</profile.active>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>yuqh</id> <!--于群辉-->
|
||||
<properties>
|
||||
<profile.active>yuqh</profile.active>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>xel</id> <!--相二林-->
|
||||
<properties>
|
||||
<profile.active>xel</profile.active>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>ydc</id> <!--英德赛-->
|
||||
<properties>
|
||||
<profile.active>ydc</profile.active>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
<build>
|
||||
<finalName>kangarooDataCenterV3</finalName>
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.druid.DruidDyna
|
|||
import com.hzya.frame.DataSource.impl.DynamicDataSourceAssistConfiguration;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
|
||||
import org.springframework.boot.web.servlet.ServletComponentScan;
|
||||
|
@ -13,12 +14,11 @@ import org.springframework.context.annotation.Import;
|
|||
import org.springframework.context.annotation.ImportResource;
|
||||
|
||||
@EnableCaching
|
||||
@ServletComponentScan(basePackages = {"com.hzya.frame"})
|
||||
@ServletComponentScan(basePackages = {"com.hzya.frame" ,"org.jeecg.modules.jmreport","com.jimureport.demo"})
|
||||
@ImportResource(locations = {"classpath:cfgHome/**/spring/spring-*.xml"})
|
||||
@Import({DruidDynamicDataSourceConfiguration.class, DynamicDataSourceCreatorAutoConfiguration.class, DynamicDataSourceAssistConfiguration.class})
|
||||
|
||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class})
|
||||
//@SpringBootApplication(scanBasePackages = {"com.hzya.frame"})
|
||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class, FlywayAutoConfiguration.class})
|
||||
public class WebappApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
|
|
@ -0,0 +1,138 @@
|
|||
package com.hzya.frame.plugin.seeyonExt.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.seeyon.service.ISeeYonInterFace;
|
||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/5/15 08:34
|
||||
**/
|
||||
public class SeeyonExtPluginInitializer extends PluginBaseEntity {
|
||||
Logger logger = LoggerFactory.getLogger(SeeyonExtPluginInitializer.class);
|
||||
@Autowired
|
||||
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
|
||||
@Autowired
|
||||
private ISeeYonInterFace seeyInterFace;
|
||||
/***
|
||||
* 插件初始化方法
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-02 10:48
|
||||
* @Param []
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public void initialize() {
|
||||
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件销毁方法
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public void destroy() {
|
||||
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的ID
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "SeeyonExtPlugin";
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的名称
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "seeyonExt插件";
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的显示值
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "seeyonExt插件";
|
||||
}
|
||||
|
||||
/***
|
||||
* 插件类型 1、场景插件
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-02 14:01
|
||||
* @Param []
|
||||
* @return java.lang.String
|
||||
**/
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
|
||||
/***
|
||||
* seeyonExt 重试专用插件
|
||||
* @Since 3.0
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-07 11:20
|
||||
* @param requestJson 执行业务代码的参数
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||
try {
|
||||
//重试方法
|
||||
if (null != requestJson){
|
||||
//JSONObject jsonStr = requestJson.getJSONObject("jsonStr");
|
||||
//如果这个id不为空,说明是重试的
|
||||
String id = requestJson.getString("integration_task_living_details_id");
|
||||
if (StrUtil.isNotEmpty(id)){
|
||||
//查询日志表
|
||||
IntegrationTaskLivingDetailsEntity taskDetailEntity = taskLivingDetailsService.get(id);
|
||||
if (null != taskDetailEntity && JSONUtil.isTypeJSON(taskDetailEntity.getRootAppPk())){
|
||||
//拿到这张表的源系统ID
|
||||
JSONObject jsonObject = JSONObject.parseObject(taskDetailEntity.getRootAppPk());
|
||||
Map<String,String>extData = new HashMap<>();
|
||||
extData.put("integration_task_living_details_id",id);//把日志id放到hzyaExtData中,下游方法从这个对象里取
|
||||
jsonObject.put("hzyaExtData",extData);
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("jsonStr", JSON.toJSONString(jsonObject));
|
||||
//调用seeyon标准重试方法
|
||||
seeyInterFace.thirdInterfaceSeeYonDefinitionRePush(param);
|
||||
}
|
||||
}
|
||||
}
|
||||
logger.info("执行成功");
|
||||
return BaseResult.getSuccessMessageEntity("执行成功");
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("执行成功");
|
||||
}
|
||||
}
|
|
@ -2,6 +2,8 @@ package com.hzya.frame.plugin.sysMessageManageLogBack.plugin;
|
|||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -38,20 +40,20 @@ public class SysMessageManageLogPluginInitializer extends PluginBaseEntity {
|
|||
public String getPluginLabel() {
|
||||
return "ESB消息日志备份";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String executeBusiness(JSONObject requestJson) throws Exception {
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||
try {
|
||||
return "备份成功";
|
||||
logger.info("执行成功");
|
||||
return BaseResult.getSuccessMessageEntity("执行成功");
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
return BaseResult.getSuccessMessageEntity("执行成功");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,20 +2,20 @@
|
|||
logging:
|
||||
#日志级别 指定目录级别
|
||||
level:
|
||||
root: info
|
||||
root: warn
|
||||
encodings: UTF-8
|
||||
file:
|
||||
# 日志保存路径
|
||||
path: /home/webservice/zt/log
|
||||
spring:
|
||||
datasource:
|
||||
dynamic:
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://hzya.ufyct.com:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
url: jdbc:mysql://hzya.ufyct.com:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
username: root
|
||||
password: bd993088e8a7c3dc5f44441617f9b4bf
|
||||
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
savefile:
|
||||
# 文件保存路径
|
||||
path: /home/webservice/zt/file
|
||||
ax:
|
||||
url: http://127.0.0.1:9081/kangarooDataCenterV3/entranceController/externalCallInterface
|
|
@ -12,9 +12,14 @@ spring:
|
|||
dynamic:
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://hzya.ufyct.com:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
# url: jdbc:mysql://hzya.ufyct.com:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
# url: jdbc:mysql://hzya.ufyct.com:9096/businesscenterauto?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
# username: root
|
||||
# password: bd993088e8a7c3dc5f44441617f9b4bf
|
||||
# driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
url: jdbc:mysql://hzya.ufyct.com:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
username: root
|
||||
password: bd993088e8a7c3dc5f44441617f9b4bf
|
||||
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
savefile:
|
||||
# 文件保存路径
|
||||
|
|
|
@ -12,9 +12,9 @@ spring:
|
|||
dynamic:
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://hzya.ufyct.com:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
url: jdbc:mysql://hzya.ufyct.com:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
username: root
|
||||
password: bd993088e8a7c3dc5f44441617f9b4bf
|
||||
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
savefile:
|
||||
# 文件保存路径
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
#######################本地环境#######################
|
||||
logging:
|
||||
#日志级别 指定目录级别
|
||||
level:
|
||||
root: info
|
||||
encodings: UTF-8
|
||||
file:
|
||||
# 日志保存路径
|
||||
path: /Users/xiangerlin/work/app/logs/ydc
|
||||
spring:
|
||||
datasource:
|
||||
dynamic:
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://hzya.ufyct.com:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
username: root
|
||||
password: bd993088e8a7c3dc5f44441617f9b4bf
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
savefile:
|
||||
# 文件保存路径
|
||||
path: /Users/xiangerlin/work/app/logs/ydc
|
|
@ -0,0 +1,21 @@
|
|||
#######################本地环境#######################
|
||||
logging:
|
||||
#日志级别 指定目录级别
|
||||
level:
|
||||
root: info
|
||||
encodings: UTF-8
|
||||
file:
|
||||
# 日志保存路径
|
||||
path: /Users/xiangerlin/work/app/logs/ydc
|
||||
spring:
|
||||
datasource:
|
||||
dynamic:
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://hzya.ufyct.com:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
username: root
|
||||
password: bd993088e8a7c3dc5f44441617f9b4bf
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
savefile:
|
||||
# 文件保存路径
|
||||
path: /Users/xiangerlin/work/app/logs/ydc
|
|
@ -0,0 +1,23 @@
|
|||
#######################本地环境#######################
|
||||
logging:
|
||||
#日志级别 指定目录级别
|
||||
level:
|
||||
root: info
|
||||
encodings: UTF-8
|
||||
file:
|
||||
# 日志保存路径
|
||||
path: E:\yongansystem\log
|
||||
spring:
|
||||
datasource:
|
||||
dynamic:
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://hzya.ufyct.com:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
username: root
|
||||
password: bd993088e8a7c3dc5f44441617f9b4bf
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
savefile:
|
||||
# 文件保存路径
|
||||
path: E:\yongansystem\log
|
||||
ax:
|
||||
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface
|
|
@ -6,6 +6,24 @@ server:
|
|||
tomcat:
|
||||
uri-encoding: utf-8
|
||||
spring:
|
||||
flyway:
|
||||
# 启动flyway migration, 默认为true
|
||||
enabled: true
|
||||
# flyway 的 clean 命令会删除指定 schema 下的所有 table, 生产务必禁掉。这个默认值是 false 理论上作为默认配置是不科学的。
|
||||
clean-disabled: true
|
||||
# SQL 脚本的目录,多个路径使用逗号分隔 默认值 classpath:db/migration
|
||||
locations: classpath:flyway
|
||||
# - classpath:flyway
|
||||
# metadata 版本控制历史表 默认 flyway_schema_history
|
||||
table: flyway_schema_history
|
||||
# 如果没有 flyway_schema_history 这个 metadata 表, 在执行 flyway migrate 命令之前, 必须先执行 flyway baseline 命令
|
||||
# 设置为 true 后 flyway 将在需要 baseline 的时候, 自动执行一次 baseline。
|
||||
baseline-on-migrate: true
|
||||
validate-on-migrate: false
|
||||
sql-migration-prefix: V
|
||||
sql-migration-separator: __
|
||||
sql-migration-suffixes: .sql
|
||||
placeholder-replacement: false
|
||||
jackson:
|
||||
date-format: yyyy-MM-dd HH:mm:ss
|
||||
time-zone: GMT+8
|
||||
|
@ -72,4 +90,36 @@ mybatis-plus:
|
|||
global-config:
|
||||
db-config:
|
||||
id-type: auto # 主键策略
|
||||
|
||||
ax:
|
||||
url:
|
||||
# 积木报表工具
|
||||
#JimuReport[minidao配置]
|
||||
minidao :
|
||||
base-package: org.jeecg.modules.jmreport.desreport.dao*
|
||||
db-type: mysql
|
||||
#JimuReport[上传配置]
|
||||
jeecg :
|
||||
jmreport:
|
||||
# 自动保存
|
||||
autoSave: true
|
||||
# 单位毫秒 默认5*60*1000
|
||||
interval: 10000
|
||||
# local|minio|alioss
|
||||
uploadType: local
|
||||
# local
|
||||
path :
|
||||
#文件路径
|
||||
upload: D:\images
|
||||
# alioss
|
||||
oss:
|
||||
endpoint: oss-cn-beijing.aliyuncs.com
|
||||
accessKey: ??
|
||||
secretKey: ??
|
||||
staticDomain: ??
|
||||
bucketName: ??
|
||||
# minio
|
||||
minio:
|
||||
minio_url: http://minio.jeecg.com
|
||||
minio_name: ??
|
||||
minio_pass: ??
|
||||
bucketName: ??
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plugin>
|
||||
<id>SeeyonExtPlugin</id>
|
||||
<name>seeyonExt插件</name>
|
||||
<category>202405150001</category>
|
||||
</plugin>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="seeyonExtPluginInitializer" class="com.hzya.frame.plugin.seeyonExt.plugin.SeeyonExtPluginInitializer" />
|
||||
</beans>
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,3 @@
|
|||
ALTER TABLE sys_data_source ADD COLUMN data_state char(1) DEFAULT NULL COMMENT '数据源状态 0校验失败 1校验成功';
|
||||
UPDATE sys_data_source SET data_state = '1';
|
||||
COMMIT;
|
|
@ -0,0 +1,3 @@
|
|||
ALTER TABLE mdm_module_distribute ADD COLUMN update_api VARCHAR(50) DEFAULT NULL COMMENT '修改接口';
|
||||
ALTER TABLE mdm_module_distribute ADD COLUMN enabled_state CHAR(1) DEFAULT NULL COMMENT '启用停用 0、停用1、启用';
|
||||
COMMIT;
|
|
@ -31,42 +31,121 @@
|
|||
</encoder>
|
||||
</appender>
|
||||
<!-- INFO级别日志输出到文件 -->
|
||||
<!-- <appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">-->
|
||||
<!-- <file>${LOG_PATH}/info.log</file>-->
|
||||
<!-- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">-->
|
||||
<!-- <fileNamePattern>${LOG_PATH}/%d{yyyy-MM-dd}/info.%d{yyyy-MM-dd-HH}.log</fileNamePattern>-->
|
||||
<!-- <maxHistory>${MAX_HISTORY}</maxHistory>-->
|
||||
<!-- </rollingPolicy>-->
|
||||
<!-- <encoder>-->
|
||||
<!-- <pattern>%d{yyyy-MM-dd HH:mm:ss} %-5level [%thread] %logger{50} - %msg%n</pattern>-->
|
||||
<!-- </encoder>-->
|
||||
<!-- <!–日志文档最大的大小–>-->
|
||||
<!-- <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">-->
|
||||
<!-- <MaxFileSize>1MB</MaxFileSize>-->
|
||||
<!-- </triggeringPolicy>-->
|
||||
<!-- </appender>-->
|
||||
|
||||
<appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${LOG_PATH}/info.log</file>
|
||||
<!-- 添加filter,只记录INFO级别以上的日志 -->
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>INFO</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!-- 每个日志文件最大MB -->
|
||||
<maxFileSize>${MAX_FILE_SIZE}</maxFileSize>
|
||||
<!-- 日志文件保留天 -->
|
||||
<maxHistory>${MAX_HISTORY}</maxHistory>
|
||||
<fileNamePattern>${LOG_PATH}/%d{yyyy-MM-dd}/%d{yyyy-MM-dd-HH}/%d{yyyy-MM-dd-HH}.%i.log</fileNamePattern>
|
||||
<!-- <fileNamePattern>${LOG_PATH}/%d{yyyy-MM-dd}/info/info_%d{yyyyMMddHH}.%i.log</fileNamePattern>-->
|
||||
<fileNamePattern>${LOG_PATH}/%d{yyyy-MM-dd}/info/info_%d{yyyyMMdd}.%i.log</fileNamePattern>
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<!-- 日志文件超过最大大小后立即生成新文件 -->
|
||||
<maxFileSize>${MAX_FILE_SIZE}</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
|
||||
</rollingPolicy>
|
||||
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss} %-5level [%thread] %logger{50} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- WARN级别日志-->
|
||||
<appender name="WARN_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!-- 每个日志文件最大MB -->
|
||||
<maxFileSize>${MAX_FILE_SIZE}</maxFileSize>
|
||||
<!-- 日志文件保留天 -->
|
||||
<maxHistory>${MAX_HISTORY}</maxHistory>
|
||||
<fileNamePattern>${LOG_PATH}/%d{yyyy-MM-dd}/warn/warn_%d{yyyyMMdd}.%i.log</fileNamePattern>
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<!-- 日志文件超过最大大小后立即生成新文件 -->
|
||||
<maxFileSize>${MAX_FILE_SIZE}</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
</rollingPolicy>
|
||||
<!-- 添加 WARN只记录WARN级别以上的日志 -->
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>WARN</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss} %-5level [%thread] %logger{50} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- error级别日志-->
|
||||
<appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!-- 每个日志文件最大MB -->
|
||||
<!-- <maxFileSize>${MAX_FILE_SIZE}</maxFileSize>-->
|
||||
<maxFileSize>${MAX_FILE_SIZE}</maxFileSize>
|
||||
<!-- 日志文件保留天 -->
|
||||
<maxHistory>${MAX_HISTORY}</maxHistory>
|
||||
<fileNamePattern>${LOG_PATH}/%d{yyyy-MM-dd}/error/error_%d{yyyyMMdd}.%i.log</fileNamePattern>
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<!-- 日志文件超过最大大小后立即生成新文件 -->
|
||||
<maxFileSize>${MAX_FILE_SIZE}</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
</rollingPolicy>
|
||||
<!-- 添加 ERROR只记录ERROR级别以上的日志 -->
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>ERROR</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss} %-5level [%thread] %logger{50} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
|
||||
|
||||
<!-- ALL 任意级别日志都会记录在此级别日志-->
|
||||
<appender name="ALL_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!-- 每个日志文件最大MB -->
|
||||
<!-- <maxFileSize>${MAX_FILE_SIZE}</maxFileSize>-->
|
||||
<maxFileSize>${MAX_FILE_SIZE}</maxFileSize>
|
||||
<!-- 日志文件保留天 -->
|
||||
<maxHistory>${MAX_HISTORY}</maxHistory>
|
||||
<fileNamePattern>${LOG_PATH}/%d{yyyy-MM-dd}/all/all_%d{yyyyMMdd}.%i.log</fileNamePattern>
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<!-- 日志文件超过最大大小后立即生成新文件 -->
|
||||
<maxFileSize>${MAX_FILE_SIZE}</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
</rollingPolicy>
|
||||
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss} %-5level [%thread] %logger{50} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
|
||||
<root level="INFO">
|
||||
<!-- 控制面板输出 -->
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
<!-- 按照每天生成日志文档 -->
|
||||
<appender-ref ref="INFO_FILE"/>
|
||||
<appender-ref ref="WARN_FILE"/>
|
||||
<appender-ref ref="ERROR_FILE"/>
|
||||
<appender-ref ref="ALL_FILE"/>
|
||||
</root>
|
||||
</configuration>
|
||||
<!-- ERROR 级别-->
|
||||
<root level="ERROR">
|
||||
<!-- 按照每天生成日志文档 -->
|
||||
<appender-ref ref="INFO_FILE"/>
|
||||
<appender-ref ref="WARN_FILE"/>
|
||||
<appender-ref ref="ERROR_FILE"/>
|
||||
<appender-ref ref="ALL_FILE"/>
|
||||
</root>
|
||||
</configuration>
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
package com.hzya.frame;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.plugin.seeyonExt.plugin.SeeyonExtPluginInitializer;
|
||||
import com.hzya.frame.util.AESUtil;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @ClassName dsasas
|
||||
* @Description
|
||||
|
@ -16,6 +21,21 @@ import org.springframework.test.context.junit4.SpringRunner;
|
|||
@SpringBootTest(classes = {WebappApplication.class})
|
||||
public class temButtom {
|
||||
|
||||
@Resource
|
||||
SeeyonExtPluginInitializer seeyonExtPluginInitializer;
|
||||
@Test
|
||||
public void seeyonExtTest(){
|
||||
JSONObject jsonStr = new JSONObject();
|
||||
jsonStr.put("integration_task_living_details_id","4276973516873482804");
|
||||
JSONObject requestJson = new JSONObject();
|
||||
requestJson.put("jsonStr", JSON.toJSONString(jsonStr));
|
||||
try {
|
||||
seeyonExtPluginInitializer.executeBusiness(requestJson);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test01() {
|
||||
String a = AESUtil.encrypt("hzya@1314");
|
||||
|
@ -26,4 +46,5 @@ public class temButtom {
|
|||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
<configuration>
|
||||
<mainClass>none</mainClass> <!-- 取消查找本项目下的Main方法:为了解决Unable to find main class的问题 -->
|
||||
<classifier>execute</classifier> <!-- 为了解决依赖模块找不到此模块中的类或属性 -->
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
package com.hzya.frame.util;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.web.exception.BaseSystemException;
|
||||
import groovy.lang.GroovyClassLoader;
|
||||
import groovy.lang.GroovyObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Groovy脚本执行工具类
|
||||
* @author 👻👻👻👻👻👻👻👻👻👻 gjh
|
||||
* @version 1.0
|
||||
* @content
|
||||
* @date 2024-05-16 13:44
|
||||
*/
|
||||
public class GroovyUtil {
|
||||
private static final Logger logger = LoggerFactory.getLogger(GroovyUtil.class);
|
||||
|
||||
|
||||
|
||||
public static Object execute(JSONObject reqData) {
|
||||
JSONObject jsonObject = JSON.parseObject(reqData.getString("jsonStr"));
|
||||
//JSON参数
|
||||
String parameterJson = jsonObject.getString("parameterJson");
|
||||
String methodStr = jsonObject.getString("methodStr");
|
||||
//TODO 后续根据存储的数据库编码拼接生成
|
||||
String className = jsonObject.getString("className");
|
||||
//组装GroovyClassScript
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append(" class ");
|
||||
stringBuffer.append(className);
|
||||
stringBuffer.append(" {");
|
||||
stringBuffer.append(" String execute (String jsonStr){");
|
||||
stringBuffer.append(methodStr);
|
||||
stringBuffer.append(" }");
|
||||
stringBuffer.append(" }");
|
||||
logger.info("Groovy Class 组装结果 "+ stringBuffer.toString());
|
||||
// 创建GroovyClassLoader实例
|
||||
GroovyClassLoader groovyClassLoader = new GroovyClassLoader();
|
||||
|
||||
// 动态编译和加载Groovy脚本
|
||||
Class<?> groovyClass = groovyClassLoader.parseClass(stringBuffer.toString());
|
||||
// 创建Groovy类的实例
|
||||
GroovyObject groovyObject = null;
|
||||
try {
|
||||
groovyObject = (GroovyObject) groovyClass.newInstance();
|
||||
|
||||
}catch (Exception e){
|
||||
logger.info("创建newInstance失败:"+ e);
|
||||
throw new BaseSystemException(e);
|
||||
}
|
||||
Object returnObj = groovyObject.invokeMethod("execute",parameterJson);
|
||||
logger.info("执行脚本结束:"+returnObj);
|
||||
return returnObj;
|
||||
}
|
||||
}
|
|
@ -26,6 +26,7 @@
|
|||
<configuration>
|
||||
<mainClass>none</mainClass> <!-- 取消查找本项目下的Main方法:为了解决Unable to find main class的问题 -->
|
||||
<classifier>execute</classifier> <!-- 为了解决依赖模块找不到此模块中的类或属性 -->
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
|
|
0
core/src/main/java/com/hzya/frame/DataSource/impl/DataSourceInitEvent.java
Executable file → Normal file
0
core/src/main/java/com/hzya/frame/DataSource/impl/DataSourceInitEvent.java
Executable file → Normal file
0
core/src/main/java/com/hzya/frame/DataSource/impl/DynamicDataSourceAssistConfiguration.java
Executable file → Normal file
0
core/src/main/java/com/hzya/frame/DataSource/impl/DynamicDataSourceAssistConfiguration.java
Executable file → Normal file
0
core/src/main/java/com/hzya/frame/DataSource/impl/EncDataSourceInitEvent.java
Executable file → Normal file
0
core/src/main/java/com/hzya/frame/DataSource/impl/EncDataSourceInitEvent.java
Executable file → Normal file
|
@ -1,6 +1,8 @@
|
|||
package com.hzya.frame.base;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
||||
/**
|
||||
* @Content插件基类接口
|
||||
|
@ -70,5 +72,6 @@ public interface SystemPluginInitializer {
|
|||
* @param requestJson 执行业务代码的参数
|
||||
* @return void
|
||||
**/
|
||||
String executeBusiness(JSONObject requestJson) throws Exception;
|
||||
@DSTransactional()
|
||||
JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception;
|
||||
}
|
||||
|
|
83
pom.xml
83
pom.xml
|
@ -59,7 +59,11 @@
|
|||
<unit.version>4.12</unit.version>
|
||||
<quartz.version>2.3.0</quartz.version>
|
||||
<org.springframework.version>5.3.23</org.springframework.version>
|
||||
<minio.version>8.0.3</minio.version>
|
||||
<postgresql.version>42.2.6</postgresql.version>
|
||||
<jimureport.version>1.7.4</jimureport.version>
|
||||
|
||||
<!-- <groovy.version>4.0.15</groovy.version>-->
|
||||
</properties>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
@ -171,7 +175,10 @@
|
|||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>${mysql-connector-java}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-jdbc</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||
|
@ -326,11 +333,56 @@
|
|||
<version>1.6.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 缓存-->
|
||||
<!-- 缓存-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-cache</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- JimuReport 积木报表 -->
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.jimureport</groupId>
|
||||
<artifactId>jimureport-spring-boot-starter</artifactId>
|
||||
<version>${jimureport.version}</version>
|
||||
</dependency>
|
||||
<!-- minio oss-->
|
||||
<dependency>
|
||||
<groupId>io.minio</groupId>
|
||||
<artifactId>minio</artifactId>
|
||||
<version>${minio.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<!-- postgresql驱动 -->
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>${postgresql.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.groovy/groovy-all -->
|
||||
<dependency>
|
||||
<groupId>org.apache.groovy</groupId>
|
||||
<artifactId>groovy-all</artifactId>
|
||||
<version>4.0.21</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<!-- flyway依赖包 -->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.flywaydb</groupId>-->
|
||||
<!-- <artifactId>flyway-core</artifactId>-->
|
||||
<!-- <version>5.2.1</version>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-core</artifactId>
|
||||
<version>8.5.13</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-mysql</artifactId>
|
||||
<version>8.5.13</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@ -364,9 +416,9 @@
|
|||
<finalName>${project.artifactId}</finalName>
|
||||
<mainClass>none</mainClass> <!-- 取消查找本项目下的Main方法:为了解决Unable to find main class的问题 -->
|
||||
<classifier>execute</classifier> <!-- 为了解决依赖模块找不到此模块中的类或属性 -->
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
<!--加载src/main/java下的xml-->
|
||||
<resources>
|
||||
|
@ -388,6 +440,7 @@
|
|||
<include>**/*.xdb</include>
|
||||
<!-- <include>**/*.jpg</include>-->
|
||||
<include>**/*.txt</include>
|
||||
<include>**/*.sql</include>
|
||||
</includes>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
|
@ -402,6 +455,7 @@
|
|||
<include>**/*.json</include>
|
||||
<include>**/*.txt</include>
|
||||
<!-- <include>**/*.jpg</include>-->
|
||||
<include>**/*.sql</include>
|
||||
|
||||
</includes>
|
||||
<filtering>true</filtering>
|
||||
|
@ -410,10 +464,27 @@
|
|||
</build>
|
||||
<!--阿里云仓库:仓库优先级为:本地仓库(localRepositories) > profile中的repositories仓库 > POM > mirrors全局仓库 -->
|
||||
<repositories>
|
||||
<!-- <repository>-->
|
||||
<!-- <id>spring-milestones</id>-->
|
||||
<!-- <name>Spring Milestones</name>-->
|
||||
<!-- <url>https://repo.spring.io/libs-milestone</url>-->
|
||||
<!-- <snapshots>-->
|
||||
<!-- <enabled>false</enabled>-->
|
||||
<!-- </snapshots>-->
|
||||
<!-- </repository>-->
|
||||
|
||||
<repository>
|
||||
<id>spring-milestones</id>
|
||||
<name>Spring Milestones</name>
|
||||
<url>https://repo.spring.io/libs-milestone</url>
|
||||
<id>aliyun</id>
|
||||
<name>aliyun Repository</name>
|
||||
<url>https://maven.aliyun.com/repository/public</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>jeecg</id>
|
||||
<name>jeecg Repository</name>
|
||||
<url>https://maven.jeecg.org/nexus/content/repositories/jeecg</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
<configuration>
|
||||
<mainClass>none</mainClass> <!-- 取消查找本项目下的Main方法:为了解决Unable to find main class的问题 -->
|
||||
<classifier>execute</classifier> <!-- 为了解决依赖模块找不到此模块中的类或属性 -->
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
|
|
|
@ -20,14 +20,11 @@ import com.hzya.frame.bip.v3.v2207.entity.BipSupplierDetailsEntity;
|
|||
import com.hzya.frame.bip.v3.v2207.entity.BipSupplierEntity;
|
||||
import com.hzya.frame.bip.v3.v2207.service.IBipV32207Service;
|
||||
import com.hzya.frame.dateutil.DateUtil;
|
||||
import com.hzya.frame.seeyon.service.impl.SeeYonInterFaceImpl;
|
||||
import com.hzya.frame.sys.integrationtask.entity.IntegrationTaskEntity;
|
||||
import com.hzya.frame.util.PluginUtils;
|
||||
import com.hzya.frame.util.bipV3.Encryption;
|
||||
import com.hzya.frame.util.bipV3.SHA256Util;
|
||||
import com.hzya.frame.util.oldNcc.CompressUtil;
|
||||
import com.hzya.frame.util.oldNcc.Decryption;
|
||||
import com.hzya.frame.util.oldNcc.ResultMessageUtil;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
@ -39,7 +36,6 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
import java.net.URLEncoder;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@Service(value = "bipV32207Service")
|
||||
|
@ -368,7 +364,7 @@ public class BipV32207ServiceImpl extends BaseService<BipSupplierEntity, String>
|
|||
public JsonResultEntity thirdInterfaceSendOa(JSONObject jsonObject) throws Exception {
|
||||
JSONObject jsonObjectStr = getstrObj("jsonStr", jsonObject);
|
||||
PluginBaseEntity pluginBaseEntity = PluginUtils.getPluginsById(jsonObjectStr.getString("plug_id"));
|
||||
String s = pluginBaseEntity.executeBusiness(jsonObjectStr);
|
||||
JsonResultEntity s = pluginBaseEntity.executeBusiness(jsonObjectStr);
|
||||
return BaseResult.getSuccessMessageEntity("传递成功");
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
package com.hzya.frame.home.dao;
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.home.entity.HomeEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IHomeDao extends IBaseDao<HomeEntity, String> {
|
||||
|
||||
|
||||
List<HomeEntity> getAppErrorNum(HomeEntity homeEntity);
|
||||
|
||||
List<HomeEntity> appApiNum(HomeEntity homeEntity);
|
||||
|
||||
List<HomeEntity> useApiNum(HomeEntity homeEntity);
|
||||
|
||||
HomeEntity taskNumRun(HomeEntity homeEntity);
|
||||
HomeEntity taskNumStop(HomeEntity homeEntity);
|
||||
|
||||
List<HomeEntity> sevenerrornum(HomeEntity homeEntity);
|
||||
|
||||
List<HomeEntity> sevensuccessnum(HomeEntity homeEntity);
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
package com.hzya.frame.home.dao.impl;
|
||||
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.home.dao.IHomeDao;
|
||||
import com.hzya.frame.home.entity.HomeEntity;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository(value = "HomeDaoImpl")
|
||||
public class HomeDaoImpl extends MybatisGenericDao<HomeEntity, String> implements IHomeDao {
|
||||
|
||||
|
||||
@Override
|
||||
public List<HomeEntity> getAppErrorNum(HomeEntity entity) {
|
||||
List<HomeEntity> o = (List<HomeEntity>) super.selectList(getSqlIdPrifx() + "getAppErrorNum", entity);
|
||||
return o;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HomeEntity> appApiNum(HomeEntity entity) {
|
||||
List<HomeEntity> o = (List<HomeEntity>) super.selectList(getSqlIdPrifx() + "appApiNum", entity);
|
||||
return o;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HomeEntity> useApiNum(HomeEntity entity) {
|
||||
List<HomeEntity> o = (List<HomeEntity>) super.selectList(getSqlIdPrifx() + "useApiNum", entity);
|
||||
return o;
|
||||
}
|
||||
@Override
|
||||
public List<HomeEntity> sevenerrornum(HomeEntity entity) {
|
||||
List<HomeEntity> o = (List<HomeEntity>) super.selectList(getSqlIdPrifx() + "sevenerrornum", entity);
|
||||
return o;
|
||||
}
|
||||
@Override
|
||||
public List<HomeEntity> sevensuccessnum(HomeEntity entity) {
|
||||
List<HomeEntity> o = (List<HomeEntity>) super.selectList(getSqlIdPrifx() + "sevensuccessnum", entity);
|
||||
return o;
|
||||
}
|
||||
@Override
|
||||
public HomeEntity taskNumRun(HomeEntity entity) {
|
||||
HomeEntity o = (HomeEntity) super.selectOne(getSqlIdPrifx() + "taskNumRun", entity);
|
||||
return o;
|
||||
}
|
||||
@Override
|
||||
public HomeEntity taskNumStop(HomeEntity entity) {
|
||||
HomeEntity o = (HomeEntity) super.selectOne(getSqlIdPrifx() + "taskNumStop", entity);
|
||||
return o;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
package com.hzya.frame.home.entity;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
|
||||
public class HomeEntity extends BaseEntity {
|
||||
//应用id
|
||||
private String appId;
|
||||
|
||||
//应用图标
|
||||
private String path;
|
||||
//
|
||||
private String name;
|
||||
|
||||
//数量
|
||||
private Integer num;
|
||||
//正常数量
|
||||
private Integer normalNum;
|
||||
//异常数量
|
||||
private Integer abnormalNum;
|
||||
|
||||
public String getAppId() {
|
||||
return appId;
|
||||
}
|
||||
|
||||
public void setAppId(String appId) {
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public String getPath() {
|
||||
return path;
|
||||
}
|
||||
|
||||
public void setPath(String path) {
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
public Integer getNormalNum() {
|
||||
return normalNum;
|
||||
}
|
||||
|
||||
public void setNormalNum(Integer normalNum) {
|
||||
this.normalNum = normalNum;
|
||||
}
|
||||
|
||||
public Integer getAbnormalNum() {
|
||||
return abnormalNum;
|
||||
}
|
||||
|
||||
public void setAbnormalNum(Integer abnormalNum) {
|
||||
this.abnormalNum = abnormalNum;
|
||||
}
|
||||
|
||||
public Integer getNum() {
|
||||
return num;
|
||||
}
|
||||
|
||||
public void setNum(Integer num) {
|
||||
this.num = num;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.home.dao.impl.HomeDaoImpl">
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="getAppErrorNum" resultType="com.hzya.frame.home.entity.HomeEntity" parameterType="com.hzya.frame.home.entity.HomeEntity">
|
||||
SELECT
|
||||
receive_app as appId,
|
||||
count( 1 ) as num
|
||||
FROM
|
||||
sys_message_manage_log
|
||||
WHERE sts = 'Y' and status = '4'
|
||||
GROUP BY
|
||||
receive_app
|
||||
</select>
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="appApiNum" resultType="com.hzya.frame.home.entity.HomeEntity" parameterType="com.hzya.frame.home.entity.HomeEntity">
|
||||
SELECT
|
||||
api.app_id as appId,
|
||||
app.app_logo as path,
|
||||
count( 1 ) as num
|
||||
FROM
|
||||
sys_application_api api
|
||||
left join sys_application app on app.id = api.app_id and app.sts = 'Y'
|
||||
WHERE api.sts = 'Y' and api.app_id is not null
|
||||
GROUP BY
|
||||
api.app_id
|
||||
</select>
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="useApiNum" resultType="com.hzya.frame.home.entity.HomeEntity" parameterType="com.hzya.frame.home.entity.HomeEntity">
|
||||
SELECT
|
||||
a.app_id as appId,
|
||||
COUNT( a.api_id ) as normalNum
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
app_id,
|
||||
api_id
|
||||
FROM
|
||||
sys_application_api_auth_detail
|
||||
WHERE
|
||||
sts = 'Y'
|
||||
GROUP BY
|
||||
api_id,app_id
|
||||
) a
|
||||
left join sys_application_api api on api.id = a.api_id and api.sts = 'Y'
|
||||
WHERE api.id is not null
|
||||
GROUP BY
|
||||
a.app_id
|
||||
|
||||
</select>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="taskNumRun" resultType="com.hzya.frame.home.entity.HomeEntity" parameterType="com.hzya.frame.home.entity.HomeEntity">
|
||||
SELECT
|
||||
count( 1 ) as normalNum
|
||||
FROM
|
||||
integration_task
|
||||
WHERE
|
||||
sts = 'Y'
|
||||
AND task_status = '1'
|
||||
</select>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="taskNumStop" resultType="com.hzya.frame.home.entity.HomeEntity" parameterType="com.hzya.frame.home.entity.HomeEntity">
|
||||
SELECT
|
||||
count( 1 ) as abnormalNum
|
||||
FROM
|
||||
integration_task
|
||||
WHERE
|
||||
sts = 'Y'
|
||||
AND task_status = '2'
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="sevenerrornum" resultType="com.hzya.frame.home.entity.HomeEntity" parameterType="com.hzya.frame.home.entity.HomeEntity">
|
||||
SELECT
|
||||
count( id ) as abnormalNum,
|
||||
DATE_FORMAT( create_time, '%Y-%m-%d' ) as name
|
||||
FROM
|
||||
sys_message_manage_log
|
||||
WHERE sts = 'Y' and status = '4' and
|
||||
create_time BETWEEN DATE_SUB( NOW(), INTERVAL 6 DAY ) AND NOW()
|
||||
GROUP BY
|
||||
DATE_FORMAT( create_time, '%Y-%m-%d' )
|
||||
ORDER BY
|
||||
DATE_FORMAT(
|
||||
create_time,
|
||||
'%Y-%m-%d')
|
||||
</select>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="sevensuccessnum" resultType="com.hzya.frame.home.entity.HomeEntity" parameterType="com.hzya.frame.home.entity.HomeEntity">
|
||||
SELECT
|
||||
count( id ) as normalNum,
|
||||
DATE_FORMAT( create_time, '%Y-%m-%d' ) as name
|
||||
FROM
|
||||
sys_message_manage_log_success
|
||||
WHERE sts = 'Y' and status = '3' and
|
||||
create_time BETWEEN DATE_SUB( NOW(), INTERVAL 6 DAY ) AND NOW()
|
||||
GROUP BY
|
||||
DATE_FORMAT( create_time, '%Y-%m-%d' )
|
||||
ORDER BY
|
||||
DATE_FORMAT(
|
||||
create_time,
|
||||
'%Y-%m-%d')
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
package com.hzya.frame.home.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.home.entity.HomeEntity;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
||||
public interface IHomeService extends IBaseService<HomeEntity, String> {
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 分组统计应用下接口日志表失败的数量(返回应用名称、失败数)
|
||||
* @Date 10:17 上午 2024/5/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity appErrorNum(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 分组统计应用下面api的总数量,以及是否有授权的api数量,(返回应用名称、api总数量、启用数量、停用数量)
|
||||
* @Date 10:17 上午 2024/5/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity appApiNum(JSONObject jsonObject);
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 查询任务监控表数据(返回任务名称、状态、总数、上次耗时、上次执行时间)
|
||||
* @Date 10:17 上午 2024/5/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity taskNum(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 统计最近7天内api成功和失败数量
|
||||
* @Date 10:17 上午 2024/5/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity sevenNum(JSONObject jsonObject);
|
||||
|
||||
}
|
|
@ -0,0 +1,155 @@
|
|||
package com.hzya.frame.home.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.home.dao.IHomeDao;
|
||||
import com.hzya.frame.home.entity.HomeEntity;
|
||||
import com.hzya.frame.home.service.IHomeService;
|
||||
import com.hzya.frame.sysnew.application.dao.ISysApplicationDao;
|
||||
import com.hzya.frame.sysnew.application.entity.SysApplicationEntity;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Service(value = "homeService")
|
||||
public class HomeServiceImpl extends BaseService<HomeEntity, String> implements IHomeService {
|
||||
|
||||
private IHomeDao homeDao;
|
||||
@Resource
|
||||
private ISysApplicationDao sysApplicationDao;
|
||||
@Autowired
|
||||
public void setSysApplicationApiDao(IHomeDao dao) {
|
||||
this.homeDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 分组统计应用下接口日志表失败的数量(返回应用名称、失败数)
|
||||
* @Date 10:17 上午 2024/5/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity appErrorNum(JSONObject jsonObject) {
|
||||
HomeEntity homeEntity = new HomeEntity();
|
||||
List<HomeEntity> homeEntities = homeDao.getAppErrorNum(homeEntity);
|
||||
if(homeEntities != null && homeEntities.size() > 0){
|
||||
SysApplicationEntity sysApplicationEntity = new SysApplicationEntity();
|
||||
sysApplicationEntity.setSts("Y");
|
||||
List<SysApplicationEntity> sysApplicationEntities = sysApplicationDao.queryByLike(sysApplicationEntity);
|
||||
if(sysApplicationEntities != null && sysApplicationEntities.size() > 0){
|
||||
for (int i = 0; i < homeEntities.size(); i++) {
|
||||
for (int a = 0; a < sysApplicationEntities.size(); a++) {
|
||||
if(homeEntities.get(i).getAppId()!= null && sysApplicationEntities.get(a).getId().equals(homeEntities.get(i).getAppId())){
|
||||
homeEntities.get(i).setPath(sysApplicationEntities.get(a).getAppLogo());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("查询数据成功",homeEntities);
|
||||
}
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 分组统计应用下面api的总数量,以及是否有授权的api数量,(返回应用名称、api总数量、启用数量、停用数量)
|
||||
* @Date 10:17 上午 2024/5/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity appApiNum(JSONObject jsonObject) {
|
||||
HomeEntity homeEntity = new HomeEntity();
|
||||
List<HomeEntity> homeEntities = homeDao.appApiNum(homeEntity);
|
||||
if(homeEntities != null && homeEntities.size() > 0){
|
||||
List<HomeEntity> useApiNum = homeDao.useApiNum(homeEntity);
|
||||
if(useApiNum != null && useApiNum.size() > 0){
|
||||
for (int i = 0; i < homeEntities.size(); i++) {
|
||||
for (int a = 0; a < useApiNum.size(); a++) {
|
||||
if(homeEntities.get(i).getAppId()!= null && useApiNum.get(a).getAppId().equals(homeEntities.get(i).getAppId())){
|
||||
homeEntities.get(i).setNormalNum(useApiNum.get(a).getNormalNum());
|
||||
homeEntities.get(i).setAbnormalNum(homeEntities.get(i).getNum() - useApiNum.get(a).getNormalNum());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SysApplicationEntity sysApplicationEntity = new SysApplicationEntity();
|
||||
sysApplicationEntity.setSts("Y");
|
||||
List<SysApplicationEntity> sysApplicationEntities = sysApplicationDao.queryByLike(sysApplicationEntity);
|
||||
if(sysApplicationEntities != null && sysApplicationEntities.size() > 0){
|
||||
for (int i = 0; i < homeEntities.size(); i++) {
|
||||
for (int a = 0; a < sysApplicationEntities.size(); a++) {
|
||||
if(homeEntities.get(i).getAppId()!= null && sysApplicationEntities.get(a).getId().equals(homeEntities.get(i).getAppId())){
|
||||
homeEntities.get(i).setPath(sysApplicationEntities.get(a).getAppLogo());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("查询数据成功",homeEntities);
|
||||
}
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 查询任务监控表数据(返回任务名称、状态、总数、上次耗时、上次执行时间)
|
||||
* @Date 10:17 上午 2024/5/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity taskNum(JSONObject jsonObject) {
|
||||
HomeEntity homeEntity = new HomeEntity();
|
||||
HomeEntity runhome = homeDao.taskNumRun(homeEntity);
|
||||
HomeEntity stophome = homeDao.taskNumStop(homeEntity);
|
||||
homeEntity.setNormalNum(runhome.getNormalNum());
|
||||
homeEntity.setAbnormalNum(stophome.getAbnormalNum());
|
||||
homeEntity.setNum(runhome.getNormalNum() + stophome.getAbnormalNum());
|
||||
return BaseResult.getSuccessMessageEntity("查询数据成功",homeEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 统计最近7天内api成功和失败数量
|
||||
* @Date 10:17 上午 2024/5/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity sevenNum(JSONObject jsonObject) {
|
||||
List<HomeEntity> homeEntities = new ArrayList<>();
|
||||
HomeEntity homeEntity = new HomeEntity();
|
||||
List<HomeEntity> errornum = homeDao.sevenerrornum(homeEntity);
|
||||
List<HomeEntity> successnum = homeDao.sevensuccessnum(homeEntity);
|
||||
for (int i = 6; i >=0; i--) {
|
||||
String date = LocalDate.now().minusDays(i).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||
HomeEntity entity = new HomeEntity();
|
||||
entity.setName(date);
|
||||
entity.setNormalNum(0);
|
||||
entity.setAbnormalNum(0);
|
||||
for (int a = 0; a < errornum.size(); a++) {
|
||||
if(date.equals(errornum.get(a).getName())){
|
||||
entity.setAbnormalNum(errornum.get(a).getAbnormalNum());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
for (int a = 0; a < successnum.size(); a++) {
|
||||
if(date.equals(successnum.get(a).getName())){
|
||||
entity.setNormalNum(successnum.get(a).getNormalNum());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
homeEntities.add(entity);
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("查询数据成功",homeEntities);
|
||||
}
|
||||
}
|
|
@ -8,7 +8,7 @@ import java.util.List;
|
|||
public class DbFiledsDto {
|
||||
|
||||
/**
|
||||
* 1\修改 2、新增
|
||||
* 1新增 2、修改
|
||||
*/
|
||||
private String dataType;
|
||||
|
||||
|
|
|
@ -1,69 +0,0 @@
|
|||
package com.hzya.frame.mdm.entity;
|
||||
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MdmDataDto {
|
||||
|
||||
private String id;
|
||||
private String tableName;
|
||||
private String documentRule;
|
||||
private Integer documentRuleNum;
|
||||
/**
|
||||
* 类型 1、主表 2、明细
|
||||
*/
|
||||
private String dbType;
|
||||
|
||||
private List<MdmDataFiledDto> mdmDataFiledDtos;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getTableName() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
public void setTableName(String tableName) {
|
||||
this.tableName = tableName;
|
||||
}
|
||||
|
||||
public List<MdmDataFiledDto> getMdmDataFiledDtos() {
|
||||
return mdmDataFiledDtos;
|
||||
}
|
||||
|
||||
public void setMdmDataFiledDtos(List<MdmDataFiledDto> mdmDataFiledDtos) {
|
||||
this.mdmDataFiledDtos = mdmDataFiledDtos;
|
||||
}
|
||||
|
||||
public String getDocumentRule() {
|
||||
return documentRule;
|
||||
}
|
||||
|
||||
public void setDocumentRule(String documentRule) {
|
||||
this.documentRule = documentRule;
|
||||
}
|
||||
|
||||
public Integer getDocumentRuleNum() {
|
||||
return documentRuleNum;
|
||||
}
|
||||
|
||||
public void setDocumentRuleNum(Integer documentRuleNum) {
|
||||
this.documentRuleNum = documentRuleNum;
|
||||
}
|
||||
|
||||
public String getDbType() {
|
||||
return dbType;
|
||||
}
|
||||
|
||||
public void setDbType(String dbType) {
|
||||
this.dbType = dbType;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
package com.hzya.frame.mdm.entity;
|
||||
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MdmDataFiledDto {
|
||||
|
||||
private String filedsName;
|
||||
private String filedsValue;
|
||||
|
||||
public String getFiledsName() {
|
||||
return filedsName;
|
||||
}
|
||||
|
||||
public void setFiledsName(String filedsName) {
|
||||
this.filedsName = filedsName;
|
||||
}
|
||||
|
||||
public String getFiledsValue() {
|
||||
return filedsValue;
|
||||
}
|
||||
|
||||
public void setFiledsValue(String filedsValue) {
|
||||
this.filedsValue = filedsValue;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +1,5 @@
|
|||
package com.hzya.frame.mdm.entity;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MdmDbFiledVo {
|
||||
private String id;
|
||||
|
|
|
@ -1,25 +1,19 @@
|
|||
package com.hzya.frame.mdm.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity;
|
||||
import com.hzya.frame.mdm.mdmTableCodeRule.entity.MdmTableCodeRuleEntity;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class MdmDbVo {
|
||||
|
||||
//单据编码规则
|
||||
private List<MdmTableCodeRuleEntity> mdmTableCodeRuleEntityList;
|
||||
//主数据主表
|
||||
private MdmModuleDbEntity mainMdmModuleDb;
|
||||
//主数据子表
|
||||
private List<MdmModuleDbEntity> sublistMdmModuleDb;
|
||||
//控件字段规则属性
|
||||
private List<MdmModuleDbFiledsRuleFilesEntity> moduleDbFiledsRuleFiles;
|
||||
//单据编码规则
|
||||
private List<MdmTableCodeRuleEntity> mdmTableCodeRuleEntityList;
|
||||
|
||||
|
||||
|
||||
public List<MdmTableCodeRuleEntity> getMdmTableCodeRuleEntityList() {
|
||||
|
@ -30,14 +24,6 @@ public class MdmDbVo {
|
|||
this.mdmTableCodeRuleEntityList = mdmTableCodeRuleEntityList;
|
||||
}
|
||||
|
||||
public List<MdmModuleDbFiledsRuleFilesEntity> getModuleDbFiledsRuleFiles() {
|
||||
return moduleDbFiledsRuleFiles;
|
||||
}
|
||||
|
||||
public void setModuleDbFiledsRuleFiles(List<MdmModuleDbFiledsRuleFilesEntity> moduleDbFiledsRuleFiles) {
|
||||
this.moduleDbFiledsRuleFiles = moduleDbFiledsRuleFiles;
|
||||
}
|
||||
|
||||
public MdmModuleDbEntity getMainMdmModuleDb() {
|
||||
return mainMdmModuleDb;
|
||||
}
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
package com.hzya.frame.mdm.entity;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MdmDetailViewVo {
|
||||
//模版信息
|
||||
private MdmModuleEntity mdmModuleEntity;
|
||||
//主数据主表
|
||||
private MdmModuleDbEntity mainMdmModuleDb;
|
||||
//主数据子表
|
||||
private List<MdmModuleDbEntity> sublistMdmModuleDb;
|
||||
|
||||
public MdmModuleEntity getMdmModuleEntity() {
|
||||
return mdmModuleEntity;
|
||||
}
|
||||
|
||||
public void setMdmModuleEntity(MdmModuleEntity mdmModuleEntity) {
|
||||
this.mdmModuleEntity = mdmModuleEntity;
|
||||
}
|
||||
|
||||
public MdmModuleDbEntity getMainMdmModuleDb() {
|
||||
return mainMdmModuleDb;
|
||||
}
|
||||
|
||||
public void setMainMdmModuleDb(MdmModuleDbEntity mainMdmModuleDb) {
|
||||
this.mainMdmModuleDb = mainMdmModuleDb;
|
||||
}
|
||||
|
||||
public List<MdmModuleDbEntity> getSublistMdmModuleDb() {
|
||||
return sublistMdmModuleDb;
|
||||
}
|
||||
|
||||
public void setSublistMdmModuleDb(List<MdmModuleDbEntity> sublistMdmModuleDb) {
|
||||
this.sublistMdmModuleDb = sublistMdmModuleDb;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
package com.hzya.frame.mdm.entity;
|
||||
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleRole.entity.MdmModuleRoleEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MdmDistributeDto {
|
||||
|
||||
//id
|
||||
private String id;
|
||||
|
||||
|
||||
private List<MdmModuleDistributeEntity> mdmModuleDistributeEntities;
|
||||
|
||||
public List<MdmModuleDistributeEntity> getMdmModuleDistributeEntities() {
|
||||
return mdmModuleDistributeEntities;
|
||||
}
|
||||
|
||||
public void setMdmModuleDistributeEntities(List<MdmModuleDistributeEntity> mdmModuleDistributeEntities) {
|
||||
this.mdmModuleDistributeEntities = mdmModuleDistributeEntities;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
package com.hzya.frame.mdm.entity;
|
||||
|
||||
public class MdmDistributeVo {
|
||||
|
||||
/**
|
||||
* 数据
|
||||
*/
|
||||
private String formmainId;
|
||||
|
||||
/**
|
||||
* 应用id
|
||||
*/
|
||||
private String appId;
|
||||
/**
|
||||
* 状态 1、发送成功 2、发送中 3、发送失败 4、未发送
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
*描述
|
||||
*/
|
||||
private String msg;
|
||||
|
||||
public String getFormmainId() {
|
||||
return formmainId;
|
||||
}
|
||||
|
||||
public void setFormmainId(String formmainId) {
|
||||
this.formmainId = formmainId;
|
||||
}
|
||||
|
||||
public String getAppId() {
|
||||
return appId;
|
||||
}
|
||||
|
||||
public void setAppId(String appId) {
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
}
|
||||
|
|
@ -2,38 +2,14 @@ package com.hzya.frame.mdm.entity;
|
|||
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity;
|
||||
import com.hzya.frame.mdm.mdmTableCodeRule.entity.MdmTableCodeRuleEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MdmDto {
|
||||
|
||||
//id
|
||||
private String id;
|
||||
//3、新增4、修改 5、查看
|
||||
private String showType;
|
||||
//分页
|
||||
private Integer pageNum;
|
||||
private Integer pageSize;
|
||||
/**
|
||||
* 显示字段
|
||||
*/
|
||||
private String viewFiled;
|
||||
/**
|
||||
* 上级id字段
|
||||
*/
|
||||
private String upIdFiled;
|
||||
//主数据名称
|
||||
private String mdmName;
|
||||
//主数据编码
|
||||
private Integer mdmCode;
|
||||
//主数据类型
|
||||
private String mdmType;
|
||||
//描述
|
||||
private String remark;
|
||||
//描述
|
||||
private String[] ids;
|
||||
private Long mdmCode;
|
||||
//单据编码规则
|
||||
private List<MdmTableCodeRuleEntity> mdmTableCodeRuleEntityList;
|
||||
//主数据主表
|
||||
|
@ -41,29 +17,20 @@ public class MdmDto {
|
|||
//主数据子表
|
||||
private List<MdmModuleDbEntity> sublistMdmModuleDb;
|
||||
|
||||
private String tableName;
|
||||
private String value;
|
||||
|
||||
private String label;
|
||||
private String lableValue;
|
||||
|
||||
private String upId;
|
||||
|
||||
|
||||
public String getLableValue() {
|
||||
return lableValue;
|
||||
public Long getMdmCode() {
|
||||
return mdmCode;
|
||||
}
|
||||
|
||||
public void setLableValue(String lableValue) {
|
||||
this.lableValue = lableValue;
|
||||
public void setMdmCode(Long mdmCode) {
|
||||
this.mdmCode = mdmCode;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
public List<MdmTableCodeRuleEntity> getMdmTableCodeRuleEntityList() {
|
||||
return mdmTableCodeRuleEntityList;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
public void setMdmTableCodeRuleEntityList(List<MdmTableCodeRuleEntity> mdmTableCodeRuleEntityList) {
|
||||
this.mdmTableCodeRuleEntityList = mdmTableCodeRuleEntityList;
|
||||
}
|
||||
|
||||
public MdmModuleDbEntity getMainMdmModuleDb() {
|
||||
|
@ -81,125 +48,5 @@ public class MdmDto {
|
|||
public void setSublistMdmModuleDb(List<MdmModuleDbEntity> sublistMdmModuleDb) {
|
||||
this.sublistMdmModuleDb = sublistMdmModuleDb;
|
||||
}
|
||||
|
||||
public String getMdmName() {
|
||||
return mdmName;
|
||||
}
|
||||
|
||||
public void setMdmName(String mdmName) {
|
||||
this.mdmName = mdmName;
|
||||
}
|
||||
|
||||
public Integer getMdmCode() {
|
||||
return mdmCode;
|
||||
}
|
||||
|
||||
public void setMdmCode(Integer mdmCode) {
|
||||
this.mdmCode = mdmCode;
|
||||
}
|
||||
|
||||
public String getMdmType() {
|
||||
return mdmType;
|
||||
}
|
||||
|
||||
public void setMdmType(String mdmType) {
|
||||
this.mdmType = mdmType;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getPageNum() {
|
||||
return pageNum;
|
||||
}
|
||||
|
||||
public void setPageNum(Integer pageNum) {
|
||||
this.pageNum = pageNum;
|
||||
}
|
||||
|
||||
public Integer getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(Integer pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getShowType() {
|
||||
return showType;
|
||||
}
|
||||
|
||||
public void setShowType(String showType) {
|
||||
this.showType = showType;
|
||||
}
|
||||
|
||||
public List<MdmTableCodeRuleEntity> getMdmTableCodeRuleEntityList() {
|
||||
return mdmTableCodeRuleEntityList;
|
||||
}
|
||||
|
||||
public void setMdmTableCodeRuleEntityList(List<MdmTableCodeRuleEntity> mdmTableCodeRuleEntityList) {
|
||||
this.mdmTableCodeRuleEntityList = mdmTableCodeRuleEntityList;
|
||||
}
|
||||
|
||||
public String getViewFiled() {
|
||||
return viewFiled;
|
||||
}
|
||||
|
||||
public void setViewFiled(String viewFiled) {
|
||||
this.viewFiled = viewFiled;
|
||||
}
|
||||
|
||||
public String getUpIdFiled() {
|
||||
return upIdFiled;
|
||||
}
|
||||
|
||||
public void setUpIdFiled(String upIdFiled) {
|
||||
this.upIdFiled = upIdFiled;
|
||||
}
|
||||
|
||||
public String getTableName() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
public void setTableName(String tableName) {
|
||||
this.tableName = tableName;
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
public void setLabel(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public String getUpId() {
|
||||
return upId;
|
||||
}
|
||||
|
||||
public void setUpId(String upId) {
|
||||
this.upId = upId;
|
||||
}
|
||||
|
||||
public String[] getIds() {
|
||||
return ids;
|
||||
}
|
||||
|
||||
public void setIds(String[] ids) {
|
||||
this.ids = ids;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package com.hzya.frame.mdm.entity;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleViewButton.entity.MdmModuleViewButtonEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MdmModuleViewDto {
|
||||
|
||||
//id
|
||||
private String id;
|
||||
private Long mdmCode;
|
||||
//模版
|
||||
private MdmModuleViewEntity mdmModuleViewEntity;
|
||||
//新增
|
||||
|
@ -21,6 +21,8 @@ public class MdmModuleViewDto {
|
|||
private List<MdmDbFiledVo> queryFiled;
|
||||
//列表
|
||||
private List<MdmDbFiledVo> listFiled;
|
||||
//按钮
|
||||
private List<MdmModuleViewButtonEntity> dbButtonFiled;
|
||||
|
||||
public MdmModuleViewEntity getMdmModuleViewEntity() {
|
||||
return mdmModuleViewEntity;
|
||||
|
@ -70,12 +72,20 @@ public class MdmModuleViewDto {
|
|||
this.listFiled = listFiled;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
public Long getMdmCode() {
|
||||
return mdmCode;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
public void setMdmCode(Long mdmCode) {
|
||||
this.mdmCode = mdmCode;
|
||||
}
|
||||
|
||||
public List<MdmModuleViewButtonEntity> getDbButtonFiled() {
|
||||
return dbButtonFiled;
|
||||
}
|
||||
|
||||
public void setDbButtonFiled(List<MdmModuleViewButtonEntity> dbButtonFiled) {
|
||||
this.dbButtonFiled = dbButtonFiled;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.hzya.frame.mdm.entity;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleViewButton.entity.MdmModuleViewButtonEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleViewDetail.entity.MdmModuleViewDetailEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -31,6 +32,8 @@ public class MdmModuleViewVo {
|
|||
private List<MdmModuleViewDetailEntity> dbQueryFiled;
|
||||
//列表
|
||||
private List<MdmModuleViewDetailEntity> dbListFiled;
|
||||
//按钮
|
||||
private List<MdmModuleViewButtonEntity> dbButtonFiled;
|
||||
|
||||
public List<MdmDbFiledVo> getAddFiled() {
|
||||
return addFiled;
|
||||
|
@ -119,5 +122,15 @@ public class MdmModuleViewVo {
|
|||
public void setDbListFiled(List<MdmModuleViewDetailEntity> dbListFiled) {
|
||||
this.dbListFiled = dbListFiled;
|
||||
}
|
||||
|
||||
public List<MdmModuleViewButtonEntity> getDbButtonFiled() {
|
||||
return dbButtonFiled;
|
||||
}
|
||||
|
||||
public void setDbButtonFiled(List<MdmModuleViewButtonEntity> dbButtonFiled) {
|
||||
this.dbButtonFiled = dbButtonFiled;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,69 +0,0 @@
|
|||
package com.hzya.frame.mdm.entity;
|
||||
|
||||
|
||||
import com.hzya.frame.sys.entity.TemplateKeyValue;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MdmQuery {
|
||||
|
||||
//分页
|
||||
private Integer pageNum;
|
||||
private Integer pageSize;
|
||||
//表名
|
||||
private String tableName;
|
||||
//查询条件
|
||||
private List<TemplateKeyValue> queryCondition;
|
||||
//返回字段
|
||||
private List<String> returnField;
|
||||
//明细表查询条件
|
||||
private List<MdmQuery> detailQueryCondition;
|
||||
|
||||
public Integer getPageNum() {
|
||||
return pageNum;
|
||||
}
|
||||
|
||||
public void setPageNum(Integer pageNum) {
|
||||
this.pageNum = pageNum;
|
||||
}
|
||||
|
||||
public Integer getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(Integer pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public String getTableName() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
public void setTableName(String tableName) {
|
||||
this.tableName = tableName;
|
||||
}
|
||||
|
||||
public List<TemplateKeyValue> getQueryCondition() {
|
||||
return queryCondition;
|
||||
}
|
||||
|
||||
public void setQueryCondition(List<TemplateKeyValue> queryCondition) {
|
||||
this.queryCondition = queryCondition;
|
||||
}
|
||||
|
||||
public List<String> getReturnField() {
|
||||
return returnField;
|
||||
}
|
||||
|
||||
public void setReturnField(List<String> returnField) {
|
||||
this.returnField = returnField;
|
||||
}
|
||||
|
||||
public List<MdmQuery> getDetailQueryCondition() {
|
||||
return detailQueryCondition;
|
||||
}
|
||||
|
||||
public void setDetailQueryCondition(List<MdmQuery> detailQueryCondition) {
|
||||
this.detailQueryCondition = detailQueryCondition;
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
package com.hzya.frame.mdm.entity;
|
||||
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleRole.entity.MdmModuleRoleEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MdmRoleDto {
|
||||
|
||||
//id
|
||||
private String id;
|
||||
|
||||
|
||||
private List<MdmModuleRoleEntity> mdmModuleRoleEntities;
|
||||
|
||||
public List<MdmModuleRoleEntity> getMdmModuleRoleEntities() {
|
||||
return mdmModuleRoleEntities;
|
||||
}
|
||||
|
||||
public void setMdmModuleRoleEntities(List<MdmModuleRoleEntity> mdmModuleRoleEntities) {
|
||||
this.mdmModuleRoleEntities = mdmModuleRoleEntities;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
package com.hzya.frame.mdm.entity;
|
||||
|
||||
public class MdmViewButtonVo {
|
||||
|
||||
//按钮类型
|
||||
private String buttonType;
|
||||
//按钮名
|
||||
private String buttonName;
|
||||
|
||||
public String getButtonType() {
|
||||
return buttonType;
|
||||
}
|
||||
|
||||
public void setButtonType(String buttonType) {
|
||||
this.buttonType = buttonType;
|
||||
}
|
||||
|
||||
public String getButtonName() {
|
||||
return buttonName;
|
||||
}
|
||||
|
||||
public void setButtonName(String buttonName) {
|
||||
this.buttonName = buttonName;
|
||||
}
|
||||
|
||||
public MdmViewButtonVo() {
|
||||
}
|
||||
|
||||
public MdmViewButtonVo(String buttonType, String buttonName) {
|
||||
this.buttonType = buttonType;
|
||||
this.buttonName = buttonName;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,114 +0,0 @@
|
|||
package com.hzya.frame.mdm.entity;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleDbFiledsRule.entity.MdmModuleDbFiledsRuleEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MdmViewFiledVo {
|
||||
|
||||
//字段id
|
||||
private String id;
|
||||
//表名
|
||||
private String dbName;
|
||||
//类型 1、主表 2、明细
|
||||
private String dbType;
|
||||
//主数据模版ID
|
||||
private String mdmId;
|
||||
//模版数据库id
|
||||
private String dbId;
|
||||
//中文名
|
||||
private String chName;
|
||||
//英文名
|
||||
private String enName;
|
||||
//排序
|
||||
private Integer sorts;
|
||||
/**
|
||||
* 字段类型 1、BIGINT 2、DECIMAL 3、VARCHAR 4、DATETIME
|
||||
*/
|
||||
private String filedType;
|
||||
//字段规则
|
||||
private List<MdmModuleDbFiledsRuleEntity> ruleList;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getDbName() {
|
||||
return dbName;
|
||||
}
|
||||
|
||||
public void setDbName(String dbName) {
|
||||
this.dbName = dbName;
|
||||
}
|
||||
|
||||
public String getDbType() {
|
||||
return dbType;
|
||||
}
|
||||
|
||||
public void setDbType(String dbType) {
|
||||
this.dbType = dbType;
|
||||
}
|
||||
|
||||
public String getMdmId() {
|
||||
return mdmId;
|
||||
}
|
||||
|
||||
public void setMdmId(String mdmId) {
|
||||
this.mdmId = mdmId;
|
||||
}
|
||||
|
||||
public String getDbId() {
|
||||
return dbId;
|
||||
}
|
||||
|
||||
public void setDbId(String dbId) {
|
||||
this.dbId = dbId;
|
||||
}
|
||||
|
||||
public String getChName() {
|
||||
return chName;
|
||||
}
|
||||
|
||||
public void setChName(String chName) {
|
||||
this.chName = chName;
|
||||
}
|
||||
|
||||
public String getEnName() {
|
||||
return enName;
|
||||
}
|
||||
|
||||
public void setEnName(String enName) {
|
||||
this.enName = enName;
|
||||
}
|
||||
|
||||
public List<MdmModuleDbFiledsRuleEntity> getRuleList() {
|
||||
return ruleList;
|
||||
}
|
||||
|
||||
public void setRuleList(List<MdmModuleDbFiledsRuleEntity> ruleList) {
|
||||
this.ruleList = ruleList;
|
||||
}
|
||||
|
||||
public Integer getSorts() {
|
||||
return sorts;
|
||||
}
|
||||
|
||||
public void setSorts(Integer sorts) {
|
||||
this.sorts = sorts;
|
||||
}
|
||||
|
||||
public String getFiledType() {
|
||||
return filedType;
|
||||
}
|
||||
|
||||
public void setFiledType(String filedType) {
|
||||
this.filedType = filedType;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
package com.hzya.frame.mdm.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleView.entity.MdmModuleViewEntity;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class MdmViewVo {
|
||||
|
||||
private String id;
|
||||
//模版信息
|
||||
private MdmModuleEntity mdmModuleEntity;
|
||||
//模版展示信息
|
||||
private MdmModuleViewEntity mdmModuleViewEntity;
|
||||
//查询条件
|
||||
private List<MdmViewFiledVo> queryList;
|
||||
//列表
|
||||
private List<MdmViewFiledVo> listList;
|
||||
//按钮
|
||||
private List<MdmViewButtonVo> buttonList;
|
||||
|
||||
public List<MdmViewFiledVo> getQueryList() {
|
||||
return queryList;
|
||||
}
|
||||
|
||||
public void setQueryList(List<MdmViewFiledVo> queryList) {
|
||||
this.queryList = queryList;
|
||||
}
|
||||
|
||||
public List<MdmViewFiledVo> getListList() {
|
||||
return listList;
|
||||
}
|
||||
|
||||
public void setListList(List<MdmViewFiledVo> listList) {
|
||||
this.listList = listList;
|
||||
}
|
||||
|
||||
public List<MdmViewButtonVo> getButtonList() {
|
||||
return buttonList;
|
||||
}
|
||||
|
||||
public void setButtonList(List<MdmViewButtonVo> buttonList) {
|
||||
this.buttonList = buttonList;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public MdmModuleEntity getMdmModuleEntity() {
|
||||
return mdmModuleEntity;
|
||||
}
|
||||
|
||||
public void setMdmModuleEntity(MdmModuleEntity mdmModuleEntity) {
|
||||
this.mdmModuleEntity = mdmModuleEntity;
|
||||
}
|
||||
|
||||
public MdmModuleViewEntity getMdmModuleViewEntity() {
|
||||
return mdmModuleViewEntity;
|
||||
}
|
||||
|
||||
public void setMdmModuleViewEntity(MdmModuleViewEntity mdmModuleViewEntity) {
|
||||
this.mdmModuleViewEntity = mdmModuleViewEntity;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,122 +0,0 @@
|
|||
package com.hzya.frame.mdm.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class MdmVo {
|
||||
|
||||
//id
|
||||
private String id;
|
||||
//主数据名称
|
||||
private String mdmName;
|
||||
//主数据编码
|
||||
private String mdmCode;
|
||||
//主数据类型 1、档案 2、单据
|
||||
private String mdmType;
|
||||
//主数据类型 1、档案 2、单据
|
||||
private String mdmTypeName;
|
||||
//描述
|
||||
private String remark;
|
||||
|
||||
/** logo(地址或者id) */
|
||||
private String mdmLogo;
|
||||
private String createUserId;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
private String modifyUserId;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date modifyTime;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getMdmName() {
|
||||
return mdmName;
|
||||
}
|
||||
|
||||
public void setMdmName(String mdmName) {
|
||||
this.mdmName = mdmName;
|
||||
}
|
||||
|
||||
public String getMdmCode() {
|
||||
return mdmCode;
|
||||
}
|
||||
|
||||
public void setMdmCode(String mdmCode) {
|
||||
this.mdmCode = mdmCode;
|
||||
}
|
||||
|
||||
public String getMdmType() {
|
||||
return mdmType;
|
||||
}
|
||||
|
||||
public void setMdmType(String mdmType) {
|
||||
this.mdmType = mdmType;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getMdmTypeName() {
|
||||
return mdmTypeName;
|
||||
}
|
||||
|
||||
public void setMdmTypeName(String mdmTypeName) {
|
||||
this.mdmTypeName = mdmTypeName;
|
||||
}
|
||||
|
||||
public String getCreateUserId() {
|
||||
return createUserId;
|
||||
}
|
||||
|
||||
public void setCreateUserId(String createUserId) {
|
||||
this.createUserId = createUserId;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getModifyUserId() {
|
||||
return modifyUserId;
|
||||
}
|
||||
|
||||
public void setModifyUserId(String modifyUserId) {
|
||||
this.modifyUserId = modifyUserId;
|
||||
}
|
||||
|
||||
public Date getModifyTime() {
|
||||
return modifyTime;
|
||||
}
|
||||
|
||||
public void setModifyTime(Date modifyTime) {
|
||||
this.modifyTime = modifyTime;
|
||||
}
|
||||
|
||||
public String getMdmLogo() {
|
||||
return mdmLogo;
|
||||
}
|
||||
|
||||
public void setMdmLogo(String mdmLogo) {
|
||||
this.mdmLogo = mdmLogo;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,15 +1,8 @@
|
|||
package com.hzya.frame.mdm.mdmModule.dao;
|
||||
|
||||
import com.hzya.frame.mdm.entity.MdmDataDto;
|
||||
import com.hzya.frame.mdm.entity.MdmDto;
|
||||
import com.hzya.frame.mdm.entity.MdmQuery;
|
||||
import com.hzya.frame.mdm.entity.MdmVo;
|
||||
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.sys.entity.FormmainDeleteDto;
|
||||
import com.hzya.frame.sys.entity.ModuleDto;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -17,37 +10,17 @@ import java.util.Map;
|
|||
* 主数据模版(mdm_module: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-10-17 15:25:41
|
||||
* @since 2024-06-03 08:46:29
|
||||
*/
|
||||
public interface IMdmModuleDao extends IBaseDao<MdmModuleEntity, String> {
|
||||
|
||||
List<MdmVo> queryMdm(MdmDto entity);
|
||||
List<MdmModuleEntity> queryMdm(MdmModuleEntity entity);
|
||||
|
||||
MdmModuleEntity getByMdmCode(Long mdmCode);
|
||||
|
||||
Integer checkTable(Map<String, String> maps);
|
||||
|
||||
Integer createTable(Map<String, Object> maps);
|
||||
Integer createTableDistribute(Map<String, Object> maps);
|
||||
Integer alterTable(Map<String, Object> maps);
|
||||
Integer alterTableName(Map<String, String> maps);
|
||||
|
||||
List<HashMap<String, Object>> queryMdmShowData(MdmQuery entity);
|
||||
|
||||
Integer checkData(Map<String, String> map);
|
||||
|
||||
Integer updateForm(MdmDataDto mdmDataDto);
|
||||
Integer saveForm(MdmDataDto mdmDataDto);
|
||||
|
||||
Integer deleteTemplateById(FormmainDeleteDto formmainDeleteDto);
|
||||
|
||||
List<HashMap<String, Object>> queryDataAll(MdmDto entity);
|
||||
|
||||
List<HashMap<String, Object>> queryTemplateData(ModuleDto entity);
|
||||
|
||||
HashMap<String, Object> queryTemplateDataOne(MdmDto entity);
|
||||
|
||||
List<HashMap<String, Object>> queryTemplateDataMore(MdmDto entity);
|
||||
List<HashMap<String, Object>> querySelectData(MdmDto entity);
|
||||
|
||||
Integer deleteChilder(FormmainDeleteDto formmainDeleteDto);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,17 +1,10 @@
|
|||
package com.hzya.frame.mdm.mdmModule.dao.impl;
|
||||
|
||||
import com.hzya.frame.mdm.entity.MdmDataDto;
|
||||
import com.hzya.frame.mdm.entity.MdmDto;
|
||||
import com.hzya.frame.mdm.entity.MdmQuery;
|
||||
import com.hzya.frame.mdm.entity.MdmVo;
|
||||
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
|
||||
import com.hzya.frame.mdm.mdmModule.dao.IMdmModuleDao;
|
||||
import com.hzya.frame.sys.entity.FormmainDeleteDto;
|
||||
import com.hzya.frame.sys.entity.ModuleDto;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -19,17 +12,23 @@ import java.util.Map;
|
|||
* 主数据模版(MdmModule)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-10-17 15:25:42
|
||||
* @since 2024-06-03 08:46:29
|
||||
*/
|
||||
@Repository(value = "MdmModuleDaoImpl")
|
||||
public class MdmModuleDaoImpl extends MybatisGenericDao<MdmModuleEntity, String> implements IMdmModuleDao {
|
||||
public class MdmModuleDaoImpl extends MybatisGenericDao<MdmModuleEntity, String> implements IMdmModuleDao{
|
||||
|
||||
@Override
|
||||
public List<MdmVo> queryMdm(MdmDto entity) {
|
||||
List<MdmVo> o = (List<MdmVo>) super.selectList(getSqlIdPrifx() + "queryMdm", entity);
|
||||
public List<MdmModuleEntity> queryMdm(MdmModuleEntity entity) {
|
||||
List<MdmModuleEntity> o = (List<MdmModuleEntity>) super.selectList(getSqlIdPrifx() + "queryMdm", entity);
|
||||
return o;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MdmModuleEntity getByMdmCode(Long mdmCode) {
|
||||
MdmModuleEntity mdmModuleEntity = (MdmModuleEntity) super.query(getSqlIdPrifx() + "getByMdmCode",mdmCode);
|
||||
return mdmModuleEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer checkTable(Map<String, String> maps) {
|
||||
Integer o = (Integer) super.selectOne(getSqlIdPrifx() + "checkTable", maps);
|
||||
|
@ -37,17 +36,13 @@ public class MdmModuleDaoImpl extends MybatisGenericDao<MdmModuleEntity, String>
|
|||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Integer createTable(Map<String, Object> maps) {
|
||||
Integer o = (Integer) super.selectOne(getSqlIdPrifx() + "createTable", maps);
|
||||
return o;
|
||||
}
|
||||
@Override
|
||||
public Integer createTableDistribute(Map<String, Object> maps) {
|
||||
Integer o = (Integer) super.selectOne(getSqlIdPrifx() + "createTableDistribute", maps);
|
||||
return o;
|
||||
}
|
||||
@Override
|
||||
public Integer alterTable(Map<String, Object> maps) {
|
||||
Integer o = (Integer) super.selectOne(getSqlIdPrifx() + "alterTable", maps);
|
||||
return o;
|
||||
|
@ -59,75 +54,5 @@ public class MdmModuleDaoImpl extends MybatisGenericDao<MdmModuleEntity, String>
|
|||
return o;
|
||||
|
||||
}
|
||||
@Override
|
||||
public Integer checkData(Map<String, String> maps) {
|
||||
Integer o = (Integer) super.selectOne(getSqlIdPrifx() + "checkData", maps);
|
||||
return o;
|
||||
|
||||
}
|
||||
@Override
|
||||
public List<HashMap<String, Object>> querySelectData(MdmDto entity) {
|
||||
List<HashMap<String, Object>> o = (List<HashMap<String, Object>>) super.selectList(getSqlIdPrifx() + "querySelectData", entity);
|
||||
return o;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<String, Object>> queryTemplateDataMore(MdmDto entity) {
|
||||
List<HashMap<String, Object>> o = (List<HashMap<String, Object>>) super.selectList(getSqlIdPrifx() + "queryTemplateDataMore", entity);
|
||||
return o;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<String, Object>> queryMdmShowData(MdmQuery entity) {
|
||||
List<HashMap<String, Object>> o = (List<HashMap<String, Object>>) super.selectList(getSqlIdPrifx() + "queryMdmShowData", entity);
|
||||
return o;
|
||||
}
|
||||
@Override
|
||||
public List<HashMap<String, Object>> queryDataAll(MdmDto entity) {
|
||||
List<HashMap<String, Object>> o = (List<HashMap<String, Object>>) super.selectList(getSqlIdPrifx() + "queryDataAll", entity);
|
||||
return o;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<String, Object>> queryTemplateData(ModuleDto entity) {
|
||||
List<HashMap<String, Object>> o = (List<HashMap<String, Object>>) super.selectList(getSqlIdPrifx() + "queryTemplateData", entity);
|
||||
return o;
|
||||
|
||||
}
|
||||
@Override
|
||||
public Integer updateForm(MdmDataDto mdmDataDto) {
|
||||
Integer o = super.update(getSqlIdPrifx() + "updateForm", mdmDataDto);
|
||||
return o;
|
||||
|
||||
}
|
||||
@Override
|
||||
public Integer saveForm(MdmDataDto mdmDataDto) {
|
||||
Integer o = super.update(getSqlIdPrifx() + "saveForm", mdmDataDto);
|
||||
return o;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer deleteTemplateById(FormmainDeleteDto entity) {
|
||||
Integer o = super.delete(getSqlIdPrifx() + "deleteTemplateById", entity);
|
||||
return o;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer deleteChilder(FormmainDeleteDto entity) {
|
||||
Integer o = super.delete(getSqlIdPrifx() + "deleteChilder", entity);
|
||||
return o;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<String, Object> queryTemplateDataOne(MdmDto entity) {
|
||||
HashMap<String, Object> o = (HashMap<String, Object>) super.selectOne(getSqlIdPrifx() + "queryTemplateDataOne", entity);
|
||||
return o;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,36 +1,31 @@
|
|||
package com.hzya.frame.mdm.mdmModule.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* 主数据模版(MdmModule)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-10-17 15:25:42
|
||||
* @since 2024-06-03 08:46:29
|
||||
*/
|
||||
public class MdmModuleEntity extends BaseEntity {
|
||||
|
||||
|
||||
/** logo(地址或者id) */
|
||||
private String mdmLogo;
|
||||
/**
|
||||
* 主数据名称
|
||||
*/
|
||||
private String mdmName;
|
||||
/**
|
||||
* 主数据编码
|
||||
*/
|
||||
private Integer mdmCode;
|
||||
/**
|
||||
* 主数据类型 1、档案 2、单据
|
||||
*/
|
||||
private String mdmType;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/** 主数据名称 */
|
||||
private String mdmName;
|
||||
/** logo */
|
||||
private String mdmLogo;
|
||||
/** 主数据编码 */
|
||||
private Long mdmCode;
|
||||
/** 主数据类型 1、档案 2、单据 */
|
||||
private String mdmType;
|
||||
/** 描述 */
|
||||
private String remark;
|
||||
/** 公司id */
|
||||
private String companyId;
|
||||
//创建人
|
||||
private String createUser;
|
||||
//修改人
|
||||
private String modifyUser;
|
||||
|
||||
|
||||
public String getMdmName() {
|
||||
|
@ -41,11 +36,19 @@ public class MdmModuleEntity extends BaseEntity {
|
|||
this.mdmName = mdmName;
|
||||
}
|
||||
|
||||
public Integer getMdmCode() {
|
||||
public String getMdmLogo() {
|
||||
return mdmLogo;
|
||||
}
|
||||
|
||||
public void setMdmLogo(String mdmLogo) {
|
||||
this.mdmLogo = mdmLogo;
|
||||
}
|
||||
|
||||
public Long getMdmCode() {
|
||||
return mdmCode;
|
||||
}
|
||||
|
||||
public void setMdmCode(Integer mdmCode) {
|
||||
public void setMdmCode(Long mdmCode) {
|
||||
this.mdmCode = mdmCode;
|
||||
}
|
||||
|
||||
|
@ -65,12 +68,28 @@ public class MdmModuleEntity extends BaseEntity {
|
|||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getMdmLogo() {
|
||||
return mdmLogo;
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setMdmLogo(String mdmLogo) {
|
||||
this.mdmLogo = mdmLogo;
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public String getModifyUser() {
|
||||
return modifyUser;
|
||||
}
|
||||
|
||||
public void setModifyUser(String modifyUser) {
|
||||
this.modifyUser = modifyUser;
|
||||
}
|
||||
|
||||
public String getCreateUser() {
|
||||
return createUser;
|
||||
}
|
||||
|
||||
public void setCreateUser(String createUser) {
|
||||
this.createUser = createUser;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,27 +2,30 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.mdm.mdmModule.dao.impl.MdmModuleDaoImpl">
|
||||
|
||||
<resultMap id="get-MdmModuleEntity-result" type="com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="mdmName" column="mdm_name" jdbcType="VARCHAR"/>
|
||||
<result property="mdmLogo" column="mdm_logo" jdbcType="VARCHAR"/>
|
||||
<result property="mdmCode" column="mdm_code" jdbcType="INTEGER"/>
|
||||
<result property="mdmType" column="mdm_type" jdbcType="VARCHAR"/>
|
||||
<result property="remark" column="remark" 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"/>
|
||||
</resultMap>
|
||||
<resultMap id="get-MdmModuleEntity-result" type="com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity" >
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="mdmName" column="mdm_name" jdbcType="VARCHAR"/>
|
||||
<result property="mdmLogo" column="mdm_logo" jdbcType="VARCHAR"/>
|
||||
<result property="mdmCode" column="mdm_code" jdbcType="INTEGER"/>
|
||||
<result property="mdmType" column="mdm_type" jdbcType="VARCHAR"/>
|
||||
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||
<result property="createUser" column="createUser" jdbcType="VARCHAR"/>
|
||||
<result property="modifyUser" column="modifyUser" 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="MdmModuleEntity_Base_Column_List">
|
||||
<sql id = "MdmModuleEntity_Base_Column_List">
|
||||
id
|
||||
,mdm_name
|
||||
,mdm_logo
|
||||
,mdm_code
|
||||
,mdm_logo
|
||||
,mdm_code
|
||||
,mdm_type
|
||||
,remark
|
||||
,sorts
|
||||
|
@ -32,257 +35,249 @@
|
|||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
</sql>
|
||||
<!--通过ID获取数据 -->
|
||||
<select id="entity_get" resultMap="get-MdmModuleEntity-result">
|
||||
select
|
||||
<include refid="MdmModuleEntity_Base_Column_List" />
|
||||
from mdm_module where sts = 'Y' and id = #{id}
|
||||
from mdm_module where id = #{ id } and sts='Y'
|
||||
</select>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-MdmModuleEntity-result"
|
||||
parameterType="com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
|
||||
select
|
||||
<include refid="MdmModuleEntity_Base_Column_List"/>
|
||||
from mdm_module
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="mdmName != null and mdmName != ''">and mdm_name = #{mdmName}</if>
|
||||
<if test="mdmLogo != null and mdmLogo != ''">and mdm_logo = #{mdmLogo}</if>
|
||||
<if test="mdmCode != null ">and mdm_code = #{mdmCode}</if>
|
||||
<if test="mdmType != null and mdmType != ''">and mdm_type = #{mdmType}</if>
|
||||
<if test="remark != null and remark != ''">and remark = #{remark}</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>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-MdmModuleEntity-result" parameterType = "com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
|
||||
select
|
||||
<include refid="MdmModuleEntity_Base_Column_List" />
|
||||
from mdm_module
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="mdmName != null and mdmName != ''"> and mdm_name = #{mdmName} </if>
|
||||
<if test="mdmLogo != null and mdmLogo != ''"> and mdm_logo = #{mdmLogo} </if>
|
||||
<if test="mdmCode != null"> and mdm_code = #{mdmCode} </if>
|
||||
<if test="mdmType != null and mdmType != ''"> and mdm_type = #{mdmType} </if>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark} </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.mdmModule.entity.MdmModuleEntity">
|
||||
select count(1) from mdm_module
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="mdmName != null and mdmName != ''">and mdm_name = #{mdmName}</if>
|
||||
<if test="mdmLogo != null and mdmLogo != ''">and mdm_logo = #{mdmLogo}</if>
|
||||
<if test="mdmCode != null ">and mdm_code = #{mdmCode}</if>
|
||||
<if test="mdmType != null and mdmType != ''">and mdm_type = #{mdmType}</if>
|
||||
<if test="remark != null and remark != ''">and remark = #{remark}</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>
|
||||
</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.mdmModule.entity.MdmModuleEntity">
|
||||
select count(1) from mdm_module
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="mdmName != null and mdmName != ''"> and mdm_name = #{mdmName} </if>
|
||||
<if test="mdmLogo != null and mdmLogo != ''"> and mdm_logo = #{mdmLogo} </if>
|
||||
<if test="mdmCode != null"> and mdm_code = #{mdmCode} </if>
|
||||
<if test="mdmType != null and mdmType != ''"> and mdm_type = #{mdmType} </if>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark} </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-MdmModuleEntity-result"
|
||||
parameterType="com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
|
||||
select
|
||||
<include refid="MdmModuleEntity_Base_Column_List"/>
|
||||
from mdm_module
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
|
||||
<if test="mdmName != null and mdmName != ''">and mdm_name like concat('%',#{mdmName},'%')</if>
|
||||
<if test="mdmLogo != null and mdmLogo != ''">and mdm_logo like concat('%',#{mdmLogo},'%')</if>
|
||||
<if test="mdmCode != null ">and mdm_code like concat('%',#{mdmCode},'%')</if>
|
||||
<if test="mdmType != null and mdmType != ''">and mdm_type like concat('%',#{mdmType},'%')</if>
|
||||
<if test="remark != null and remark != ''">and remark like concat('%',#{remark},'%')</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>
|
||||
<select id="entity_list_like" resultMap="get-MdmModuleEntity-result" parameterType = "com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
|
||||
select
|
||||
<include refid="MdmModuleEntity_Base_Column_List" />
|
||||
from mdm_module
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
|
||||
<if test="mdmName != null and mdmName != ''"> and mdm_name like concat('%',#{mdmName},'%') </if>
|
||||
<if test="mdmLogo != null and mdmLogo != ''"> and mdm_logo like concat('%',#{mdmLogo},'%') </if>
|
||||
<if test="mdmCode != null"> and mdm_code like concat('%',#{mdmCode},'%') </if>
|
||||
<if test="mdmType != null and mdmType != ''"> and mdm_type like concat('%',#{mdmType},'%') </if>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%',#{remark},'%') </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="MdmModuleentity_list_or" resultMap="get-MdmModuleEntity-result"
|
||||
parameterType="com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
|
||||
select
|
||||
<include refid="MdmModuleEntity_Base_Column_List"/>
|
||||
from mdm_module
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">or id = #{id}</if>
|
||||
<if test="mdmName != null and mdmName != ''">or mdm_name = #{mdmName}</if>
|
||||
<if test="mdmLogo != null and mdmLogo != ''">or mdm_logo = #{mdmLogo}</if>
|
||||
<if test="mdmCode != null ">or mdm_code = #{mdmCode}</if>
|
||||
<if test="mdmType != null and mdmType != ''">or mdm_type = #{mdmType}</if>
|
||||
<if test="remark != null and remark != ''">or remark = #{remark}</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>
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="MdmModuleentity_list_or" resultMap="get-MdmModuleEntity-result" parameterType = "com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
|
||||
select
|
||||
<include refid="MdmModuleEntity_Base_Column_List" />
|
||||
from mdm_module
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> or id = #{id} </if>
|
||||
<if test="mdmName != null and mdmName != ''"> or mdm_name = #{mdmName} </if>
|
||||
<if test="mdmLogo != null and mdmLogo != ''"> or mdm_logo = #{mdmLogo} </if>
|
||||
<if test="mdmCode != null"> or mdm_code = #{mdmCode} </if>
|
||||
<if test="mdmType != null and mdmType != ''"> or mdm_type = #{mdmType} </if>
|
||||
<if test="remark != null and remark != ''"> or remark = #{remark} </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.mdmModule.entity.MdmModuleEntity" keyProperty="id"
|
||||
useGeneratedKeys="true">
|
||||
insert into mdm_module(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id ,</if>
|
||||
<if test="mdmName != null and mdmName != ''">mdm_name ,</if>
|
||||
<if test="mdmLogo != null and mdmLogo != ''">mdm_logo ,</if>
|
||||
<if test="mdmCode != null ">mdm_code ,</if>
|
||||
<if test="mdmCode == null ">mdm_code ,</if>
|
||||
<if test="mdmType != null and mdmType != ''">mdm_type ,</if>
|
||||
<if test="remark != null and remark != ''">remark ,</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="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="mdmName != null and mdmName != ''">#{mdmName} ,</if>
|
||||
<if test="mdmLogo != null and mdmLogo != ''">#{mdmLogo} ,</if>
|
||||
<if test="mdmCode != null ">#{mdmCode} ,</if>
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType = "com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity" >
|
||||
insert into mdm_module(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> id , </if>
|
||||
<if test="mdmName != null and mdmName != ''"> mdm_name , </if>
|
||||
<if test="mdmLogo != null and mdmLogo != ''"> mdm_logo , </if>
|
||||
<if test="mdmCode != null"> mdm_code , </if>
|
||||
<if test="mdmCode == null"> mdm_code , </if>
|
||||
<if test="mdmType != null and mdmType != ''"> mdm_type , </if>
|
||||
<if test="remark != null and remark != ''"> remark , </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="mdmName != null and mdmName != ''"> #{mdmName} ,</if>
|
||||
<if test="mdmLogo != null and mdmLogo != ''"> #{mdmLogo} ,</if>
|
||||
<if test="mdmCode != null"> #{mdmCode} ,</if>
|
||||
<if test="mdmCode == null ">(SELECT IFNULL(MAX(b.mdm_code)+1,10001) AS mdmCode FROM mdm_module b ),</if>
|
||||
<if test="mdmType != null and mdmType != ''">#{mdmType} ,</if>
|
||||
<if test="remark != null and remark != ''">#{remark} ,</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="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from mdm_module a WHERE a.sts = 'Y' ),</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_module(mdm_name,mdm_logo, mdm_code, mdm_type, remark, sorts, create_user_id, create_time, modify_user_id,
|
||||
modify_time, sts, org_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.mdmName},#{entity.mdmLogo},#{entity.mdmCode},#{entity.mdmType},#{entity.remark},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},
|
||||
'Y')
|
||||
</foreach>
|
||||
</insert>
|
||||
<!-- 批量新增或者修改-->
|
||||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_module(mdm_name, mdm_logo, mdm_code, mdm_type, remark, sorts, create_user_id, create_time, modify_user_id,
|
||||
modify_time, sts, org_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.mdmName},#{entity.mdmLogo},#{entity.mdmCode},#{entity.mdmType},#{entity.remark},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
mdm_name = values(mdm_name),
|
||||
mdm_logo = values(mdm_logo),
|
||||
mdm_code = values(mdm_code),
|
||||
mdm_type = values(mdm_type),
|
||||
remark = values(remark),
|
||||
sorts = values(sorts),
|
||||
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)
|
||||
</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType="com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
|
||||
update mdm_module set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="mdmName != null and mdmName != ''">mdm_name = #{mdmName},</if>
|
||||
<if test="mdmLogo != null and mdmLogo != ''">mdm_logo = #{mdmLogo},</if>
|
||||
<if test="mdmCode != null ">mdm_code = #{mdmCode},</if>
|
||||
<if test="mdmType != null and mdmType != ''">mdm_type = #{mdmType},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="sorts != null">sorts = #{sorts},</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>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType="com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
|
||||
<if test="mdmType != null and mdmType != ''"> #{mdmType} ,</if>
|
||||
<if test="remark != null and remark != ''"> #{remark} ,</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(mdm_name, mdm_logo, mdm_code, mdm_type, remark, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.mdmName},#{entity.mdmLogo},#{entity.mdmCode},#{entity.mdmType},#{entity.remark},#{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(mdm_name, mdm_logo, mdm_code, mdm_type, remark, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.mdmName},#{entity.mdmLogo},#{entity.mdmCode},#{entity.mdmType},#{entity.remark},#{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_name = values(mdm_name),
|
||||
mdm_logo = values(mdm_logo),
|
||||
mdm_code = values(mdm_code),
|
||||
mdm_type = values(mdm_type),
|
||||
remark = values(remark),
|
||||
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.mdmModule.entity.MdmModuleEntity" >
|
||||
update mdm_module set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="mdmName != null and mdmName != ''"> mdm_name = #{mdmName},</if>
|
||||
<if test="mdmLogo != null and mdmLogo != ''"> mdm_logo = #{mdmLogo},</if>
|
||||
<if test="mdmCode != null"> mdm_code = #{mdmCode},</if>
|
||||
<if test="mdmType != null and mdmType != ''"> mdm_type = #{mdmType},</if>
|
||||
<if test="remark != null and remark != ''"> remark = #{remark},</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.mdmModule.entity.MdmModuleEntity" >
|
||||
update mdm_module 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.mdmModule.entity.MdmModuleEntity">
|
||||
update mdm_module 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="mdmName != null and mdmName != ''">and mdm_name = #{mdmName}</if>
|
||||
<if test="mdmLogo != null and mdmLogo != ''">and mdm_logo = #{mdmLogo}</if>
|
||||
<if test="mdmCode != null ">and mdm_code = #{mdmCode}</if>
|
||||
<if test="mdmType != null and mdmType != ''">and mdm_type = #{mdmType}</if>
|
||||
<if test="remark != null and remark != ''">and remark = #{remark}</if>
|
||||
<if test="sorts != null">and sorts = #{sorts}</if>
|
||||
<if test="sts != null and sts != ''">and sts = #{sts}</if>
|
||||
<!-- 多条件逻辑删除 -->
|
||||
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity" >
|
||||
update mdm_module 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="mdmName != null and mdmName != ''"> and mdm_name = #{mdmName} </if>
|
||||
<if test="mdmLogo != null and mdmLogo != ''"> and mdm_logo = #{mdmLogo} </if>
|
||||
<if test="mdmCode != null"> and mdm_code = #{mdmCode} </if>
|
||||
<if test="mdmType != null and mdmType != ''"> and mdm_type = #{mdmType} </if>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark} </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 where id = #{id}
|
||||
</delete>
|
||||
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="queryMdm" resultType="com.hzya.frame.mdm.entity.MdmVo" parameterType="com.hzya.frame.mdm.entity.MdmDto">
|
||||
<select id="queryMdm" resultMap="get-MdmModuleEntity-result" parameterType = "com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
|
||||
select
|
||||
a.id as id,
|
||||
a.mdm_name as mdmName,
|
||||
a.mdm_logo as mdmLogo,
|
||||
a.mdm_code as mdmCode,
|
||||
a.mdm_type as mdmType,
|
||||
sd.column_content as mdmTypeName,
|
||||
a.remark as remark,
|
||||
a.create_time as createTime,
|
||||
a.modify_time as modifyTime,
|
||||
c.view_name as createUserId,
|
||||
m.view_name as modifyUserId
|
||||
a.id as id,
|
||||
a.mdm_name as mdm_name,
|
||||
a.mdm_logo as mdm_logo,
|
||||
a.mdm_code as mdm_code,
|
||||
a.mdm_type as mdm_type,
|
||||
a.remark as remark,
|
||||
a.create_time as create_time,
|
||||
a.modify_time as modify_time,
|
||||
d.person_name as createUser,
|
||||
n.person_name as modifyUser
|
||||
from
|
||||
mdm_module a
|
||||
LEFT JOIN sys_dictionaryshop_new sd on sd.column_value = a.mdm_type and sd.tab_name = 'mdm' and sd.column_name = 'mdm_type' and sd.used_sts = '1'
|
||||
mdm_module a
|
||||
LEFT JOIN sys_user c on c.id = a.create_user_id and c.sts = 'Y'
|
||||
LEFT JOIN sys_person d on d.id = c.person_id and d.sts = 'Y'
|
||||
LEFT JOIN sys_user m on m.id = a.modify_user_id and m.sts = 'Y'
|
||||
LEFT JOIN sys_person n on n.id = m.person_id and n.sts = 'Y'
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and a.id like concat('%',#{id},'%')</if>
|
||||
<if test="mdmName != null and mdmName != ''">and a.mdm_name like concat('%',#{mdmName},'%')</if>
|
||||
|
@ -294,6 +289,12 @@ where id = #{id}
|
|||
order by a.sorts asc
|
||||
</select>
|
||||
|
||||
<!--通过ID获取数据 -->
|
||||
<select id="getByMdmCode" resultMap="get-MdmModuleEntity-result">
|
||||
select
|
||||
<include refid="MdmModuleEntity_Base_Column_List" />
|
||||
from mdm_module where mdm_code = #{ mdmCode } and sts='Y'
|
||||
</select>
|
||||
<!--通过ID获取数据 -->
|
||||
<select id="checkTable" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
|
@ -305,58 +306,42 @@ where id = #{id}
|
|||
and TABLE_NAME = #{tableName}
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="createTable" resultType="java.lang.Integer">
|
||||
CREATE TABLE ${tableName} (
|
||||
`id` varchar(50) NOT NULL COMMENT '唯一标识码',
|
||||
<if test="dbType == '1'.toString()">
|
||||
`document_rule` varchar(50) DEFAULT NULL COMMENT '单据规则',
|
||||
`document_rule_num` bigint(50) DEFAULT NULL COMMENT '单据规则流水号',
|
||||
</if>
|
||||
<foreach collection="databaseFields" item="item" index="index">
|
||||
<choose>
|
||||
<when test="item.filedType == '1'.toString()">
|
||||
${item.enName} bigint(${item.filedLength}) DEFAULT NULL COMMENT #{item.chName},
|
||||
<when test="item.enName == 'id'.toString()">
|
||||
`id` varchar(50) NOT NULL COMMENT '唯一标识码',
|
||||
</when>
|
||||
<when test="item.filedType == '2'.toString()">
|
||||
${item.enName} decimal(${item.filedLength}) DEFAULT NULL COMMENT #{item.chName},
|
||||
</when>
|
||||
<when test="item.filedType == '3'.toString()">
|
||||
${item.enName} varchar(${item.filedLength}) DEFAULT NULL COMMENT #{item.chName},
|
||||
</when>
|
||||
<when test="item.filedType == '4'.toString()">
|
||||
${item.enName} datetime DEFAULT NULL COMMENT #{item.chName},
|
||||
<when test="item.enName == 'sorts'.toString()">
|
||||
`sorts` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '排序',
|
||||
</when>
|
||||
<otherwise >
|
||||
<choose>
|
||||
<when test="item.filedType == '1'.toString()">
|
||||
${item.enName} bigint(${item.filedLength}) DEFAULT NULL COMMENT #{item.chName},
|
||||
</when>
|
||||
<when test="item.filedType == '2'.toString()">
|
||||
${item.enName} decimal(${item.filedLength}) DEFAULT NULL COMMENT #{item.chName},
|
||||
</when>
|
||||
<when test="item.filedType == '3'.toString()">
|
||||
${item.enName} varchar(${item.filedLength}) DEFAULT NULL COMMENT #{item.chName},
|
||||
</when>
|
||||
<when test="item.filedType == '4'.toString()">
|
||||
${item.enName} datetime DEFAULT NULL COMMENT #{item.chName},
|
||||
</when>
|
||||
</choose>
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
`sorts` bigint(20) DEFAULT NULL COMMENT '排序',
|
||||
`create_user_id` varchar(50) DEFAULT NULL COMMENT '创建人id',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`modify_user_id` varchar(50) DEFAULT NULL COMMENT '修改人id',
|
||||
`modify_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||||
`sts` char(1) DEFAULT NULL COMMENT '状态(Y正常N删除)',
|
||||
`org_id` varchar(50) DEFAULT NULL COMMENT '组织机构ID',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = INNODB DEFAULT CHARSET = utf8 COMMENT = #{tableRemark}
|
||||
PRIMARY KEY (`sorts`,`id`) USING BTREE
|
||||
) ENGINE = INNODB DEFAULT CHARSET = utf8mb4 COMMENT = #{tableRemark}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="createTableDistribute" resultType="java.lang.Integer">
|
||||
CREATE TABLE ${tableName} (
|
||||
`id` varchar(50) NOT NULL COMMENT '唯一标识码',
|
||||
`formmain_id` varchar(50) DEFAULT NULL COMMENT '数据id',
|
||||
`app_id` varchar(50) DEFAULT NULL COMMENT '应用id',
|
||||
`status` varchar(50) DEFAULT NULL COMMENT '状态',
|
||||
`msg` varchar(50) DEFAULT NULL COMMENT '描述',
|
||||
`sorts` bigint(20) DEFAULT NULL COMMENT '排序',
|
||||
`create_user_id` varchar(50) DEFAULT NULL COMMENT '创建人id',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`modify_user_id` varchar(50) DEFAULT NULL COMMENT '修改人id',
|
||||
`modify_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||||
`sts` char(1) DEFAULT NULL COMMENT '状态(Y正常N删除)',
|
||||
`org_id` varchar(50) DEFAULT NULL COMMENT '组织机构ID',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = INNODB DEFAULT CHARSET = utf8 COMMENT = #{tableRemark}
|
||||
</select>
|
||||
|
||||
|
||||
<!--通过ID获取数据 -->
|
||||
<select id="alterTable" resultType="java.lang.Integer">
|
||||
|
@ -419,281 +404,5 @@ where id = #{id}
|
|||
<select id="alterTableName" resultType="java.lang.Integer">
|
||||
ALTER TABLE ${tableName} COMMENT = #{tableRemark}
|
||||
</select>
|
||||
<!-- 查询符合条件的数量 -->
|
||||
<select id="checkData" resultType="Integer" >
|
||||
SELECT
|
||||
count(*)
|
||||
from
|
||||
${tableName}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="filedName != null and filedName !='' and filedValue != null and filedValue !='' ">
|
||||
and ${filedName} = #{filedValue}
|
||||
</if>
|
||||
|
||||
<if test="id != null and id !='' ">and id != #{id}</if>
|
||||
and sts = 'Y'
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="queryMdmShowData" resultType="java.util.HashMap"
|
||||
parameterType="com.hzya.frame.mdm.entity.MdmQuery">
|
||||
select
|
||||
<if test="returnField != null and returnField.size>0">
|
||||
(SELECT count(*) from ${tableName}_distribute WHERE sts = 'Y' and status = '1' and formmain_id = a.id) as qwqwasdasdzxasda,
|
||||
<trim suffixOverrides=",">
|
||||
<foreach collection="returnField" item="returnField">
|
||||
a.${returnField} as ${returnField} ,
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
<if test="returnField == null or returnField.size == 0">
|
||||
(SELECT count(*) from ${tableName}_distribute WHERE sts = 'Y' and status = '1' and formmain_id = a.id) as qwqwasdasdzxasda,
|
||||
a.*
|
||||
</if>
|
||||
from ${tableName} a
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="queryCondition != null and queryCondition.size>0">
|
||||
<foreach collection="queryCondition" item="item" index="index">
|
||||
${item.getValueByType('a.')}
|
||||
</foreach>
|
||||
</if>
|
||||
and a.sts='Y'
|
||||
<if test="detailQueryCondition != null and detailQueryCondition.size>0">
|
||||
<foreach collection="detailQueryCondition" item="item" index="index">
|
||||
AND a.id IN (
|
||||
SELECT
|
||||
formmain_id
|
||||
FROM
|
||||
${item.tableName}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
sts = 'Y'
|
||||
<if test="item.queryCondition != null and item.queryCondition.size>0">
|
||||
<foreach collection="item.queryCondition" item="itema" index="index">
|
||||
${itema.getValueByType('')}
|
||||
</foreach>
|
||||
</if>
|
||||
</trim>
|
||||
)
|
||||
</foreach>
|
||||
</if>
|
||||
</trim>
|
||||
order by a.sorts asc
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="saveForm" parameterType="com.hzya.frame.mdm.entity.MdmDataDto">
|
||||
insert into ${tableName}(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="mdmDataFiledDtos != null and mdmDataFiledDtos.size>0">
|
||||
<foreach collection="mdmDataFiledDtos" item="item" index="index">
|
||||
<if test="item.filedsName != 'logid'.toString() ">
|
||||
${item.filedsName},
|
||||
</if>
|
||||
<if test="item.filedsName == 'logid'.toString() ">
|
||||
create_user_id,
|
||||
modify_user_id,
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
sorts,
|
||||
create_time,
|
||||
modify_time,
|
||||
sts,
|
||||
<if test="dbType == '1'.toString()">
|
||||
document_rule,
|
||||
document_rule_num,
|
||||
</if>
|
||||
</trim>
|
||||
)values
|
||||
(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="mdmDataFiledDtos != null and mdmDataFiledDtos.size>0">
|
||||
<foreach collection="mdmDataFiledDtos" item="item" index="index">
|
||||
<if test="item.filedsName != 'logid'.toString() ">
|
||||
#{item.filedsValue},
|
||||
</if>
|
||||
<if test="item.filedsName == 'logid'.toString() ">
|
||||
#{item.filedsValue},
|
||||
#{item.filedsValue},
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from ${tableName} a WHERE
|
||||
a.sts = 'Y' ),
|
||||
now(),
|
||||
now(),
|
||||
'Y',
|
||||
<if test="dbType == '1'.toString()">
|
||||
( concat(#{documentRule},
|
||||
(SELECT
|
||||
IF
|
||||
(
|
||||
LENGTH( (SELECT
|
||||
IFNULL(MAX(b.document_rule_num),0)+1
|
||||
FROM
|
||||
${tableName} b
|
||||
WHERE
|
||||
DATE_FORMAT( b.create_time, '%Y-%m' ) = DATE_FORMAT( now(), '%Y-%m' )) ) <= ${documentRuleNum},
|
||||
LPAD( (SELECT
|
||||
IFNULL(MAX(c.document_rule_num),0)+1
|
||||
FROM
|
||||
${tableName} c
|
||||
WHERE
|
||||
DATE_FORMAT( c.create_time, '%Y-%m' ) = DATE_FORMAT( now(), '%Y-%m' )), ${documentRuleNum}, '0' ),
|
||||
(SELECT
|
||||
IFNULL(MAX(d.document_rule_num),0)+1
|
||||
FROM
|
||||
${tableName} d
|
||||
WHERE
|
||||
DATE_FORMAT( d.create_time, '%Y-%m' ) = DATE_FORMAT( now(), '%Y-%m' ))
|
||||
)
|
||||
)
|
||||
)),
|
||||
(SELECT
|
||||
IF
|
||||
(
|
||||
LENGTH( (SELECT
|
||||
IFNULL(MAX(e.document_rule_num),0)+1
|
||||
FROM
|
||||
${tableName} e
|
||||
WHERE
|
||||
DATE_FORMAT( e.create_time, '%Y-%m' ) = DATE_FORMAT( now(), '%Y-%m' )) ) <= ${documentRuleNum},
|
||||
LPAD( (SELECT
|
||||
IFNULL(MAX(f.document_rule_num),0)+1
|
||||
FROM
|
||||
${tableName} f
|
||||
WHERE
|
||||
DATE_FORMAT( f.create_time, '%Y-%m' ) = DATE_FORMAT( now(), '%Y-%m' )), ${documentRuleNum}, '0' ),
|
||||
(SELECT
|
||||
IFNULL(MAX(g.document_rule_num),0)+1
|
||||
FROM
|
||||
${tableName} g
|
||||
WHERE
|
||||
DATE_FORMAT( g.create_time, '%Y-%m' ) = DATE_FORMAT( now(), '%Y-%m' ))
|
||||
)
|
||||
)
|
||||
</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<update id="updateForm" parameterType="com.hzya.frame.mdm.entity.MdmDataDto">
|
||||
update ${tableName} set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="mdmDataFiledDtos != null and mdmDataFiledDtos.size>0">
|
||||
<foreach collection="mdmDataFiledDtos" item="item" index="index">
|
||||
<if test="item.filedsName != 'logid'.toString() ">
|
||||
${item.filedsName} = #{item.filedsValue},
|
||||
</if>
|
||||
<if test="item.filedsName == 'logid'.toString() ">
|
||||
modify_user_id = #{item.filedsValue},
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
modify_time = now(),
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteTemplateById" parameterType="com.hzya.frame.sys.entity.FormmainDeleteDto">
|
||||
update ${tableName} set
|
||||
sts='N',modify_time = now(),modify_user_id = #{loginId}
|
||||
<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>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</update>
|
||||
|
||||
|
||||
<update id="deleteChilder" parameterType="com.hzya.frame.sys.entity.FormmainDeleteDto">
|
||||
update ${tableName} set
|
||||
sts='N',modify_time = now(),modify_user_id = #{loginId}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="upIdFiled != null and upIdFiled !='' and upIdFiledValue != null and upIdFiledValue !=''">
|
||||
and ${upIdFiled} like concat(#{upIdFiledValue},'%')
|
||||
</if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</update>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="queryDataAll" resultType="java.util.HashMap"
|
||||
parameterType="com.hzya.frame.mdm.entity.MdmDto">
|
||||
select
|
||||
id as qsdfg,
|
||||
${label},
|
||||
${upId}
|
||||
from ${tableName}
|
||||
where sts = 'Y'
|
||||
order by sorts asc
|
||||
</select>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="queryTemplateData" resultType="java.util.HashMap" parameterType="com.hzya.frame.sys.entity.ModuleDto">
|
||||
select
|
||||
${value},
|
||||
${label}
|
||||
from ${tableName}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id !='' ">and ${value} = #{id}</if>
|
||||
<if test="lableValue != null and lableValue !='' ">and ${label} like concat('%',#{lableValue},'%')</if>
|
||||
and sts = 'Y'
|
||||
</trim>
|
||||
order by sorts asc
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="queryTemplateDataOne" resultType="java.util.HashMap"
|
||||
parameterType="com.hzya.frame.mdm.entity.MdmDto">
|
||||
select
|
||||
${value} as id,
|
||||
${label} as label,
|
||||
${upId} as upID
|
||||
from ${tableName}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id !='' ">and id = #{id}</if>
|
||||
and sts = 'Y'
|
||||
</trim>
|
||||
order by sorts asc
|
||||
</select>
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="queryTemplateDataMore" resultType="java.util.HashMap"
|
||||
parameterType="com.hzya.frame.mdm.entity.MdmDto">
|
||||
select
|
||||
${value} as id,
|
||||
${label} as label,
|
||||
${upId} as upID
|
||||
from ${tableName}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="ids != null and ids.length >0">
|
||||
and id in (
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<foreach collection="ids" item="item" index="index">
|
||||
#{item},
|
||||
</foreach>
|
||||
</trim>
|
||||
)
|
||||
</if>
|
||||
and sts = 'Y'
|
||||
</trim>
|
||||
order by sorts asc
|
||||
</select>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="querySelectData" resultType="java.util.HashMap" parameterType="com.hzya.frame.mdm.entity.MdmDto">
|
||||
select
|
||||
${value},
|
||||
${label}
|
||||
from ${tableName}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id !='' ">and ${value} = #{id}</if>
|
||||
<if test="lableValue != null and lableValue !='' ">and ${label} like concat('%',#{lableValue},'%')</if>
|
||||
and sts = 'Y'
|
||||
and ${label} is not null
|
||||
</trim>
|
||||
order by sorts asc
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
|
|
@ -2,12 +2,11 @@ package com.hzya.frame.mdm.mdmModule.service;
|
|||
|
||||
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
|
||||
/**
|
||||
* 主数据模版(MdmModule)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-10-17 15:25:44
|
||||
* @since 2024-06-03 08:46:29
|
||||
*/
|
||||
public interface IMdmModuleService extends IBaseService<MdmModuleEntity, String> {
|
||||
public interface IMdmModuleService extends IBaseService<MdmModuleEntity, String>{
|
||||
}
|
||||
|
|
|
@ -3,27 +3,24 @@ package com.hzya.frame.mdm.mdmModule.service.impl;
|
|||
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
|
||||
import com.hzya.frame.mdm.mdmModule.dao.IMdmModuleDao;
|
||||
import com.hzya.frame.mdm.mdmModule.service.IMdmModuleService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
|
||||
/**
|
||||
* 主数据模版(MdmModule)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-10-17 15:25:44
|
||||
* @since 2024-06-03 08:46:29
|
||||
*/
|
||||
@Service(value = "mdmModuleService")
|
||||
public class MdmModuleServiceImpl extends BaseService<MdmModuleEntity, String> implements IMdmModuleService {
|
||||
|
||||
|
||||
private IMdmModuleDao mdmModuleDao;
|
||||
|
||||
|
||||
@Autowired
|
||||
public void setMdmModuleDao(IMdmModuleDao dao) {
|
||||
this.mdmModuleDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
public void setMdmModuleDao(IMdmModuleDao dao) {
|
||||
this.mdmModuleDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,29 +1,15 @@
|
|||
package com.hzya.frame.mdm.mdmModuleDb.dao;
|
||||
|
||||
import com.hzya.frame.mdm.entity.MdmDistributeVo;
|
||||
import com.hzya.frame.mdm.entity.MdmDto;
|
||||
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.sys.entity.ModuleDto;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
/**
|
||||
* 模版数据库表(mdm_module_db: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-10-17 15:26:49
|
||||
* @since 2024-06-03 08:46:48
|
||||
*/
|
||||
public interface IMdmModuleDbDao extends IBaseDao<MdmModuleDbEntity, String> {
|
||||
|
||||
HashMap<String, Object> getServiceDataById(Map<String, Object> queryData);
|
||||
|
||||
List<HashMap<String, Object>> getServiceByFormmainId(Map<String, Object> queryData);
|
||||
List<HashMap<String, Object>> getServiceByDistributeId(Map<String, Object> queryData);
|
||||
List<MdmDistributeVo> getServiceByDistributeIdNoCase(Map<String, Object> queryData);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,51 +1,17 @@
|
|||
package com.hzya.frame.mdm.mdmModuleDb.dao.impl;
|
||||
|
||||
import com.hzya.frame.mdm.entity.MdmDistributeVo;
|
||||
import com.hzya.frame.mdm.entity.MdmDto;
|
||||
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleDb.dao.IMdmModuleDbDao;
|
||||
import com.hzya.frame.sys.entity.ModuleDto;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 模版数据库表(MdmModuleDb)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-10-17 15:26:49
|
||||
* @since 2024-06-03 08:46:50
|
||||
*/
|
||||
@Repository(value = "MdmModuleDbDaoImpl")
|
||||
public class MdmModuleDbDaoImpl extends MybatisGenericDao<MdmModuleDbEntity, String> implements IMdmModuleDbDao {
|
||||
|
||||
@Override
|
||||
public HashMap<String, Object> getServiceDataById(Map<String, Object> maps) {
|
||||
HashMap<String, Object> o = (HashMap<String, Object>) super.selectOne(getSqlIdPrifx() + "getServiceDataById", maps);
|
||||
return o;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<String, Object>> getServiceByFormmainId(Map<String, Object> maps) {
|
||||
List<HashMap<String, Object>> o = (List<HashMap<String, Object>>) super.selectList(getSqlIdPrifx() + "getServiceByFormmainId", maps);
|
||||
return o;
|
||||
|
||||
}
|
||||
@Override
|
||||
public List<HashMap<String, Object>> getServiceByDistributeId(Map<String, Object> maps) {
|
||||
List<HashMap<String, Object>> o = (List<HashMap<String, Object>>) super.selectList(getSqlIdPrifx() + "getServiceByDistributeId", maps);
|
||||
return o;
|
||||
|
||||
}
|
||||
@Override
|
||||
public List<MdmDistributeVo> getServiceByDistributeIdNoCase(Map<String, Object> maps) {
|
||||
List<MdmDistributeVo> o = (List<MdmDistributeVo>) super.selectList(getSqlIdPrifx() + "getServiceByDistributeIdNoCase", maps);
|
||||
return o;
|
||||
|
||||
}
|
||||
|
||||
public class MdmModuleDbDaoImpl extends MybatisGenericDao<MdmModuleDbEntity, String> implements IMdmModuleDbDao{
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -4,36 +4,31 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleDbFiledsRule.entity.MdmModuleDbFiledsRuleEntity;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* 模版数据库表(MdmModuleDb)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-10-17 15:26:49
|
||||
* @since 2024-06-03 08:46:50
|
||||
*/
|
||||
public class MdmModuleDbEntity extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主数据模版ID
|
||||
*/
|
||||
private String mdmId;
|
||||
/**
|
||||
* 表名
|
||||
*/
|
||||
private String dbName;
|
||||
/**
|
||||
* 类型 1、主表 2、明细
|
||||
*/
|
||||
private String dbType;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
//主数据子表字段
|
||||
|
||||
/** 主数据模版ID */
|
||||
private String mdmId;
|
||||
/** 表名 */
|
||||
private String dbName;
|
||||
/** 类型 1、主表 2、明细 3、操作日志 4、下发日志 */
|
||||
private String dbType;
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
/** 公司id */
|
||||
private String companyId;
|
||||
/** 数据类型 1、新增 2、修改 */
|
||||
private String dataType;
|
||||
private List<MdmModuleDbFiledsEntity> sublistMdmModuleDbFileds;
|
||||
|
||||
|
||||
public String getMdmId() {
|
||||
return mdmId;
|
||||
}
|
||||
|
@ -66,6 +61,14 @@ public class MdmModuleDbEntity extends BaseEntity {
|
|||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public List<MdmModuleDbFiledsEntity> getSublistMdmModuleDbFileds() {
|
||||
return sublistMdmModuleDbFileds;
|
||||
}
|
||||
|
@ -73,5 +76,13 @@ public class MdmModuleDbEntity extends BaseEntity {
|
|||
public void setSublistMdmModuleDbFileds(List<MdmModuleDbFiledsEntity> sublistMdmModuleDbFileds) {
|
||||
this.sublistMdmModuleDbFileds = sublistMdmModuleDbFileds;
|
||||
}
|
||||
|
||||
public String getDataType() {
|
||||
return dataType;
|
||||
}
|
||||
|
||||
public void setDataType(String dataType) {
|
||||
this.dataType = dataType;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,22 +2,23 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.mdm.mdmModuleDb.dao.impl.MdmModuleDbDaoImpl">
|
||||
|
||||
<resultMap id="get-MdmModuleDbEntity-result" type="com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
|
||||
<result property="dbName" column="db_name" jdbcType="VARCHAR"/>
|
||||
<result property="dbType" column="db_type" jdbcType="VARCHAR"/>
|
||||
<result property="remark" column="remark" 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"/>
|
||||
</resultMap>
|
||||
<resultMap id="get-MdmModuleDbEntity-result" type="com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity" >
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
|
||||
<result property="dbName" column="db_name" jdbcType="VARCHAR"/>
|
||||
<result property="dbType" column="db_type" jdbcType="VARCHAR"/>
|
||||
<result property="remark" column="remark" 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="MdmModuleDbEntity_Base_Column_List">
|
||||
<sql id = "MdmModuleDbEntity_Base_Column_List">
|
||||
id
|
||||
,mdm_id
|
||||
,db_name
|
||||
|
@ -30,297 +31,213 @@
|
|||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-MdmModuleDbEntity-result"
|
||||
parameterType="com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
|
||||
select
|
||||
<include refid="MdmModuleDbEntity_Base_Column_List"/>
|
||||
from mdm_module_db
|
||||
<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="dbName != null and dbName != ''">and db_name = #{dbName}</if>
|
||||
<if test="dbType != null and dbType != ''">and db_type = #{dbType}</if>
|
||||
<if test="remark != null and remark != ''">and remark = #{remark}</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>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-MdmModuleDbEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
|
||||
select
|
||||
<include refid="MdmModuleDbEntity_Base_Column_List" />
|
||||
from mdm_module_db
|
||||
<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="dbName != null and dbName != ''"> and db_name = #{dbName} </if>
|
||||
<if test="dbType != null and dbType != ''"> and db_type = #{dbType} </if>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark} </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.mdmModuleDb.entity.MdmModuleDbEntity">
|
||||
select count(1) from mdm_module_db
|
||||
<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="dbName != null and dbName != ''">and db_name = #{dbName}</if>
|
||||
<if test="dbType != null and dbType != ''">and db_type = #{dbType}</if>
|
||||
<if test="remark != null and remark != ''">and remark = #{remark}</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>
|
||||
</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.mdmModuleDb.entity.MdmModuleDbEntity">
|
||||
select count(1) from mdm_module_db
|
||||
<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="dbName != null and dbName != ''"> and db_name = #{dbName} </if>
|
||||
<if test="dbType != null and dbType != ''"> and db_type = #{dbType} </if>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark} </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-MdmModuleDbEntity-result"
|
||||
parameterType="com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
|
||||
select
|
||||
<include refid="MdmModuleDbEntity_Base_Column_List"/>
|
||||
from mdm_module_db
|
||||
<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="dbName != null and dbName != ''">and db_name like concat('%',#{dbName},'%')</if>
|
||||
<if test="dbType != null and dbType != ''">and db_type like concat('%',#{dbType},'%')</if>
|
||||
<if test="remark != null and remark != ''">and remark like concat('%',#{remark},'%')</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>
|
||||
<select id="entity_list_like" resultMap="get-MdmModuleDbEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
|
||||
select
|
||||
<include refid="MdmModuleDbEntity_Base_Column_List" />
|
||||
from mdm_module_db
|
||||
<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="dbName != null and dbName != ''"> and db_name like concat('%',#{dbName},'%') </if>
|
||||
<if test="dbType != null and dbType != ''"> and db_type like concat('%',#{dbType},'%') </if>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%',#{remark},'%') </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="MdmModuleDbentity_list_or" resultMap="get-MdmModuleDbEntity-result"
|
||||
parameterType="com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
|
||||
select
|
||||
<include refid="MdmModuleDbEntity_Base_Column_List"/>
|
||||
from mdm_module_db
|
||||
<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="dbName != null and dbName != ''">or db_name = #{dbName}</if>
|
||||
<if test="dbType != null and dbType != ''">or db_type = #{dbType}</if>
|
||||
<if test="remark != null and remark != ''">or remark = #{remark}</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>
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="MdmModuleDbentity_list_or" resultMap="get-MdmModuleDbEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
|
||||
select
|
||||
<include refid="MdmModuleDbEntity_Base_Column_List" />
|
||||
from mdm_module_db
|
||||
<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="dbName != null and dbName != ''"> or db_name = #{dbName} </if>
|
||||
<if test="dbType != null and dbType != ''"> or db_type = #{dbType} </if>
|
||||
<if test="remark != null and remark != ''"> or remark = #{remark} </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.mdmModuleDb.entity.MdmModuleDbEntity" keyProperty="id"
|
||||
useGeneratedKeys="true">
|
||||
insert into mdm_module_db(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id ,</if>
|
||||
<if test="mdmId != null and mdmId != ''">mdm_id ,</if>
|
||||
<if test="dbName != null and dbName != ''">db_name ,</if>
|
||||
<if test="dbType != null and dbType != ''">db_type ,</if>
|
||||
<if test="remark != null and remark != ''">remark ,</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="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="dbName != null and dbName != ''">#{dbName} ,</if>
|
||||
<if test="dbType != null and dbType != ''">#{dbType} ,</if>
|
||||
<if test="remark != null and remark != ''">#{remark} ,</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="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from mdm_module_db a WHERE a.sts =
|
||||
'Y' ),
|
||||
</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_module_db(mdm_id, db_name, db_type, remark, sorts, create_user_id, create_time, modify_user_id,
|
||||
modify_time, sts, org_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.mdmId},#{entity.dbName},#{entity.dbType},#{entity.remark},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},
|
||||
'Y')
|
||||
</foreach>
|
||||
</insert>
|
||||
<!-- 批量新增或者修改-->
|
||||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_module_db(mdm_id, db_name, db_type, remark, sorts, create_user_id, create_time, modify_user_id,
|
||||
modify_time, sts, org_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.mdmId},#{entity.dbName},#{entity.dbType},#{entity.remark},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
mdm_id = values(mdm_id),
|
||||
db_name = values(db_name),
|
||||
db_type = values(db_type),
|
||||
remark = values(remark),
|
||||
sorts = values(sorts),
|
||||
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)
|
||||
</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType="com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
|
||||
update mdm_module_db set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="mdmId != null and mdmId != ''">mdm_id = #{mdmId},</if>
|
||||
<if test="dbName != null and dbName != ''">db_name = #{dbName},</if>
|
||||
<if test="dbType != null and dbType != ''">db_type = #{dbType},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="sorts != null">sorts = #{sorts},</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>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType="com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType = "com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity" >
|
||||
insert into mdm_module_db(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> id , </if>
|
||||
<if test="mdmId != null and mdmId != ''"> mdm_id , </if>
|
||||
<if test="dbName != null and dbName != ''"> db_name , </if>
|
||||
<if test="dbType != null and dbType != ''"> db_type , </if>
|
||||
<if test="remark != null and remark != ''"> remark , </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="dbName != null and dbName != ''"> #{dbName} ,</if>
|
||||
<if test="dbType != null and dbType != ''"> #{dbType} ,</if>
|
||||
<if test="remark != null and remark != ''"> #{remark} ,</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_db(mdm_id, db_name, db_type, remark, 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.dbName},#{entity.dbType},#{entity.remark},#{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_db(mdm_id, db_name, db_type, remark, 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.dbName},#{entity.dbType},#{entity.remark},#{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),
|
||||
db_name = values(db_name),
|
||||
db_type = values(db_type),
|
||||
remark = values(remark),
|
||||
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.mdmModuleDb.entity.MdmModuleDbEntity" >
|
||||
update mdm_module_db set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="mdmId != null and mdmId != ''"> mdm_id = #{mdmId},</if>
|
||||
<if test="dbName != null and dbName != ''"> db_name = #{dbName},</if>
|
||||
<if test="dbType != null and dbType != ''"> db_type = #{dbType},</if>
|
||||
<if test="remark != null and remark != ''"> remark = #{remark},</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.mdmModuleDb.entity.MdmModuleDbEntity" >
|
||||
update mdm_module_db 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.mdmModuleDb.entity.MdmModuleDbEntity">
|
||||
update mdm_module_db 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="dbName != null and dbName != ''">and db_name = #{dbName}</if>
|
||||
<if test="dbType != null and dbType != ''">and db_type = #{dbType}</if>
|
||||
<if test="remark != null and remark != ''">and remark = #{remark}</if>
|
||||
<if test="sorts != null">and sorts = #{sorts}</if>
|
||||
<if test="sts != null and sts != ''">and sts = #{sts}</if>
|
||||
<!-- 多条件逻辑删除 -->
|
||||
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity" >
|
||||
update mdm_module_db 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="dbName != null and dbName != ''"> and db_name = #{dbName} </if>
|
||||
<if test="dbType != null and dbType != ''"> and db_type = #{dbType} </if>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark} </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_db where id = #{id}
|
||||
</delete>
|
||||
<select id="getServiceDataById" resultType="java.util.HashMap" parameterType="java.util.HashMap">
|
||||
select
|
||||
*
|
||||
from ${tableName}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="detailFlag">
|
||||
and formmain_id = #{id}
|
||||
</if>
|
||||
<if test="!detailFlag">
|
||||
and id = #{id}
|
||||
</if>
|
||||
and sts = 'Y'
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="getServiceByFormmainId" resultType="java.util.HashMap" parameterType="java.util.HashMap">
|
||||
select
|
||||
*
|
||||
from ${tableName}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="detailFlag">
|
||||
and formmain_id = #{id}
|
||||
</if>
|
||||
<if test="!detailFlag">
|
||||
and id = #{id}
|
||||
</if>
|
||||
and sts = 'Y'
|
||||
</trim>
|
||||
order by sorts asc
|
||||
</select>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="getServiceByDistributeId" resultType="java.util.HashMap" parameterType="java.util.HashMap">
|
||||
select
|
||||
id,
|
||||
formmain_id,
|
||||
app_id,
|
||||
CASE
|
||||
status
|
||||
WHEN '1' THEN '发送成功'
|
||||
WHEN '2' THEN '发送中'
|
||||
WHEN '3' THEN '发送失败'
|
||||
ELSE ''
|
||||
END status,
|
||||
msg,
|
||||
sorts,
|
||||
create_user_id,
|
||||
create_time,
|
||||
modify_user_id,
|
||||
modify_time,
|
||||
sts,
|
||||
org_id
|
||||
from ${tableName}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
and formmain_id = #{id}
|
||||
and sts = 'Y'
|
||||
</trim>
|
||||
order by sorts asc
|
||||
</select>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="getServiceByDistributeIdNoCase" resultType="com.hzya.frame.mdm.entity.MdmDistributeVo" parameterType="java.util.HashMap">
|
||||
select
|
||||
formmain_id as formmainId,
|
||||
app_id as appId,
|
||||
status,
|
||||
msg
|
||||
from ${tableName}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
and formmain_id = #{id}
|
||||
and sts = 'Y'
|
||||
</trim>
|
||||
order by sorts asc
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
|
|
@ -2,12 +2,11 @@ package com.hzya.frame.mdm.mdmModuleDb.service;
|
|||
|
||||
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
|
||||
/**
|
||||
* 模版数据库表(MdmModuleDb)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-10-17 15:26:51
|
||||
* @since 2024-06-03 08:46:51
|
||||
*/
|
||||
public interface IMdmModuleDbService extends IBaseService<MdmModuleDbEntity, String> {
|
||||
public interface IMdmModuleDbService extends IBaseService<MdmModuleDbEntity, String>{
|
||||
}
|
||||
|
|
|
@ -3,27 +3,24 @@ package com.hzya.frame.mdm.mdmModuleDb.service.impl;
|
|||
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleDb.dao.IMdmModuleDbDao;
|
||||
import com.hzya.frame.mdm.mdmModuleDb.service.IMdmModuleDbService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
|
||||
/**
|
||||
* 模版数据库表(MdmModuleDb)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-10-17 15:26:51
|
||||
* @since 2024-06-03 08:46:52
|
||||
*/
|
||||
@Service(value = "mdmModuleDbService")
|
||||
public class MdmModuleDbServiceImpl extends BaseService<MdmModuleDbEntity, String> implements IMdmModuleDbService {
|
||||
|
||||
|
||||
private IMdmModuleDbDao mdmModuleDbDao;
|
||||
|
||||
|
||||
@Autowired
|
||||
public void setMdmModuleDbDao(IMdmModuleDbDao dao) {
|
||||
this.mdmModuleDbDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
public void setMdmModuleDbDao(IMdmModuleDbDao dao) {
|
||||
this.mdmModuleDbDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package com.hzya.frame.mdm.mdmModuleDbFileds.dao;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
/**
|
||||
* 模版数据库字段表(mdm_module_db_fileds: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-10-17 15:28:06
|
||||
* @since 2024-06-03 08:47:01
|
||||
*/
|
||||
public interface IMdmModuleDbFiledsDao extends IBaseDao<MdmModuleDbFiledsEntity, String> {
|
||||
|
||||
|
|
|
@ -4,15 +4,14 @@ import com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity;
|
|||
import com.hzya.frame.mdm.mdmModuleDbFileds.dao.IMdmModuleDbFiledsDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
|
||||
/**
|
||||
* 模版数据库字段表(MdmModuleDbFileds)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-10-17 15:28:07
|
||||
* @since 2024-06-03 08:47:01
|
||||
*/
|
||||
@Repository(value = "MdmModuleDbFiledsDaoImpl")
|
||||
public class MdmModuleDbFiledsDaoImpl extends MybatisGenericDao<MdmModuleDbFiledsEntity, String> implements IMdmModuleDbFiledsDao {
|
||||
|
||||
public class MdmModuleDbFiledsDaoImpl extends MybatisGenericDao<MdmModuleDbFiledsEntity, String> implements IMdmModuleDbFiledsDao{
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -5,57 +5,43 @@ import java.util.List;
|
|||
|
||||
import com.hzya.frame.mdm.mdmModuleDbFiledsRule.entity.MdmModuleDbFiledsRuleEntity;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* 模版数据库字段表(MdmModuleDbFileds)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-10-17 15:28:07
|
||||
* @since 2024-06-03 08:47:01
|
||||
*/
|
||||
public class MdmModuleDbFiledsEntity extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主数据模版ID
|
||||
*/
|
||||
private String mdmId;
|
||||
/**
|
||||
* 模版数据库id
|
||||
*/
|
||||
private String dbId;
|
||||
/**
|
||||
* 中文名
|
||||
*/
|
||||
private String chName;
|
||||
/**
|
||||
* 英文名
|
||||
*/
|
||||
private String enName;
|
||||
/**
|
||||
* 字段类型 1、BIGINT 2、DECIMAL 3、VARCHAR 4、DATETIME
|
||||
*/
|
||||
private String filedType;
|
||||
/**
|
||||
* 长度
|
||||
*/
|
||||
private String filedLength;
|
||||
/**
|
||||
* roletype
|
||||
*/
|
||||
private String roletype;
|
||||
/**
|
||||
* roletype
|
||||
*/
|
||||
private String roleValue;
|
||||
//字段规则
|
||||
private List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRules;
|
||||
|
||||
public List<MdmModuleDbFiledsRuleEntity> getMdmModuleDbFiledsRules() {
|
||||
return mdmModuleDbFiledsRules;
|
||||
}
|
||||
|
||||
public void setMdmModuleDbFiledsRules(List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRules) {
|
||||
this.mdmModuleDbFiledsRules = mdmModuleDbFiledsRules;
|
||||
}
|
||||
|
||||
/** 主数据模版ID */
|
||||
private String mdmId;
|
||||
/** 模版数据库id */
|
||||
private String dbId;
|
||||
/** 中文名 */
|
||||
private String chName;
|
||||
/** 英文名 */
|
||||
private String enName;
|
||||
/** 字段类型 1、BIGINT 2、DECIMAL 3、VARCHAR 4、DATETIME */
|
||||
private String filedType;
|
||||
/** 显示类型:新增 */
|
||||
private String addType;
|
||||
/** 显示类型:修改 */
|
||||
private String updateType;
|
||||
/** 显示类型:查看 */
|
||||
private String showType;
|
||||
/** 显示类型:查询 */
|
||||
private String queryType;
|
||||
/** 显示类型:列表 */
|
||||
private String listType;
|
||||
/** 显示类型:显示 */
|
||||
private String viewType;
|
||||
/** 长度 */
|
||||
private String filedLength;
|
||||
/** 公司id */
|
||||
private String companyId;
|
||||
/** 数据类型 1、新增 2、修改 */
|
||||
private String dataType;
|
||||
private List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRules;
|
||||
|
||||
public String getMdmId() {
|
||||
return mdmId;
|
||||
|
@ -97,6 +83,54 @@ public class MdmModuleDbFiledsEntity extends BaseEntity {
|
|||
this.filedType = filedType;
|
||||
}
|
||||
|
||||
public String getAddType() {
|
||||
return addType;
|
||||
}
|
||||
|
||||
public void setAddType(String addType) {
|
||||
this.addType = addType;
|
||||
}
|
||||
|
||||
public String getUpdateType() {
|
||||
return updateType;
|
||||
}
|
||||
|
||||
public void setUpdateType(String updateType) {
|
||||
this.updateType = updateType;
|
||||
}
|
||||
|
||||
public String getShowType() {
|
||||
return showType;
|
||||
}
|
||||
|
||||
public void setShowType(String showType) {
|
||||
this.showType = showType;
|
||||
}
|
||||
|
||||
public String getQueryType() {
|
||||
return queryType;
|
||||
}
|
||||
|
||||
public void setQueryType(String queryType) {
|
||||
this.queryType = queryType;
|
||||
}
|
||||
|
||||
public String getListType() {
|
||||
return listType;
|
||||
}
|
||||
|
||||
public void setListType(String listType) {
|
||||
this.listType = listType;
|
||||
}
|
||||
|
||||
public String getViewType() {
|
||||
return viewType;
|
||||
}
|
||||
|
||||
public void setViewType(String viewType) {
|
||||
this.viewType = viewType;
|
||||
}
|
||||
|
||||
public String getFiledLength() {
|
||||
return filedLength;
|
||||
}
|
||||
|
@ -105,20 +139,28 @@ public class MdmModuleDbFiledsEntity extends BaseEntity {
|
|||
this.filedLength = filedLength;
|
||||
}
|
||||
|
||||
public String getRoletype() {
|
||||
return roletype;
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setRoletype(String roletype) {
|
||||
this.roletype = roletype;
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public String getRoleValue() {
|
||||
return roleValue;
|
||||
public List<MdmModuleDbFiledsRuleEntity> getMdmModuleDbFiledsRules() {
|
||||
return mdmModuleDbFiledsRules;
|
||||
}
|
||||
|
||||
public void setRoleValue(String roleValue) {
|
||||
this.roleValue = roleValue;
|
||||
public void setMdmModuleDbFiledsRules(List<MdmModuleDbFiledsRuleEntity> mdmModuleDbFiledsRules) {
|
||||
this.mdmModuleDbFiledsRules = mdmModuleDbFiledsRules;
|
||||
}
|
||||
|
||||
public String getDataType() {
|
||||
return dataType;
|
||||
}
|
||||
|
||||
public void setDataType(String dataType) {
|
||||
this.dataType = dataType;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,31 +2,43 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.mdm.mdmModuleDbFileds.dao.impl.MdmModuleDbFiledsDaoImpl">
|
||||
|
||||
<resultMap id="get-MdmModuleDbFiledsEntity-result"
|
||||
type="com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
|
||||
<result property="dbId" column="db_id" jdbcType="VARCHAR"/>
|
||||
<result property="chName" column="ch_name" jdbcType="VARCHAR"/>
|
||||
<result property="enName" column="en_name" jdbcType="VARCHAR"/>
|
||||
<result property="filedType" column="filed_type" jdbcType="VARCHAR"/>
|
||||
<result property="filedLength" column="filed_length" 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"/>
|
||||
</resultMap>
|
||||
<resultMap id="get-MdmModuleDbFiledsEntity-result" type="com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity" >
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
|
||||
<result property="dbId" column="db_id" jdbcType="VARCHAR"/>
|
||||
<result property="chName" column="ch_name" jdbcType="VARCHAR"/>
|
||||
<result property="enName" column="en_name" jdbcType="VARCHAR"/>
|
||||
<result property="filedType" column="filed_type" jdbcType="VARCHAR"/>
|
||||
<result property="addType" column="add_type" jdbcType="VARCHAR"/>
|
||||
<result property="updateType" column="update_type" jdbcType="VARCHAR"/>
|
||||
<result property="showType" column="show_type" jdbcType="VARCHAR"/>
|
||||
<result property="queryType" column="query_type" jdbcType="VARCHAR"/>
|
||||
<result property="listType" column="list_type" jdbcType="VARCHAR"/>
|
||||
<result property="viewType" column="view_type" jdbcType="VARCHAR"/>
|
||||
<result property="filedLength" column="filed_length" 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="MdmModuleDbFiledsEntity_Base_Column_List">
|
||||
<sql id = "MdmModuleDbFiledsEntity_Base_Column_List">
|
||||
id
|
||||
,mdm_id
|
||||
,db_id
|
||||
,ch_name
|
||||
,en_name
|
||||
,filed_type
|
||||
,add_type
|
||||
,update_type
|
||||
,show_type
|
||||
,query_type
|
||||
,list_type
|
||||
,view_type
|
||||
,filed_length
|
||||
,sorts
|
||||
,create_user_id
|
||||
|
@ -35,248 +47,283 @@
|
|||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-MdmModuleDbFiledsEntity-result"
|
||||
parameterType="com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
|
||||
select
|
||||
<include refid="MdmModuleDbFiledsEntity_Base_Column_List"/>
|
||||
from mdm_module_db_fileds
|
||||
<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="dbId != null and dbId != ''">and db_id = #{dbId}</if>
|
||||
<if test="chName != null and chName != ''">and ch_name = #{chName}</if>
|
||||
<if test="enName != null and enName != ''">and en_name = #{enName}</if>
|
||||
<if test="filedType != null and filedType != ''">and filed_type = #{filedType}</if>
|
||||
<if test="filedLength != null and filedLength != ''">and filed_length = #{filedLength}</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="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>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-MdmModuleDbFiledsEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
|
||||
select
|
||||
<include refid="MdmModuleDbFiledsEntity_Base_Column_List" />
|
||||
from mdm_module_db_fileds
|
||||
<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="dbId != null and dbId != ''"> and db_id = #{dbId} </if>
|
||||
<if test="chName != null and chName != ''"> and ch_name = #{chName} </if>
|
||||
<if test="enName != null and enName != ''"> and en_name = #{enName} </if>
|
||||
<if test="filedType != null and filedType != ''"> and filed_type = #{filedType} </if>
|
||||
<if test="addType != null and addType != ''"> and add_type = #{addType} </if>
|
||||
<if test="updateType != null and updateType != ''"> and update_type = #{updateType} </if>
|
||||
<if test="showType != null and showType != ''"> and show_type = #{showType} </if>
|
||||
<if test="queryType != null and queryType != ''"> and query_type = #{queryType} </if>
|
||||
<if test="listType != null and listType != ''"> and list_type = #{listType} </if>
|
||||
<if test="viewType != null and viewType != ''"> and view_type = #{viewType} </if>
|
||||
<if test="filedLength != null and filedLength != ''"> and filed_length = #{filedLength} </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.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
|
||||
select count(1) from mdm_module_db_fileds
|
||||
<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="dbId != null and dbId != ''">and db_id = #{dbId}</if>
|
||||
<if test="chName != null and chName != ''">and ch_name = #{chName}</if>
|
||||
<if test="enName != null and enName != ''">and en_name = #{enName}</if>
|
||||
<if test="filedType != null and filedType != ''">and filed_type = #{filedType}</if>
|
||||
<if test="filedLength != null and filedLength != ''">and filed_length = #{filedLength}</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>
|
||||
</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.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
|
||||
select count(1) from mdm_module_db_fileds
|
||||
<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="dbId != null and dbId != ''"> and db_id = #{dbId} </if>
|
||||
<if test="chName != null and chName != ''"> and ch_name = #{chName} </if>
|
||||
<if test="enName != null and enName != ''"> and en_name = #{enName} </if>
|
||||
<if test="filedType != null and filedType != ''"> and filed_type = #{filedType} </if>
|
||||
<if test="addType != null and addType != ''"> and add_type = #{addType} </if>
|
||||
<if test="updateType != null and updateType != ''"> and update_type = #{updateType} </if>
|
||||
<if test="showType != null and showType != ''"> and show_type = #{showType} </if>
|
||||
<if test="queryType != null and queryType != ''"> and query_type = #{queryType} </if>
|
||||
<if test="listType != null and listType != ''"> and list_type = #{listType} </if>
|
||||
<if test="viewType != null and viewType != ''"> and view_type = #{viewType} </if>
|
||||
<if test="filedLength != null and filedLength != ''"> and filed_length = #{filedLength} </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-MdmModuleDbFiledsEntity-result"
|
||||
parameterType="com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
|
||||
select
|
||||
<include refid="MdmModuleDbFiledsEntity_Base_Column_List"/>
|
||||
from mdm_module_db_fileds
|
||||
<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="dbId != null and dbId != ''">and db_id like concat('%',#{dbId},'%')</if>
|
||||
<if test="chName != null and chName != ''">and ch_name like concat('%',#{chName},'%')</if>
|
||||
<if test="enName != null and enName != ''">and en_name like concat('%',#{enName},'%')</if>
|
||||
<if test="filedType != null and filedType != ''">and filed_type like concat('%',#{filedType},'%')</if>
|
||||
<if test="filedLength != null and filedLength != ''">and filed_length like concat('%',#{filedLength},'%')
|
||||
</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>
|
||||
<select id="entity_list_like" resultMap="get-MdmModuleDbFiledsEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
|
||||
select
|
||||
<include refid="MdmModuleDbFiledsEntity_Base_Column_List" />
|
||||
from mdm_module_db_fileds
|
||||
<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="dbId != null and dbId != ''"> and db_id like concat('%',#{dbId},'%') </if>
|
||||
<if test="chName != null and chName != ''"> and ch_name like concat('%',#{chName},'%') </if>
|
||||
<if test="enName != null and enName != ''"> and en_name like concat('%',#{enName},'%') </if>
|
||||
<if test="filedType != null and filedType != ''"> and filed_type like concat('%',#{filedType},'%') </if>
|
||||
<if test="addType != null and addType != ''"> and add_type like concat('%',#{addType},'%') </if>
|
||||
<if test="updateType != null and updateType != ''"> and update_type like concat('%',#{updateType},'%') </if>
|
||||
<if test="showType != null and showType != ''"> and show_type like concat('%',#{showType},'%') </if>
|
||||
<if test="queryType != null and queryType != ''"> and query_type like concat('%',#{queryType},'%') </if>
|
||||
<if test="listType != null and listType != ''"> and list_type like concat('%',#{listType},'%') </if>
|
||||
<if test="viewType != null and viewType != ''"> and view_type like concat('%',#{viewType},'%') </if>
|
||||
<if test="filedLength != null and filedLength != ''"> and filed_length like concat('%',#{filedLength},'%') </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="MdmModuleDbFiledsentity_list_or" resultMap="get-MdmModuleDbFiledsEntity-result"
|
||||
parameterType="com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
|
||||
select
|
||||
<include refid="MdmModuleDbFiledsEntity_Base_Column_List"/>
|
||||
from mdm_module_db_fileds
|
||||
<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="dbId != null and dbId != ''">or db_id = #{dbId}</if>
|
||||
<if test="chName != null and chName != ''">or ch_name = #{chName}</if>
|
||||
<if test="enName != null and enName != ''">or en_name = #{enName}</if>
|
||||
<if test="filedType != null and filedType != ''">or filed_type = #{filedType}</if>
|
||||
<if test="filedLength != null and filedLength != ''">or filed_length = #{filedLength}</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>
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="MdmModuleDbFiledsentity_list_or" resultMap="get-MdmModuleDbFiledsEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
|
||||
select
|
||||
<include refid="MdmModuleDbFiledsEntity_Base_Column_List" />
|
||||
from mdm_module_db_fileds
|
||||
<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="dbId != null and dbId != ''"> or db_id = #{dbId} </if>
|
||||
<if test="chName != null and chName != ''"> or ch_name = #{chName} </if>
|
||||
<if test="enName != null and enName != ''"> or en_name = #{enName} </if>
|
||||
<if test="filedType != null and filedType != ''"> or filed_type = #{filedType} </if>
|
||||
<if test="addType != null and addType != ''"> or add_type = #{addType} </if>
|
||||
<if test="updateType != null and updateType != ''"> or update_type = #{updateType} </if>
|
||||
<if test="showType != null and showType != ''"> or show_type = #{showType} </if>
|
||||
<if test="queryType != null and queryType != ''"> or query_type = #{queryType} </if>
|
||||
<if test="listType != null and listType != ''"> or list_type = #{listType} </if>
|
||||
<if test="viewType != null and viewType != ''"> or view_type = #{viewType} </if>
|
||||
<if test="filedLength != null and filedLength != ''"> or filed_length = #{filedLength} </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.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity"
|
||||
keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_module_db_fileds(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id ,</if>
|
||||
<if test="mdmId != null and mdmId != ''">mdm_id ,</if>
|
||||
<if test="dbId != null and dbId != ''">db_id ,</if>
|
||||
<if test="chName != null and chName != ''">ch_name ,</if>
|
||||
<if test="enName != null and enName != ''">en_name ,</if>
|
||||
<if test="filedType != null and filedType != ''">filed_type ,</if>
|
||||
<if test="filedLength != null and filedLength != ''">filed_length ,</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="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="dbId != null and dbId != ''">#{dbId} ,</if>
|
||||
<if test="chName != null and chName != ''">#{chName} ,</if>
|
||||
<if test="enName != null and enName != ''">#{enName} ,</if>
|
||||
<if test="filedType != null and filedType != ''">#{filedType} ,</if>
|
||||
<if test="filedLength != null and filedLength != ''">#{filedLength} ,</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="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from mdm_module_db_fileds a WHERE
|
||||
a.sts = 'Y' ),
|
||||
</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_module_db_fileds(mdm_id, db_id, ch_name, en_name, filed_type, filed_length, sorts,
|
||||
create_user_id, create_time, modify_user_id, modify_time, sts, org_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.mdmId},#{entity.dbId},#{entity.chName},#{entity.enName},#{entity.filedType},#{entity.filedLength},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},
|
||||
'Y')
|
||||
</foreach>
|
||||
</insert>
|
||||
<!-- 批量新增或者修改-->
|
||||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_module_db_fileds(mdm_id, db_id, ch_name, en_name, filed_type, filed_length, sorts,
|
||||
create_user_id, create_time, modify_user_id, modify_time, sts, org_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.mdmId},#{entity.dbId},#{entity.chName},#{entity.enName},#{entity.filedType},#{entity.filedLength},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
mdm_id = values(mdm_id),
|
||||
db_id = values(db_id),
|
||||
ch_name = values(ch_name),
|
||||
en_name = values(en_name),
|
||||
filed_type = values(filed_type),
|
||||
filed_length = values(filed_length),
|
||||
sorts = values(sorts),
|
||||
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)
|
||||
</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType="com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
|
||||
update mdm_module_db_fileds set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="mdmId != null and mdmId != ''">mdm_id = #{mdmId},</if>
|
||||
<if test="dbId != null and dbId != ''">db_id = #{dbId},</if>
|
||||
<if test="chName != null and chName != ''">ch_name = #{chName},</if>
|
||||
<if test="enName != null and enName != ''">en_name = #{enName},</if>
|
||||
<if test="filedType != null and filedType != ''">filed_type = #{filedType},</if>
|
||||
<if test="filedLength != null and filedLength != ''">filed_length = #{filedLength},</if>
|
||||
<if test="sorts != null">sorts = #{sorts},</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>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType="com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType = "com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity" >
|
||||
insert into mdm_module_db_fileds(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> id , </if>
|
||||
<if test="mdmId != null and mdmId != ''"> mdm_id , </if>
|
||||
<if test="dbId != null and dbId != ''"> db_id , </if>
|
||||
<if test="chName != null and chName != ''"> ch_name , </if>
|
||||
<if test="enName != null and enName != ''"> en_name , </if>
|
||||
<if test="filedType != null and filedType != ''"> filed_type , </if>
|
||||
<if test="addType != null and addType != ''"> add_type , </if>
|
||||
<if test="updateType != null and updateType != ''"> update_type , </if>
|
||||
<if test="showType != null and showType != ''"> show_type , </if>
|
||||
<if test="queryType != null and queryType != ''"> query_type , </if>
|
||||
<if test="listType != null and listType != ''"> list_type , </if>
|
||||
<if test="viewType != null and viewType != ''"> view_type , </if>
|
||||
<if test="filedLength != null and filedLength != ''"> filed_length , </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="dbId != null and dbId != ''"> #{dbId} ,</if>
|
||||
<if test="chName != null and chName != ''"> #{chName} ,</if>
|
||||
<if test="enName != null and enName != ''"> #{enName} ,</if>
|
||||
<if test="filedType != null and filedType != ''"> #{filedType} ,</if>
|
||||
<if test="addType != null and addType != ''"> #{addType} ,</if>
|
||||
<if test="updateType != null and updateType != ''"> #{updateType} ,</if>
|
||||
<if test="showType != null and showType != ''"> #{showType} ,</if>
|
||||
<if test="queryType != null and queryType != ''"> #{queryType} ,</if>
|
||||
<if test="listType != null and listType != ''"> #{listType} ,</if>
|
||||
<if test="viewType != null and viewType != ''"> #{viewType} ,</if>
|
||||
<if test="filedLength != null and filedLength != ''"> #{filedLength} ,</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_db_fileds(mdm_id, db_id, ch_name, en_name, filed_type, add_type, update_type, show_type, query_type, list_type, view_type, filed_length, 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.dbId},#{entity.chName},#{entity.enName},#{entity.filedType},#{entity.addType},#{entity.updateType},#{entity.showType},#{entity.queryType},#{entity.listType},#{entity.viewType},#{entity.filedLength},#{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_db_fileds(mdm_id, db_id, ch_name, en_name, filed_type, add_type, update_type, show_type, query_type, list_type, view_type, filed_length, 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.dbId},#{entity.chName},#{entity.enName},#{entity.filedType},#{entity.addType},#{entity.updateType},#{entity.showType},#{entity.queryType},#{entity.listType},#{entity.viewType},#{entity.filedLength},#{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),
|
||||
db_id = values(db_id),
|
||||
ch_name = values(ch_name),
|
||||
en_name = values(en_name),
|
||||
filed_type = values(filed_type),
|
||||
add_type = values(add_type),
|
||||
update_type = values(update_type),
|
||||
show_type = values(show_type),
|
||||
query_type = values(query_type),
|
||||
list_type = values(list_type),
|
||||
view_type = values(view_type),
|
||||
filed_length = values(filed_length),
|
||||
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.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity" >
|
||||
update mdm_module_db_fileds set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="mdmId != null and mdmId != ''"> mdm_id = #{mdmId},</if>
|
||||
<if test="dbId != null and dbId != ''"> db_id = #{dbId},</if>
|
||||
<if test="chName != null and chName != ''"> ch_name = #{chName},</if>
|
||||
<if test="enName != null and enName != ''"> en_name = #{enName},</if>
|
||||
<if test="filedType != null and filedType != ''"> filed_type = #{filedType},</if>
|
||||
<if test="addType != null and addType != ''"> add_type = #{addType},</if>
|
||||
<if test="updateType != null and updateType != ''"> update_type = #{updateType},</if>
|
||||
<if test="showType != null and showType != ''"> show_type = #{showType},</if>
|
||||
<if test="queryType != null and queryType != ''"> query_type = #{queryType},</if>
|
||||
<if test="listType != null and listType != ''"> list_type = #{listType},</if>
|
||||
<if test="viewType != null and viewType != ''"> view_type = #{viewType},</if>
|
||||
<if test="filedLength != null and filedLength != ''"> filed_length = #{filedLength},</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.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity" >
|
||||
update mdm_module_db_fileds 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.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
|
||||
update mdm_module_db_fileds 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="dbId != null and dbId != ''">and db_id = #{dbId}</if>
|
||||
<if test="chName != null and chName != ''">and ch_name = #{chName}</if>
|
||||
<if test="enName != null and enName != ''">and en_name = #{enName}</if>
|
||||
<if test="filedType != null and filedType != ''">and filed_type = #{filedType}</if>
|
||||
<if test="filedLength != null and filedLength != ''">and filed_length = #{filedLength}</if>
|
||||
<if test="sorts != null">and sorts = #{sorts}</if>
|
||||
<if test="sts != null and sts != ''">and sts = #{sts}</if>
|
||||
<!-- 多条件逻辑删除 -->
|
||||
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity" >
|
||||
update mdm_module_db_fileds 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="dbId != null and dbId != ''"> and db_id = #{dbId} </if>
|
||||
<if test="chName != null and chName != ''"> and ch_name = #{chName} </if>
|
||||
<if test="enName != null and enName != ''"> and en_name = #{enName} </if>
|
||||
<if test="filedType != null and filedType != ''"> and filed_type = #{filedType} </if>
|
||||
<if test="addType != null and addType != ''"> and add_type = #{addType} </if>
|
||||
<if test="updateType != null and updateType != ''"> and update_type = #{updateType} </if>
|
||||
<if test="showType != null and showType != ''"> and show_type = #{showType} </if>
|
||||
<if test="queryType != null and queryType != ''"> and query_type = #{queryType} </if>
|
||||
<if test="listType != null and listType != ''"> and list_type = #{listType} </if>
|
||||
<if test="viewType != null and viewType != ''"> and view_type = #{viewType} </if>
|
||||
<if test="filedLength != null and filedLength != ''"> and filed_length = #{filedLength} </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_db_fileds where id = #{id}
|
||||
</delete>
|
||||
|
||||
|
|
|
@ -2,12 +2,11 @@ package com.hzya.frame.mdm.mdmModuleDbFileds.service;
|
|||
|
||||
import com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
|
||||
/**
|
||||
* 模版数据库字段表(MdmModuleDbFileds)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-10-17 15:28:09
|
||||
* @since 2024-06-03 08:47:01
|
||||
*/
|
||||
public interface IMdmModuleDbFiledsService extends IBaseService<MdmModuleDbFiledsEntity, String> {
|
||||
public interface IMdmModuleDbFiledsService extends IBaseService<MdmModuleDbFiledsEntity, String>{
|
||||
}
|
||||
|
|
|
@ -3,27 +3,24 @@ package com.hzya.frame.mdm.mdmModuleDbFileds.service.impl;
|
|||
import com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleDbFileds.dao.IMdmModuleDbFiledsDao;
|
||||
import com.hzya.frame.mdm.mdmModuleDbFileds.service.IMdmModuleDbFiledsService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
|
||||
/**
|
||||
* 模版数据库字段表(MdmModuleDbFileds)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-10-17 15:28:09
|
||||
* @since 2024-06-03 08:47:01
|
||||
*/
|
||||
@Service(value = "mdmModuleDbFiledsService")
|
||||
public class MdmModuleDbFiledsServiceImpl extends BaseService<MdmModuleDbFiledsEntity, String> implements IMdmModuleDbFiledsService {
|
||||
|
||||
|
||||
private IMdmModuleDbFiledsDao mdmModuleDbFiledsDao;
|
||||
|
||||
|
||||
@Autowired
|
||||
public void setMdmModuleDbFiledsDao(IMdmModuleDbFiledsDao dao) {
|
||||
this.mdmModuleDbFiledsDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
public void setMdmModuleDbFiledsDao(IMdmModuleDbFiledsDao dao) {
|
||||
this.mdmModuleDbFiledsDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ import com.hzya.frame.basedao.dao.IBaseDao;
|
|||
* 模版数据库字段规则表(mdm_module_db_fileds_rule: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-11-04 11:16:44
|
||||
* @since 2024-06-03 08:47:10
|
||||
*/
|
||||
public interface IMdmModuleDbFiledsRuleDao extends IBaseDao<MdmModuleDbFiledsRuleEntity, String> {
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
|||
* 模版数据库字段规则表(MdmModuleDbFiledsRule)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-11-04 11:16:44
|
||||
* @since 2024-06-03 08:47:10
|
||||
*/
|
||||
@Repository(value = "MdmModuleDbFiledsRuleDaoImpl")
|
||||
public class MdmModuleDbFiledsRuleDaoImpl extends MybatisGenericDao<MdmModuleDbFiledsRuleEntity, String> implements IMdmModuleDbFiledsRuleDao{
|
||||
|
|
|
@ -6,7 +6,7 @@ import com.hzya.frame.web.entity.BaseEntity;
|
|||
* 模版数据库字段规则表(MdmModuleDbFiledsRule)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-11-04 11:16:44
|
||||
* @since 2024-06-03 08:47:10
|
||||
*/
|
||||
public class MdmModuleDbFiledsRuleEntity extends BaseEntity {
|
||||
|
||||
|
@ -26,7 +26,10 @@ public class MdmModuleDbFiledsRuleEntity extends BaseEntity {
|
|||
private String ruleValue;
|
||||
/** 规则类型1、表单属性 2、控件属性 */
|
||||
private String ruleType;
|
||||
|
||||
/** 公司id */
|
||||
private String companyId;
|
||||
/** 数据类型 1、新增 2、修改 */
|
||||
private String dataType;
|
||||
|
||||
public String getMdmId() {
|
||||
return mdmId;
|
||||
|
@ -92,5 +95,20 @@ public class MdmModuleDbFiledsRuleEntity extends BaseEntity {
|
|||
this.ruleType = ruleType;
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public String getDataType() {
|
||||
return dataType;
|
||||
}
|
||||
|
||||
public void setDataType(String dataType) {
|
||||
this.dataType = dataType;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
<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 = "MdmModuleDbFiledsRuleEntity_Base_Column_List">
|
||||
|
@ -38,6 +39,7 @@
|
|||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-MdmModuleDbFiledsRuleEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDbFiledsRule.entity.MdmModuleDbFiledsRuleEntity">
|
||||
|
@ -61,6 +63,7 @@
|
|||
<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>
|
||||
|
@ -87,6 +90,7 @@
|
|||
<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>
|
||||
|
@ -115,6 +119,7 @@
|
|||
<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>
|
||||
|
@ -143,14 +148,15 @@
|
|||
<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>
|
||||
and sts='Y'
|
||||
<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>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType = "com.hzya.frame.mdm.mdmModuleDbFiledsRule.entity.MdmModuleDbFiledsRuleEntity" keyProperty="id" useGeneratedKeys="true">
|
||||
<insert id="entity_insert" parameterType = "com.hzya.frame.mdm.mdmModuleDbFiledsRule.entity.MdmModuleDbFiledsRuleEntity" >
|
||||
insert into mdm_module_db_fileds_rule(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> id , </if>
|
||||
|
@ -169,7 +175,7 @@
|
|||
<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="sorts == null ">sorts,</if>
|
||||
<if test="companyId != null and companyId != ''"> company_id , </if>
|
||||
<if test="sts == null ">sts,</if>
|
||||
</trim>
|
||||
)values(
|
||||
|
@ -190,25 +196,25 @@
|
|||
<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="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from mdm_module_db_fileds_rule a WHERE a.sts = 'Y' ),</if>
|
||||
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_module_db_fileds_rule(mdm_id, form_name, db_id, filed_id, rule_name, rule_code, rule_value, rule_type, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, sts)
|
||||
<insert id="entityInsertBatch" >
|
||||
insert into mdm_module_db_fileds_rule(mdm_id, form_name, db_id, filed_id, rule_name, rule_code, rule_value, rule_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.mdmId},#{entity.formName},#{entity.dbId},#{entity.filedId},#{entity.ruleName},#{entity.ruleCode},#{entity.ruleValue},#{entity.ruleType},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id}, 'Y')
|
||||
(#{entity.mdmId},#{entity.formName},#{entity.dbId},#{entity.filedId},#{entity.ruleName},#{entity.ruleCode},#{entity.ruleValue},#{entity.ruleType},#{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" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_module_db_fileds_rule(mdm_id, form_name, db_id, filed_id, rule_name, rule_code, rule_value, rule_type, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id)
|
||||
<insert id="entityInsertOrUpdateBatch" >
|
||||
insert into mdm_module_db_fileds_rule(mdm_id, form_name, db_id, filed_id, rule_name, rule_code, rule_value, rule_type, 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.formName},#{entity.dbId},#{entity.filedId},#{entity.ruleName},#{entity.ruleCode},#{entity.ruleValue},#{entity.ruleType},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id})
|
||||
(#{entity.mdmId},#{entity.formName},#{entity.dbId},#{entity.filedId},#{entity.ruleName},#{entity.ruleCode},#{entity.ruleValue},#{entity.ruleType},#{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),
|
||||
|
@ -219,13 +225,13 @@
|
|||
rule_code = values(rule_code),
|
||||
rule_value = values(rule_value),
|
||||
rule_type = values(rule_type),
|
||||
sorts = values(sorts),
|
||||
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)</insert>
|
||||
org_id = values(org_id),
|
||||
company_id = values(company_id)</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType = "com.hzya.frame.mdm.mdmModuleDbFiledsRule.entity.MdmModuleDbFiledsRuleEntity" >
|
||||
update mdm_module_db_fileds_rule set
|
||||
|
@ -238,14 +244,14 @@ update mdm_module_db_fileds_rule set
|
|||
<if test="ruleCode != null and ruleCode != ''"> rule_code = #{ruleCode},</if>
|
||||
<if test="ruleValue != null and ruleValue != ''"> rule_value = #{ruleValue},</if>
|
||||
<if test="ruleType != null and ruleType != ''"> rule_type = #{ruleType},</if>
|
||||
<if test="sorts != null"> sorts = #{sorts},</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>
|
||||
</trim>
|
||||
<if test="companyId != null and companyId != ''"> company_id = #{companyId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
|
@ -268,7 +274,8 @@ update mdm_module_db_fileds_rule set sts= 'N' ,modify_time = #{modify_time},mod
|
|||
<if test="ruleType != null and ruleType != ''"> and rule_type = #{ruleType} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
and sts='Y'
|
||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</update>
|
||||
<!--通过主键删除-->
|
||||
|
|
|
@ -6,7 +6,7 @@ import com.hzya.frame.basedao.service.IBaseService;
|
|||
* 模版数据库字段规则表(MdmModuleDbFiledsRule)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-11-04 11:16:44
|
||||
* @since 2024-06-03 08:47:10
|
||||
*/
|
||||
public interface IMdmModuleDbFiledsRuleService extends IBaseService<MdmModuleDbFiledsRuleEntity, String>{
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import com.hzya.frame.basedao.service.impl.BaseService;
|
|||
* 模版数据库字段规则表(MdmModuleDbFiledsRule)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-11-04 11:16:44
|
||||
* @since 2024-06-03 08:47:10
|
||||
*/
|
||||
@Service(value = "mdmModuleDbFiledsRuleService")
|
||||
public class MdmModuleDbFiledsRuleServiceImpl extends BaseService<MdmModuleDbFiledsRuleEntity, String> implements IMdmModuleDbFiledsRuleService {
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
package com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.dao;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
/**
|
||||
* 模版数据库字段规则档案表(mdm_module_db_fileds_rule_files: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-10-17 15:30:12
|
||||
*/
|
||||
public interface IMdmModuleDbFiledsRuleFilesDao extends IBaseDao<MdmModuleDbFiledsRuleFilesEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
package com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.dao.impl;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.dao.IMdmModuleDbFiledsRuleFilesDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
|
||||
/**
|
||||
* 模版数据库字段规则档案表(MdmModuleDbFiledsRuleFiles)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-10-17 15:30:12
|
||||
*/
|
||||
@Repository(value = "MdmModuleDbFiledsRuleFilesDaoImpl")
|
||||
public class MdmModuleDbFiledsRuleFilesDaoImpl extends MybatisGenericDao<MdmModuleDbFiledsRuleFilesEntity, String> implements IMdmModuleDbFiledsRuleFilesDao {
|
||||
|
||||
}
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
package com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* 模版数据库字段规则档案表(MdmModuleDbFiledsRuleFiles)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-10-17 15:30:13
|
||||
*/
|
||||
public class MdmModuleDbFiledsRuleFilesEntity extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 规则名称
|
||||
*/
|
||||
private String ruleName;
|
||||
/**
|
||||
* 规则编码
|
||||
*/
|
||||
private String ruleCode;
|
||||
/**
|
||||
* 规则类型 1、表单属性 2、控件属性
|
||||
*/
|
||||
private String ruleType;
|
||||
/**
|
||||
* 规则值
|
||||
*/
|
||||
private String ruleValue;
|
||||
|
||||
|
||||
public String getRuleName() {
|
||||
return ruleName;
|
||||
}
|
||||
|
||||
public void setRuleName(String ruleName) {
|
||||
this.ruleName = ruleName;
|
||||
}
|
||||
|
||||
public String getRuleCode() {
|
||||
return ruleCode;
|
||||
}
|
||||
|
||||
public void setRuleCode(String ruleCode) {
|
||||
this.ruleCode = ruleCode;
|
||||
}
|
||||
|
||||
public String getRuleType() {
|
||||
return ruleType;
|
||||
}
|
||||
|
||||
public void setRuleType(String ruleType) {
|
||||
this.ruleType = ruleType;
|
||||
}
|
||||
|
||||
public String getRuleValue() {
|
||||
return ruleValue;
|
||||
}
|
||||
|
||||
public void setRuleValue(String ruleValue) {
|
||||
this.ruleValue = ruleValue;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,257 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.dao.impl.MdmModuleDbFiledsRuleFilesDaoImpl">
|
||||
|
||||
<resultMap id="get-MdmModuleDbFiledsRuleFilesEntity-result"
|
||||
type="com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity">
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="ruleName" column="rule_name" jdbcType="VARCHAR"/>
|
||||
<result property="ruleCode" column="rule_code" jdbcType="VARCHAR"/>
|
||||
<result property="ruleType" column="rule_type" jdbcType="VARCHAR"/>
|
||||
<result property="ruleValue" column="rule_value" 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"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id="MdmModuleDbFiledsRuleFilesEntity_Base_Column_List">
|
||||
id
|
||||
,rule_name
|
||||
,rule_code
|
||||
,rule_type
|
||||
,rule_value
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-MdmModuleDbFiledsRuleFilesEntity-result"
|
||||
parameterType="com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity">
|
||||
select
|
||||
<include refid="MdmModuleDbFiledsRuleFilesEntity_Base_Column_List"/>
|
||||
from mdm_module_db_fileds_rule_files
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="ruleName != null and ruleName != ''">and rule_name = #{ruleName}</if>
|
||||
<if test="ruleCode != null and ruleCode != ''">and rule_code = #{ruleCode}</if>
|
||||
<if test="ruleType != null and ruleType != ''">and rule_type = #{ruleType}</if>
|
||||
<if test="ruleValue != null and ruleValue != ''">and rule_value = #{ruleValue}</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>
|
||||
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.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity">
|
||||
select count(1) from mdm_module_db_fileds_rule_files
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="ruleName != null and ruleName != ''">and rule_name = #{ruleName}</if>
|
||||
<if test="ruleCode != null and ruleCode != ''">and rule_code = #{ruleCode}</if>
|
||||
<if test="ruleType != null and ruleType != ''">and rule_type = #{ruleType}</if>
|
||||
<if test="ruleValue != null and ruleValue != ''">and rule_value = #{ruleValue}</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>
|
||||
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>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-MdmModuleDbFiledsRuleFilesEntity-result"
|
||||
parameterType="com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity">
|
||||
select
|
||||
<include refid="MdmModuleDbFiledsRuleFilesEntity_Base_Column_List"/>
|
||||
from mdm_module_db_fileds_rule_files
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
|
||||
<if test="ruleName != null and ruleName != ''">and rule_name like concat('%',#{ruleName},'%')</if>
|
||||
<if test="ruleCode != null and ruleCode != ''">and rule_code like concat('%',#{ruleCode},'%')</if>
|
||||
<if test="ruleType != null and ruleType != ''">and rule_type like concat('%',#{ruleType},'%')</if>
|
||||
<if test="ruleValue != null and ruleValue != ''">and rule_value like concat('%',#{ruleValue},'%')</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>
|
||||
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>
|
||||
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="MdmModuleDbFiledsRuleFilesentity_list_or" resultMap="get-MdmModuleDbFiledsRuleFilesEntity-result"
|
||||
parameterType="com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity">
|
||||
select
|
||||
<include refid="MdmModuleDbFiledsRuleFilesEntity_Base_Column_List"/>
|
||||
from mdm_module_db_fileds_rule_files
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''">or id = #{id}</if>
|
||||
<if test="ruleName != null and ruleName != ''">or rule_name = #{ruleName}</if>
|
||||
<if test="ruleCode != null and ruleCode != ''">or rule_code = #{ruleCode}</if>
|
||||
<if test="ruleType != null and ruleType != ''">or rule_type = #{ruleType}</if>
|
||||
<if test="ruleValue != null and ruleValue != ''">or rule_value = #{ruleValue}</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>
|
||||
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>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert"
|
||||
parameterType="com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity"
|
||||
keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_module_db_fileds_rule_files(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id ,</if>
|
||||
<if test="ruleName != null and ruleName != ''">rule_name ,</if>
|
||||
<if test="ruleCode != null and ruleCode != ''">rule_code ,</if>
|
||||
<if test="ruleType != null and ruleType != ''">rule_type ,</if>
|
||||
<if test="ruleValue != null and ruleValue != ''">rule_value ,</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="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="ruleName != null and ruleName != ''">#{ruleName} ,</if>
|
||||
<if test="ruleCode != null and ruleCode != ''">#{ruleCode} ,</if>
|
||||
<if test="ruleType != null and ruleType != ''">#{ruleType} ,</if>
|
||||
<if test="ruleValue != null and ruleValue != ''">#{ruleValue} ,</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="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from
|
||||
mdm_module_db_fileds_rule_files a WHERE a.sts = 'Y' ),
|
||||
</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_module_db_fileds_rule_files(rule_name, rule_code, rule_type, rule_value, sorts, create_user_id,
|
||||
create_time, modify_user_id, modify_time, sts, org_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.ruleName},#{entity.ruleCode},#{entity.ruleType},#{entity.ruleValue},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},
|
||||
'Y')
|
||||
</foreach>
|
||||
</insert>
|
||||
<!-- 批量新增或者修改-->
|
||||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_module_db_fileds_rule_files(rule_name, rule_code, rule_type, rule_value, sorts, create_user_id,
|
||||
create_time, modify_user_id, modify_time, sts, org_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.ruleName},#{entity.ruleCode},#{entity.ruleType},#{entity.ruleValue},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
rule_name = values(rule_name),
|
||||
rule_code = values(rule_code),
|
||||
rule_type = values(rule_type),
|
||||
rule_value = values(rule_value),
|
||||
sorts = values(sorts),
|
||||
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)
|
||||
</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update"
|
||||
parameterType="com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity">
|
||||
update mdm_module_db_fileds_rule_files set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="ruleName != null and ruleName != ''">rule_name = #{ruleName},</if>
|
||||
<if test="ruleCode != null and ruleCode != ''">rule_code = #{ruleCode},</if>
|
||||
<if test="ruleType != null and ruleType != ''">rule_type = #{ruleType},</if>
|
||||
<if test="ruleValue != null and ruleValue != ''">rule_value = #{ruleValue},</if>
|
||||
<if test="sorts != null">sorts = #{sorts},</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>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete"
|
||||
parameterType="com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity">
|
||||
update mdm_module_db_fileds_rule_files 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.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity">
|
||||
update mdm_module_db_fileds_rule_files 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="ruleName != null and ruleName != ''">and rule_name = #{ruleName}</if>
|
||||
<if test="ruleCode != null and ruleCode != ''">and rule_code = #{ruleCode}</if>
|
||||
<if test="ruleType != null and ruleType != ''">and rule_type = #{ruleType}</if>
|
||||
<if test="ruleValue != null and ruleValue != ''">and rule_value = #{ruleValue}</if>
|
||||
<if test="sorts != null">and sorts = #{sorts}</if>
|
||||
<if test="sts != null and sts != ''">and sts = #{sts}</if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</update>
|
||||
<!--通过主键删除-->
|
||||
<delete id="entity_delete">
|
||||
delete from mdm_module_db_fileds_rule_files where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
package com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.service;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
|
||||
/**
|
||||
* 模版数据库字段规则档案表(MdmModuleDbFiledsRuleFiles)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-10-17 15:30:14
|
||||
*/
|
||||
public interface IMdmModuleDbFiledsRuleFilesService extends IBaseService<MdmModuleDbFiledsRuleFilesEntity, String> {
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
package com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.service.impl;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.entity.MdmModuleDbFiledsRuleFilesEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.dao.IMdmModuleDbFiledsRuleFilesDao;
|
||||
import com.hzya.frame.mdm.mdmModuleDbFiledsRuleFiles.service.IMdmModuleDbFiledsRuleFilesService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
|
||||
/**
|
||||
* 模版数据库字段规则档案表(MdmModuleDbFiledsRuleFiles)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-10-17 15:30:15
|
||||
*/
|
||||
@Service(value = "mdmModuleDbFiledsRuleFilesService")
|
||||
public class MdmModuleDbFiledsRuleFilesServiceImpl extends BaseService<MdmModuleDbFiledsRuleFilesEntity, String> implements IMdmModuleDbFiledsRuleFilesService {
|
||||
|
||||
private IMdmModuleDbFiledsRuleFilesDao mdmModuleDbFiledsRuleFilesDao;
|
||||
|
||||
@Autowired
|
||||
public void setMdmModuleDbFiledsRuleFilesDao(IMdmModuleDbFiledsRuleFilesDao dao) {
|
||||
this.mdmModuleDbFiledsRuleFilesDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
}
|
|
@ -7,7 +7,7 @@ import com.hzya.frame.basedao.dao.IBaseDao;
|
|||
* 主数据功能应用分发表(mdm_module_distribute: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-11-06 15:27:41
|
||||
* @since 2024-06-03 08:47:33
|
||||
*/
|
||||
public interface IMdmModuleDistributeDao extends IBaseDao<MdmModuleDistributeEntity, String> {
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
|||
* 主数据功能应用分发表(MdmModuleDistribute)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-11-06 15:27:42
|
||||
* @since 2024-06-03 08:47:33
|
||||
*/
|
||||
@Repository(value = "MdmModuleDistributeDaoImpl")
|
||||
public class MdmModuleDistributeDaoImpl extends MybatisGenericDao<MdmModuleDistributeEntity, String> implements IMdmModuleDistributeDao{
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
package com.hzya.frame.mdm.mdmModuleDistribute.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
/**
|
||||
* 主数据功能应用分发表(MdmModuleDistribute)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-11-06 15:27:42
|
||||
* @since 2024-06-03 08:47:33
|
||||
*/
|
||||
public class MdmModuleDistributeEntity extends BaseEntity {
|
||||
|
||||
|
@ -17,36 +14,17 @@ public class MdmModuleDistributeEntity extends BaseEntity {
|
|||
private String mdmId;
|
||||
/** 应用id */
|
||||
private String appId;
|
||||
/** 修改接口 */
|
||||
private String updateApi;
|
||||
/** 新增接口 */
|
||||
private String addApi;
|
||||
/** 删除接口 */
|
||||
private String deleteApi;
|
||||
/** 新增使用类型 */
|
||||
private String addType;
|
||||
/** 删除使用类型 */
|
||||
private String deleteType;
|
||||
/** 新增插件 */
|
||||
private String addPlug;
|
||||
/** 删除插件 */
|
||||
private String deletePlug;
|
||||
private List<MdmModuleDistributeDetailEntity> addList;
|
||||
private List<MdmModuleDistributeDetailEntity> deleteList;
|
||||
/** 启用停用 0、停用1、启用 */
|
||||
private String enabledState;
|
||||
/** 公司id */
|
||||
private String companyId;
|
||||
|
||||
public List<MdmModuleDistributeDetailEntity> getAddList() {
|
||||
return addList;
|
||||
}
|
||||
|
||||
public void setAddList(List<MdmModuleDistributeDetailEntity> addList) {
|
||||
this.addList = addList;
|
||||
}
|
||||
|
||||
public List<MdmModuleDistributeDetailEntity> getDeleteList() {
|
||||
return deleteList;
|
||||
}
|
||||
|
||||
public void setDeleteList(List<MdmModuleDistributeDetailEntity> deleteList) {
|
||||
this.deleteList = deleteList;
|
||||
}
|
||||
|
||||
public String getMdmId() {
|
||||
return mdmId;
|
||||
|
@ -64,6 +42,14 @@ public class MdmModuleDistributeEntity extends BaseEntity {
|
|||
this.appId = appId;
|
||||
}
|
||||
|
||||
public String getUpdateApi() {
|
||||
return updateApi;
|
||||
}
|
||||
|
||||
public void setUpdateApi(String updateApi) {
|
||||
this.updateApi = updateApi;
|
||||
}
|
||||
|
||||
public String getAddApi() {
|
||||
return addApi;
|
||||
}
|
||||
|
@ -80,36 +66,20 @@ public class MdmModuleDistributeEntity extends BaseEntity {
|
|||
this.deleteApi = deleteApi;
|
||||
}
|
||||
|
||||
public String getAddType() {
|
||||
return addType;
|
||||
public String getEnabledState() {
|
||||
return enabledState;
|
||||
}
|
||||
|
||||
public void setAddType(String addType) {
|
||||
this.addType = addType;
|
||||
public void setEnabledState(String enabledState) {
|
||||
this.enabledState = enabledState;
|
||||
}
|
||||
|
||||
public String getDeleteType() {
|
||||
return deleteType;
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setDeleteType(String deleteType) {
|
||||
this.deleteType = deleteType;
|
||||
}
|
||||
|
||||
public String getAddPlug() {
|
||||
return addPlug;
|
||||
}
|
||||
|
||||
public void setAddPlug(String addPlug) {
|
||||
this.addPlug = addPlug;
|
||||
}
|
||||
|
||||
public String getDeletePlug() {
|
||||
return deletePlug;
|
||||
}
|
||||
|
||||
public void setDeletePlug(String deletePlug) {
|
||||
this.deletePlug = deletePlug;
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
|
||||
<result property="appId" column="app_id" jdbcType="VARCHAR"/>
|
||||
<result property="updateApi" column="update_api" jdbcType="VARCHAR"/>
|
||||
<result property="addApi" column="add_api" jdbcType="VARCHAR"/>
|
||||
<result property="deleteApi" column="delete_api" jdbcType="VARCHAR"/>
|
||||
<result property="addType" column="add_type" jdbcType="VARCHAR"/>
|
||||
<result property="deleteType" column="delete_type" 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"/>
|
||||
|
@ -17,18 +17,17 @@
|
|||
<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="addPlug" column="add_plug" jdbcType="VARCHAR"/>
|
||||
<result property="deletePlug" column="delete_plug" jdbcType="VARCHAR"/>
|
||||
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id = "MdmModuleDistributeEntity_Base_Column_List">
|
||||
id
|
||||
,mdm_id
|
||||
,app_id
|
||||
,update_api
|
||||
,add_api
|
||||
,delete_api
|
||||
,add_type
|
||||
,delete_type
|
||||
,enabled_state
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
|
@ -36,8 +35,7 @@
|
|||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,add_plug
|
||||
,delete_plug
|
||||
,company_id
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-MdmModuleDistributeEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity">
|
||||
|
@ -48,10 +46,10 @@
|
|||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
|
||||
<if test="updateApi != null and updateApi != ''"> and update_api = #{updateApi} </if>
|
||||
<if test="addApi != null and addApi != ''"> and add_api = #{addApi} </if>
|
||||
<if test="deleteApi != null and deleteApi != ''"> and delete_api = #{deleteApi} </if>
|
||||
<if test="addType != null and addType != ''"> and add_type = #{addType} </if>
|
||||
<if test="deleteType != null and deleteType != ''"> and delete_type = #{deleteType} </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>
|
||||
|
@ -59,8 +57,7 @@
|
|||
<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="addPlug != null and addPlug != ''"> and add_plug = #{addPlug} </if>
|
||||
<if test="deletePlug != null and deletePlug != ''"> and delete_plug = #{deletePlug} </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>
|
||||
|
@ -74,10 +71,10 @@
|
|||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
|
||||
<if test="updateApi != null and updateApi != ''"> and update_api = #{updateApi} </if>
|
||||
<if test="addApi != null and addApi != ''"> and add_api = #{addApi} </if>
|
||||
<if test="deleteApi != null and deleteApi != ''"> and delete_api = #{deleteApi} </if>
|
||||
<if test="addType != null and addType != ''"> and add_type = #{addType} </if>
|
||||
<if test="deleteType != null and deleteType != ''"> and delete_type = #{deleteType} </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>
|
||||
|
@ -85,8 +82,7 @@
|
|||
<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="addPlug != null and addPlug != ''"> and add_plug = #{addPlug} </if>
|
||||
<if test="deletePlug != null and deletePlug != ''"> and delete_plug = #{deletePlug} </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>
|
||||
|
@ -102,10 +98,10 @@
|
|||
<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="appId != null and appId != ''"> and app_id like concat('%',#{appId},'%') </if>
|
||||
<if test="updateApi != null and updateApi != ''"> and update_api like concat('%',#{updateApi},'%') </if>
|
||||
<if test="addApi != null and addApi != ''"> and add_api like concat('%',#{addApi},'%') </if>
|
||||
<if test="deleteApi != null and deleteApi != ''"> and delete_api like concat('%',#{deleteApi},'%') </if>
|
||||
<if test="addType != null and addType != ''"> and add_type like concat('%',#{addType},'%') </if>
|
||||
<if test="deleteType != null and deleteType != ''"> and delete_type like concat('%',#{deleteType},'%') </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>
|
||||
|
@ -113,8 +109,7 @@
|
|||
<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="addPlug != null and addPlug != ''"> and add_plug like concat('%',#{addPlug},'%') </if>
|
||||
<if test="deletePlug != null and deletePlug != ''"> and delete_plug like concat('%',#{deletePlug},'%') </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>
|
||||
|
@ -130,10 +125,10 @@
|
|||
<if test="id != null and id != ''"> or id = #{id} </if>
|
||||
<if test="mdmId != null and mdmId != ''"> or mdm_id = #{mdmId} </if>
|
||||
<if test="appId != null and appId != ''"> or app_id = #{appId} </if>
|
||||
<if test="updateApi != null and updateApi != ''"> or update_api = #{updateApi} </if>
|
||||
<if test="addApi != null and addApi != ''"> or add_api = #{addApi} </if>
|
||||
<if test="deleteApi != null and deleteApi != ''"> or delete_api = #{deleteApi} </if>
|
||||
<if test="addType != null and addType != ''"> or add_type = #{addType} </if>
|
||||
<if test="deleteType != null and deleteType != ''"> or delete_type = #{deleteType} </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>
|
||||
|
@ -141,8 +136,7 @@
|
|||
<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="addPlug != null and addPlug != ''"> or add_plug = #{addPlug} </if>
|
||||
<if test="deletePlug != null and deletePlug != ''"> or delete_plug = #{deletePlug} </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>
|
||||
|
@ -150,16 +144,16 @@
|
|||
</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>
|
||||
<if test="mdmId != null and mdmId != ''"> mdm_id , </if>
|
||||
<if test="appId != null and appId != ''"> app_id , </if>
|
||||
<if test="updateApi != null and updateApi != ''"> update_api , </if>
|
||||
<if test="addApi != null and addApi != ''"> add_api , </if>
|
||||
<if test="deleteApi != null and deleteApi != ''"> delete_api , </if>
|
||||
<if test="addType != null and addType != ''"> add_type , </if>
|
||||
<if test="deleteType != null and deleteType != ''"> delete_type , </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>
|
||||
|
@ -167,9 +161,7 @@
|
|||
<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="addPlug != null and addPlug != ''"> add_plug , </if>
|
||||
<if test="deletePlug != null and deletePlug != ''"> delete_plug , </if>
|
||||
<if test="sorts == null ">sorts,</if>
|
||||
<if test="companyId != null and companyId != ''"> company_id , </if>
|
||||
<if test="sts == null ">sts,</if>
|
||||
</trim>
|
||||
)values(
|
||||
|
@ -177,10 +169,10 @@
|
|||
<if test="id != null and id != ''"> #{id} ,</if>
|
||||
<if test="mdmId != null and mdmId != ''"> #{mdmId} ,</if>
|
||||
<if test="appId != null and appId != ''"> #{appId} ,</if>
|
||||
<if test="updateApi != null and updateApi != ''"> #{updateApi} ,</if>
|
||||
<if test="addApi != null and addApi != ''"> #{addApi} ,</if>
|
||||
<if test="deleteApi != null and deleteApi != ''"> #{deleteApi} ,</if>
|
||||
<if test="addType != null and addType != ''"> #{addType} ,</if>
|
||||
<if test="deleteType != null and deleteType != ''"> #{deleteType} ,</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>
|
||||
|
@ -188,63 +180,57 @@
|
|||
<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="addPlug != null and addPlug != ''"> #{addPlug} ,</if>
|
||||
<if test="deletePlug != null and deletePlug != ''"> #{deletePlug} ,</if>
|
||||
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from mdm_module_distribute a WHERE a.sts = 'Y' ),</if>
|
||||
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_module_distribute(mdm_id, app_id, add_api, delete_api, add_type, delete_type, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, add_plug, delete_plug, sts)
|
||||
<insert id="entityInsertBatch" >
|
||||
insert into mdm_module_distribute(mdm_id, app_id, update_api, add_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.appId},#{entity.addApi},#{entity.deleteApi},#{entity.addType},#{entity.deleteType},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.addPlug},#{entity.deletePlug}, 'Y')
|
||||
(#{entity.mdmId},#{entity.appId},#{entity.updateApi},#{entity.addApi},#{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" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_module_distribute(mdm_id, app_id, add_api, delete_api, add_type, delete_type, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, add_plug, delete_plug)
|
||||
<insert id="entityInsertOrUpdateBatch" >
|
||||
insert into mdm_module_distribute(mdm_id, app_id, update_api, add_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.appId},#{entity.addApi},#{entity.deleteApi},#{entity.addType},#{entity.deleteType},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.addPlug},#{entity.deletePlug})
|
||||
(#{entity.mdmId},#{entity.appId},#{entity.updateApi},#{entity.addApi},#{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),
|
||||
app_id = values(app_id),
|
||||
update_api = values(update_api),
|
||||
add_api = values(add_api),
|
||||
delete_api = values(delete_api),
|
||||
add_type = values(add_type),
|
||||
delete_type = values(delete_type),
|
||||
sorts = values(sorts),
|
||||
enabled_state = values(enabled_state),
|
||||
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),
|
||||
add_plug = values(add_plug),
|
||||
delete_plug = values(delete_plug)</insert>
|
||||
company_id = values(company_id)</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType = "com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity" >
|
||||
update mdm_module_distribute set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="mdmId != null and mdmId != ''"> mdm_id = #{mdmId},</if>
|
||||
<if test="appId != null and appId != ''"> app_id = #{appId},</if>
|
||||
<if test="updateApi != null and updateApi != ''"> update_api = #{updateApi},</if>
|
||||
<if test="addApi != null and addApi != ''"> add_api = #{addApi},</if>
|
||||
<if test="deleteApi != null and deleteApi != ''"> delete_api = #{deleteApi},</if>
|
||||
<if test="addType != null and addType != ''"> add_type = #{addType},</if>
|
||||
<if test="deleteType != null and deleteType != ''"> delete_type = #{deleteType},</if>
|
||||
<if test="sorts != null"> sorts = #{sorts},</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>
|
||||
<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="addPlug != null and addPlug != ''"> add_plug = #{addPlug},</if>
|
||||
<if test="deletePlug != null and deletePlug != ''"> delete_plug = #{deletePlug},</if>
|
||||
<if test="companyId != null and companyId != ''"> company_id = #{companyId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
@ -260,14 +246,13 @@ update mdm_module_distribute set sts= 'N' ,modify_time = #{modify_time},modify_
|
|||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
|
||||
<if test="updateApi != null and updateApi != ''"> and update_api = #{updateApi} </if>
|
||||
<if test="addApi != null and addApi != ''"> and add_api = #{addApi} </if>
|
||||
<if test="deleteApi != null and deleteApi != ''"> and delete_api = #{deleteApi} </if>
|
||||
<if test="addType != null and addType != ''"> and add_type = #{addType} </if>
|
||||
<if test="deleteType != null and deleteType != ''"> and delete_type = #{deleteType} </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="addPlug != null and addPlug != ''"> and add_plug = #{addPlug} </if>
|
||||
<if test="deletePlug != null and deletePlug != ''"> and delete_plug = #{deletePlug} </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</update>
|
||||
|
|
|
@ -6,7 +6,7 @@ import com.hzya.frame.basedao.service.IBaseService;
|
|||
* 主数据功能应用分发表(MdmModuleDistribute)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-11-06 15:27:42
|
||||
* @since 2024-06-03 08:47:33
|
||||
*/
|
||||
public interface IMdmModuleDistributeService extends IBaseService<MdmModuleDistributeEntity, String>{
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import com.hzya.frame.basedao.service.impl.BaseService;
|
|||
* 主数据功能应用分发表(MdmModuleDistribute)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-11-06 15:27:42
|
||||
* @since 2024-06-03 08:47:33
|
||||
*/
|
||||
@Service(value = "mdmModuleDistributeService")
|
||||
public class MdmModuleDistributeServiceImpl extends BaseService<MdmModuleDistributeEntity, String> implements IMdmModuleDistributeService {
|
||||
|
|
|
@ -7,7 +7,7 @@ import com.hzya.frame.basedao.dao.IBaseDao;
|
|||
* 主数据功能应用分发明细表(mdm_module_distribute_detail: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-11-07 09:11:31
|
||||
* @since 2024-06-03 08:48:18
|
||||
*/
|
||||
public interface IMdmModuleDistributeDetailDao extends IBaseDao<MdmModuleDistributeDetailEntity, String> {
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
|||
* 主数据功能应用分发明细表(MdmModuleDistributeDetail)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-11-07 09:11:31
|
||||
* @since 2024-06-03 08:48:18
|
||||
*/
|
||||
@Repository(value = "MdmModuleDistributeDetailDaoImpl")
|
||||
public class MdmModuleDistributeDetailDaoImpl extends MybatisGenericDao<MdmModuleDistributeDetailEntity, String> implements IMdmModuleDistributeDetailDao{
|
||||
|
|
|
@ -6,7 +6,7 @@ import com.hzya.frame.web.entity.BaseEntity;
|
|||
* 主数据功能应用分发明细表(MdmModuleDistributeDetail)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-11-07 09:11:31
|
||||
* @since 2024-06-03 08:48:18
|
||||
*/
|
||||
public class MdmModuleDistributeDetailEntity extends BaseEntity {
|
||||
|
||||
|
@ -16,24 +16,16 @@ public class MdmModuleDistributeDetailEntity extends BaseEntity {
|
|||
private String distributeId;
|
||||
/** 接口id */
|
||||
private String apiId;
|
||||
/** 源API字段 */
|
||||
private String sourceField;
|
||||
/** 源API字段名 */
|
||||
private String sourceName;
|
||||
/** 目标API字段 */
|
||||
private String targetField;
|
||||
/** 目标API字段名 */
|
||||
private String targetName;
|
||||
/** 数据类型 1、新增2、修改3、删除 */
|
||||
private String dataType;
|
||||
/** 字段名 */
|
||||
private String filedName;
|
||||
/** 对比类型 1、等于 */
|
||||
private String compareType;
|
||||
/** 目标API字段默认值 */
|
||||
private String defaultVaule;
|
||||
/** 源字段层级 */
|
||||
private String sourceFieldPath;
|
||||
/** 目标字段层级 */
|
||||
private String targetFieldPath;
|
||||
private String targetPath;
|
||||
private String sourcePath;
|
||||
/** 连线信息 */
|
||||
private String coordinate;
|
||||
private String filedVaule;
|
||||
/** 公司id */
|
||||
private String companyId;
|
||||
|
||||
|
||||
public String getMdmId() {
|
||||
|
@ -60,84 +52,44 @@ public class MdmModuleDistributeDetailEntity extends BaseEntity {
|
|||
this.apiId = apiId;
|
||||
}
|
||||
|
||||
public String getSourceField() {
|
||||
return sourceField;
|
||||
public String getDataType() {
|
||||
return dataType;
|
||||
}
|
||||
|
||||
public void setSourceField(String sourceField) {
|
||||
this.sourceField = sourceField;
|
||||
public void setDataType(String dataType) {
|
||||
this.dataType = dataType;
|
||||
}
|
||||
|
||||
public String getSourceName() {
|
||||
return sourceName;
|
||||
public String getFiledName() {
|
||||
return filedName;
|
||||
}
|
||||
|
||||
public void setSourceName(String sourceName) {
|
||||
this.sourceName = sourceName;
|
||||
public void setFiledName(String filedName) {
|
||||
this.filedName = filedName;
|
||||
}
|
||||
|
||||
public String getTargetField() {
|
||||
return targetField;
|
||||
public String getCompareType() {
|
||||
return compareType;
|
||||
}
|
||||
|
||||
public void setTargetField(String targetField) {
|
||||
this.targetField = targetField;
|
||||
public void setCompareType(String compareType) {
|
||||
this.compareType = compareType;
|
||||
}
|
||||
|
||||
public String getTargetName() {
|
||||
return targetName;
|
||||
public String getFiledVaule() {
|
||||
return filedVaule;
|
||||
}
|
||||
|
||||
public void setTargetName(String targetName) {
|
||||
this.targetName = targetName;
|
||||
public void setFiledVaule(String filedVaule) {
|
||||
this.filedVaule = filedVaule;
|
||||
}
|
||||
|
||||
public String getDefaultVaule() {
|
||||
return defaultVaule;
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setDefaultVaule(String defaultVaule) {
|
||||
this.defaultVaule = defaultVaule;
|
||||
}
|
||||
|
||||
public String getSourceFieldPath() {
|
||||
return sourceFieldPath;
|
||||
}
|
||||
|
||||
public void setSourceFieldPath(String sourceFieldPath) {
|
||||
this.sourceFieldPath = sourceFieldPath;
|
||||
}
|
||||
|
||||
public String getTargetFieldPath() {
|
||||
return targetFieldPath;
|
||||
}
|
||||
|
||||
public void setTargetFieldPath(String targetFieldPath) {
|
||||
this.targetFieldPath = targetFieldPath;
|
||||
}
|
||||
|
||||
public String getTargetPath() {
|
||||
return targetPath;
|
||||
}
|
||||
|
||||
public void setTargetPath(String targetPath) {
|
||||
this.targetPath = targetPath;
|
||||
}
|
||||
|
||||
public String getSourcePath() {
|
||||
return sourcePath;
|
||||
}
|
||||
|
||||
public void setSourcePath(String sourcePath) {
|
||||
this.sourcePath = sourcePath;
|
||||
}
|
||||
|
||||
public String getCoordinate() {
|
||||
return coordinate;
|
||||
}
|
||||
|
||||
public void setCoordinate(String coordinate) {
|
||||
this.coordinate = coordinate;
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -7,15 +7,10 @@
|
|||
<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="sourceField" column="source_field" jdbcType="VARCHAR"/>
|
||||
<result property="sourceName" column="source_name" jdbcType="VARCHAR"/>
|
||||
<result property="targetField" column="target_field" jdbcType="VARCHAR"/>
|
||||
<result property="targetName" column="target_name" jdbcType="VARCHAR"/>
|
||||
<result property="defaultVaule" column="default_vaule" jdbcType="VARCHAR"/>
|
||||
<result property="sourceFieldPath" column="source_field_path" jdbcType="VARCHAR"/>
|
||||
<result property="targetFieldPath" column="target_field_path" jdbcType="VARCHAR"/>
|
||||
<result property="targetPath" column="target_path" jdbcType="VARCHAR"/>
|
||||
<result property="sourcePath" column="source_path" jdbcType="VARCHAR"/>
|
||||
<result property="dataType" column="data_type" 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="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"/>
|
||||
|
@ -23,7 +18,7 @@
|
|||
<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="coordinate" column="coordinate" jdbcType="VARCHAR"/>
|
||||
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id = "MdmModuleDistributeDetailEntity_Base_Column_List">
|
||||
|
@ -31,15 +26,10 @@
|
|||
,mdm_id
|
||||
,distribute_id
|
||||
,api_id
|
||||
,source_field
|
||||
,source_name
|
||||
,target_field
|
||||
,target_name
|
||||
,default_vaule
|
||||
,source_field_path
|
||||
,target_field_path
|
||||
,target_path
|
||||
,source_path
|
||||
,data_type
|
||||
,filed_name
|
||||
,compare_type
|
||||
,filed_vaule
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
|
@ -47,7 +37,7 @@
|
|||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,coordinate
|
||||
,company_id
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-MdmModuleDistributeDetailEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity">
|
||||
|
@ -59,15 +49,10 @@
|
|||
<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="sourceField != null and sourceField != ''"> and source_field = #{sourceField} </if>
|
||||
<if test="sourceName != null and sourceName != ''"> and source_name = #{sourceName} </if>
|
||||
<if test="targetField != null and targetField != ''"> and target_field = #{targetField} </if>
|
||||
<if test="targetName != null and targetName != ''"> and target_name = #{targetName} </if>
|
||||
<if test="defaultVaule != null and defaultVaule != ''"> and default_vaule = #{defaultVaule} </if>
|
||||
<if test="sourceFieldPath != null and sourceFieldPath != ''"> and source_field_path = #{sourceFieldPath} </if>
|
||||
<if test="targetFieldPath != null and targetFieldPath != ''"> and target_field_path = #{targetFieldPath} </if>
|
||||
<if test="targetPath != null and targetPath != ''"> and target_path = #{targetPath} </if>
|
||||
<if test="sourcePath != null and sourcePath != ''"> and source_path = #{sourcePath} </if>
|
||||
<if test="dataType != null and dataType != ''"> and data_type = #{dataType} </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="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>
|
||||
|
@ -75,7 +60,7 @@
|
|||
<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="coordinate != null and coordinate != ''"> and coordinate = #{coordinate} </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>
|
||||
|
@ -90,15 +75,10 @@
|
|||
<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="sourceField != null and sourceField != ''"> and source_field = #{sourceField} </if>
|
||||
<if test="sourceName != null and sourceName != ''"> and source_name = #{sourceName} </if>
|
||||
<if test="targetField != null and targetField != ''"> and target_field = #{targetField} </if>
|
||||
<if test="targetName != null and targetName != ''"> and target_name = #{targetName} </if>
|
||||
<if test="defaultVaule != null and defaultVaule != ''"> and default_vaule = #{defaultVaule} </if>
|
||||
<if test="sourceFieldPath != null and sourceFieldPath != ''"> and source_field_path = #{sourceFieldPath} </if>
|
||||
<if test="targetFieldPath != null and targetFieldPath != ''"> and target_field_path = #{targetFieldPath} </if>
|
||||
<if test="targetPath != null and targetPath != ''"> and target_path = #{targetPath} </if>
|
||||
<if test="sourcePath != null and sourcePath != ''"> and source_path = #{sourcePath} </if>
|
||||
<if test="dataType != null and dataType != ''"> and data_type = #{dataType} </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="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>
|
||||
|
@ -106,7 +86,7 @@
|
|||
<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="coordinate != null and coordinate != ''"> and coordinate = #{coordinate} </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>
|
||||
|
@ -123,15 +103,10 @@
|
|||
<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="sourceField != null and sourceField != ''"> and source_field like concat('%',#{sourceField},'%') </if>
|
||||
<if test="sourceName != null and sourceName != ''"> and source_name like concat('%',#{sourceName},'%') </if>
|
||||
<if test="targetField != null and targetField != ''"> and target_field like concat('%',#{targetField},'%') </if>
|
||||
<if test="targetName != null and targetName != ''"> and target_name like concat('%',#{targetName},'%') </if>
|
||||
<if test="defaultVaule != null and defaultVaule != ''"> and default_vaule like concat('%',#{defaultVaule},'%') </if>
|
||||
<if test="sourceFieldPath != null and sourceFieldPath != ''"> and source_field_path like concat('%',#{sourceFieldPath},'%') </if>
|
||||
<if test="targetFieldPath != null and targetFieldPath != ''"> and target_field_path like concat('%',#{targetFieldPath},'%') </if>
|
||||
<if test="targetPath != null and targetPath != ''"> and target_path like concat('%',#{targetPath},'%') </if>
|
||||
<if test="sourcePath != null and sourcePath != ''"> and source_path like concat('%',#{sourcePath},'%') </if>
|
||||
<if test="dataType != null and dataType != ''"> and data_type like concat('%',#{dataType},'%') </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="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>
|
||||
|
@ -139,7 +114,7 @@
|
|||
<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="coordinate != null and coordinate != ''"> and coordinate like concat('%',#{coordinate},'%') </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>
|
||||
|
@ -156,15 +131,10 @@
|
|||
<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="sourceField != null and sourceField != ''"> or source_field = #{sourceField} </if>
|
||||
<if test="sourceName != null and sourceName != ''"> or source_name = #{sourceName} </if>
|
||||
<if test="targetField != null and targetField != ''"> or target_field = #{targetField} </if>
|
||||
<if test="targetName != null and targetName != ''"> or target_name = #{targetName} </if>
|
||||
<if test="defaultVaule != null and defaultVaule != ''"> or default_vaule = #{defaultVaule} </if>
|
||||
<if test="sourceFieldPath != null and sourceFieldPath != ''"> or source_field_path = #{sourceFieldPath} </if>
|
||||
<if test="targetFieldPath != null and targetFieldPath != ''"> or target_field_path = #{targetFieldPath} </if>
|
||||
<if test="targetPath != null and targetPath != ''"> or target_path = #{targetPath} </if>
|
||||
<if test="sourcePath != null and sourcePath != ''"> or source_path = #{sourcePath} </if>
|
||||
<if test="dataType != null and dataType != ''"> or data_type = #{dataType} </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="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>
|
||||
|
@ -172,7 +142,7 @@
|
|||
<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="coordinate != null and coordinate != ''"> or coordinate = #{coordinate} </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>
|
||||
|
@ -180,22 +150,17 @@
|
|||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity" keyProperty="id" useGeneratedKeys="true">
|
||||
<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="sourceField != null and sourceField != ''"> source_field , </if>
|
||||
<if test="sourceName != null and sourceName != ''"> source_name , </if>
|
||||
<if test="targetField != null and targetField != ''"> target_field , </if>
|
||||
<if test="targetName != null and targetName != ''"> target_name , </if>
|
||||
<if test="defaultVaule != null and defaultVaule != ''"> default_vaule , </if>
|
||||
<if test="sourceFieldPath != null and sourceFieldPath != ''"> source_field_path , </if>
|
||||
<if test="targetFieldPath != null and targetFieldPath != ''"> target_field_path , </if>
|
||||
<if test="targetPath != null and targetPath != ''"> target_path , </if>
|
||||
<if test="sourcePath != null and sourcePath != ''"> source_path , </if>
|
||||
<if test="dataType != null and dataType != ''"> data_type , </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="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>
|
||||
|
@ -203,8 +168,7 @@
|
|||
<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="coordinate != null and coordinate != ''"> coordinate , </if>
|
||||
<if test="sorts == null ">sorts,</if>
|
||||
<if test="companyId != null and companyId != ''"> company_id , </if>
|
||||
<if test="sts == null ">sts,</if>
|
||||
</trim>
|
||||
)values(
|
||||
|
@ -213,15 +177,10 @@
|
|||
<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="sourceField != null and sourceField != ''"> #{sourceField} ,</if>
|
||||
<if test="sourceName != null and sourceName != ''"> #{sourceName} ,</if>
|
||||
<if test="targetField != null and targetField != ''"> #{targetField} ,</if>
|
||||
<if test="targetName != null and targetName != ''"> #{targetName} ,</if>
|
||||
<if test="defaultVaule != null and defaultVaule != ''"> #{defaultVaule} ,</if>
|
||||
<if test="sourceFieldPath != null and sourceFieldPath != ''"> #{sourceFieldPath} ,</if>
|
||||
<if test="targetFieldPath != null and targetFieldPath != ''"> #{targetFieldPath} ,</if>
|
||||
<if test="targetPath != null and targetPath != ''"> #{targetPath} ,</if>
|
||||
<if test="sourcePath != null and sourcePath != ''"> #{sourcePath} ,</if>
|
||||
<if test="dataType != null and dataType != ''"> #{dataType} ,</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="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>
|
||||
|
@ -229,48 +188,41 @@
|
|||
<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="coordinate != null and coordinate != ''"> #{coordinate} ,</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="companyId != null and companyId != ''"> #{companyId} ,</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_module_distribute_detail(mdm_id, distribute_id, api_id, source_field, source_name, target_field, target_name, default_vaule, source_field_path, target_field_path, target_path, source_path, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, coordinate, sts)
|
||||
<insert id="entityInsertBatch" >
|
||||
insert into mdm_module_distribute_detail(mdm_id, distribute_id, api_id, data_type, filed_name, compare_type, filed_vaule, 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.sourceField},#{entity.sourceName},#{entity.targetField},#{entity.targetName},#{entity.defaultVaule},#{entity.sourceFieldPath},#{entity.targetFieldPath},#{entity.targetPath},#{entity.sourcePath},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.coordinate}, 'Y')
|
||||
(#{entity.mdmId},#{entity.distributeId},#{entity.apiId},#{entity.dataType},#{entity.filedName},#{entity.compareType},#{entity.filedVaule},#{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" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_module_distribute_detail(mdm_id, distribute_id, api_id, source_field, source_name, target_field, target_name, default_vaule, source_field_path, target_field_path, target_path, source_path, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, coordinate)
|
||||
<insert id="entityInsertOrUpdateBatch" >
|
||||
insert into mdm_module_distribute_detail(mdm_id, distribute_id, api_id, data_type, filed_name, compare_type, filed_vaule, 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.sourceField},#{entity.sourceName},#{entity.targetField},#{entity.targetName},#{entity.defaultVaule},#{entity.sourceFieldPath},#{entity.targetFieldPath},#{entity.targetPath},#{entity.sourcePath},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.coordinate})
|
||||
(#{entity.mdmId},#{entity.distributeId},#{entity.apiId},#{entity.dataType},#{entity.filedName},#{entity.compareType},#{entity.filedVaule},#{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),
|
||||
source_field = values(source_field),
|
||||
source_name = values(source_name),
|
||||
target_field = values(target_field),
|
||||
target_name = values(target_name),
|
||||
default_vaule = values(default_vaule),
|
||||
source_field_path = values(source_field_path),
|
||||
target_field_path = values(target_field_path),
|
||||
target_path = values(target_path),
|
||||
source_path = values(source_path),
|
||||
sorts = values(sorts),
|
||||
data_type = values(data_type),
|
||||
filed_name = values(filed_name),
|
||||
compare_type = values(compare_type),
|
||||
filed_vaule = values(filed_vaule),
|
||||
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),
|
||||
coordinate = values(coordinate)</insert>
|
||||
company_id = values(company_id)</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType = "com.hzya.frame.mdm.mdmModuleDistributeDetail.entity.MdmModuleDistributeDetailEntity" >
|
||||
update mdm_module_distribute_detail set
|
||||
|
@ -278,23 +230,17 @@ update mdm_module_distribute_detail set
|
|||
<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="sourceField != null and sourceField != ''"> source_field = #{sourceField},</if>
|
||||
<if test="sourceName != null and sourceName != ''"> source_name = #{sourceName},</if>
|
||||
<if test="targetField != null and targetField != ''"> target_field = #{targetField},</if>
|
||||
<if test="targetName != null and targetName != ''"> target_name = #{targetName},</if>
|
||||
<if test="defaultVaule != null and defaultVaule != ''"> default_vaule = #{defaultVaule},</if>
|
||||
<if test="sourceFieldPath != null and sourceFieldPath != ''"> source_field_path = #{sourceFieldPath},</if>
|
||||
<if test="targetFieldPath != null and targetFieldPath != ''"> target_field_path = #{targetFieldPath},</if>
|
||||
<if test="targetPath != null and targetPath != ''"> target_path = #{targetPath},</if>
|
||||
<if test="sourcePath != null and sourcePath != ''"> source_path = #{sourcePath},</if>
|
||||
<if test="sorts != null"> sorts = #{sorts},</if>
|
||||
<if test="dataType != null and dataType != ''"> data_type = #{dataType},</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="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="coordinate != null and coordinate != ''"> coordinate = #{coordinate},</if>
|
||||
<if test="companyId != null and companyId != ''"> company_id = #{companyId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
@ -311,18 +257,13 @@ update mdm_module_distribute_detail set sts= 'N' ,modify_time = #{modify_time},
|
|||
<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="sourceField != null and sourceField != ''"> and source_field = #{sourceField} </if>
|
||||
<if test="sourceName != null and sourceName != ''"> and source_name = #{sourceName} </if>
|
||||
<if test="targetField != null and targetField != ''"> and target_field = #{targetField} </if>
|
||||
<if test="targetName != null and targetName != ''"> and target_name = #{targetName} </if>
|
||||
<if test="defaultVaule != null and defaultVaule != ''"> and default_vaule = #{defaultVaule} </if>
|
||||
<if test="sourceFieldPath != null and sourceFieldPath != ''"> and source_field_path = #{sourceFieldPath} </if>
|
||||
<if test="targetFieldPath != null and targetFieldPath != ''"> and target_field_path = #{targetFieldPath} </if>
|
||||
<if test="targetPath != null and targetPath != ''"> and target_path = #{targetPath} </if>
|
||||
<if test="sourcePath != null and sourcePath != ''"> and source_path = #{sourcePath} </if>
|
||||
<if test="dataType != null and dataType != ''"> and data_type = #{dataType} </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="sorts != null"> and sorts = #{sorts} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
<if test="coordinate != null and coordinate != ''"> and coordinate = #{coordinate} </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</update>
|
||||
|
|
|
@ -6,7 +6,7 @@ import com.hzya.frame.basedao.service.IBaseService;
|
|||
* 主数据功能应用分发明细表(MdmModuleDistributeDetail)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-11-07 09:11:31
|
||||
* @since 2024-06-03 08:48:18
|
||||
*/
|
||||
public interface IMdmModuleDistributeDetailService extends IBaseService<MdmModuleDistributeDetailEntity, String>{
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import com.hzya.frame.basedao.service.impl.BaseService;
|
|||
* 主数据功能应用分发明细表(MdmModuleDistributeDetail)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-11-07 09:11:31
|
||||
* @since 2024-06-03 08:48:18
|
||||
*/
|
||||
@Service(value = "mdmModuleDistributeDetailService")
|
||||
public class MdmModuleDistributeDetailServiceImpl extends BaseService<MdmModuleDistributeDetailEntity, String> implements IMdmModuleDistributeDetailService {
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
package com.hzya.frame.mdm.mdmModuleRole.dao;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleRole.entity.MdmModuleRoleEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
/**
|
||||
* 主数据功能角色表(mdm_module_role: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-10-17 15:32:25
|
||||
*/
|
||||
public interface IMdmModuleRoleDao extends IBaseDao<MdmModuleRoleEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
package com.hzya.frame.mdm.mdmModuleRole.dao.impl;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleRole.entity.MdmModuleRoleEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleRole.dao.IMdmModuleRoleDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
|
||||
/**
|
||||
* 主数据功能角色表(MdmModuleRole)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-10-17 15:32:25
|
||||
*/
|
||||
@Repository(value = "MdmModuleRoleDaoImpl")
|
||||
public class MdmModuleRoleDaoImpl extends MybatisGenericDao<MdmModuleRoleEntity, String> implements IMdmModuleRoleDao {
|
||||
|
||||
}
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
package com.hzya.frame.mdm.mdmModuleRole.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleRoleButton.entity.MdmModuleRoleButtonEntity;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* 主数据功能角色表(MdmModuleRole)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-10-17 15:32:25
|
||||
*/
|
||||
public class MdmModuleRoleEntity extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主数据模版ID
|
||||
*/
|
||||
private String mdmId;
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
private String roleId;
|
||||
|
||||
//角色按钮
|
||||
private List<MdmModuleRoleButtonEntity> mdmModuleRoleButtonEntities;
|
||||
public String getMdmId() {
|
||||
return mdmId;
|
||||
}
|
||||
|
||||
public void setMdmId(String mdmId) {
|
||||
this.mdmId = mdmId;
|
||||
}
|
||||
|
||||
public String getRoleId() {
|
||||
return roleId;
|
||||
}
|
||||
|
||||
public void setRoleId(String roleId) {
|
||||
this.roleId = roleId;
|
||||
}
|
||||
|
||||
public List<MdmModuleRoleButtonEntity> getMdmModuleRoleButtonEntities() {
|
||||
return mdmModuleRoleButtonEntities;
|
||||
}
|
||||
|
||||
public void setMdmModuleRoleButtonEntities(List<MdmModuleRoleButtonEntity> mdmModuleRoleButtonEntities) {
|
||||
this.mdmModuleRoleButtonEntities = mdmModuleRoleButtonEntities;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,230 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.mdm.mdmModuleRole.dao.impl.MdmModuleRoleDaoImpl">
|
||||
|
||||
<resultMap id="get-MdmModuleRoleEntity-result" type="com.hzya.frame.mdm.mdmModuleRole.entity.MdmModuleRoleEntity">
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
|
||||
<result property="roleId" column="role_id" 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"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id="MdmModuleRoleEntity_Base_Column_List">
|
||||
id
|
||||
,mdm_id
|
||||
,role_id
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-MdmModuleRoleEntity-result"
|
||||
parameterType="com.hzya.frame.mdm.mdmModuleRole.entity.MdmModuleRoleEntity">
|
||||
select
|
||||
<include refid="MdmModuleRoleEntity_Base_Column_List"/>
|
||||
from mdm_module_role
|
||||
<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="roleId != null and roleId != ''">and role_id = #{roleId}</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>
|
||||
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.mdmModuleRole.entity.MdmModuleRoleEntity">
|
||||
select count(1) from mdm_module_role
|
||||
<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="roleId != null and roleId != ''">and role_id = #{roleId}</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>
|
||||
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>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-MdmModuleRoleEntity-result"
|
||||
parameterType="com.hzya.frame.mdm.mdmModuleRole.entity.MdmModuleRoleEntity">
|
||||
select
|
||||
<include refid="MdmModuleRoleEntity_Base_Column_List"/>
|
||||
from mdm_module_role
|
||||
<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="roleId != null and roleId != ''">and role_id like concat('%',#{roleId},'%')</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>
|
||||
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>
|
||||
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="MdmModuleRoleentity_list_or" resultMap="get-MdmModuleRoleEntity-result"
|
||||
parameterType="com.hzya.frame.mdm.mdmModuleRole.entity.MdmModuleRoleEntity">
|
||||
select
|
||||
<include refid="MdmModuleRoleEntity_Base_Column_List"/>
|
||||
from mdm_module_role
|
||||
<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="roleId != null and roleId != ''">or role_id = #{roleId}</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>
|
||||
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>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType="com.hzya.frame.mdm.mdmModuleRole.entity.MdmModuleRoleEntity"
|
||||
keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_module_role(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id ,</if>
|
||||
<if test="mdmId != null and mdmId != ''">mdm_id ,</if>
|
||||
<if test="roleId != null and roleId != ''">role_id ,</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="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="roleId != null and roleId != ''">#{roleId} ,</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="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from mdm_module_role a WHERE a.sts
|
||||
= 'Y' ),
|
||||
</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_module_role(mdm_id, role_id, sorts, create_user_id, create_time, modify_user_id, modify_time,
|
||||
sts, org_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.mdmId},#{entity.roleId},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},
|
||||
'Y')
|
||||
</foreach>
|
||||
</insert>
|
||||
<!-- 批量新增或者修改-->
|
||||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_module_role(mdm_id, role_id, sorts, create_user_id, create_time, modify_user_id, modify_time,
|
||||
sts, org_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.mdmId},#{entity.roleId},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
mdm_id = values(mdm_id),
|
||||
role_id = values(role_id),
|
||||
sorts = values(sorts),
|
||||
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)
|
||||
</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType="com.hzya.frame.mdm.mdmModuleRole.entity.MdmModuleRoleEntity">
|
||||
update mdm_module_role set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="mdmId != null and mdmId != ''">mdm_id = #{mdmId},</if>
|
||||
<if test="roleId != null and roleId != ''">role_id = #{roleId},</if>
|
||||
<if test="sorts != null">sorts = #{sorts},</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>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType="com.hzya.frame.mdm.mdmModuleRole.entity.MdmModuleRoleEntity">
|
||||
update mdm_module_role 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.mdmModuleRole.entity.MdmModuleRoleEntity">
|
||||
update mdm_module_role 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="roleId != null and roleId != ''">and role_id = #{roleId}</if>
|
||||
<if test="sorts != null">and sorts = #{sorts}</if>
|
||||
<if test="sts != null and sts != ''">and sts = #{sts}</if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</update>
|
||||
<!--通过主键删除-->
|
||||
<delete id="entity_delete">
|
||||
delete from mdm_module_role where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
package com.hzya.frame.mdm.mdmModuleRole.service;
|
||||
|
||||
import com.hzya.frame.mdm.mdmModuleRole.entity.MdmModuleRoleEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
|
||||
/**
|
||||
* 主数据功能角色表(MdmModuleRole)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-10-17 15:32:26
|
||||
*/
|
||||
public interface IMdmModuleRoleService extends IBaseService<MdmModuleRoleEntity, String> {
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue