Commit 72fe358f authored by 赵啸非's avatar 赵啸非

站点事项添加热门和显示

parent fbbf4eaf
...@@ -26,3 +26,10 @@ ALTER TABLE mortals_sys_app_info_field ADD COLUMN `defaultValue` varchar (255) ...@@ -26,3 +26,10 @@ ALTER TABLE mortals_sys_app_info_field ADD COLUMN `defaultValue` varchar (255)
ALTER TABLE mortals_sys_app_info_templete_field ADD COLUMN `fieldTypeValue` varchar (255) default "" COMMENT '字段类型值,当字段类型为多选,单选时候,预设复选值' AFTER fieldType; ALTER TABLE mortals_sys_app_info_templete_field ADD COLUMN `fieldTypeValue` varchar (255) default "" COMMENT '字段类型值,当字段类型为多选,单选时候,预设复选值' AFTER fieldType;
ALTER TABLE mortals_sys_app_info_templete_field ADD COLUMN `defaultValue` varchar (255) default "" COMMENT '字段默认值' AFTER fieldValue; ALTER TABLE mortals_sys_app_info_templete_field ADD COLUMN `defaultValue` varchar (255) default "" COMMENT '字段默认值' AFTER fieldValue;
-- ----------------------------
2023-4-12
-- ----------------------------
ALTER TABLE mortals_sys_site_matter ADD COLUMN `hot` tinyint(2) DEFAULT '0' COMMENT '热门(0.否,1.是)', AFTER eventTypeShow;
ALTER TABLE mortals_sys_site_matter ADD COLUMN `display` tinyint(2) DEFAULT '0' COMMENT '显示(0.否,1.是)', AFTER hot;
...@@ -1960,15 +1960,16 @@ msg|String|消息|- ...@@ -1960,15 +1960,16 @@ msg|String|消息|-
**请求参数:** **请求参数:**
参数名称|类型|备注|必填|其它 参数名称|类型| 备注 |必填|其它
---|---|---|---|--- ---|---|------|---|---
page|Integer|当前页|否|- page|Integer| 当前页 |否|-
size|Integer|每页条数|否|- size|Integer| 每页条数 |否|-
siteId|Long|站点ID|否|- siteId|Long| 站点ID |否|-
siteName|String|站点名称|否|- siteName|String| 站点名称 |否|-
matterId|Long|事项ID|否|- matterId|Long| 事项ID |否|-
matterName|String|事项名称|否|- matterName|String| 事项名称 |否|-
hot|Integer| 热门 |否|-
display|Integer| 显示 |否|-
**请求样例:** **请求样例:**
``` ```
...@@ -1978,6 +1979,8 @@ matterName|String|事项名称|否|- ...@@ -1978,6 +1979,8 @@ matterName|String|事项名称|否|-
"siteName":"o68yk6", "siteName":"o68yk6",
"matterId":2909, "matterId":2909,
"matterName":"oz1oig", "matterName":"oz1oig",
"hot":0,
"display":1,
"page":1, "page":1,
"size":10 "size":10
} }
......
package com.mortals.xhx.module.site.model; package com.mortals.xhx.module.site.model;
import com.mortals.xhx.common.code.SourceEnum; import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.site.model.vo.SiteMatterVo; import com.mortals.xhx.module.site.model.vo.SiteMatterVo;
/** /**
* 站点事项实体对象 * 站点事项实体对象
* *
* @author zxfei * @author zxfei
* @date 2022-11-16 * @date 2023-04-12
*/ */
public class SiteMatterEntity extends SiteMatterVo { public class SiteMatterEntity extends SiteMatterVo {
...@@ -52,6 +56,14 @@ public class SiteMatterEntity extends SiteMatterVo { ...@@ -52,6 +56,14 @@ public class SiteMatterEntity extends SiteMatterVo {
* 部门编号 * 部门编号
*/ */
private String deptCode; private String deptCode;
/**
* 热门(0.否,1.是)
*/
private Integer hot;
/**
* 显示(0.否,1.是)
*/
private Integer display;
...@@ -173,7 +185,6 @@ public class SiteMatterEntity extends SiteMatterVo { ...@@ -173,7 +185,6 @@ public class SiteMatterEntity extends SiteMatterVo {
* @return Integer * @return Integer
*/ */
public Integer getSource(){ public Integer getSource(){
return source; return source;
} }
/** /**
...@@ -197,6 +208,34 @@ public class SiteMatterEntity extends SiteMatterVo { ...@@ -197,6 +208,34 @@ public class SiteMatterEntity extends SiteMatterVo {
public void setDeptCode(String deptCode){ public void setDeptCode(String deptCode){
this.deptCode = deptCode; this.deptCode = deptCode;
} }
/**
* 获取 热门(0.否,1.是)
* @return Integer
*/
public Integer getHot(){
return hot;
}
/**
* 设置 热门(0.否,1.是)
* @param hot
*/
public void setHot(Integer hot){
this.hot = hot;
}
/**
* 获取 显示(0.否,1.是)
* @return Integer
*/
public Integer getDisplay(){
return display;
}
/**
* 设置 显示(0.否,1.是)
* @param display
*/
public void setDisplay(Integer display){
this.display = display;
}
...@@ -229,6 +268,8 @@ public class SiteMatterEntity extends SiteMatterVo { ...@@ -229,6 +268,8 @@ public class SiteMatterEntity extends SiteMatterVo {
sb.append(",eventTypeShow:").append(getEventTypeShow()); sb.append(",eventTypeShow:").append(getEventTypeShow());
sb.append(",source:").append(getSource()); sb.append(",source:").append(getSource());
sb.append(",deptCode:").append(getDeptCode()); sb.append(",deptCode:").append(getDeptCode());
sb.append(",hot:").append(getHot());
sb.append(",display:").append(getDisplay());
return sb.toString(); return sb.toString();
} }
...@@ -236,22 +277,26 @@ public class SiteMatterEntity extends SiteMatterVo { ...@@ -236,22 +277,26 @@ public class SiteMatterEntity extends SiteMatterVo {
this.siteId = null; this.siteId = null;
this.siteName = ""; this.siteName = null;
this.matterId = null; this.matterId = null;
this.matterName = ""; this.matterName = null;
this.matterCode = ""; this.matterCode = null;
this.deptId = null; this.deptId = null;
this.deptName = ""; this.deptName = null;
this.eventTypeShow = null;
this.source = null;
this.eventTypeShow = ""; this.deptCode = null;
this.source = 0; this.hot = 0;
this.deptCode = ""; this.display = 0;
} }
} }
\ No newline at end of file
...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.site.model.SiteMatterEntity; ...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.site.model.SiteMatterEntity;
* 站点事项查询对象 * 站点事项查询对象
* *
* @author zxfei * @author zxfei
* @date 2023-02-21 * @date 2023-04-12
*/ */
public class SiteMatterQuery extends SiteMatterEntity { public class SiteMatterQuery extends SiteMatterEntity {
/** 开始 序号,主键,自增长 */ /** 开始 序号,主键,自增长 */
...@@ -141,6 +141,36 @@ public class SiteMatterQuery extends SiteMatterEntity { ...@@ -141,6 +141,36 @@ public class SiteMatterQuery extends SiteMatterEntity {
/** 结束 修改时间 */ /** 结束 修改时间 */
private String updateTimeEnd; private String updateTimeEnd;
/** 开始 热门(0.否,1.是) */
private Integer hotStart;
/** 结束 热门(0.否,1.是) */
private Integer hotEnd;
/** 增加 热门(0.否,1.是) */
private Integer hotIncrement;
/** 热门(0.否,1.是)列表 */
private List <Integer> hotList;
/** 热门(0.否,1.是)排除列表 */
private List <Integer> hotNotList;
/** 开始 显示(0.否,1.是) */
private Integer displayStart;
/** 结束 显示(0.否,1.是) */
private Integer displayEnd;
/** 增加 显示(0.否,1.是) */
private Integer displayIncrement;
/** 显示(0.否,1.是)列表 */
private List <Integer> displayList;
/** 显示(0.否,1.是)排除列表 */
private List <Integer> displayNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */ /** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<SiteMatterQuery> orConditionList; private List<SiteMatterQuery> orConditionList;
...@@ -891,6 +921,168 @@ public class SiteMatterQuery extends SiteMatterEntity { ...@@ -891,6 +921,168 @@ public class SiteMatterQuery extends SiteMatterEntity {
this.updateTimeEnd = updateTimeEnd; this.updateTimeEnd = updateTimeEnd;
} }
/**
* 获取 开始 热门(0.否,1.是)
* @return hotStart
*/
public Integer getHotStart(){
return this.hotStart;
}
/**
* 设置 开始 热门(0.否,1.是)
* @param hotStart
*/
public void setHotStart(Integer hotStart){
this.hotStart = hotStart;
}
/**
* 获取 结束 热门(0.否,1.是)
* @return $hotEnd
*/
public Integer getHotEnd(){
return this.hotEnd;
}
/**
* 设置 结束 热门(0.否,1.是)
* @param hotEnd
*/
public void setHotEnd(Integer hotEnd){
this.hotEnd = hotEnd;
}
/**
* 获取 增加 热门(0.否,1.是)
* @return hotIncrement
*/
public Integer getHotIncrement(){
return this.hotIncrement;
}
/**
* 设置 增加 热门(0.否,1.是)
* @param hotIncrement
*/
public void setHotIncrement(Integer hotIncrement){
this.hotIncrement = hotIncrement;
}
/**
* 获取 热门(0.否,1.是)
* @return hotList
*/
public List<Integer> getHotList(){
return this.hotList;
}
/**
* 设置 热门(0.否,1.是)
* @param hotList
*/
public void setHotList(List<Integer> hotList){
this.hotList = hotList;
}
/**
* 获取 热门(0.否,1.是)
* @return hotNotList
*/
public List<Integer> getHotNotList(){
return this.hotNotList;
}
/**
* 设置 热门(0.否,1.是)
* @param hotNotList
*/
public void setHotNotList(List<Integer> hotNotList){
this.hotNotList = hotNotList;
}
/**
* 获取 开始 显示(0.否,1.是)
* @return displayStart
*/
public Integer getDisplayStart(){
return this.displayStart;
}
/**
* 设置 开始 显示(0.否,1.是)
* @param displayStart
*/
public void setDisplayStart(Integer displayStart){
this.displayStart = displayStart;
}
/**
* 获取 结束 显示(0.否,1.是)
* @return $displayEnd
*/
public Integer getDisplayEnd(){
return this.displayEnd;
}
/**
* 设置 结束 显示(0.否,1.是)
* @param displayEnd
*/
public void setDisplayEnd(Integer displayEnd){
this.displayEnd = displayEnd;
}
/**
* 获取 增加 显示(0.否,1.是)
* @return displayIncrement
*/
public Integer getDisplayIncrement(){
return this.displayIncrement;
}
/**
* 设置 增加 显示(0.否,1.是)
* @param displayIncrement
*/
public void setDisplayIncrement(Integer displayIncrement){
this.displayIncrement = displayIncrement;
}
/**
* 获取 显示(0.否,1.是)
* @return displayList
*/
public List<Integer> getDisplayList(){
return this.displayList;
}
/**
* 设置 显示(0.否,1.是)
* @param displayList
*/
public void setDisplayList(List<Integer> displayList){
this.displayList = displayList;
}
/**
* 获取 显示(0.否,1.是)
* @return displayNotList
*/
public List<Integer> getDisplayNotList(){
return this.displayNotList;
}
/**
* 设置 显示(0.否,1.是)
* @param displayNotList
*/
public void setDisplayNotList(List<Integer> displayNotList){
this.displayNotList = displayNotList;
}
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param id * @param id
...@@ -1331,6 +1523,114 @@ public class SiteMatterQuery extends SiteMatterEntity { ...@@ -1331,6 +1523,114 @@ public class SiteMatterQuery extends SiteMatterEntity {
} }
/**
* 设置 热门(0.否,1.是)
* @param hot
*/
public SiteMatterQuery hot(Integer hot){
setHot(hot);
return this;
}
/**
* 设置 开始 热门(0.否,1.是)
* @param hotStart
*/
public SiteMatterQuery hotStart(Integer hotStart){
this.hotStart = hotStart;
return this;
}
/**
* 设置 结束 热门(0.否,1.是)
* @param hotEnd
*/
public SiteMatterQuery hotEnd(Integer hotEnd){
this.hotEnd = hotEnd;
return this;
}
/**
* 设置 增加 热门(0.否,1.是)
* @param hotIncrement
*/
public SiteMatterQuery hotIncrement(Integer hotIncrement){
this.hotIncrement = hotIncrement;
return this;
}
/**
* 设置 热门(0.否,1.是)
* @param hotList
*/
public SiteMatterQuery hotList(List<Integer> hotList){
this.hotList = hotList;
return this;
}
/**
* 设置 热门(0.否,1.是)
* @param hotNotList
*/
public SiteMatterQuery hotNotList(List<Integer> hotNotList){
this.hotNotList = hotNotList;
return this;
}
/**
* 设置 显示(0.否,1.是)
* @param display
*/
public SiteMatterQuery display(Integer display){
setDisplay(display);
return this;
}
/**
* 设置 开始 显示(0.否,1.是)
* @param displayStart
*/
public SiteMatterQuery displayStart(Integer displayStart){
this.displayStart = displayStart;
return this;
}
/**
* 设置 结束 显示(0.否,1.是)
* @param displayEnd
*/
public SiteMatterQuery displayEnd(Integer displayEnd){
this.displayEnd = displayEnd;
return this;
}
/**
* 设置 增加 显示(0.否,1.是)
* @param displayIncrement
*/
public SiteMatterQuery displayIncrement(Integer displayIncrement){
this.displayIncrement = displayIncrement;
return this;
}
/**
* 设置 显示(0.否,1.是)
* @param displayList
*/
public SiteMatterQuery displayList(List<Integer> displayList){
this.displayList = displayList;
return this;
}
/**
* 设置 显示(0.否,1.是)
* @param displayNotList
*/
public SiteMatterQuery displayNotList(List<Integer> displayNotList){
this.displayNotList = displayNotList;
return this;
}
/** /**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) * 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList * @return orConditionList
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
<result property="createTime" column="createTime" /> <result property="createTime" column="createTime" />
<result property="createUserId" column="createUserId" /> <result property="createUserId" column="createUserId" />
<result property="updateTime" column="updateTime" /> <result property="updateTime" column="updateTime" />
<result property="hot" column="hot" />
<result property="display" column="display" />
</resultMap> </resultMap>
...@@ -68,23 +70,29 @@ ...@@ -68,23 +70,29 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime, a.updateTime,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('hot') or colPickMode == 1 and data.containsKey('hot')))">
a.hot,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('display') or colPickMode == 1 and data.containsKey('display')))">
a.display,
</if>
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="SiteMatterEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="SiteMatterEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_sys_site_matter insert into mortals_sys_site_matter
(siteId,siteName,matterId,matterName,matterCode,deptId,deptName,eventTypeShow,source,deptCode,createTime,createUserId,updateTime) (siteId,siteName,matterId,matterName,matterCode,deptId,deptName,eventTypeShow,source,deptCode,createTime,createUserId,updateTime,hot,display)
VALUES VALUES
(#{siteId},#{siteName},#{matterId},#{matterName},#{matterCode},#{deptId},#{deptName},#{eventTypeShow},#{source},#{deptCode},#{createTime},#{createUserId},#{updateTime}) (#{siteId},#{siteName},#{matterId},#{matterName},#{matterCode},#{deptId},#{deptName},#{eventTypeShow},#{source},#{deptCode},#{createTime},#{createUserId},#{updateTime},#{hot},#{display})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_sys_site_matter insert into mortals_sys_site_matter
(siteId,siteName,matterId,matterName,matterCode,deptId,deptName,eventTypeShow,source,deptCode,createTime,createUserId,updateTime) (siteId,siteName,matterId,matterName,matterCode,deptId,deptName,eventTypeShow,source,deptCode,createTime,createUserId,updateTime,hot,display)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.siteId},#{item.siteName},#{item.matterId},#{item.matterName},#{item.matterCode},#{item.deptId},#{item.deptName},#{item.eventTypeShow},#{item.source},#{item.deptCode},#{item.createTime},#{item.createUserId},#{item.updateTime}) (#{item.siteId},#{item.siteName},#{item.matterId},#{item.matterName},#{item.matterCode},#{item.deptId},#{item.deptName},#{item.eventTypeShow},#{item.source},#{item.deptCode},#{item.createTime},#{item.createUserId},#{item.updateTime},#{item.hot},#{item.display})
</foreach> </foreach>
</insert> </insert>
...@@ -148,6 +156,18 @@ ...@@ -148,6 +156,18 @@
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))"> <if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime}, a.updateTime=#{data.updateTime},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('hot')) or (colPickMode==1 and !data.containsKey('hot'))">
a.hot=#{data.hot},
</if>
<if test="(colPickMode==0 and data.containsKey('hotIncrement')) or (colPickMode==1 and !data.containsKey('hotIncrement'))">
a.hot=ifnull(a.hot,0) + #{data.hotIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('display')) or (colPickMode==1 and !data.containsKey('display'))">
a.display=#{data.display},
</if>
<if test="(colPickMode==0 and data.containsKey('displayIncrement')) or (colPickMode==1 and !data.containsKey('displayIncrement'))">
a.display=ifnull(a.display,0) + #{data.displayIncrement},
</if>
</trim> </trim>
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
where where
...@@ -276,6 +296,30 @@ ...@@ -276,6 +296,30 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="hot=(case" suffix="ELSE hot end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('hot')) or (colPickMode==1 and !item.containsKey('hot'))">
when a.id=#{item.id} then #{item.hot}
</when>
<when test="(colPickMode==0 and item.containsKey('hotIncrement')) or (colPickMode==1 and !item.containsKey('hotIncrement'))">
when a.id=#{item.id} then ifnull(a.hot,0) + #{item.hotIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="display=(case" suffix="ELSE display end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('display')) or (colPickMode==1 and !item.containsKey('display'))">
when a.id=#{item.id} then #{item.display}
</when>
<when test="(colPickMode==0 and item.containsKey('displayIncrement')) or (colPickMode==1 and !item.containsKey('displayIncrement'))">
when a.id=#{item.id} then ifnull(a.display,0) + #{item.displayIncrement}
</when>
</choose>
</foreach>
</trim>
</trim> </trim>
where id in where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")"> <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
...@@ -400,13 +444,13 @@ ...@@ -400,13 +444,13 @@
${_conditionType_} a.id is null ${_conditionType_} a.id is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('idList')"> <if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
${_conditionType_} a.id in ${_conditionType_} a.id in
<foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('idNotList')"> <if test="conditionParamRef.containsKey('idNotList') and conditionParamRef.idNotList.size() > 0">
${_conditionType_} a.id not in ${_conditionType_} a.id not in
<foreach collection="conditionParamRef.idNotList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.idNotList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
...@@ -427,13 +471,13 @@ ...@@ -427,13 +471,13 @@
${_conditionType_} a.siteId is null ${_conditionType_} a.siteId is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('siteIdList')"> <if test="conditionParamRef.containsKey('siteIdList') and conditionParamRef.siteIdList.size() > 0">
${_conditionType_} a.siteId in ${_conditionType_} a.siteId in
<foreach collection="conditionParamRef.siteIdList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.siteIdList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('siteIdNotList')"> <if test="conditionParamRef.containsKey('siteIdNotList') and conditionParamRef.siteIdNotList.size() > 0">
${_conditionType_} a.siteId not in ${_conditionType_} a.siteId not in
<foreach collection="conditionParamRef.siteIdNotList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.siteIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
...@@ -455,13 +499,13 @@ ...@@ -455,13 +499,13 @@
${_conditionType_} a.siteName is null ${_conditionType_} a.siteName is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('siteNameList')"> <if test="conditionParamRef.containsKey('siteNameList') and conditionParamRef.siteNameList.size() > 0">
${_conditionType_} a.siteName in ${_conditionType_} a.siteName in
<foreach collection="conditionParamRef.siteNameList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.siteNameList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('siteNameNotList')"> <if test="conditionParamRef.containsKey('siteNameNotList') and conditionParamRef.siteNameNotList.size() > 0">
${_conditionType_} a.siteName not in ${_conditionType_} a.siteName not in
<foreach collection="conditionParamRef.siteNameNotList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.siteNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
...@@ -475,13 +519,13 @@ ...@@ -475,13 +519,13 @@
${_conditionType_} a.matterId is null ${_conditionType_} a.matterId is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('matterIdList')"> <if test="conditionParamRef.containsKey('matterIdList') and conditionParamRef.matterIdList.size() > 0">
${_conditionType_} a.matterId in ${_conditionType_} a.matterId in
<foreach collection="conditionParamRef.matterIdList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.matterIdList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('matterIdNotList')"> <if test="conditionParamRef.containsKey('matterIdNotList') and conditionParamRef.matterIdNotList.size() > 0">
${_conditionType_} a.matterId not in ${_conditionType_} a.matterId not in
<foreach collection="conditionParamRef.matterIdNotList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.matterIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
...@@ -503,13 +547,13 @@ ...@@ -503,13 +547,13 @@
${_conditionType_} a.matterName is null ${_conditionType_} a.matterName is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('matterNameList')"> <if test="conditionParamRef.containsKey('matterNameList') and conditionParamRef.matterNameList.size() > 0">
${_conditionType_} a.matterName in ${_conditionType_} a.matterName in
<foreach collection="conditionParamRef.matterNameList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.matterNameList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('matterNameNotList')"> <if test="conditionParamRef.containsKey('matterNameNotList') and conditionParamRef.matterNameNotList.size() > 0">
${_conditionType_} a.matterName not in ${_conditionType_} a.matterName not in
<foreach collection="conditionParamRef.matterNameNotList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.matterNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
...@@ -524,13 +568,13 @@ ...@@ -524,13 +568,13 @@
${_conditionType_} a.matterCode is null ${_conditionType_} a.matterCode is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('matterCodeList')"> <if test="conditionParamRef.containsKey('matterCodeList') and conditionParamRef.matterCodeList.size() > 0">
${_conditionType_} a.matterCode in ${_conditionType_} a.matterCode in
<foreach collection="conditionParamRef.matterCodeList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.matterCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('matterCodeNotList')"> <if test="conditionParamRef.containsKey('matterCodeNotList') and conditionParamRef.matterCodeNotList.size() > 0">
${_conditionType_} a.matterCode not in ${_conditionType_} a.matterCode not in
<foreach collection="conditionParamRef.matterCodeNotList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.matterCodeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
...@@ -544,13 +588,13 @@ ...@@ -544,13 +588,13 @@
${_conditionType_} a.deptId is null ${_conditionType_} a.deptId is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('deptIdList')"> <if test="conditionParamRef.containsKey('deptIdList') and conditionParamRef.deptIdList.size() > 0">
${_conditionType_} a.deptId in ${_conditionType_} a.deptId in
<foreach collection="conditionParamRef.deptIdList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.deptIdList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('deptIdNotList')"> <if test="conditionParamRef.containsKey('deptIdNotList') and conditionParamRef.deptIdNotList.size() > 0">
${_conditionType_} a.deptId not in ${_conditionType_} a.deptId not in
<foreach collection="conditionParamRef.deptIdNotList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.deptIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
...@@ -572,13 +616,13 @@ ...@@ -572,13 +616,13 @@
${_conditionType_} a.deptName is null ${_conditionType_} a.deptName is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('deptNameList')"> <if test="conditionParamRef.containsKey('deptNameList') and conditionParamRef.deptNameList.size() > 0">
${_conditionType_} a.deptName in ${_conditionType_} a.deptName in
<foreach collection="conditionParamRef.deptNameList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.deptNameList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('deptNameNotList')"> <if test="conditionParamRef.containsKey('deptNameNotList') and conditionParamRef.deptNameNotList.size() > 0">
${_conditionType_} a.deptName not in ${_conditionType_} a.deptName not in
<foreach collection="conditionParamRef.deptNameNotList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.deptNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
...@@ -593,13 +637,13 @@ ...@@ -593,13 +637,13 @@
${_conditionType_} a.eventTypeShow is null ${_conditionType_} a.eventTypeShow is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('eventTypeShowList')"> <if test="conditionParamRef.containsKey('eventTypeShowList') and conditionParamRef.eventTypeShowList.size() > 0">
${_conditionType_} a.eventTypeShow in ${_conditionType_} a.eventTypeShow in
<foreach collection="conditionParamRef.eventTypeShowList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.eventTypeShowList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('eventTypeShowNotList')"> <if test="conditionParamRef.containsKey('eventTypeShowNotList') and conditionParamRef.eventTypeShowNotList.size() > 0">
${_conditionType_} a.eventTypeShow not in ${_conditionType_} a.eventTypeShow not in
<foreach collection="conditionParamRef.eventTypeShowNotList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.eventTypeShowNotList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
...@@ -613,13 +657,13 @@ ...@@ -613,13 +657,13 @@
${_conditionType_} a.source is null ${_conditionType_} a.source is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('sourceList')"> <if test="conditionParamRef.containsKey('sourceList') and conditionParamRef.sourceList.size() > 0">
${_conditionType_} a.source in ${_conditionType_} a.source in
<foreach collection="conditionParamRef.sourceList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.sourceList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('sourceNotList')"> <if test="conditionParamRef.containsKey('sourceNotList') and conditionParamRef.sourceNotList.size() > 0">
${_conditionType_} a.source not in ${_conditionType_} a.source not in
<foreach collection="conditionParamRef.sourceNotList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.sourceNotList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
...@@ -641,13 +685,13 @@ ...@@ -641,13 +685,13 @@
${_conditionType_} a.deptCode is null ${_conditionType_} a.deptCode is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('deptCodeList')"> <if test="conditionParamRef.containsKey('deptCodeList') and conditionParamRef.deptCodeList.size() > 0">
${_conditionType_} a.deptCode in ${_conditionType_} a.deptCode in
<foreach collection="conditionParamRef.deptCodeList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.deptCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('deptCodeNotList')"> <if test="conditionParamRef.containsKey('deptCodeNotList') and conditionParamRef.deptCodeNotList.size() > 0">
${_conditionType_} a.deptCode not in ${_conditionType_} a.deptCode not in
<foreach collection="conditionParamRef.deptCodeNotList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.deptCodeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
...@@ -676,13 +720,13 @@ ...@@ -676,13 +720,13 @@
${_conditionType_} a.createUserId is null ${_conditionType_} a.createUserId is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('createUserIdList')"> <if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
${_conditionType_} a.createUserId in ${_conditionType_} a.createUserId in
<foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('createUserIdNotList')"> <if test="conditionParamRef.containsKey('createUserIdNotList') and conditionParamRef.createUserIdNotList.size() > 0">
${_conditionType_} a.createUserId not in ${_conditionType_} a.createUserId not in
<foreach collection="conditionParamRef.createUserIdNotList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.createUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
...@@ -710,6 +754,60 @@ ...@@ -710,6 +754,60 @@
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''"> <if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''">
${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') ${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if> </if>
<if test="conditionParamRef.containsKey('hot')">
<if test="conditionParamRef.hot != null ">
${_conditionType_} a.hot = #{${_conditionParam_}.hot}
</if>
<if test="conditionParamRef.hot == null">
${_conditionType_} a.hot is null
</if>
</if>
<if test="conditionParamRef.containsKey('hotList') and conditionParamRef.hotList.size() > 0">
${_conditionType_} a.hot in
<foreach collection="conditionParamRef.hotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('hotNotList') and conditionParamRef.hotNotList.size() > 0">
${_conditionType_} a.hot not in
<foreach collection="conditionParamRef.hotNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('hotStart') and conditionParamRef.hotStart != null">
${_conditionType_} a.hot <![CDATA[ >= ]]> #{${_conditionParam_}.hotStart}
</if>
<if test="conditionParamRef.containsKey('hotEnd') and conditionParamRef.hotEnd != null">
${_conditionType_} a.hot <![CDATA[ <= ]]> #{${_conditionParam_}.hotEnd}
</if>
<if test="conditionParamRef.containsKey('display')">
<if test="conditionParamRef.display != null ">
${_conditionType_} a.display = #{${_conditionParam_}.display}
</if>
<if test="conditionParamRef.display == null">
${_conditionType_} a.display is null
</if>
</if>
<if test="conditionParamRef.containsKey('displayList') and conditionParamRef.displayList.size() > 0">
${_conditionType_} a.display in
<foreach collection="conditionParamRef.displayList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('displayNotList') and conditionParamRef.displayNotList.size() > 0">
${_conditionType_} a.display not in
<foreach collection="conditionParamRef.displayNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('displayStart') and conditionParamRef.displayStart != null">
${_conditionType_} a.display <![CDATA[ >= ]]> #{${_conditionParam_}.displayStart}
</if>
<if test="conditionParamRef.containsKey('displayEnd') and conditionParamRef.displayEnd != null">
${_conditionType_} a.display <![CDATA[ <= ]]> #{${_conditionParam_}.displayEnd}
</if>
</sql> </sql>
<sql id="_orderCols_"> <sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()"> <if test="orderColList != null and !orderColList.isEmpty()">
...@@ -793,6 +891,16 @@ ...@@ -793,6 +891,16 @@
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if> <if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('hot')">
a.hot
<if test='orderCol.hot != null and "DESC".equalsIgnoreCase(orderCol.hot)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('display')">
a.display
<if test='orderCol.display != null and "DESC".equalsIgnoreCase(orderCol.display)'>DESC</if>
,
</if>
</trim> </trim>
</if> </if>
</sql> </sql>
...@@ -800,7 +908,7 @@ ...@@ -800,7 +908,7 @@
<if test="groupList != null and !groupList.isEmpty()"> <if test="groupList != null and !groupList.isEmpty()">
GROUP BY GROUP BY
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
<foreach collection="groupList" open="" close="" index="index" item="item" separator=","> <foreach collection="gr·oupList" open="" close="" index="index" item="item" separator=",">
${item} ${item}
</foreach> </foreach>
</trim> </trim>
......
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