248 lines
10 KiB
XML
248 lines
10 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.basics.UrlCommGroupDao">
|
|
<resultMap id="urlCommGroupCfgMap" type="com.nis.domain.basics.UrlCommGroupCfg">
|
|
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
|
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
|
<result column="cfg_keywords" property="cfgKeywords" 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="expr_type" property="exprType" jdbcType="INTEGER" />
|
|
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
|
|
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
|
|
<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="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
|
<result column="ratelimit" property="ratelimit" jdbcType="VARCHAR" />
|
|
<result column="user_region1" property="userRegion1" jdbcType="VARCHAR" />
|
|
<result column="user_region2" property="userRegion2" jdbcType="VARCHAR" />
|
|
<result column="user_region3" property="userRegion3" jdbcType="VARCHAR" />
|
|
<result column="user_region4" property="userRegion4" jdbcType="VARCHAR" />
|
|
<result column="user_region5" property="userRegion5" jdbcType="VARCHAR" />
|
|
|
|
</resultMap>
|
|
|
|
<select id="findAllPageList" parameterType="com.nis.domain.basics.UrlCommGroupCfg" resultMap="urlCommGroupCfgMap">
|
|
SELECT
|
|
r.cfg_id,r.cfg_desc,r.cfg_keywords,r.action,r.is_valid,r.is_audit,r.creator_id,
|
|
r.create_time,r.editor_id,r.edit_time,r.auditor_id,r.audit_time,r.service_id,
|
|
r.request_id,r.compile_id,r.is_area_effective,r.classify,r.attribute,r.lable,
|
|
r.expr_type,r.match_method,r.is_hexbin,r.area_effective_ids,r.function_id,
|
|
r.cfg_region_code,r.cfg_type,r.ratelimit,r.user_region1,r.user_region2,
|
|
r.user_region3,r.user_region4,r.user_region5,
|
|
s.name AS creator_name,e.name AS editor_name,u.name AS auditor_name
|
|
FROM
|
|
http_url_cfg r
|
|
LEFT JOIN sys_user s ON r.creator_id = s.id
|
|
LEFT JOIN sys_user e ON r.editor_id = e.id
|
|
LEFT JOIN sys_user u ON r.auditor_id = u.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 r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
|
</if>
|
|
<if test="cfgDesc != null and cfgDesc != ''">
|
|
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="cfgKeywords != null and cfgKeywords != ''">
|
|
AND r.cfg_keywords like concat(concat('%',#{cfgKeywords,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="cfgRegionCode != null">
|
|
AND r.CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="cfgType != null and cfgType != ''">
|
|
AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="action != null">
|
|
AND r.ACTION=#{action,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="isValid != null">
|
|
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="isValid == null">
|
|
AND r.IS_VALID != -1
|
|
</if>
|
|
<if test="isAudit != null">
|
|
AND r.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 r.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 r.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 r.AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
|
|
</if>
|
|
<if test="serviceId != null">
|
|
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="requestId != null">
|
|
AND r.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="isAreaEffective != null">
|
|
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="classify != null and classify !=''">
|
|
AND r.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="attribute != null and attribute !=''">
|
|
AND r.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="lable != null and lable !=''">
|
|
AND r.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="areaEffectiveIds != null and areaEffectiveIds !=''">
|
|
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="functionId != null">
|
|
AND r.FUNCTION_ID=#{functionId,jdbcType=INTEGER}
|
|
</if>
|
|
|
|
<!-- 数据范围过滤 -->
|
|
${sqlMap.dsf}
|
|
</trim>
|
|
<choose>
|
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
|
ORDER BY ${page.orderBy}
|
|
</when>
|
|
<otherwise>
|
|
ORDER BY r.create_time desc
|
|
</otherwise>
|
|
</choose>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="findByPage" resultMap="urlCommGroupCfgMap">
|
|
SELECT
|
|
r.cfg_id,r.cfg_desc,r.cfg_keywords,r.action,r.is_valid,r.is_audit,r.creator_id,
|
|
r.create_time,r.editor_id,r.edit_time,r.auditor_id,r.audit_time,r.service_id,
|
|
r.request_id,r.compile_id,r.is_area_effective,r.classify,r.attribute,r.lable,
|
|
r.expr_type,r.match_method,r.is_hexbin,r.area_effective_ids,r.function_id,
|
|
r.cfg_region_code,r.cfg_type,r.ratelimit,r.user_region1,r.user_region2,
|
|
r.user_region3,r.user_region4,r.user_region5,
|
|
s.name AS creator_name,e.name AS editor_name,u.name AS auditor_name
|
|
FROM
|
|
http_url_cfg r
|
|
LEFT JOIN sys_user s ON r.creator_id = s.id
|
|
LEFT JOIN sys_user e ON r.editor_id = e.id
|
|
LEFT JOIN sys_user u ON r.auditor_id = u.id
|
|
where r.CFG_ID in (${ids})
|
|
</select>
|
|
|
|
<select id="findInfoByCfgId" resultMap="urlCommGroupCfgMap">
|
|
SELECT
|
|
r.cfg_id,r.cfg_desc,r.cfg_keywords,r.action,r.is_valid,r.is_audit,r.creator_id,
|
|
r.create_time,r.editor_id,r.edit_time,r.auditor_id,r.audit_time,r.service_id,
|
|
r.request_id,r.compile_id,r.is_area_effective,r.classify,r.attribute,r.lable,
|
|
r.expr_type,r.match_method,r.is_hexbin,r.area_effective_ids,r.function_id,
|
|
r.cfg_region_code,r.cfg_type,r.ratelimit,r.user_region1,r.user_region2,
|
|
r.user_region3,r.user_region4,r.user_region5,
|
|
s.name AS creator_name,e.name AS editor_name,u.name AS auditor_name
|
|
FROM
|
|
http_url_cfg r
|
|
LEFT JOIN sys_user s ON r.creator_id = s.id
|
|
LEFT JOIN sys_user e ON r.editor_id = e.id
|
|
LEFT JOIN sys_user u ON r.auditor_id = u.id
|
|
where r.CFG_ID =#{cfgId}
|
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertUrlCommGroupCfg" parameterType="com.nis.domain.basics.UrlCommGroupCfg">
|
|
insert into http_url_cfg (
|
|
CFG_DESC,
|
|
cfg_keywords,
|
|
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,
|
|
expr_type,
|
|
match_method,
|
|
is_hexbin,
|
|
area_effective_ids,
|
|
function_id,
|
|
cfg_region_code,
|
|
cfg_type,
|
|
ratelimit,
|
|
user_region1,
|
|
user_region2,
|
|
user_region3,
|
|
user_region4,
|
|
user_region5
|
|
)values (
|
|
#{cfgDesc,jdbcType=VARCHAR},
|
|
#{cfgKeywords,jdbcType=VARCHAR},
|
|
#{action,jdbcType=INTEGER},
|
|
#{isValid,jdbcType=INTEGER},
|
|
#{isAudit,jdbcType=INTEGER},
|
|
#{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},
|
|
#{exprType,jdbcType=INTEGER},
|
|
#{matchMethod,jdbcType=INTEGER},
|
|
#{isHexbin,jdbcType=INTEGER},
|
|
#{areaEffectiveIds,jdbcType=VARCHAR},
|
|
#{functionId,jdbcType=INTEGER},
|
|
#{cfgRegionCode,jdbcType=INTEGER},
|
|
#{cfgType,jdbcType=VARCHAR},
|
|
#{ratelimit,jdbcType=VARCHAR},
|
|
#{userRegion1,jdbcType=VARCHAR},
|
|
#{userRegion2,jdbcType=VARCHAR},
|
|
#{userRegion3,jdbcType=VARCHAR},
|
|
#{userRegion4,jdbcType=VARCHAR},
|
|
#{userRegion5,jdbcType=VARCHAR}
|
|
)
|
|
</insert>
|
|
|
|
</mapper> |