Commit 7c2ea4d6 authored by 赵啸非's avatar 赵啸非

脚本更新

parent 5041f9f2
Subproject commit 14d1a991d85f5cdf7314a3377afaa4aabcb80ca1
Subproject commit a84cc56da34785cfdc0685de536b7b133eb02c57
......@@ -10,11 +10,11 @@ import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.setup.model.vo.SetupProjectVo;
import lombok.Data;
/**
* 项目工程信息实体对象
*
* @author zxfei
* @date 2024-10-21
*/
* 项目工程信息实体对象
*
* @author zxfei
* @date 2024-10-24
*/
@Data
public class SetupProjectEntity extends SetupProjectVo {
private static final long serialVersionUID = 1L;
......@@ -75,6 +75,10 @@ public class SetupProjectEntity extends SetupProjectVo {
* 备注
*/
private String remark;
/**
* 排序字段
*/
private Long orderNum;
@Override
public int hashCode() {
return this.getId().hashCode();
......@@ -94,7 +98,7 @@ public class SetupProjectEntity extends SetupProjectVo {
public void initAttrValue(){
this.name = "";
this.projectCode = "";
this.projectPath = "";
this.projectPath = "/home/publish/";
this.projectShell = "";
this.sourceProject = "";
this.dbHost = "127.0.0.1";
......@@ -106,5 +110,6 @@ public class SetupProjectEntity extends SetupProjectVo {
this.projectType = 1;
this.projectStatus = 1;
this.remark = "";
this.orderNum = 0L;
}
}
\ No newline at end of file
......@@ -3,11 +3,11 @@ package com.mortals.xhx.module.setup.model;
import java.util.List;
import com.mortals.xhx.module.setup.model.SetupProjectEntity;
/**
* 项目工程信息查询对象
*
* @author zxfei
* @date 2024-10-21
*/
* 项目工程信息查询对象
*
* @author zxfei
* @date 2024-10-24
*/
public class SetupProjectQuery extends SetupProjectEntity {
/** 开始 ID,主键,自增长 */
private Long idStart;
......@@ -136,6 +136,51 @@ public class SetupProjectQuery extends SetupProjectEntity {
/** 创建用户,登录名排除列表 */
private List <String> createUserNotList;
/** 开始 排序字段 */
private Long orderNumStart;
/** 结束 排序字段 */
private Long orderNumEnd;
/** 增加 排序字段 */
private Long orderNumIncrement;
/** 排序字段列表 */
private List <Long> orderNumList;
/** 排序字段排除列表 */
private List <Long> orderNumNotList;
/** 开始 更新用户id */
private Long updateUserIdStart;
/** 结束 更新用户id */
private Long updateUserIdEnd;
/** 增加 更新用户id */
private Long updateUserIdIncrement;
/** 更新用户id列表 */
private List <Long> updateUserIdList;
/** 更新用户id排除列表 */
private List <Long> updateUserIdNotList;
/** 开始 创建用户id */
private Long createUserIdStart;
/** 结束 创建用户id */
private Long createUserIdEnd;
/** 增加 创建用户id */
private Long createUserIdIncrement;
/** 创建用户id列表 */
private List <Long> createUserIdList;
/** 创建用户id排除列表 */
private List <Long> createUserIdNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<SetupProjectQuery> orConditionList;
......@@ -899,6 +944,249 @@ public class SetupProjectQuery extends SetupProjectEntity {
this.createUserNotList = createUserNotList;
}
/**
* 获取 开始 排序字段
* @return orderNumStart
*/
public Long getOrderNumStart(){
return this.orderNumStart;
}
/**
* 设置 开始 排序字段
* @param orderNumStart
*/
public void setOrderNumStart(Long orderNumStart){
this.orderNumStart = orderNumStart;
}
/**
* 获取 结束 排序字段
* @return $orderNumEnd
*/
public Long getOrderNumEnd(){
return this.orderNumEnd;
}
/**
* 设置 结束 排序字段
* @param orderNumEnd
*/
public void setOrderNumEnd(Long orderNumEnd){
this.orderNumEnd = orderNumEnd;
}
/**
* 获取 增加 排序字段
* @return orderNumIncrement
*/
public Long getOrderNumIncrement(){
return this.orderNumIncrement;
}
/**
* 设置 增加 排序字段
* @param orderNumIncrement
*/
public void setOrderNumIncrement(Long orderNumIncrement){
this.orderNumIncrement = orderNumIncrement;
}
/**
* 获取 排序字段
* @return orderNumList
*/
public List<Long> getOrderNumList(){
return this.orderNumList;
}
/**
* 设置 排序字段
* @param orderNumList
*/
public void setOrderNumList(List<Long> orderNumList){
this.orderNumList = orderNumList;
}
/**
* 获取 排序字段
* @return orderNumNotList
*/
public List<Long> getOrderNumNotList(){
return this.orderNumNotList;
}
/**
* 设置 排序字段
* @param orderNumNotList
*/
public void setOrderNumNotList(List<Long> orderNumNotList){
this.orderNumNotList = orderNumNotList;
}
/**
* 获取 开始 更新用户id
* @return updateUserIdStart
*/
public Long getUpdateUserIdStart(){
return this.updateUserIdStart;
}
/**
* 设置 开始 更新用户id
* @param updateUserIdStart
*/
public void setUpdateUserIdStart(Long updateUserIdStart){
this.updateUserIdStart = updateUserIdStart;
}
/**
* 获取 结束 更新用户id
* @return $updateUserIdEnd
*/
public Long getUpdateUserIdEnd(){
return this.updateUserIdEnd;
}
/**
* 设置 结束 更新用户id
* @param updateUserIdEnd
*/
public void setUpdateUserIdEnd(Long updateUserIdEnd){
this.updateUserIdEnd = updateUserIdEnd;
}
/**
* 获取 增加 更新用户id
* @return updateUserIdIncrement
*/
public Long getUpdateUserIdIncrement(){
return this.updateUserIdIncrement;
}
/**
* 设置 增加 更新用户id
* @param updateUserIdIncrement
*/
public void setUpdateUserIdIncrement(Long updateUserIdIncrement){
this.updateUserIdIncrement = updateUserIdIncrement;
}
/**
* 获取 更新用户id
* @return updateUserIdList
*/
public List<Long> getUpdateUserIdList(){
return this.updateUserIdList;
}
/**
* 设置 更新用户id
* @param updateUserIdList
*/
public void setUpdateUserIdList(List<Long> updateUserIdList){
this.updateUserIdList = updateUserIdList;
}
/**
* 获取 更新用户id
* @return updateUserIdNotList
*/
public List<Long> getUpdateUserIdNotList(){
return this.updateUserIdNotList;
}
/**
* 设置 更新用户id
* @param updateUserIdNotList
*/
public void setUpdateUserIdNotList(List<Long> updateUserIdNotList){
this.updateUserIdNotList = updateUserIdNotList;
}
/**
* 获取 开始 创建用户id
* @return createUserIdStart
*/
public Long getCreateUserIdStart(){
return this.createUserIdStart;
}
/**
* 设置 开始 创建用户id
* @param createUserIdStart
*/
public void setCreateUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart;
}
/**
* 获取 结束 创建用户id
* @return $createUserIdEnd
*/
public Long getCreateUserIdEnd(){
return this.createUserIdEnd;
}
/**
* 设置 结束 创建用户id
* @param createUserIdEnd
*/
public void setCreateUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd;
}
/**
* 获取 增加 创建用户id
* @return createUserIdIncrement
*/
public Long getCreateUserIdIncrement(){
return this.createUserIdIncrement;
}
/**
* 设置 增加 创建用户id
* @param createUserIdIncrement
*/
public void setCreateUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement;
}
/**
* 获取 创建用户id
* @return createUserIdList
*/
public List<Long> getCreateUserIdList(){
return this.createUserIdList;
}
/**
* 设置 创建用户id
* @param createUserIdList
*/
public void setCreateUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList;
}
/**
* 获取 创建用户id
* @return createUserIdNotList
*/
public List<Long> getCreateUserIdNotList(){
return this.createUserIdNotList;
}
/**
* 设置 创建用户id
* @param createUserIdNotList
*/
public void setCreateUserIdNotList(List<Long> createUserIdNotList){
this.createUserIdNotList = createUserIdNotList;
}
/**
* 设置 ID,主键,自增长
* @param id
......@@ -1329,6 +1617,168 @@ public class SetupProjectQuery extends SetupProjectEntity {
return this;
}
/**
* 设置 排序字段
* @param orderNum
*/
public SetupProjectQuery orderNum(Long orderNum){
setOrderNum(orderNum);
return this;
}
/**
* 设置 开始 排序字段
* @param orderNumStart
*/
public SetupProjectQuery orderNumStart(Long orderNumStart){
this.orderNumStart = orderNumStart;
return this;
}
/**
* 设置 结束 排序字段
* @param orderNumEnd
*/
public SetupProjectQuery orderNumEnd(Long orderNumEnd){
this.orderNumEnd = orderNumEnd;
return this;
}
/**
* 设置 增加 排序字段
* @param orderNumIncrement
*/
public SetupProjectQuery orderNumIncrement(Long orderNumIncrement){
this.orderNumIncrement = orderNumIncrement;
return this;
}
/**
* 设置 排序字段
* @param orderNumList
*/
public SetupProjectQuery orderNumList(List<Long> orderNumList){
this.orderNumList = orderNumList;
return this;
}
/**
* 设置 排序字段
* @param orderNumNotList
*/
public SetupProjectQuery orderNumNotList(List<Long> orderNumNotList){
this.orderNumNotList = orderNumNotList;
return this;
}
/**
* 设置 更新用户id
* @param updateUserId
*/
public SetupProjectQuery updateUserId(Long updateUserId){
setUpdateUserId(updateUserId);
return this;
}
/**
* 设置 开始 更新用户id
* @param updateUserIdStart
*/
public SetupProjectQuery updateUserIdStart(Long updateUserIdStart){
this.updateUserIdStart = updateUserIdStart;
return this;
}
/**
* 设置 结束 更新用户id
* @param updateUserIdEnd
*/
public SetupProjectQuery updateUserIdEnd(Long updateUserIdEnd){
this.updateUserIdEnd = updateUserIdEnd;
return this;
}
/**
* 设置 增加 更新用户id
* @param updateUserIdIncrement
*/
public SetupProjectQuery updateUserIdIncrement(Long updateUserIdIncrement){
this.updateUserIdIncrement = updateUserIdIncrement;
return this;
}
/**
* 设置 更新用户id
* @param updateUserIdList
*/
public SetupProjectQuery updateUserIdList(List<Long> updateUserIdList){
this.updateUserIdList = updateUserIdList;
return this;
}
/**
* 设置 更新用户id
* @param updateUserIdNotList
*/
public SetupProjectQuery updateUserIdNotList(List<Long> updateUserIdNotList){
this.updateUserIdNotList = updateUserIdNotList;
return this;
}
/**
* 设置 创建用户id
* @param createUserId
*/
public SetupProjectQuery createUserId(Long createUserId){
setCreateUserId(createUserId);
return this;
}
/**
* 设置 开始 创建用户id
* @param createUserIdStart
*/
public SetupProjectQuery createUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart;
return this;
}
/**
* 设置 结束 创建用户id
* @param createUserIdEnd
*/
public SetupProjectQuery createUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd;
return this;
}
/**
* 设置 增加 创建用户id
* @param createUserIdIncrement
*/
public SetupProjectQuery createUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement;
return this;
}
/**
* 设置 创建用户id
* @param createUserIdList
*/
public SetupProjectQuery createUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList;
return this;
}
/**
* 设置 创建用户id
* @param createUserIdNotList
*/
public SetupProjectQuery createUserIdNotList(List<Long> createUserIdNotList){
this.createUserIdNotList = createUserIdNotList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
......
......@@ -7,6 +7,7 @@ import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.common.code.ProjectStatusEnum;
import com.mortals.xhx.common.code.ProjectTypeEnum;
......@@ -26,6 +27,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
......@@ -58,6 +61,22 @@ public class SetupProjectController extends BaseCRUDJsonBodyMappingController<Se
super.init(model, context);
}
@Override
protected void doListBefore(SetupProjectEntity query, Map<String, Object> model, Context context) throws AppException {
query.setSize(50);
query.setOrderColList(Arrays.asList(new OrderCol("orderNum")));
super.doListBefore(query, model, context);
}
@Override
protected void doListAfter(SetupProjectEntity query, List<SetupProjectEntity> list, Context context) throws AppException {
//todo 更新项目状态 通过shell cmd 命令等 查询项目状态
super.doListAfter(query, list, context);
}
/**
* 部署
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.setup.dao.ibatis.SetupProjectDaoImpl">
<!-- 字段和属性映射 -->
......@@ -24,6 +24,9 @@
<result property="updateUser" column="updateUser" />
<result property="createTime" column="createTime" />
<result property="createUser" column="createUser" />
<result property="orderNum" column="orderNum" />
<result property="updateUserId" column="updateUserId" />
<result property="createUserId" column="createUserId" />
</resultMap>
<!-- 表所有列 -->
......@@ -86,23 +89,32 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUser') or colPickMode == 1 and data.containsKey('createUser')))">
a.createUser,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('orderNum') or colPickMode == 1 and data.containsKey('orderNum')))">
a.orderNum,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateUserId') or colPickMode == 1 and data.containsKey('updateUserId')))">
a.updateUserId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.createUserId,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="SetupProjectEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_setup_project
(name,projectCode,projectPath,projectShell,sourceProject,dbHost,dbPort,dbUser,dbPassword,dbName,version,projectType,projectStatus,remark,updateTime,updateUser,createTime,createUser)
(name,projectCode,projectPath,projectShell,sourceProject,dbHost,dbPort,dbUser,dbPassword,dbName,version,projectType,projectStatus,remark,updateTime,updateUser,createTime,createUser,orderNum,updateUserId,createUserId)
VALUES
(#{name},#{projectCode},#{projectPath},#{projectShell},#{sourceProject},#{dbHost},#{dbPort},#{dbUser},#{dbPassword},#{dbName},#{version},#{projectType},#{projectStatus},#{remark},#{updateTime},#{updateUser},#{createTime},#{createUser})
(#{name},#{projectCode},#{projectPath},#{projectShell},#{sourceProject},#{dbHost},#{dbPort},#{dbUser},#{dbPassword},#{dbName},#{version},#{projectType},#{projectStatus},#{remark},#{updateTime},#{updateUser},#{createTime},#{createUser},#{orderNum},#{updateUserId},#{createUserId})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_setup_project
(name,projectCode,projectPath,projectShell,sourceProject,dbHost,dbPort,dbUser,dbPassword,dbName,version,projectType,projectStatus,remark,updateTime,updateUser,createTime,createUser)
(name,projectCode,projectPath,projectShell,sourceProject,dbHost,dbPort,dbUser,dbPassword,dbName,version,projectType,projectStatus,remark,updateTime,updateUser,createTime,createUser,orderNum,updateUserId,createUserId)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.name},#{item.projectCode},#{item.projectPath},#{item.projectShell},#{item.sourceProject},#{item.dbHost},#{item.dbPort},#{item.dbUser},#{item.dbPassword},#{item.dbName},#{item.version},#{item.projectType},#{item.projectStatus},#{item.remark},#{item.updateTime},#{item.updateUser},#{item.createTime},#{item.createUser})
(#{item.name},#{item.projectCode},#{item.projectPath},#{item.projectShell},#{item.sourceProject},#{item.dbHost},#{item.dbPort},#{item.dbUser},#{item.dbPassword},#{item.dbName},#{item.version},#{item.projectType},#{item.projectStatus},#{item.remark},#{item.updateTime},#{item.updateUser},#{item.createTime},#{item.createUser},#{item.orderNum},#{item.updateUserId},#{item.createUserId})
</foreach>
</insert>
......@@ -172,6 +184,24 @@
<if test="(colPickMode==0 and data.containsKey('createUser')) or (colPickMode==1 and !data.containsKey('createUser'))">
a.createUser=#{data.createUser},
</if>
<if test="(colPickMode==0 and data.containsKey('orderNum')) or (colPickMode==1 and !data.containsKey('orderNum'))">
a.orderNum=#{data.orderNum},
</if>
<if test="(colPickMode==0 and data.containsKey('orderNumIncrement')) or (colPickMode==1 and !data.containsKey('orderNumIncrement'))">
a.orderNum=ifnull(a.orderNum,0) + #{data.orderNumIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('updateUserId')) or (colPickMode==1 and !data.containsKey('updateUserId'))">
a.updateUserId=#{data.updateUserId},
</if>
<if test="(colPickMode==0 and data.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !data.containsKey('updateUserIdIncrement'))">
a.updateUserId=ifnull(a.updateUserId,0) + #{data.updateUserIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('createUserId')) or (colPickMode==1 and !data.containsKey('createUserId'))">
a.createUserId=#{data.createUserId},
</if>
<if test="(colPickMode==0 and data.containsKey('createUserIdIncrement')) or (colPickMode==1 and !data.containsKey('createUserIdIncrement'))">
a.createUserId=ifnull(a.createUserId,0) + #{data.createUserIdIncrement},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
......@@ -320,6 +350,42 @@
</if>
</foreach>
</trim>
<trim prefix="orderNum=(case" suffix="ELSE orderNum end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('orderNum')) or (colPickMode==1 and !item.containsKey('orderNum'))">
when a.id=#{item.id} then #{item.orderNum}
</when>
<when test="(colPickMode==0 and item.containsKey('orderNumIncrement')) or (colPickMode==1 and !item.containsKey('orderNumIncrement'))">
when a.id=#{item.id} then ifnull(a.orderNum,0) + #{item.orderNumIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="updateUserId=(case" suffix="ELSE updateUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('updateUserId')) or (colPickMode==1 and !item.containsKey('updateUserId'))">
when a.id=#{item.id} then #{item.updateUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !item.containsKey('updateUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.updateUserId,0) + #{item.updateUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="createUserId=(case" suffix="ELSE createUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('createUserId')) or (colPickMode==1 and !item.containsKey('createUserId'))">
when a.id=#{item.id} then #{item.createUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('createUserIdIncrement')) or (colPickMode==1 and !item.containsKey('createUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.createUserId,0) + #{item.createUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
......@@ -845,6 +911,87 @@
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('orderNum')">
<if test="conditionParamRef.orderNum != null ">
${_conditionType_} a.orderNum = #{${_conditionParam_}.orderNum}
</if>
<if test="conditionParamRef.orderNum == null">
${_conditionType_} a.orderNum is null
</if>
</if>
<if test="conditionParamRef.containsKey('orderNumList') and conditionParamRef.orderNumList.size() > 0">
${_conditionType_} a.orderNum in
<foreach collection="conditionParamRef.orderNumList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('orderNumNotList') and conditionParamRef.orderNumNotList.size() > 0">
${_conditionType_} a.orderNum not in
<foreach collection="conditionParamRef.orderNumNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('orderNumStart') and conditionParamRef.orderNumStart != null">
${_conditionType_} a.orderNum <![CDATA[ >= ]]> #{${_conditionParam_}.orderNumStart}
</if>
<if test="conditionParamRef.containsKey('orderNumEnd') and conditionParamRef.orderNumEnd != null">
${_conditionType_} a.orderNum <![CDATA[ <= ]]> #{${_conditionParam_}.orderNumEnd}
</if>
<if test="conditionParamRef.containsKey('updateUserId')">
<if test="conditionParamRef.updateUserId != null ">
${_conditionType_} a.updateUserId = #{${_conditionParam_}.updateUserId}
</if>
<if test="conditionParamRef.updateUserId == null">
${_conditionType_} a.updateUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
${_conditionType_} a.updateUserId in
<foreach collection="conditionParamRef.updateUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('updateUserIdNotList') and conditionParamRef.updateUserIdNotList.size() > 0">
${_conditionType_} a.updateUserId not in
<foreach collection="conditionParamRef.updateUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('updateUserIdStart') and conditionParamRef.updateUserIdStart != null">
${_conditionType_} a.updateUserId <![CDATA[ >= ]]> #{${_conditionParam_}.updateUserIdStart}
</if>
<if test="conditionParamRef.containsKey('updateUserIdEnd') and conditionParamRef.updateUserIdEnd != null">
${_conditionType_} a.updateUserId <![CDATA[ <= ]]> #{${_conditionParam_}.updateUserIdEnd}
</if>
<if test="conditionParamRef.containsKey('createUserId')">
<if test="conditionParamRef.createUserId != null ">
${_conditionType_} a.createUserId = #{${_conditionParam_}.createUserId}
</if>
<if test="conditionParamRef.createUserId == null">
${_conditionType_} a.createUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
${_conditionType_} a.createUserId in
<foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserIdNotList') and conditionParamRef.createUserIdNotList.size() > 0">
${_conditionType_} a.createUserId not in
<foreach collection="conditionParamRef.createUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserIdStart') and conditionParamRef.createUserIdStart != null">
${_conditionType_} a.createUserId <![CDATA[ >= ]]> #{${_conditionParam_}.createUserIdStart}
</if>
<if test="conditionParamRef.containsKey('createUserIdEnd') and conditionParamRef.createUserIdEnd != null">
${_conditionType_} a.createUserId <![CDATA[ <= ]]> #{${_conditionParam_}.createUserIdEnd}
</if>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
......@@ -870,6 +1017,27 @@
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('orderNumList') and conditionParamRef.orderNumList.size() > 0">
field(a.orderNum,
<foreach collection="conditionParamRef.orderNumList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
field(a.updateUserId,
<foreach collection="conditionParamRef.updateUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
field(a.createUserId,
<foreach collection="conditionParamRef.createUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<trim suffixOverrides="," suffix="">
<foreach collection="orderColList" open="" close="" index="index" item="item" separator=",">
a.${item.colName} ${item.sortKind}
......@@ -899,6 +1067,27 @@
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('orderNumList') and conditionParamRef.orderNumList.size() > 0">
field(a.orderNum,
<foreach collection="conditionParamRef.orderNumList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
field(a.updateUserId,
<foreach collection="conditionParamRef.updateUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
field(a.createUserId,
<foreach collection="conditionParamRef.createUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<trim suffixOverrides="," suffix="">
<if test="orderCol.containsKey('id')">
a.id
......@@ -995,6 +1184,21 @@
<if test='orderCol.createUser != null and "DESC".equalsIgnoreCase(orderCol.createUser)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('orderNum')">
a.orderNum
<if test='orderCol.orderNum != null and "DESC".equalsIgnoreCase(orderCol.orderNum)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateUserId')">
a.updateUserId
<if test='orderCol.updateUserId != null and "DESC".equalsIgnoreCase(orderCol.updateUserId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createUserId')">
a.createUserId
<if test='orderCol.createUserId != null and "DESC".equalsIgnoreCase(orderCol.createUserId)'>DESC</if>
,
</if>
</trim>
</if>
......
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