579 lines
25 KiB
XML
579 lines
25 KiB
XML
<?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.AvCfgDao" >
|
|
<resultMap id="AvFileSampleMap" type="com.nis.domain.configuration.AvFileSampleCfg" >
|
|
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
|
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
|
<result column="src_url" property="srcUrl" jdbcType="VARCHAR" />
|
|
<result column="sample_url" property="sampleUrl" jdbcType="VARCHAR" />
|
|
<result column="src_path" property="srcPath" jdbcType="VARCHAR" />
|
|
<result column="sample_path" property="samplePath" jdbcType="VARCHAR" />
|
|
<result column="src_md5" property="srcMd5" jdbcType="VARCHAR" />
|
|
<result column="sample_md5" property="sampleMd5" jdbcType="VARCHAR" />
|
|
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
|
<result column="action" property="action" jdbcType="INTEGER" />
|
|
<result column="level" property="level" jdbcType="INTEGER" />
|
|
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
|
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
|
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
|
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
|
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
|
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
|
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
|
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
|
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
|
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
|
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
|
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
|
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
|
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
|
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
|
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
|
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
|
<result column="creator_name" property="creatorName" jdbcType="VARCHAR" />
|
|
<result column="auditor_name" property="auditorName" jdbcType="VARCHAR" />
|
|
<result column="editor_name" property="editorName" jdbcType="VARCHAR" />
|
|
</resultMap>
|
|
|
|
<resultMap id="AvSignSampleMap" type="com.nis.domain.configuration.AvSignSampleCfg" >
|
|
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
|
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
|
<result column="description" property="description" jdbcType="VARCHAR" />
|
|
<result column="level" property="level" jdbcType="INTEGER" />
|
|
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
|
<result column="action" property="action" jdbcType="INTEGER" />
|
|
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
|
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
|
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
|
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
|
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
|
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
|
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
|
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
|
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
|
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
|
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
|
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
|
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
|
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
|
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
|
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
|
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
|
<result column="creator_name" property="creatorName" jdbcType="VARCHAR" />
|
|
<result column="auditor_name" property="auditorName" jdbcType="VARCHAR" />
|
|
<result column="editor_name" property="editorName" jdbcType="VARCHAR" />
|
|
<result column="do_log" property="doLog" jdbcType="INTEGER" />
|
|
</resultMap>
|
|
<sql id="AvFileSample_Column" >
|
|
a.CFG_ID, a.SRC_URL,a.SAMPLE_URL, a.SRC_MD5,a.SAMPLE_MD5,a.CFG_DESC,a.ACTION,a.IS_VALID,a.IS_AUDIT,
|
|
a.CREATOR_ID,a.CREATE_TIME,a.EDITOR_ID,a.EDIT_TIME,a.AUDITOR_ID,a.AUDIT_TIME,
|
|
a.SERVICE_ID,a.REQUEST_ID,a.COMPILE_ID,a.IS_AREA_EFFECTIVE,a.CLASSIFY,
|
|
a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id,a.cfg_type,a.cfg_region_code,a.LEVEL,
|
|
a.src_path,a.sample_path
|
|
</sql>
|
|
|
|
<sql id="AvSignSample_Column" >
|
|
a.CFG_ID, a.description,a.CFG_DESC,a.ACTION,a.IS_VALID,a.IS_AUDIT,
|
|
a.CREATOR_ID,a.CREATE_TIME,a.EDITOR_ID,a.EDIT_TIME,a.AUDITOR_ID,a.AUDIT_TIME,
|
|
a.SERVICE_ID,a.REQUEST_ID,a.COMPILE_ID,a.IS_AREA_EFFECTIVE,a.CLASSIFY,
|
|
a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id,a.cfg_type,a.cfg_region_code,a.LEVEL,a.do_log
|
|
</sql>
|
|
|
|
<select id="getAvFileSampleById" resultMap="AvFileSampleMap">
|
|
SELECT
|
|
<include refid="AvFileSample_Column" />
|
|
FROM av_file_sample_cfg a
|
|
<where>
|
|
<if test="cfgId !=null">
|
|
CFG_ID = #{cfgId,jdbcType=BIGINT}
|
|
</if>
|
|
<if test="compileId != null">
|
|
AND COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="getAvSignSampleById" resultMap="AvSignSampleMap" parameterType="java.lang.Long" >
|
|
SELECT
|
|
<include refid="AvSignSample_Column" />
|
|
FROM av_sign_sample_cfg a
|
|
WHERE a.CFG_ID = #{cfgId,jdbcType=BIGINT}
|
|
</select>
|
|
|
|
<select id="getAvFileSampleList" resultMap="AvFileSampleMap" >
|
|
SELECT
|
|
<include refid="AvFileSample_Column" />
|
|
<trim prefix="," prefixOverrides=",">
|
|
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
|
,ri.request_title as requestName
|
|
</trim>
|
|
FROM av_file_sample_cfg a
|
|
left join sys_user s on a.creator_id=s.id
|
|
left join sys_user e on a.editor_id=e.id
|
|
left join sys_user u on a.auditor_id=u.id
|
|
left join request_info ri on a.request_id=ri.id
|
|
|
|
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
|
<if test="page !=null and page.where != null and page.where != ''">
|
|
AND ${page.where}
|
|
</if>
|
|
<if test="cfgId != null">
|
|
AND a.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
|
</if>
|
|
<if test="cfgDesc != null and cfgDesc != ''">
|
|
AND a.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="action != null">
|
|
AND a.ACTION=#{action,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="isValid != null">
|
|
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="isValid == null">
|
|
AND a.IS_VALID != -1
|
|
</if>
|
|
<if test="isAudit != null">
|
|
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="creatorName != null and creatorName != ''">
|
|
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="createTime != null and createTime != ''">
|
|
AND a.CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
|
|
</if>
|
|
<if test="editorName != null and editorName != ''">
|
|
AND EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="editTime != null and editTime != ''">
|
|
AND a.EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
|
|
</if>
|
|
<if test="auditorName != null and auditorName != ''">
|
|
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="auditTime != null and auditTime != ''">
|
|
AND a.AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
|
|
</if>
|
|
<if test="serviceId != null">
|
|
AND a.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="requestId != null">
|
|
AND a.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="compileId != null">
|
|
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="isAreaEffective != null">
|
|
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="classify != null and classify != ''">
|
|
AND a.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="attribute != null and attribute != ''">
|
|
AND a.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="lable != null and lable != ''">
|
|
AND a.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="areaEffectiveIds != null and areaEffectiveIds != ''">
|
|
AND a.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="functionId != null">
|
|
AND a.function_id=#{functionId,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="level != null">
|
|
AND a.level=#{level,jdbcType=INTEGER}
|
|
</if>
|
|
<!-- 数据范围过滤 -->
|
|
${sqlMap.dsf}
|
|
</trim>
|
|
<choose>
|
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
|
ORDER BY ${page.orderBy},a.is_audit,a.CFG_ID desc
|
|
</when>
|
|
<otherwise>
|
|
ORDER BY a.is_audit,a.CFG_ID desc
|
|
</otherwise>
|
|
</choose>
|
|
</select>
|
|
|
|
<select id="getAvSignSampleList" resultMap="AvSignSampleMap" >
|
|
SELECT
|
|
<include refid="AvSignSample_Column" />
|
|
<trim prefix="," prefixOverrides=",">
|
|
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
|
,ri.request_title as requestName
|
|
</trim>
|
|
FROM av_sign_sample_cfg a
|
|
left join sys_user s on a.creator_id=s.id
|
|
left join sys_user e on a.editor_id=e.id
|
|
left join sys_user u on a.auditor_id=u.id
|
|
left join request_info ri on a.request_id=ri.id
|
|
|
|
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
|
<if test="page !=null and page.where != null and page.where != ''">
|
|
AND ${page.where}
|
|
</if>
|
|
<if test="cfgId != null">
|
|
AND a.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
|
</if>
|
|
<if test="cfgDesc != null and cfgDesc != ''">
|
|
AND a.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="action != null">
|
|
AND a.ACTION=#{action,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="isValid != null">
|
|
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="isValid == null">
|
|
AND a.IS_VALID != -1
|
|
</if>
|
|
<if test="isAudit != null">
|
|
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="creatorName != null and creatorName != ''">
|
|
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="createTime != null and createTime != ''">
|
|
AND a.CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
|
|
</if>
|
|
<if test="editorName != null and editorName != ''">
|
|
AND EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="editTime != null and editTime != ''">
|
|
AND a.EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
|
|
</if>
|
|
<if test="auditorName != null and auditorName != ''">
|
|
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="auditTime != null and auditTime != ''">
|
|
AND a.AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
|
|
</if>
|
|
<if test="serviceId != null">
|
|
AND a.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="requestId != null">
|
|
AND a.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="compileId != null">
|
|
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="isAreaEffective != null">
|
|
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="classify != null and classify != ''">
|
|
AND a.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="attribute != null and attribute != ''">
|
|
AND a.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="lable != null and lable != ''">
|
|
AND a.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="areaEffectiveIds != null and areaEffectiveIds != ''">
|
|
AND a.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="functionId != null">
|
|
AND a.function_id=#{functionId,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="level != null">
|
|
AND a.level=#{level,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="description != null and description != ''">
|
|
AND a.description like concat(concat('%',#{description,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<!-- 数据范围过滤 -->
|
|
${sqlMap.dsf}
|
|
</trim>
|
|
<choose>
|
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
|
ORDER BY ${page.orderBy},a.is_audit,a.CFG_ID desc
|
|
</when>
|
|
<otherwise>
|
|
ORDER BY a.is_audit,a.CFG_ID desc
|
|
</otherwise>
|
|
</choose>
|
|
</select>
|
|
|
|
<insert id="insertAvFileSample" parameterType="com.nis.domain.configuration.AvFileSampleCfg" >
|
|
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
|
SELECT LAST_INSERT_ID()
|
|
</selectKey>
|
|
insert into av_file_sample_cfg (
|
|
SRC_URL,SAMPLE_URL, SRC_MD5,SAMPLE_MD5,LEVEL,CFG_DESC,ACTION,IS_VALID,IS_AUDIT,
|
|
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
|
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
|
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,function_id,cfg_type,cfg_region_code,src_path,sample_path,
|
|
is_sample_created
|
|
)values (
|
|
#{srcUrl,jdbcType=VARCHAR},#{sampleUrl,jdbcType=VARCHAR},#{srcMd5,jdbcType=VARCHAR},
|
|
#{sampleMd5,jdbcType=VARCHAR},#{level,jdbcType=INTEGER},#{cfgDesc,jdbcType=VARCHAR},#{action,jdbcType=INTEGER},
|
|
0,0,#{creatorId,jdbcType=INTEGER},
|
|
#{createTime,jdbcType=TIMESTAMP},#{editorId,jdbcType=INTEGER},#{editTime,jdbcType=TIMESTAMP},
|
|
#{auditorId,jdbcType=INTEGER},#{auditTime,jdbcType=TIMESTAMP},#{serviceId,jdbcType=INTEGER},
|
|
#{requestId,jdbcType=INTEGER},#{compileId,jdbcType=INTEGER},#{isAreaEffective,jdbcType=INTEGER},
|
|
#{classify,jdbcType=VARCHAR},#{attribute,jdbcType=VARCHAR},#{lable,jdbcType=VARCHAR},
|
|
#{areaEffectiveIds,jdbcType=VARCHAR},#{functionId,jdbcType=INTEGER},
|
|
#{cfgType,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER},#{srcPath,jdbcType=VARCHAR},#{samplePath,jdbcType=VARCHAR},
|
|
#{isSampleCreated,jdbcType=INTEGER}
|
|
)
|
|
</insert>
|
|
|
|
<insert id="insertAvSignSample" parameterType="com.nis.domain.configuration.AvSignSampleCfg" >
|
|
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
|
SELECT LAST_INSERT_ID()
|
|
</selectKey>
|
|
insert into av_sign_sample_cfg (
|
|
description,LEVEL,CFG_DESC,ACTION,IS_VALID,IS_AUDIT,
|
|
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
|
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
|
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,function_id,cfg_type,cfg_region_code,do_log
|
|
)values (
|
|
#{description,jdbcType=VARCHAR},#{level,jdbcType=INTEGER},#{cfgDesc,jdbcType=VARCHAR},#{action,jdbcType=INTEGER},
|
|
0,0,#{creatorId,jdbcType=INTEGER},
|
|
#{createTime,jdbcType=TIMESTAMP},#{editorId,jdbcType=INTEGER},#{editTime,jdbcType=TIMESTAMP},
|
|
#{auditorId,jdbcType=INTEGER},#{auditTime,jdbcType=TIMESTAMP},#{serviceId,jdbcType=INTEGER},
|
|
#{requestId,jdbcType=INTEGER},#{compileId,jdbcType=INTEGER},#{isAreaEffective,jdbcType=INTEGER},
|
|
#{classify,jdbcType=VARCHAR},#{attribute,jdbcType=VARCHAR},#{lable,jdbcType=VARCHAR},
|
|
#{areaEffectiveIds,jdbcType=VARCHAR},#{functionId,jdbcType=INTEGER},
|
|
#{cfgType,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER},
|
|
#{doLog,jdbcType=INTEGER}
|
|
)
|
|
</insert>
|
|
|
|
<update id="updateAvFileSample" parameterType="com.nis.domain.configuration.AvFileSampleCfg" >
|
|
update av_file_sample_cfg
|
|
<set >
|
|
<trim suffixOverrides=",">
|
|
<if test="cfgDesc != null and cfgDesc != ''" >
|
|
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="srcUrl != null and srcUrl != ''">
|
|
src_url = #{srcUrl,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="sampleUrl != null and sampleUrl != ''">
|
|
sample_url = #{sampleUrl,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="action != null" >
|
|
action = #{action,jdbcType=INTEGER},
|
|
</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 and createTime != ''" >
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="editorId != null" >
|
|
editor_id = #{editorId,jdbcType=INTEGER},
|
|
</if>
|
|
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
|
<if test="serviceId != null" >
|
|
service_id = #{serviceId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="requestId != null" >
|
|
request_id = #{requestId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="isAreaEffective != null" >
|
|
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="classify != null and classify != ''" >
|
|
classify = #{classify,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="attribute != null and attribute != ''" >
|
|
attribute = #{attribute,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="lable != null and lable != ''" >
|
|
lable = #{lable,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="areaEffectiveIds != null" >
|
|
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="functionId != null" >
|
|
function_id = #{functionId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="cfgRegionCode != null" >
|
|
cfg_region_code = #{cfgRegionCode,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="cfgType != null" >
|
|
cfg_type = #{cfgType,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="level != null" >
|
|
level = #{level,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="srcPath != null and srcPath != ''">
|
|
src_path = #{srcPath,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="samplePath != null and samplePath != ''">
|
|
sample_path = #{samplePath,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="isSampleCreated != null" >
|
|
is_sample_created = #{isSampleCreated,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="srcMd5 != null and srcMd5 != ''">
|
|
src_md5 = #{srcMd5,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="sampleMd5 != null and sampleMd5 != ''">
|
|
sample_md5 = #{sampleMd5,jdbcType=VARCHAR},
|
|
</if>
|
|
</trim>
|
|
</set>
|
|
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
|
</update>
|
|
|
|
<update id="updateAvSignSample" parameterType="com.nis.domain.configuration.AvSignSampleCfg" >
|
|
update av_sign_sample_cfg
|
|
<set >
|
|
<trim suffixOverrides=",">
|
|
<if test="cfgDesc != null and cfgDesc != ''" >
|
|
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="description != null and description != ''">
|
|
description = #{description,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="action != null" >
|
|
action = #{action,jdbcType=INTEGER},
|
|
</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 and createTime != ''" >
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="editorId != null" >
|
|
editor_id = #{editorId,jdbcType=INTEGER},
|
|
</if>
|
|
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
|
<if test="serviceId != null" >
|
|
service_id = #{serviceId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="requestId != null" >
|
|
request_id = #{requestId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="isAreaEffective != null" >
|
|
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="classify != null and classify != ''" >
|
|
classify = #{classify,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="attribute != null and attribute != ''" >
|
|
attribute = #{attribute,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="lable != null and lable != ''" >
|
|
lable = #{lable,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="areaEffectiveIds != null" >
|
|
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="functionId != null" >
|
|
function_id = #{functionId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="cfgRegionCode != null" >
|
|
cfg_region_code = #{cfgRegionCode,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="cfgType != null" >
|
|
cfg_type = #{cfgType,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="level != null" >
|
|
level = #{level,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="doLog != null" >
|
|
do_log = #{doLog,jdbcType=INTEGER},
|
|
</if>
|
|
</trim>
|
|
</set>
|
|
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
|
</update>
|
|
|
|
<update id="updateAvFileSampleValid" parameterType="com.nis.domain.configuration.AvFileSampleCfg" >
|
|
update av_file_sample_cfg set is_valid = #{isValid,jdbcType=INTEGER},
|
|
editor_id = #{editorId,jdbcType=INTEGER} ,
|
|
edit_time = #{editTime,jdbcType=TIMESTAMP} where cfg_id = #{cfgId,jdbcType=BIGINT}
|
|
</update>
|
|
<update id="auditAvFileSample" parameterType="com.nis.domain.configuration.AvFileSampleCfg" >
|
|
update av_file_sample_cfg set is_audit = #{isAudit,jdbcType=INTEGER},
|
|
auditor_id = #{auditorId,jdbcType=INTEGER},
|
|
audit_time = #{auditTime,jdbcType=TIMESTAMP}
|
|
<if test="isValid != null" >
|
|
,is_valid = #{isValid,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="srcUrl != null and srcUrl!=''" >
|
|
,src_url = #{srcUrl,jdbcType=VARCHAR}
|
|
</if>
|
|
<if test="sampleUrl != null and sampleUrl!=''" >
|
|
,sample_url = #{sampleUrl,jdbcType=VARCHAR}
|
|
</if>
|
|
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
|
</update>
|
|
|
|
<update id="updateAvSignSampleValid" parameterType="com.nis.domain.configuration.AvSignSampleCfg" >
|
|
update av_sign_sample_cfg
|
|
<set>
|
|
is_valid = #{isValid,jdbcType=INTEGER},
|
|
<if test="isAudit != null" >
|
|
is_audit = #{isAudit,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="serviceId!=null">
|
|
service_id=#{serviceId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="action!=null">
|
|
action=#{action,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="level!=null">
|
|
level=#{level,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="editorId != null" >
|
|
editor_id = #{editorId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="editTime != null and editTime!=''" >
|
|
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="auditTime != null and auditTime!=''" >
|
|
audit_time = #{auditTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="auditorId != null" >
|
|
auditor_id = #{auditorId,jdbcType=INTEGER}
|
|
</if>
|
|
</set>
|
|
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
|
</update>
|
|
<update id="auditAvSignSample" parameterType="com.nis.domain.configuration.AvSignSampleCfg" >
|
|
update av_sign_sample_cfg set is_audit = #{isAudit,jdbcType=INTEGER},
|
|
auditor_id = #{auditorId,jdbcType=INTEGER},
|
|
audit_time = #{auditTime,jdbcType=TIMESTAMP}
|
|
<if test="isValid != null" >
|
|
,is_valid = #{isValid,jdbcType=INTEGER}
|
|
</if>
|
|
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
|
</update>
|
|
|
|
<select id="getAvFileBySampleList" resultMap="AvFileSampleMap" >
|
|
SELECT
|
|
<include refid="AvFileSample_Column" />
|
|
<trim prefix="," prefixOverrides=",">
|
|
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
|
,ri.request_title as requestName
|
|
</trim>
|
|
FROM av_file_sample_cfg a
|
|
left join sys_user s on a.creator_id=s.id
|
|
left join sys_user e on a.editor_id=e.id
|
|
left join sys_user u on a.auditor_id=u.id
|
|
left join request_info ri on a.request_id=ri.id
|
|
where a.CFG_ID in (${ids})
|
|
</select>
|
|
|
|
|
|
</mapper> |