Commit 9b3e5d2e authored by 赵啸非's avatar 赵啸非

修复部分sqlXml生成缺陷

parent cfc36bb1
<template>
<el-form ref="genInfoForm" :model="info" :rules="rules" label-width="200px">
<el-row>
<el-form style="height: 700px; overflow-y: auto; overflow-x: auto" ref="genInfoForm" :model="info" :rules="rules" label-width="200px">
<el-row >
<el-col :span="12">
<el-form-item prop="tplCategory">
<span slot="label">生成模板</span>
......@@ -308,7 +308,6 @@
</el-row>
<el-row v-for="(index) in 3" :key="index" v-show="info.tplCategory == 'sub' || info.tplCategory == 'subone'">
<h4 class="form-header">关联信息</h4>
<el-col :span="12">
<el-form-item>
<span slot="label">
......
ALTER TABLE mortals_xhx_gentable
ADD COLUMN `subTableName3` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '关联子表的表名3' AFTER subTableName;
ALTER TABLE mortals_xhx_gentable
ADD COLUMN `subTableFkName3` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '子表关联的外键名3' AFTER subTableFkName;
ALTER TABLE mortals_xhx_gentable
ADD COLUMN `subTableName2` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '关联子表的表名2' AFTER subTableName;
ALTER TABLE mortals_xhx_gentable
ADD COLUMN `subTableFkName2` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '子表关联的外键名2' AFTER subTableFkName;
ALTER TABLE mortals_xhx_gentable
ADD COLUMN `subTableName1` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '关联子表的表名1' AFTER subTableName;
ALTER TABLE mortals_xhx_gentable
ADD COLUMN `subTableFkName1` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '子表关联的外键名1' AFTER subTableFkName;
package com.mortals.xhx.base.system.gentable.model;
import lombok.Data;
/**
* 代码生成业务实体对象
*
* @author zxfei
* @date 2022-07-04
*/
@Data
public class GentableEntity extends GentableEntityExt {
private static final long serialVersionUID = 1L;
......@@ -23,10 +25,34 @@ public class GentableEntity extends GentableEntityExt {
* 关联子表的表名
*/
private String subTableName;
/**
* 关联子表的表名1
*/
private String subTableName1;
/**
* 关联子表的表名2
*/
private String subTableName2;
/**
* 关联子表的表名3
*/
private String subTableName3;
/**
* 子表关联的外键名
*/
private String subTableFkName;
/**
* 子表关联的外键名1
*/
private String subTableFkName1;
/**
* 子表关联的外键名2
*/
private String subTableFkName2;
/**
* 子表关联的外键名3
*/
private String subTableFkName3;
/**
* 实体类名称
*/
......@@ -76,7 +102,7 @@ public class GentableEntity extends GentableEntityExt {
*/
private String feignAppName;
/**
* vue生成详细页面方式(0,独立页面,1.弹出窗,2.抽屉)
*
*/
private Integer detailShow;
/**
......@@ -107,350 +133,6 @@ public class GentableEntity extends GentableEntityExt {
* 应用id
*/
private Long appId;
public GentableEntity(){}
/**
* 获取 表名称
* @return String
*/
public String getTableName(){
return tableName;
}
/**
* 设置 表名称
* @param tableName
*/
public void setTableName(String tableName){
this.tableName = tableName;
}
/**
* 获取 表描述
* @return String
*/
public String getTableComment(){
return tableComment;
}
/**
* 设置 表描述
* @param tableComment
*/
public void setTableComment(String tableComment){
this.tableComment = tableComment;
}
/**
* 获取 关联子表的表名
* @return String
*/
public String getSubTableName(){
return subTableName;
}
/**
* 设置 关联子表的表名
* @param subTableName
*/
public void setSubTableName(String subTableName){
this.subTableName = subTableName;
}
/**
* 获取 子表关联的外键名
* @return String
*/
public String getSubTableFkName(){
return subTableFkName;
}
/**
* 设置 子表关联的外键名
* @param subTableFkName
*/
public void setSubTableFkName(String subTableFkName){
this.subTableFkName = subTableFkName;
}
/**
* 获取 实体类名称
* @return String
*/
public String getClassName(){
return className;
}
/**
* 设置 实体类名称
* @param className
*/
public void setClassName(String className){
this.className = className;
}
/**
* 获取 使用的模板(crud单表操作 tree树表操作)
* @return String
*/
public String getTplCategory(){
return tplCategory;
}
/**
* 设置 使用的模板(crud单表操作 tree树表操作)
* @param tplCategory
*/
public void setTplCategory(String tplCategory){
this.tplCategory = tplCategory;
}
/**
* 获取 生成包路径
* @return String
*/
public String getPackageName(){
return packageName;
}
/**
* 设置 生成包路径
* @param packageName
*/
public void setPackageName(String packageName){
this.packageName = packageName;
}
/**
* 获取 生成模块名
* @return String
*/
public String getModuleName(){
return moduleName;
}
/**
* 设置 生成模块名
* @param moduleName
*/
public void setModuleName(String moduleName){
this.moduleName = moduleName;
}
/**
* 获取 生成业务名
* @return String
*/
public String getBusinessName(){
return businessName;
}
/**
* 设置 生成业务名
* @param businessName
*/
public void setBusinessName(String businessName){
this.businessName = businessName;
}
/**
* 获取 生成功能名
* @return String
*/
public String getFunctionName(){
return functionName;
}
/**
* 设置 生成功能名
* @param functionName
*/
public void setFunctionName(String functionName){
this.functionName = functionName;
}
/**
* 获取 生成功能作者
* @return String
*/
public String getFunctionAuthor(){
return functionAuthor;
}
/**
* 设置 生成功能作者
* @param functionAuthor
*/
public void setFunctionAuthor(String functionAuthor){
this.functionAuthor = functionAuthor;
}
/**
* 获取 缓存服务方式(0,无,1.静态实体缓存,2.动态实体缓存)
* @return Integer
*/
public Integer getCacheServiceType(){
return cacheServiceType;
}
/**
* 设置 缓存服务方式(0,无,1.静态实体缓存,2.动态实体缓存)
* @param cacheServiceType
*/
public void setCacheServiceType(Integer cacheServiceType){
this.cacheServiceType = cacheServiceType;
}
/**
* 获取 生成代码方式(0.zip压缩包 1.自定义路径)
* @return Integer
*/
public Integer getGenType(){
return genType;
}
/**
* 设置 生成代码方式(0.zip压缩包 1.自定义路径)
* @param genType
*/
public void setGenType(Integer genType){
this.genType = genType;
}
/**
* 获取 分表方式(0.无,1.年,2.月,3.日,4.hash取余)
* @return Integer
*/
public Integer getDividedTableType(){
return dividedTableType;
}
/**
* 设置 分表方式(0.无,1.年,2.月,3.日,4.hash取余)
* @param dividedTableType
*/
public void setDividedTableType(Integer dividedTableType){
this.dividedTableType = dividedTableType;
}
/**
* 获取 是否生成feign结构(0.否,1.是)
* @return Integer
*/
public Integer getGenFeign(){
return genFeign;
}
/**
* 设置 是否生成feign结构(0.否,1.是)
* @param genFeign
*/
public void setGenFeign(Integer genFeign){
this.genFeign = genFeign;
}
/**
* 获取 生成feign接口,消费应用工程名称如(workflow-platform)
* @return String
*/
public String getFeignAppName(){
return feignAppName;
}
/**
* 设置 生成feign接口,消费应用工程名称如(workflow-platform)
* @param feignAppName
*/
public void setFeignAppName(String feignAppName){
this.feignAppName = feignAppName;
}
/**
* 获取 vue生成详细页面方式(0,独立页面,1.弹出窗,2.抽屉)
* @return Integer
*/
public Integer getDetailShow(){
return detailShow;
}
/**
* 设置 vue生成详细页面方式(0,独立页面,1.弹出窗,2.抽屉)
* @param detailShow
*/
public void setDetailShow(Integer detailShow){
this.detailShow = detailShow;
}
/**
* 获取 是否生成对外api结构(0,否,1.是)
* @return Integer
*/
public Integer getGenApi(){
return genApi;
}
/**
* 设置 是否生成对外api结构(0,否,1.是)
* @param genApi
*/
public void setGenApi(Integer genApi){
this.genApi = genApi;
}
/**
* 获取 是否生成前端导入导出代码(0,否,1.是 默认0)
* @return Integer
*/
public Integer getIsGenExport(){
return isGenExport;
}
/**
* 设置 是否生成前端导入导出代码(0,否,1.是 默认0)
* @param isGenExport
*/
public void setIsGenExport(Integer isGenExport){
this.isGenExport = isGenExport;
}
/**
* 获取 是否显示的生成controll mapping(0,否,1.是 默认0)
* @return Integer
*/
public Integer getIsShowControl(){
return isShowControl;
}
/**
* 设置 是否显示的生成controll mapping(0,否,1.是 默认0)
* @param isShowControl
*/
public void setIsShowControl(Integer isShowControl){
this.isShowControl = isShowControl;
}
/**
* 获取 生成路径(不填默认项目路径)
* @return String
*/
public String getGenPath(){
return genPath;
}
/**
* 设置 生成路径(不填默认项目路径)
* @param genPath
*/
public void setGenPath(String genPath){
this.genPath = genPath;
}
/**
* 获取 其它生成选项
* @return String
*/
public String getOptions(){
return options;
}
/**
* 设置 其它生成选项
* @param options
*/
public void setOptions(String options){
this.options = options;
}
/**
* 获取 备注
* @return String
*/
public String getRemark(){
return remark;
}
/**
* 设置 备注
* @param remark
*/
public void setRemark(String remark){
this.remark = remark;
}
/**
* 获取 应用id
* @return Long
*/
public Long getAppId(){
return appId;
}
/**
* 设置 应用id
* @param appId
*/
public void setAppId(Long appId){
this.appId = appId;
}
@Override
public int hashCode() {
return this.getId().hashCode();
......@@ -467,83 +149,36 @@ public class GentableEntity extends GentableEntityExt {
return false;
}
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",tableName:").append(getTableName());
sb.append(",tableComment:").append(getTableComment());
sb.append(",subTableName:").append(getSubTableName());
sb.append(",subTableFkName:").append(getSubTableFkName());
sb.append(",className:").append(getClassName());
sb.append(",tplCategory:").append(getTplCategory());
sb.append(",packageName:").append(getPackageName());
sb.append(",moduleName:").append(getModuleName());
sb.append(",businessName:").append(getBusinessName());
sb.append(",functionName:").append(getFunctionName());
sb.append(",functionAuthor:").append(getFunctionAuthor());
sb.append(",cacheServiceType:").append(getCacheServiceType());
sb.append(",genType:").append(getGenType());
sb.append(",dividedTableType:").append(getDividedTableType());
sb.append(",genFeign:").append(getGenFeign());
sb.append(",feignAppName:").append(getFeignAppName());
sb.append(",detailShow:").append(getDetailShow());
sb.append(",genApi:").append(getGenApi());
sb.append(",isGenExport:").append(getIsGenExport());
sb.append(",isShowControl:").append(getIsShowControl());
sb.append(",genPath:").append(getGenPath());
sb.append(",options:").append(getOptions());
sb.append(",remark:").append(getRemark());
sb.append(",appId:").append(getAppId());
return sb.toString();
}
public void initAttrValue(){
this.tableName = "";
this.tableComment = "";
this.subTableName = null;
this.subTableFkName = null;
this.subTableName = "";
this.subTableName1 = "";
this.subTableName2 = "";
this.subTableName3 = "";
this.subTableFkName = "";
this.subTableFkName1 = "";
this.subTableFkName2 = "";
this.subTableFkName3 = "";
this.className = "";
this.tplCategory = "crud";
this.packageName = null;
this.moduleName = null;
this.businessName = null;
this.functionName = null;
this.functionAuthor = null;
this.cacheServiceType = null;
this.packageName = "";
this.moduleName = "";
this.businessName = "";
this.functionName = "";
this.functionAuthor = "";
this.cacheServiceType = 0;
this.genType = 0;
this.dividedTableType = 0;
this.genFeign = 0;
this.feignAppName = "";
this.detailShow = 2;
this.genApi = null;
this.isGenExport = null;
this.isShowControl = null;
this.detailShow = 0;
this.genApi = 0;
this.isGenExport = 0;
this.isShowControl = 0;
this.genPath = "/";
this.options = null;
this.remark = null;
this.options = "";
this.remark = "";
this.appId = null;
}
}
\ No newline at end of file
......@@ -16,6 +16,34 @@ import java.util.stream.Collectors;
@Data
public class GentableEntityExt extends BaseEntityLong {
/**
* 关联子表的表名
*/
private String subTableName1;
/**
* 子表关联的外键名
*/
private String subTableFkName1;
/**
* 关联子表的表名
*/
private String subTableName2;
/**
* 子表关联的外键名
*/
private String subTableFkName2;
/**
* 关联子表的表名
*/
private String subTableName3;
/**
* 子表关联的外键名
*/
private String subTableFkName3;
/**
* 主键信息
*/
......
......@@ -9,7 +9,13 @@
<result property="tableName" column="tableName" />
<result property="tableComment" column="tableComment" />
<result property="subTableName" column="subTableName" />
<result property="subTableName1" column="subTableName1" />
<result property="subTableName2" column="subTableName2" />
<result property="subTableName3" column="subTableName3" />
<result property="subTableFkName" column="subTableFkName" />
<result property="subTableFkName1" column="subTableFkName1" />
<result property="subTableFkName2" column="subTableFkName2" />
<result property="subTableFkName3" column="subTableFkName3" />
<result property="className" column="className" />
<result property="tplCategory" column="tplCategory" />
<result property="packageName" column="packageName" />
......@@ -34,10 +40,8 @@
<result property="updateUser" column="updateUser" />
<result property="createTime" column="createTime" />
<result property="createUser" column="createUser" />
</resultMap>
<!-- 表所有列 -->
<sql id="_columns">
<trim suffixOverrides="," suffix="">
......@@ -53,9 +57,27 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('subTableName') or colPickMode == 1 and data.containsKey('subTableName')))">
a.subTableName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('subTableName1') or colPickMode == 1 and data.containsKey('subTableName1')))">
a.subTableName1,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('subTableName2') or colPickMode == 1 and data.containsKey('subTableName2')))">
a.subTableName2,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('subTableName3') or colPickMode == 1 and data.containsKey('subTableName3')))">
a.subTableName3,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('subTableFkName') or colPickMode == 1 and data.containsKey('subTableFkName')))">
a.subTableFkName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('subTableFkName1') or colPickMode == 1 and data.containsKey('subTableFkName1')))">
a.subTableFkName1,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('subTableFkName2') or colPickMode == 1 and data.containsKey('subTableFkName2')))">
a.subTableFkName2,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('subTableFkName3') or colPickMode == 1 and data.containsKey('subTableFkName3')))">
a.subTableFkName3,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('className') or colPickMode == 1 and data.containsKey('className')))">
a.className,
</if>
......@@ -133,18 +155,18 @@
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="GentableEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_gentable
(tableName,tableComment,subTableName,subTableFkName,className,tplCategory,packageName,moduleName,businessName,functionName,functionAuthor,cacheServiceType,genType,dividedTableType,genFeign,feignAppName,detailShow,genApi,isGenExport,isShowControl,genPath,options,remark,appId,updateTime,updateUser,createTime,createUser)
(tableName,tableComment,subTableName,subTableName1,subTableName2,subTableName3,subTableFkName,subTableFkName1,subTableFkName2,subTableFkName3,className,tplCategory,packageName,moduleName,businessName,functionName,functionAuthor,cacheServiceType,genType,dividedTableType,genFeign,feignAppName,detailShow,genApi,isGenExport,isShowControl,genPath,options,remark,appId,updateTime,updateUser,createTime,createUser)
VALUES
(#{tableName},#{tableComment},#{subTableName},#{subTableFkName},#{className},#{tplCategory},#{packageName},#{moduleName},#{businessName},#{functionName},#{functionAuthor},#{cacheServiceType},#{genType},#{dividedTableType},#{genFeign},#{feignAppName},#{detailShow},#{genApi},#{isGenExport},#{isShowControl},#{genPath},#{options},#{remark},#{appId},#{updateTime},#{updateUser},#{createTime},#{createUser})
(#{tableName},#{tableComment},#{subTableName},#{subTableName1},#{subTableName2},#{subTableName3},#{subTableFkName},#{subTableFkName1},#{subTableFkName2},#{subTableFkName3},#{className},#{tplCategory},#{packageName},#{moduleName},#{businessName},#{functionName},#{functionAuthor},#{cacheServiceType},#{genType},#{dividedTableType},#{genFeign},#{feignAppName},#{detailShow},#{genApi},#{isGenExport},#{isShowControl},#{genPath},#{options},#{remark},#{appId},#{updateTime},#{updateUser},#{createTime},#{createUser})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_gentable
(tableName,tableComment,subTableName,subTableFkName,className,tplCategory,packageName,moduleName,businessName,functionName,functionAuthor,cacheServiceType,genType,dividedTableType,genFeign,feignAppName,detailShow,genApi,isGenExport,isShowControl,genPath,options,remark,appId,updateTime,updateUser,createTime,createUser)
(tableName,tableComment,subTableName,subTableName1,subTableName2,subTableName3,subTableFkName,subTableFkName1,subTableFkName2,subTableFkName3,className,tplCategory,packageName,moduleName,businessName,functionName,functionAuthor,cacheServiceType,genType,dividedTableType,genFeign,feignAppName,detailShow,genApi,isGenExport,isShowControl,genPath,options,remark,appId,updateTime,updateUser,createTime,createUser)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.tableName},#{item.tableComment},#{item.subTableName},#{item.subTableFkName},#{item.className},#{item.tplCategory},#{item.packageName},#{item.moduleName},#{item.businessName},#{item.functionName},#{item.functionAuthor},#{item.cacheServiceType},#{item.genType},#{item.dividedTableType},#{item.genFeign},#{item.feignAppName},#{item.detailShow},#{item.genApi},#{item.isGenExport},#{item.isShowControl},#{item.genPath},#{item.options},#{item.remark},#{item.appId},#{item.updateTime},#{item.updateUser},#{item.createTime},#{item.createUser})
(#{item.tableName},#{item.tableComment},#{item.subTableName},#{item.subTableName1},#{item.subTableName2},#{item.subTableName3},#{item.subTableFkName},#{item.subTableFkName1},#{item.subTableFkName2},#{item.subTableFkName3},#{item.className},#{item.tplCategory},#{item.packageName},#{item.moduleName},#{item.businessName},#{item.functionName},#{item.functionAuthor},#{item.cacheServiceType},#{item.genType},#{item.dividedTableType},#{item.genFeign},#{item.feignAppName},#{item.detailShow},#{item.genApi},#{item.isGenExport},#{item.isShowControl},#{item.genPath},#{item.options},#{item.remark},#{item.appId},#{item.updateTime},#{item.updateUser},#{item.createTime},#{item.createUser})
</foreach>
</insert>
......@@ -163,9 +185,27 @@
<if test="(colPickMode==0 and data.containsKey('subTableName')) or (colPickMode==1 and !data.containsKey('subTableName'))">
a.subTableName=#{data.subTableName},
</if>
<if test="(colPickMode==0 and data.containsKey('subTableName1')) or (colPickMode==1 and !data.containsKey('subTableName1'))">
a.subTableName1=#{data.subTableName1},
</if>
<if test="(colPickMode==0 and data.containsKey('subTableName2')) or (colPickMode==1 and !data.containsKey('subTableName2'))">
a.subTableName2=#{data.subTableName2},
</if>
<if test="(colPickMode==0 and data.containsKey('subTableName3')) or (colPickMode==1 and !data.containsKey('subTableName3'))">
a.subTableName3=#{data.subTableName3},
</if>
<if test="(colPickMode==0 and data.containsKey('subTableFkName')) or (colPickMode==1 and !data.containsKey('subTableFkName'))">
a.subTableFkName=#{data.subTableFkName},
</if>
<if test="(colPickMode==0 and data.containsKey('subTableFkName1')) or (colPickMode==1 and !data.containsKey('subTableFkName1'))">
a.subTableFkName1=#{data.subTableFkName1},
</if>
<if test="(colPickMode==0 and data.containsKey('subTableFkName2')) or (colPickMode==1 and !data.containsKey('subTableFkName2'))">
a.subTableFkName2=#{data.subTableFkName2},
</if>
<if test="(colPickMode==0 and data.containsKey('subTableFkName3')) or (colPickMode==1 and !data.containsKey('subTableFkName3'))">
a.subTableFkName3=#{data.subTableFkName3},
</if>
<if test="(colPickMode==0 and data.containsKey('className')) or (colPickMode==1 and !data.containsKey('className'))">
a.className=#{data.className},
</if>
......@@ -298,6 +338,27 @@
</if>
</foreach>
</trim>
<trim prefix="subTableName1=(case" suffix="ELSE subTableName1 end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('subTableName1')) or (colPickMode==1 and !item.containsKey('subTableName1'))">
when a.id=#{item.id} then #{item.subTableName1}
</if>
</foreach>
</trim>
<trim prefix="subTableName2=(case" suffix="ELSE subTableName2 end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('subTableName2')) or (colPickMode==1 and !item.containsKey('subTableName2'))">
when a.id=#{item.id} then #{item.subTableName2}
</if>
</foreach>
</trim>
<trim prefix="subTableName3=(case" suffix="ELSE subTableName3 end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('subTableName3')) or (colPickMode==1 and !item.containsKey('subTableName3'))">
when a.id=#{item.id} then #{item.subTableName3}
</if>
</foreach>
</trim>
<trim prefix="subTableFkName=(case" suffix="ELSE subTableFkName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('subTableFkName')) or (colPickMode==1 and !item.containsKey('subTableFkName'))">
......@@ -305,6 +366,27 @@
</if>
</foreach>
</trim>
<trim prefix="subTableFkName1=(case" suffix="ELSE subTableFkName1 end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('subTableFkName1')) or (colPickMode==1 and !item.containsKey('subTableFkName1'))">
when a.id=#{item.id} then #{item.subTableFkName1}
</if>
</foreach>
</trim>
<trim prefix="subTableFkName2=(case" suffix="ELSE subTableFkName2 end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('subTableFkName2')) or (colPickMode==1 and !item.containsKey('subTableFkName2'))">
when a.id=#{item.id} then #{item.subTableFkName2}
</if>
</foreach>
</trim>
<trim prefix="subTableFkName3=(case" suffix="ELSE subTableFkName3 end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('subTableFkName3')) or (colPickMode==1 and !item.containsKey('subTableFkName3'))">
when a.id=#{item.id} then #{item.subTableFkName3}
</if>
</foreach>
</trim>
<trim prefix="className=(case" suffix="ELSE className end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('className')) or (colPickMode==1 and !item.containsKey('className'))">
......@@ -532,7 +614,7 @@
</select>
<!-- 根据主健删除 -->
<delete id="deleteByKey" parameterType="paramDto">
delete a.* from mortals_xhx_gentable as a where a.id=#{condition.id}
delete from mortals_xhx_gentable where id=#{condition.id}
</delete>
<!-- 根据主健删除一批,针对单一主健有效 -->
<delete id="deleteByKeys">
......@@ -541,6 +623,21 @@
#{item}
</foreach>
</delete>
<!-- 根据主健列表删除一批,针对单一主健有效 -->
<delete id="deleteByKeyList">
delete from mortals_xhx_gentable where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 根据对象列表删除一批,针对单一主健有效 -->
<delete id="deleteByEntityList">
delete from mortals_xhx_gentable where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item.id}
</foreach>
</delete>
<!-- 根据paramDto删除一批 -->
<delete id="deleteByMap" parameterType="paramDto">
delete a.* from mortals_xhx_gentable as a
......@@ -614,6 +711,10 @@
<!-- 条件映射-代参数 -->
<sql id="_condition_param_">
<bind name="conditionParamRef" value="${_conditionParam_}"/>
<if test="permissionSql != null and permissionSql != ''">
${permissionSql}
</if>
<if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null">
${_conditionType_} a.id=#{${_conditionParam_}.id}
......@@ -627,12 +728,18 @@
${_conditionType_} a.id is null
</if>
</if>
<if test="conditionParamRef.containsKey('idList')">
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
${_conditionType_} a.id in
<foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('idNotList') and conditionParamRef.idNotList.size() > 0">
${_conditionType_} a.id not in
<foreach collection="conditionParamRef.idNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('idStart') and conditionParamRef.idStart != null">
${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart}
</if>
......@@ -649,12 +756,18 @@
${_conditionType_} a.tableName is null
</if>
</if>
<if test="conditionParamRef.containsKey('tableNameList')">
<if test="conditionParamRef.containsKey('tableNameList') and conditionParamRef.tableNameList.size() > 0">
${_conditionType_} a.tableName in
<foreach collection="conditionParamRef.tableNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('tableNameNotList') and conditionParamRef.tableNameNotList.size() > 0">
${_conditionType_} a.tableName not in
<foreach collection="conditionParamRef.tableNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('tableComment')">
<if test="conditionParamRef.tableComment != null and conditionParamRef.tableComment != ''">
......@@ -664,12 +777,18 @@
${_conditionType_} a.tableComment is null
</if>
</if>
<if test="conditionParamRef.containsKey('tableCommentList')">
<if test="conditionParamRef.containsKey('tableCommentList') and conditionParamRef.tableCommentList.size() > 0">
${_conditionType_} a.tableComment in
<foreach collection="conditionParamRef.tableCommentList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('tableCommentNotList') and conditionParamRef.tableCommentNotList.size() > 0">
${_conditionType_} a.tableComment not in
<foreach collection="conditionParamRef.tableCommentNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('subTableName')">
<if test="conditionParamRef.subTableName != null and conditionParamRef.subTableName != ''">
......@@ -679,12 +798,81 @@
${_conditionType_} a.subTableName is null
</if>
</if>
<if test="conditionParamRef.containsKey('subTableNameList')">
<if test="conditionParamRef.containsKey('subTableNameList') and conditionParamRef.subTableNameList.size() > 0">
${_conditionType_} a.subTableName in
<foreach collection="conditionParamRef.subTableNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('subTableNameNotList') and conditionParamRef.subTableNameNotList.size() > 0">
${_conditionType_} a.subTableName not in
<foreach collection="conditionParamRef.subTableNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('subTableName1')">
<if test="conditionParamRef.subTableName1 != null and conditionParamRef.subTableName1 != ''">
${_conditionType_} a.subTableName1 like #{${_conditionParam_}.subTableName1}
</if>
<if test="conditionParamRef.subTableName1 == null">
${_conditionType_} a.subTableName1 is null
</if>
</if>
<if test="conditionParamRef.containsKey('subTableName1List') and conditionParamRef.subTableName1List.size() > 0">
${_conditionType_} a.subTableName1 in
<foreach collection="conditionParamRef.subTableName1List" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('subTableName1NotList') and conditionParamRef.subTableName1NotList.size() > 0">
${_conditionType_} a.subTableName1 not in
<foreach collection="conditionParamRef.subTableName1NotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('subTableName2')">
<if test="conditionParamRef.subTableName2 != null and conditionParamRef.subTableName2 != ''">
${_conditionType_} a.subTableName2 like #{${_conditionParam_}.subTableName2}
</if>
<if test="conditionParamRef.subTableName2 == null">
${_conditionType_} a.subTableName2 is null
</if>
</if>
<if test="conditionParamRef.containsKey('subTableName2List') and conditionParamRef.subTableName2List.size() > 0">
${_conditionType_} a.subTableName2 in
<foreach collection="conditionParamRef.subTableName2List" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('subTableName2NotList') and conditionParamRef.subTableName2NotList.size() > 0">
${_conditionType_} a.subTableName2 not in
<foreach collection="conditionParamRef.subTableName2NotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('subTableName3')">
<if test="conditionParamRef.subTableName3 != null and conditionParamRef.subTableName3 != ''">
${_conditionType_} a.subTableName3 like #{${_conditionParam_}.subTableName3}
</if>
<if test="conditionParamRef.subTableName3 == null">
${_conditionType_} a.subTableName3 is null
</if>
</if>
<if test="conditionParamRef.containsKey('subTableName3List') and conditionParamRef.subTableName3List.size() > 0">
${_conditionType_} a.subTableName3 in
<foreach collection="conditionParamRef.subTableName3List" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('subTableName3NotList') and conditionParamRef.subTableName3NotList.size() > 0">
${_conditionType_} a.subTableName3 not in
<foreach collection="conditionParamRef.subTableName3NotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('subTableFkName')">
<if test="conditionParamRef.subTableFkName != null and conditionParamRef.subTableFkName != ''">
......@@ -694,12 +882,81 @@
${_conditionType_} a.subTableFkName is null
</if>
</if>
<if test="conditionParamRef.containsKey('subTableFkNameList')">
<if test="conditionParamRef.containsKey('subTableFkNameList') and conditionParamRef.subTableFkNameList.size() > 0">
${_conditionType_} a.subTableFkName in
<foreach collection="conditionParamRef.subTableFkNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('subTableFkNameNotList') and conditionParamRef.subTableFkNameNotList.size() > 0">
${_conditionType_} a.subTableFkName not in
<foreach collection="conditionParamRef.subTableFkNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('subTableFkName1')">
<if test="conditionParamRef.subTableFkName1 != null and conditionParamRef.subTableFkName1 != ''">
${_conditionType_} a.subTableFkName1 like #{${_conditionParam_}.subTableFkName1}
</if>
<if test="conditionParamRef.subTableFkName1 == null">
${_conditionType_} a.subTableFkName1 is null
</if>
</if>
<if test="conditionParamRef.containsKey('subTableFkName1List') and conditionParamRef.subTableFkName1List.size() > 0">
${_conditionType_} a.subTableFkName1 in
<foreach collection="conditionParamRef.subTableFkName1List" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('subTableFkName1NotList') and conditionParamRef.subTableFkName1NotList.size() > 0">
${_conditionType_} a.subTableFkName1 not in
<foreach collection="conditionParamRef.subTableFkName1NotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('subTableFkName2')">
<if test="conditionParamRef.subTableFkName2 != null and conditionParamRef.subTableFkName2 != ''">
${_conditionType_} a.subTableFkName2 like #{${_conditionParam_}.subTableFkName2}
</if>
<if test="conditionParamRef.subTableFkName2 == null">
${_conditionType_} a.subTableFkName2 is null
</if>
</if>
<if test="conditionParamRef.containsKey('subTableFkName2List') and conditionParamRef.subTableFkName2List.size() > 0">
${_conditionType_} a.subTableFkName2 in
<foreach collection="conditionParamRef.subTableFkName2List" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('subTableFkName2NotList') and conditionParamRef.subTableFkName2NotList.size() > 0">
${_conditionType_} a.subTableFkName2 not in
<foreach collection="conditionParamRef.subTableFkName2NotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('subTableFkName3')">
<if test="conditionParamRef.subTableFkName3 != null and conditionParamRef.subTableFkName3 != ''">
${_conditionType_} a.subTableFkName3 like #{${_conditionParam_}.subTableFkName3}
</if>
<if test="conditionParamRef.subTableFkName3 == null">
${_conditionType_} a.subTableFkName3 is null
</if>
</if>
<if test="conditionParamRef.containsKey('subTableFkName3List') and conditionParamRef.subTableFkName3List.size() > 0">
${_conditionType_} a.subTableFkName3 in
<foreach collection="conditionParamRef.subTableFkName3List" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('subTableFkName3NotList') and conditionParamRef.subTableFkName3NotList.size() > 0">
${_conditionType_} a.subTableFkName3 not in
<foreach collection="conditionParamRef.subTableFkName3NotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('className')">
<if test="conditionParamRef.className != null and conditionParamRef.className != ''">
......@@ -709,12 +966,18 @@
${_conditionType_} a.className is null
</if>
</if>
<if test="conditionParamRef.containsKey('classNameList')">
<if test="conditionParamRef.containsKey('classNameList') and conditionParamRef.classNameList.size() > 0">
${_conditionType_} a.className in
<foreach collection="conditionParamRef.classNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('classNameNotList') and conditionParamRef.classNameNotList.size() > 0">
${_conditionType_} a.className not in
<foreach collection="conditionParamRef.classNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('tplCategory')">
<if test="conditionParamRef.tplCategory != null and conditionParamRef.tplCategory != ''">
......@@ -724,12 +987,18 @@
${_conditionType_} a.tplCategory is null
</if>
</if>
<if test="conditionParamRef.containsKey('tplCategoryList')">
<if test="conditionParamRef.containsKey('tplCategoryList') and conditionParamRef.tplCategoryList.size() > 0">
${_conditionType_} a.tplCategory in
<foreach collection="conditionParamRef.tplCategoryList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('tplCategoryNotList') and conditionParamRef.tplCategoryNotList.size() > 0">
${_conditionType_} a.tplCategory not in
<foreach collection="conditionParamRef.tplCategoryNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('packageName')">
<if test="conditionParamRef.packageName != null and conditionParamRef.packageName != ''">
......@@ -739,12 +1008,18 @@
${_conditionType_} a.packageName is null
</if>
</if>
<if test="conditionParamRef.containsKey('packageNameList')">
<if test="conditionParamRef.containsKey('packageNameList') and conditionParamRef.packageNameList.size() > 0">
${_conditionType_} a.packageName in
<foreach collection="conditionParamRef.packageNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('packageNameNotList') and conditionParamRef.packageNameNotList.size() > 0">
${_conditionType_} a.packageName not in
<foreach collection="conditionParamRef.packageNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('moduleName')">
<if test="conditionParamRef.moduleName != null and conditionParamRef.moduleName != ''">
......@@ -754,12 +1029,18 @@
${_conditionType_} a.moduleName is null
</if>
</if>
<if test="conditionParamRef.containsKey('moduleNameList')">
<if test="conditionParamRef.containsKey('moduleNameList') and conditionParamRef.moduleNameList.size() > 0">
${_conditionType_} a.moduleName in
<foreach collection="conditionParamRef.moduleNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('moduleNameNotList') and conditionParamRef.moduleNameNotList.size() > 0">
${_conditionType_} a.moduleName not in
<foreach collection="conditionParamRef.moduleNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('businessName')">
<if test="conditionParamRef.businessName != null and conditionParamRef.businessName != ''">
......@@ -769,12 +1050,18 @@
${_conditionType_} a.businessName is null
</if>
</if>
<if test="conditionParamRef.containsKey('businessNameList')">
<if test="conditionParamRef.containsKey('businessNameList') and conditionParamRef.businessNameList.size() > 0">
${_conditionType_} a.businessName in
<foreach collection="conditionParamRef.businessNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('businessNameNotList') and conditionParamRef.businessNameNotList.size() > 0">
${_conditionType_} a.businessName not in
<foreach collection="conditionParamRef.businessNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('functionName')">
<if test="conditionParamRef.functionName != null and conditionParamRef.functionName != ''">
......@@ -784,12 +1071,18 @@
${_conditionType_} a.functionName is null
</if>
</if>
<if test="conditionParamRef.containsKey('functionNameList')">
<if test="conditionParamRef.containsKey('functionNameList') and conditionParamRef.functionNameList.size() > 0">
${_conditionType_} a.functionName in
<foreach collection="conditionParamRef.functionNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('functionNameNotList') and conditionParamRef.functionNameNotList.size() > 0">
${_conditionType_} a.functionName not in
<foreach collection="conditionParamRef.functionNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('functionAuthor')">
<if test="conditionParamRef.functionAuthor != null and conditionParamRef.functionAuthor != ''">
......@@ -799,12 +1092,18 @@
${_conditionType_} a.functionAuthor is null
</if>
</if>
<if test="conditionParamRef.containsKey('functionAuthorList')">
<if test="conditionParamRef.containsKey('functionAuthorList') and conditionParamRef.functionAuthorList.size() > 0">
${_conditionType_} a.functionAuthor in
<foreach collection="conditionParamRef.functionAuthorList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('functionAuthorNotList') and conditionParamRef.functionAuthorNotList.size() > 0">
${_conditionType_} a.functionAuthor not in
<foreach collection="conditionParamRef.functionAuthorNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('cacheServiceType')">
<if test="conditionParamRef.cacheServiceType != null ">
${_conditionType_} a.cacheServiceType = #{${_conditionParam_}.cacheServiceType}
......@@ -813,12 +1112,18 @@
${_conditionType_} a.cacheServiceType is null
</if>
</if>
<if test="conditionParamRef.containsKey('cacheServiceTypeList')">
<if test="conditionParamRef.containsKey('cacheServiceTypeList') and conditionParamRef.cacheServiceTypeList.size() > 0">
${_conditionType_} a.cacheServiceType in
<foreach collection="conditionParamRef.cacheServiceTypeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('cacheServiceTypeNotList') and conditionParamRef.cacheServiceTypeNotList.size() > 0">
${_conditionType_} a.cacheServiceType not in
<foreach collection="conditionParamRef.cacheServiceTypeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('cacheServiceTypeStart') and conditionParamRef.cacheServiceTypeStart != null">
${_conditionType_} a.cacheServiceType <![CDATA[ >= ]]> #{${_conditionParam_}.cacheServiceTypeStart}
</if>
......@@ -834,12 +1139,18 @@
${_conditionType_} a.genType is null
</if>
</if>
<if test="conditionParamRef.containsKey('genTypeList')">
<if test="conditionParamRef.containsKey('genTypeList') and conditionParamRef.genTypeList.size() > 0">
${_conditionType_} a.genType in
<foreach collection="conditionParamRef.genTypeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('genTypeNotList') and conditionParamRef.genTypeNotList.size() > 0">
${_conditionType_} a.genType not in
<foreach collection="conditionParamRef.genTypeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('genTypeStart') and conditionParamRef.genTypeStart != null">
${_conditionType_} a.genType <![CDATA[ >= ]]> #{${_conditionParam_}.genTypeStart}
</if>
......@@ -855,12 +1166,18 @@
${_conditionType_} a.dividedTableType is null
</if>
</if>
<if test="conditionParamRef.containsKey('dividedTableTypeList')">
<if test="conditionParamRef.containsKey('dividedTableTypeList') and conditionParamRef.dividedTableTypeList.size() > 0">
${_conditionType_} a.dividedTableType in
<foreach collection="conditionParamRef.dividedTableTypeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('dividedTableTypeNotList') and conditionParamRef.dividedTableTypeNotList.size() > 0">
${_conditionType_} a.dividedTableType not in
<foreach collection="conditionParamRef.dividedTableTypeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('dividedTableTypeStart') and conditionParamRef.dividedTableTypeStart != null">
${_conditionType_} a.dividedTableType <![CDATA[ >= ]]> #{${_conditionParam_}.dividedTableTypeStart}
</if>
......@@ -876,12 +1193,18 @@
${_conditionType_} a.genFeign is null
</if>
</if>
<if test="conditionParamRef.containsKey('genFeignList')">
<if test="conditionParamRef.containsKey('genFeignList') and conditionParamRef.genFeignList.size() > 0">
${_conditionType_} a.genFeign in
<foreach collection="conditionParamRef.genFeignList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('genFeignNotList') and conditionParamRef.genFeignNotList.size() > 0">
${_conditionType_} a.genFeign not in
<foreach collection="conditionParamRef.genFeignNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('genFeignStart') and conditionParamRef.genFeignStart != null">
${_conditionType_} a.genFeign <![CDATA[ >= ]]> #{${_conditionParam_}.genFeignStart}
</if>
......@@ -898,12 +1221,18 @@
${_conditionType_} a.feignAppName is null
</if>
</if>
<if test="conditionParamRef.containsKey('feignAppNameList')">
<if test="conditionParamRef.containsKey('feignAppNameList') and conditionParamRef.feignAppNameList.size() > 0">
${_conditionType_} a.feignAppName in
<foreach collection="conditionParamRef.feignAppNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('feignAppNameNotList') and conditionParamRef.feignAppNameNotList.size() > 0">
${_conditionType_} a.feignAppName not in
<foreach collection="conditionParamRef.feignAppNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('detailShow')">
<if test="conditionParamRef.detailShow != null ">
${_conditionType_} a.detailShow = #{${_conditionParam_}.detailShow}
......@@ -912,12 +1241,18 @@
${_conditionType_} a.detailShow is null
</if>
</if>
<if test="conditionParamRef.containsKey('detailShowList')">
<if test="conditionParamRef.containsKey('detailShowList') and conditionParamRef.detailShowList.size() > 0">
${_conditionType_} a.detailShow in
<foreach collection="conditionParamRef.detailShowList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('detailShowNotList') and conditionParamRef.detailShowNotList.size() > 0">
${_conditionType_} a.detailShow not in
<foreach collection="conditionParamRef.detailShowNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('detailShowStart') and conditionParamRef.detailShowStart != null">
${_conditionType_} a.detailShow <![CDATA[ >= ]]> #{${_conditionParam_}.detailShowStart}
</if>
......@@ -933,12 +1268,18 @@
${_conditionType_} a.genApi is null
</if>
</if>
<if test="conditionParamRef.containsKey('genApiList')">
<if test="conditionParamRef.containsKey('genApiList') and conditionParamRef.genApiList.size() > 0">
${_conditionType_} a.genApi in
<foreach collection="conditionParamRef.genApiList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('genApiNotList') and conditionParamRef.genApiNotList.size() > 0">
${_conditionType_} a.genApi not in
<foreach collection="conditionParamRef.genApiNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('genApiStart') and conditionParamRef.genApiStart != null">
${_conditionType_} a.genApi <![CDATA[ >= ]]> #{${_conditionParam_}.genApiStart}
</if>
......@@ -954,12 +1295,18 @@
${_conditionType_} a.isGenExport is null
</if>
</if>
<if test="conditionParamRef.containsKey('isGenExportList')">
<if test="conditionParamRef.containsKey('isGenExportList') and conditionParamRef.isGenExportList.size() > 0">
${_conditionType_} a.isGenExport in
<foreach collection="conditionParamRef.isGenExportList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('isGenExportNotList') and conditionParamRef.isGenExportNotList.size() > 0">
${_conditionType_} a.isGenExport not in
<foreach collection="conditionParamRef.isGenExportNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('isGenExportStart') and conditionParamRef.isGenExportStart != null">
${_conditionType_} a.isGenExport <![CDATA[ >= ]]> #{${_conditionParam_}.isGenExportStart}
</if>
......@@ -975,12 +1322,18 @@
${_conditionType_} a.isShowControl is null
</if>
</if>
<if test="conditionParamRef.containsKey('isShowControlList')">
<if test="conditionParamRef.containsKey('isShowControlList') and conditionParamRef.isShowControlList.size() > 0">
${_conditionType_} a.isShowControl in
<foreach collection="conditionParamRef.isShowControlList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('isShowControlNotList') and conditionParamRef.isShowControlNotList.size() > 0">
${_conditionType_} a.isShowControl not in
<foreach collection="conditionParamRef.isShowControlNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('isShowControlStart') and conditionParamRef.isShowControlStart != null">
${_conditionType_} a.isShowControl <![CDATA[ >= ]]> #{${_conditionParam_}.isShowControlStart}
</if>
......@@ -997,12 +1350,18 @@
${_conditionType_} a.genPath is null
</if>
</if>
<if test="conditionParamRef.containsKey('genPathList')">
<if test="conditionParamRef.containsKey('genPathList') and conditionParamRef.genPathList.size() > 0">
${_conditionType_} a.genPath in
<foreach collection="conditionParamRef.genPathList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('genPathNotList') and conditionParamRef.genPathNotList.size() > 0">
${_conditionType_} a.genPath not in
<foreach collection="conditionParamRef.genPathNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('options')">
<if test="conditionParamRef.options != null and conditionParamRef.options != ''">
......@@ -1012,12 +1371,18 @@
${_conditionType_} a.options is null
</if>
</if>
<if test="conditionParamRef.containsKey('optionsList')">
<if test="conditionParamRef.containsKey('optionsList') and conditionParamRef.optionsList.size() > 0">
${_conditionType_} a.options in
<foreach collection="conditionParamRef.optionsList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('optionsNotList') and conditionParamRef.optionsNotList.size() > 0">
${_conditionType_} a.options not in
<foreach collection="conditionParamRef.optionsNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('remark')">
<if test="conditionParamRef.remark != null and conditionParamRef.remark != ''">
......@@ -1027,12 +1392,18 @@
${_conditionType_} a.remark is null
</if>
</if>
<if test="conditionParamRef.containsKey('remarkList')">
<if test="conditionParamRef.containsKey('remarkList') and conditionParamRef.remarkList.size() > 0">
${_conditionType_} a.remark in
<foreach collection="conditionParamRef.remarkList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('remarkNotList') and conditionParamRef.remarkNotList.size() > 0">
${_conditionType_} a.remark not in
<foreach collection="conditionParamRef.remarkNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('appId')">
<if test="conditionParamRef.appId != null ">
${_conditionType_} a.appId = #{${_conditionParam_}.appId}
......@@ -1041,12 +1412,18 @@
${_conditionType_} a.appId is null
</if>
</if>
<if test="conditionParamRef.containsKey('appIdList')">
<if test="conditionParamRef.containsKey('appIdList') and conditionParamRef.appIdList.size() > 0">
${_conditionType_} a.appId in
<foreach collection="conditionParamRef.appIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('appIdNotList') and conditionParamRef.appIdNotList.size() > 0">
${_conditionType_} a.appId not in
<foreach collection="conditionParamRef.appIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('appIdStart') and conditionParamRef.appIdStart != null">
${_conditionType_} a.appId <![CDATA[ >= ]]> #{${_conditionParam_}.appIdStart}
</if>
......@@ -1078,12 +1455,18 @@
${_conditionType_} a.updateUser is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateUserList')">
<if test="conditionParamRef.containsKey('updateUserList') and conditionParamRef.updateUserList.size() > 0">
${_conditionType_} a.updateUser in
<foreach collection="conditionParamRef.updateUserList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('updateUserNotList') and conditionParamRef.updateUserNotList.size() > 0">
${_conditionType_} a.updateUser not in
<foreach collection="conditionParamRef.updateUserNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createTime')">
<if test="conditionParamRef.createTime != null ">
......@@ -1108,24 +1491,171 @@
${_conditionType_} a.createUser is null
</if>
</if>
<if test="conditionParamRef.containsKey('createUserList')">
<if test="conditionParamRef.containsKey('createUserList') and conditionParamRef.createUserList.size() > 0">
${_conditionType_} a.createUser in
<foreach collection="conditionParamRef.createUserList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserNotList') and conditionParamRef.createUserNotList.size() > 0">
${_conditionType_} a.createUser not in
<foreach collection="conditionParamRef.createUserNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
order by
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
field(a.id,
<foreach collection="conditionParamRef.idList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('cacheServiceTypeList') and conditionParamRef.cacheServiceTypeList.size() > 0">
field(a.cacheServiceType,
<foreach collection="conditionParamRef.cacheServiceTypeList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('genTypeList') and conditionParamRef.genTypeList.size() > 0">
field(a.genType,
<foreach collection="conditionParamRef.genTypeList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('dividedTableTypeList') and conditionParamRef.dividedTableTypeList.size() > 0">
field(a.dividedTableType,
<foreach collection="conditionParamRef.dividedTableTypeList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('genFeignList') and conditionParamRef.genFeignList.size() > 0">
field(a.genFeign,
<foreach collection="conditionParamRef.genFeignList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('detailShowList') and conditionParamRef.detailShowList.size() > 0">
field(a.detailShow,
<foreach collection="conditionParamRef.detailShowList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('genApiList') and conditionParamRef.genApiList.size() > 0">
field(a.genApi,
<foreach collection="conditionParamRef.genApiList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('isGenExportList') and conditionParamRef.isGenExportList.size() > 0">
field(a.isGenExport,
<foreach collection="conditionParamRef.isGenExportList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('isShowControlList') and conditionParamRef.isShowControlList.size() > 0">
field(a.isShowControl,
<foreach collection="conditionParamRef.isShowControlList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('appIdList') and conditionParamRef.appIdList.size() > 0">
field(a.appId,
<foreach collection="conditionParamRef.appIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<trim suffixOverrides="," suffix="">
<foreach collection="orderColList" open="" close="" index="index" item="item" separator=",">
${item.colName} ${item.sortKind}
a.${item.colName} ${item.sortKind}
</foreach>
</trim>
</if>
<if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()">
order by
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
field(a.id,
<foreach collection="conditionParamRef.idList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('cacheServiceTypeList') and conditionParamRef.cacheServiceTypeList.size() > 0">
field(a.cacheServiceType,
<foreach collection="conditionParamRef.cacheServiceTypeList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('genTypeList') and conditionParamRef.genTypeList.size() > 0">
field(a.genType,
<foreach collection="conditionParamRef.genTypeList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('dividedTableTypeList') and conditionParamRef.dividedTableTypeList.size() > 0">
field(a.dividedTableType,
<foreach collection="conditionParamRef.dividedTableTypeList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('genFeignList') and conditionParamRef.genFeignList.size() > 0">
field(a.genFeign,
<foreach collection="conditionParamRef.genFeignList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('detailShowList') and conditionParamRef.detailShowList.size() > 0">
field(a.detailShow,
<foreach collection="conditionParamRef.detailShowList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('genApiList') and conditionParamRef.genApiList.size() > 0">
field(a.genApi,
<foreach collection="conditionParamRef.genApiList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('isGenExportList') and conditionParamRef.isGenExportList.size() > 0">
field(a.isGenExport,
<foreach collection="conditionParamRef.isGenExportList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('isShowControlList') and conditionParamRef.isShowControlList.size() > 0">
field(a.isShowControl,
<foreach collection="conditionParamRef.isShowControlList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('appIdList') and conditionParamRef.appIdList.size() > 0">
field(a.appId,
<foreach collection="conditionParamRef.appIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<trim suffixOverrides="," suffix="">
<if test="orderCol.containsKey('id')">
a.id
......@@ -1147,11 +1677,41 @@
<if test='orderCol.subTableName != null and "DESC".equalsIgnoreCase(orderCol.subTableName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('subTableName1')">
a.subTableName1
<if test='orderCol.subTableName1 != null and "DESC".equalsIgnoreCase(orderCol.subTableName1)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('subTableName2')">
a.subTableName2
<if test='orderCol.subTableName2 != null and "DESC".equalsIgnoreCase(orderCol.subTableName2)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('subTableName3')">
a.subTableName3
<if test='orderCol.subTableName3 != null and "DESC".equalsIgnoreCase(orderCol.subTableName3)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('subTableFkName')">
a.subTableFkName
<if test='orderCol.subTableFkName != null and "DESC".equalsIgnoreCase(orderCol.subTableFkName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('subTableFkName1')">
a.subTableFkName1
<if test='orderCol.subTableFkName1 != null and "DESC".equalsIgnoreCase(orderCol.subTableFkName1)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('subTableFkName2')">
a.subTableFkName2
<if test='orderCol.subTableFkName2 != null and "DESC".equalsIgnoreCase(orderCol.subTableFkName2)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('subTableFkName3')">
a.subTableFkName3
<if test='orderCol.subTableFkName3 != null and "DESC".equalsIgnoreCase(orderCol.subTableFkName3)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('className')">
a.className
<if test='orderCol.className != null and "DESC".equalsIgnoreCase(orderCol.className)'>DESC</if>
......@@ -1274,6 +1834,8 @@
</if>
</trim>
</if>
</sql>
<sql id="_group_by_">
<if test="groupList != null and !groupList.isEmpty()">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment