融合代码,提交本地

更新:辅助字典移动到basics目录下,
               修订数据类型条件查询无效bug,
               优化无条件分页查询代码,
               配置编码自增,用户不需手动输入(app强特征作用域功能待添加);
               无上级,改为根节点,
This commit is contained in:
zhangshilin
2018-03-06 10:36:15 +08:00
53 changed files with 1872 additions and 736 deletions

View File

@@ -159,8 +159,7 @@
</choose> -->
<trim prefix="," prefixOverrides=",">
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
,ri.request_title as requestName,sdic.item_value as classifyName,sdia.item_value as attributeName
,sdil.item_value as lableName
,ri.request_title as requestName
</trim>
from ${tableName} r
left join sys_user s on r.creator_id=s.id

View File

@@ -239,8 +239,7 @@
</choose> -->
<trim prefix="," prefixOverrides=",">
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
,ri.request_title as requestName,sdic.item_value as classifyName,sdia.item_value as attributeName
,sdil.item_value as lableName
,ri.request_title as requestName
</trim>
from ${tableName} r
left join sys_user s on r.creator_id=s.id

View File

@@ -162,8 +162,7 @@
</choose> -->
<trim prefix="," prefixOverrides=",">
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
,ri.request_title as requestName,sdic.item_value as classifyName,sdia.item_value as attributeName
,sdil.item_value as lableName
,ri.request_title as requestName
</trim>
from num_boundary_cfg r
left join sys_user s on r.creator_id=s.id

View File

@@ -6,6 +6,7 @@ import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.nis.domain.configuration.RequestInfo;
import com.nis.domain.configuration.TaskInfo;
import com.nis.web.dao.CrudDao;
import com.nis.web.dao.MyBatisDao;
@@ -20,14 +21,8 @@ public interface RequestInfoDao extends CrudDao {
int deleteByPrimaryKey(Long id);
List<TaskInfo> showTask(TaskInfo taskInfo);
int insertSelective(RequestInfo requestInfo);
RequestInfo selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(RequestInfo requestInfo);
int updateByPrimaryKey(RequestInfo requestInfo);
}

View File

@@ -16,6 +16,7 @@
<result column="edit_time" jdbcType="DATE" property="editTime" />
<result column="auditor_id" jdbcType="INTEGER" property="auditorId" />
<result column="audit_time" jdbcType="DATE" property="auditTime" />
<result column="task_id" jdbcType="BIGINT" property="taskId" />
</resultMap>
<sql id="Base_Column_List">
id, request_number, request_org, request_time, request_title, request_content, is_valid,
@@ -25,6 +26,7 @@
<select id="findRequestInfo" resultMap="BaseResultMap">
select
r.id AS id,
r.task_id AS taskId,
r.request_number AS requestNumber,
r.request_org AS requestOrg,
r.request_time AS requestTime,
@@ -37,11 +39,13 @@
u.name AS editorName,
r.edit_time AS editTime,
e.name AS currentName,
r.audit_time AS auditTime
r.audit_time AS auditTime,
t.task_name AS taskName
from request_info r
left join sys_user s on r.creator_id=s.id
left join sys_user u on r.editor_id=u.id
left join sys_user e on r.auditor_id=e.id
left join task_info t on r.task_id=t.id
where r.is_valid=1 and r.is_audit !=3
<if test="requestTitle != null and requestTitle != ''">
AND r.request_title like
@@ -159,159 +163,4 @@
where id = #{id,jdbcType=BIGINT} and is_audit !=1
</update>
<insert id="insertSelective" parameterType="com.nis.domain.configuration.RequestInfo">
insert into request_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="requestNumber != null">
request_number,
</if>
<if test="requestOrg != null">
request_org,
</if>
<if test="requestTime != null">
request_time,
</if>
<if test="requestTitle != null">
request_title,
</if>
<if test="requestContent != null">
request_content,
</if>
<if test="isValid != null">
is_valid,
</if>
<if test="isAudit != null">
is_audit,
</if>
<if test="creatorId != null">
creator_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="editorId != null">
editor_id,
</if>
<if test="editTime != null">
edit_time,
</if>
<if test="auditorId != null">
auditor_id,
</if>
<if test="auditTime != null">
audit_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="requestNumber != null">
#{requestNumber,jdbcType=VARCHAR},
</if>
<if test="requestOrg != null">
#{requestOrg,jdbcType=VARCHAR},
</if>
<if test="requestTime != null">
#{requestTime,jdbcType=DATE},
</if>
<if test="requestTitle != null">
#{requestTitle,jdbcType=VARCHAR},
</if>
<if test="requestContent != null">
#{requestContent,jdbcType=VARCHAR},
</if>
<if test="isValid != null">
#{isValid,jdbcType=INTEGER},
</if>
<if test="isAudit != null">
#{isAudit,jdbcType=INTEGER},
</if>
<if test="creatorId != null">
#{creatorId,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=DATE},
</if>
<if test="editorId != null">
#{editorId,jdbcType=INTEGER},
</if>
<if test="editTime != null">
#{editTime,jdbcType=DATE},
</if>
<if test="auditorId != null">
#{auditorId,jdbcType=INTEGER},
</if>
<if test="auditTime != null">
#{auditTime,jdbcType=DATE},
</if>
</trim>
</insert>
<update id="updateByPrimaryKey" parameterType="com.nis.domain.configuration.RequestInfo">
update request_info
set request_number = #{requestNumber,jdbcType=VARCHAR},
request_org = #{requestOrg,jdbcType=VARCHAR},
request_time = #{requestTime,jdbcType=DATE},
request_title = #{requestTitle,jdbcType=VARCHAR},
request_content = #{requestContent,jdbcType=VARCHAR},
is_valid = #{isValid,jdbcType=INTEGER},
is_audit = #{isAudit,jdbcType=INTEGER},
creator_id = #{creatorId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=DATE},
editor_id = #{editorId,jdbcType=INTEGER},
edit_time = #{editTime,jdbcType=DATE},
auditor_id = #{auditorId,jdbcType=INTEGER},
audit_time = #{auditTime,jdbcType=DATE}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="findAllList" resultMap="BaseResultMap">
select
r.id AS id,
r.request_number AS requestNumber,
r.request_org AS requestOrg,
r.request_time AS requestTime,
r.request_title AS requestTitle,
r.request_content AS requestContent,
r.is_valid AS isValid,
r.is_audit AS isAudit,
s.name AS creatorName,
r.create_time AS createTime,
u.name AS editorName,
r.edit_time AS editTime,
e.name AS currentName,
r.audit_time AS auditTime
from request_info r
left join sys_user s on r.creator_id=s.id
left join sys_user u on r.editor_id=u.id
left join sys_user e on r.auditor_id=e.id
<trim prefix="where" prefixOverrides="AND|OR">
<if test="requestTitle != null and requestTitle != ''">
AND r.request_title like
<if test="dbName == 'mysql'">CONCAT('%',#{requestTitle}, '%')</if>
</if>
<if test="requestContent != null and requestContent != ''">
AND r.request_content like
<if test="dbName == 'mysql'">CONCAT('%',#{requestContent},'%')</if>
</if>
<if test="requestNumber != null and requestNumber != ''">
AND r.request_number=#{requestNumber}
</if>
<if test="isAudit != null">
AND r.is_audit=${isAudit}
</if>
<if test=" timeType = 'requestTime' and beginDate!=null and beginDate!='' and endDate!=null and endDate!=''">
AND r.request_time between #{beginDate} and #{endDate}
</if>
<if test="timeType = 'createTime' and beginDate!=null and beginDate!='' and endDate!=null and endDate!=''">
AND (r.create_time between #{beginDate} and #{endDate}) or (r.audit_time between #{beginDate} and #{endDate})
</if>
</trim>
order by r.request_time desc
</select>
</mapper>

View File

@@ -0,0 +1,303 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.nis.web.dao.configuration.ServiceDictInfoDao" >
<resultMap id="dictResultMap" type="com.nis.domain.configuration.ServiceDictInfo" >
<id column="service_dict_id" property="serviceDictId" jdbcType="INTEGER" />
<result column="item_type" property="itemType" jdbcType="INTEGER" />
<result column="item_code" property="itemCode" jdbcType="INTEGER" />
<result column="item_value" property="itemValue" jdbcType="VARCHAR" />
<result column="item_desc" property="itemDesc" jdbcType="VARCHAR" />
<result column="is_leaf" property="isLeaf" jdbcType="INTEGER" />
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
<!-- 父id -->
<association property="parent" javaType="com.nis.domain.configuration.ServiceDictInfo">
<id column="service_dict_id" property="serviceDictId" jdbcType="INTEGER" />
<result column="item_type" property="itemType" jdbcType="INTEGER" />
<result column="item_code" property="itemCode" jdbcType="INTEGER" />
<result column="item_value" property="itemValue" jdbcType="VARCHAR" />
<result column="item_desc" property="itemDesc" jdbcType="VARCHAR" />
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
</association>
<!-- 创建人员 -->
<association property="serviceDictCreator" javaType="com.nis.domain.SysUser">
<id property="id" column="id"/>
<result property="loginId" column="login_id"/>
<result property="name" column="name"/>
</association>
<!-- 修改人员 -->
<association property="serviceDictEditor" javaType="com.nis.domain.SysUser">
<id property="id" column="id"/>
<result property="loginId" column="login_id"/>
<result property="name" column="name"/>
</association>
</resultMap>
<resultMap id="dictResultSimpleMap" type="com.nis.domain.configuration.ServiceDictInfo" >
<id column="service_dict_id" property="serviceDictId" jdbcType="INTEGER" />
<result column="item_type" property="itemType" jdbcType="INTEGER" />
<result column="item_code" property="itemCode" jdbcType="INTEGER" />
<result column="item_value" property="itemValue" jdbcType="VARCHAR" />
<result column="item_desc" property="itemDesc" jdbcType="VARCHAR" />
<result column="is_leaf" property="isLeaf" jdbcType="INTEGER" />
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
</resultMap>
<sql id="serviceDictInfoColumns">
s.service_dict_id AS serviceDictId,
s.item_type AS itemType,
s.item_code AS itemCode,
s.item_value AS itemValue,
s.item_desc AS itemDesc,
s.parent_id AS "parent.serviceDictId",
s.is_leaf AS isLeaf,
s.is_valid AS isValid,
s.creator_id AS "serviceDictCreator.id",
s.create_time AS createTime,
s.editor_id AS "serviceDictEditor.id",
s.edit_time AS editTime
</sql>
<sql id="serviceDictInfoColumnsSimple">
s.service_dict_id AS serviceDictId,
s.item_type AS itemType,
s.item_code AS itemCode,
s.item_value AS itemValue,
s.item_desc AS itemDesc,
s.is_leaf AS isLeaf,
s.is_valid AS isValid
</sql>
<!-- 查询顶层分页列表 (==)-->
<select id="findTopDictList" resultMap="dictResultMap" parameterType="com.nis.domain.configuration.ServiceDictInfo">
SELECT * FROM service_dict_info WHERE is_valid=1 AND parent_id = 0
<if test="itemValue != null and itemValue != '' " >
AND item_value like '%${itemValue}%'
</if>
<if test="itemCode != null and itemCode != '' " >
AND item_code like '%${itemCode}%'
</if>
<if test="itemType != null and itemType != '' " >
AND item_type = #{itemType}
</if>
<if test="beginDate !=null" >
AND create_time &gt;= #{beginDate,jdbcType=TIMESTAMP}
</if>
<if test="endDate !=null" >
AND create_time &lt;= DATE_ADD(#{endDate,jdbcType=TIMESTAMP},INTERVAL 1 DAY)
</if>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
<otherwise>
ORDER BY create_time desc
</otherwise>
</choose>
</select>
<!-- 查询顶层分页列表 (!=)-->
<select id="findTopDictListN" resultMap="dictResultMap" parameterType="com.nis.domain.configuration.ServiceDictInfo">
SELECT * FROM service_dict_info WHERE is_valid=1 AND parent_id = 0
<if test="itemValue != null and itemValue != '' " >
AND item_value like '%${itemValue}%'
</if>
<if test="itemCode != null and itemCode != '' " >
AND item_code like '%${itemCode}%'
</if>
<if test="itemType != null and itemType != '' " >
AND item_type != #{itemType}
</if>
<if test="beginDate !=null" >
AND create_time &gt;= #{beginDate,jdbcType=TIMESTAMP}
</if>
<if test="endDate !=null" >
AND create_time &lt;= DATE_ADD(#{endDate,jdbcType=TIMESTAMP},INTERVAL 1 DAY)
</if>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
<otherwise>
ORDER BY create_time desc
</otherwise>
</choose>
</select>
<!-- 查出所有 -->
<select id="findAllDictList" resultType="serviceDictInfo">
SELECT
<include refid="serviceDictInfoColumns"/>
FROM service_dict_info s
<include refid="menuJoins"/>
WHERE s.is_valid =1
</select>
<!-- 查询所有非叶子配置 -->
<select id="findAllNoLeafDictList" resultType="com.nis.domain.configuration.ServiceDictInfo" parameterType="java.lang.Integer">
SELECT
<include refid="serviceDictInfoColumns"/>
FROM service_dict_info s
WHERE s.is_valid = 1 AND s.is_leaf = 0 AND item_type = #{itemType}
</select>
<!-- 条件查询分页(==) -->
<select id="findDictSearchList" resultMap="dictResultMap" parameterType="com.nis.domain.configuration.ServiceDictInfo">
SELECT * FROM service_dict_info WHERE is_valid=1
<if test="itemType != null and itemType != '' " >
AND item_type like '%${itemType}%'
</if>
<if test="itemCode != null and itemCode != '' " >
AND item_code like '%${itemCode}%'
</if>
<if test="itemValue!= null and itemValue != '' " >
AND item_value like '%${itemValue}%'
</if>
<if test="beginDate !=null" >
AND create_time &gt;= #{beginDate,jdbcType=TIMESTAMP}
</if>
<if test="endDate !=null" >
AND create_time &lt;= DATE_ADD(#{endDate,jdbcType=TIMESTAMP},INTERVAL 1 DAY)
</if>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
<otherwise>
ORDER BY create_time desc
</otherwise>
</choose>
</select>
<!-- 条件查询分页(!=) -->
<select id="findDictSearchListN" resultMap="dictResultMap" parameterType="com.nis.domain.configuration.ServiceDictInfo">
SELECT * FROM service_dict_info WHERE is_valid=1
<if test="itemCode != null and itemCode != '' " >
AND item_code like '%${itemCode}%'
</if>
<if test="itemValue!= null and itemValue != '' " >
AND item_value like '%${itemValue}%'
</if>
<if test="itemType != null and itemType != '' " >
AND item_type != ${itemType}
</if>
<if test="beginDate !=null" >
AND create_time &gt;= #{beginDate,jdbcType=TIMESTAMP}
</if>
<if test="endDate !=null" >
AND create_time &lt;= DATE_ADD(#{endDate,jdbcType=TIMESTAMP},INTERVAL 1 DAY)
</if>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
<otherwise>
ORDER BY create_time desc
</otherwise>
</choose>
</select>
<!-- 根据主键查询字典详细信息 -->
<select id="getDictById" resultType="com.nis.domain.configuration.ServiceDictInfo">
select
<include refid="serviceDictInfoColumns"/>
from service_dict_info s where s.service_dict_id = #{serviceDictId}
</select>
<!-- 根据上级id选出所有下级 -->
<select id="getDictByParentId" resultMap="dictResultMap">
select *
from service_dict_info s where parent_id = #{parentId}
</select>
<!-- 根据itemCode查询字典对象列表 -->
<select id="findByItemCode" resultType="com.nis.domain.configuration.ServiceDictInfo">
select
<include refid="serviceDictInfoColumns"/>
from service_dict_info s where s.item_code = #{itemCode}
</select>
<!-- 新增字典信息 -->
<insert id="insertDict" parameterType="com.nis.domain.configuration.ServiceDictInfo" useGeneratedKeys="true" keyProperty="id" >
insert into service_dict_info (item_type, item_code, item_value, item_desc, parent_id, is_leaf, is_valid, creator_id, create_time, editor_id, edit_time)
values ( #{itemType,jdbcType=INTEGER}, #{itemCode,jdbcType=INTEGER},
#{itemValue,jdbcType=VARCHAR}, #{itemDesc,jdbcType=VARCHAR},
#{parent.serviceDictId,jdbcType=INTEGER}, #{isLeaf,jdbcType=INTEGER}, #{isValid,jdbcType=INTEGER},
#{serviceDictCreator.id,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{serviceDictEditor.id,jdbcType=INTEGER}, #{editTime,jdbcType=TIMESTAMP})
</insert>
<!-- 修改 -->
<update id="update">
UPDATE service_dict_info s SET
s.service_dict_id = #{serviceDictId},
s.item_type = #{itemType},
s.item_code = #{itemCode},
s.item_value = #{itemValue},
s.item_desc = #{itemDesc},
s.parent_id = #{parent.serviceDictId},
s.is_leaf = #{isLeaf},
s.creator_id = #{serviceDictCreator.id},
s.editor_id = #{serviceDictEditor.id},
s.edit_time = #{editTime}
WHERE s.service_dict_id = #{serviceDictId}
</update>
<!-- 删除 -->
<update id="delete">
UPDATE service_dict_info s set s.is_valid = #{isValid} where s.service_dict_id = #{serviceDictId}
</update>
<select id="findItemDict" resultMap="dictResultSimpleMap">
select
<include refid="serviceDictInfoColumnsSimple" />
from service_dict_info s where s.is_leaf = 0 and s.item_type=#{itemType} and s.is_valid=#{isValid};
</select>
<select id="findAllItemDict" resultMap="dictResultSimpleMap">
select
<include refid="serviceDictInfoColumnsSimple" />
from service_dict_info s where s.is_leaf = 0 and s.item_type=#{itemType};
</select>
<sql id="menuJoins">
LEFT JOIN service_dict_info p ON p.service_dict_id = s.parent_id
</sql>
</mapper>

View File

@@ -178,8 +178,7 @@
</choose> -->
<trim prefix="," prefixOverrides=",">
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
,ri.request_title as requestName,sdic.item_value as classifyName,sdia.item_value as attributeName
,sdil.item_value as lableName
,ri.request_title as requestName
</trim>
from ${tableName} r
left join sys_user s on r.creator_id=s.id

View File

@@ -0,0 +1,8 @@
package com.nis.web.dao.configuration;
import com.nis.domain.configuration.TaskInfo;
import com.nis.web.dao.CrudDao;
import com.nis.web.dao.MyBatisDao;
@MyBatisDao
public interface TaskInfoDao extends CrudDao<TaskInfo>{
}

View File

@@ -0,0 +1,192 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.nis.web.dao.configuration.TaskInfoDao">
<resultMap id="BaseResultMap" type="com.nis.domain.configuration.TaskInfo">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="task_name" jdbcType="VARCHAR" property="taskName" />
<result column="task_org" jdbcType="VARCHAR" property="taskOrg" />
<result column="task_time" jdbcType="DATE" property="taskTime" />
<result column="task_desc" jdbcType="VARCHAR" property="taskDesc" />
<result column="is_valid" jdbcType="INTEGER" property="isValid" />
<result column="is_audit" jdbcType="INTEGER" property="isAudit" />
<result column="creator_id" jdbcType="INTEGER" property="creatorId" />
<result column="create_time" jdbcType="DATE" property="createTime" />
<result column="editor_id" jdbcType="INTEGER" property="editorId" />
<result column="edit_time" jdbcType="DATE" property="editTime" />
<result column="auditor_id" jdbcType="INTEGER" property="auditorId" />
<result column="audit_time" jdbcType="DATE" property="auditTime" />
</resultMap>
<sql id="Base_Column_List">
id, task_name, task_org, task_time, task_desc, is_valid, is_audit, creator_id, create_time,
editor_id, edit_time, auditor_id, audit_time
</sql>
<select id="findList" parameterType="com.nis.domain.configuration.TaskInfo" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from task_info
<if test="id!=null">
where id = #{id,jdbcType=BIGINT}
</if>
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from task_info
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.nis.domain.configuration.TaskInfo">
insert into task_info (id, task_name, task_org,
task_time, task_desc, is_valid,
is_audit, creator_id, create_time,
editor_id, edit_time, auditor_id,
audit_time)
values (#{id,jdbcType=BIGINT}, #{taskName,jdbcType=VARCHAR}, #{taskOrg,jdbcType=VARCHAR},
#{taskTime,jdbcType=DATE}, #{taskDesc,jdbcType=VARCHAR}, #{isValid,jdbcType=INTEGER},
#{isAudit,jdbcType=INTEGER}, #{creatorId,jdbcType=INTEGER}, #{createTime,jdbcType=DATE},
#{editorId,jdbcType=INTEGER}, #{editTime,jdbcType=DATE}, #{auditorId,jdbcType=INTEGER},
#{auditTime,jdbcType=DATE})
</insert>
<insert id="insertSelective" parameterType="com.nis.domain.configuration.TaskInfo">
insert into task_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="taskName != null">
task_name,
</if>
<if test="taskOrg != null">
task_org,
</if>
<if test="taskTime != null">
task_time,
</if>
<if test="taskDesc != null">
task_desc,
</if>
<if test="isValid != null">
is_valid,
</if>
<if test="isAudit != null">
is_audit,
</if>
<if test="creatorId != null">
creator_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="editorId != null">
editor_id,
</if>
<if test="editTime != null">
edit_time,
</if>
<if test="auditorId != null">
auditor_id,
</if>
<if test="auditTime != null">
audit_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="taskName != null">
#{taskName,jdbcType=VARCHAR},
</if>
<if test="taskOrg != null">
#{taskOrg,jdbcType=VARCHAR},
</if>
<if test="taskTime != null">
#{taskTime,jdbcType=DATE},
</if>
<if test="taskDesc != null">
#{taskDesc,jdbcType=VARCHAR},
</if>
<if test="isValid != null">
#{isValid,jdbcType=INTEGER},
</if>
<if test="isAudit != null">
#{isAudit,jdbcType=INTEGER},
</if>
<if test="creatorId != null">
#{creatorId,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=DATE},
</if>
<if test="editorId != null">
#{editorId,jdbcType=INTEGER},
</if>
<if test="editTime != null">
#{editTime,jdbcType=DATE},
</if>
<if test="auditorId != null">
#{auditorId,jdbcType=INTEGER},
</if>
<if test="auditTime != null">
#{auditTime,jdbcType=DATE},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.nis.domain.configuration.TaskInfo">
update task_info
<set>
<if test="taskName != null">
task_name = #{taskName,jdbcType=VARCHAR},
</if>
<if test="taskOrg != null">
task_org = #{taskOrg,jdbcType=VARCHAR},
</if>
<if test="taskTime != null">
task_time = #{taskTime,jdbcType=DATE},
</if>
<if test="taskDesc != null">
task_desc = #{taskDesc,jdbcType=VARCHAR},
</if>
<if test="isValid != null">
is_valid = #{isValid,jdbcType=INTEGER},
</if>
<if test="isAudit != null">
is_audit = #{isAudit,jdbcType=INTEGER},
</if>
<if test="creatorId != null">
creator_id = #{creatorId,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=DATE},
</if>
<if test="editorId != null">
editor_id = #{editorId,jdbcType=INTEGER},
</if>
<if test="editTime != null">
edit_time = #{editTime,jdbcType=DATE},
</if>
<if test="auditorId != null">
auditor_id = #{auditorId,jdbcType=INTEGER},
</if>
<if test="auditTime != null">
audit_time = #{auditTime,jdbcType=DATE},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.nis.domain.configuration.TaskInfo">
update task_info
set task_name = #{taskName,jdbcType=VARCHAR},
task_org = #{taskOrg,jdbcType=VARCHAR},
task_time = #{taskTime,jdbcType=DATE},
task_desc = #{taskDesc,jdbcType=VARCHAR},
is_valid = #{isValid,jdbcType=INTEGER},
is_audit = #{isAudit,jdbcType=INTEGER},
creator_id = #{creatorId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=DATE},
editor_id = #{editorId,jdbcType=INTEGER},
edit_time = #{editTime,jdbcType=DATE},
auditor_id = #{auditorId,jdbcType=INTEGER},
audit_time = #{auditTime,jdbcType=DATE}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -41,6 +41,9 @@
<if test="serviceName != null and serviceName != ''">
and ssi.service_name like CONCAT('%', #{serviceName}, '%')
</if>
<if test="serviceId != null and serviceId != ''">
and ssi.service_id like CONCAT('%', #{serviceId}, '%')
</if>
<if test="action != null">
and ssi.action=#{action}
</if>