feat: 迁移国内标准法规部分6 详情 下载 标准查询
This commit is contained in:
@@ -0,0 +1,144 @@
|
||||
<?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.adc.da.slrs.sarSarAccess.dao.SarSarAccessDao">
|
||||
|
||||
<!-- Result Map-->
|
||||
<resultMap id="BaseResultMap" type="com.adc.da.slrs.sarSarAccess.entity.SarSarAccess">
|
||||
<id column="id" property="id"/>
|
||||
<result column="modify_time" property="modifyTime"/>
|
||||
<result column="creation_time" property="creationTime"/>
|
||||
<result column="creation_user" property="creationUser"/>
|
||||
<result column="valid_flag" property="validFlag"/>
|
||||
<result column="access_content" property="accessContent"/>
|
||||
<result column="country" property="country"/>
|
||||
<result column="apply_arctic" property="applyArctic"/>
|
||||
<result column="energy_kind" property="energyKind"/>
|
||||
<result column="type" property="type"/>
|
||||
<result column="remark" property="remark"/>
|
||||
<result column="relate_file" property="relateFile"/>
|
||||
<result column="state" property="state"/>
|
||||
<result column="version" property="version"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- SAR_SAR_ACCESS table all fields -->
|
||||
<sql id="Base_Column_List">
|
||||
modify_time, creation_time, creation_user,
|
||||
valid_flag, access_content, country, id,apply_arctic,energy_kind,type,remark,relate_file,version,state
|
||||
</sql>
|
||||
|
||||
<sql id="BasePage_Column_List">
|
||||
SAR_SAR_ACCESS.modify_time, SAR_SAR_ACCESS.creation_time, SAR_SAR_ACCESS.creation_user,
|
||||
SAR_SAR_ACCESS.valid_flag, SAR_SAR_ACCESS.access_content, SAR_SAR_ACCESS.country, SAR_SAR_ACCESS.id,TS_USER.uname,
|
||||
dicountry.DIC_TYPE_NAME as countryShow,SAR_SAR_ACCESS.apply_arctic,SAR_SAR_ACCESS.energy_kind,
|
||||
SAR_SAR_ACCESS.type,SAR_SAR_ACCESS.remark,SAR_SAR_ACCESS.relate_file,SAR_SAR_ACCESS.version,SAR_SAR_ACCESS.state
|
||||
</sql>
|
||||
|
||||
<!-- 查询条件 -->
|
||||
<sql id="Base_Where_Clause">
|
||||
where 1=1
|
||||
<trim suffixOverrides=",">
|
||||
<if test="applyArctic != null">
|
||||
and apply_arctic = #{applyArctic}
|
||||
</if>
|
||||
<if test="energyKind != null">
|
||||
and energy_kind = #{energyKind}
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and type = #{type}
|
||||
</if>
|
||||
<if test="modifyTime != null">
|
||||
and modify_time ${modifyTimeOperator} #{modifyTime}
|
||||
</if>
|
||||
<if test="modifyTime1 != null">
|
||||
and modify_time >= #{modifyTime1}
|
||||
</if>
|
||||
<if test="modifyTime2 != null">
|
||||
and modify_time <= #{modifyTime2}
|
||||
</if>
|
||||
<if test="creationTime != null">
|
||||
and creation_time ${creationTimeOperator} #{creationTime}
|
||||
</if>
|
||||
<if test="creationTime1 != null">
|
||||
and creation_time >= #{creationTime1}
|
||||
</if>
|
||||
<if test="creationTime2 != null">
|
||||
and creation_time <= #{creationTime2}
|
||||
</if>
|
||||
<if test="creationUser != null">
|
||||
and creation_user ${creationUserOperator} #{creationUser}
|
||||
</if>
|
||||
<if test="validFlag != null">
|
||||
and SAR_SAR_ACCESS.valid_flag = #{validFlag}
|
||||
</if>
|
||||
<if test="accessContent != null">
|
||||
and access_content ${accessContentOperator} concat(concat('%',#{accessContent}),'%')
|
||||
</if>
|
||||
<if test="country != null">
|
||||
and country ${countryOperator} concat(concat('%',#{country}),'%')
|
||||
</if>
|
||||
<if test="id != null">
|
||||
and id ${idOperator} #{id}
|
||||
</if>
|
||||
<if test="advanceSearchStr != null">
|
||||
and (${advanceSearchStr})
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<!-- 查询条件 -->
|
||||
<sql id="PageBase_Where_Clause">
|
||||
left join TS_USER on SAR_SAR_ACCESS.creation_user = TS_USER.usid
|
||||
left join TS_DICTYPE dicountry on (dicountry.dic_type_code = SAR_SAR_ACCESS.country and dicountry.dic_id is not
|
||||
null and dicountry.valid_flag = 0)
|
||||
<if test="accessSarType != null">
|
||||
LEFT JOIN SAR_SAR_ACCESS_INFO ON SAR_SAR_ACCESS.ID = SAR_SAR_ACCESS_INFO.ACCESS_ID
|
||||
</if>
|
||||
where 1=1
|
||||
<trim suffixOverrides=",">
|
||||
<if test="state != null">
|
||||
and SAR_SAR_ACCESS.state = #{state}
|
||||
</if>
|
||||
<if test="applyArctic != null">
|
||||
and SAR_SAR_ACCESS.apply_arctic = #{applyArctic}
|
||||
</if>
|
||||
<if test="energyKind != null">
|
||||
and SAR_SAR_ACCESS.energy_kind = #{energyKind}
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and SAR_SAR_ACCESS.type = #{type}
|
||||
</if>
|
||||
<if test="validFlag != null">
|
||||
and SAR_SAR_ACCESS.valid_flag = #{validFlag}
|
||||
</if>
|
||||
<if test="accessContent != null">
|
||||
and access_content like concat(concat('%',#{accessContent}),'%')
|
||||
</if>
|
||||
<if test="country != null">
|
||||
and country like concat('%',#{country},'%')
|
||||
</if>
|
||||
<if test="id != null">
|
||||
and id ${idOperator} #{id}
|
||||
</if>
|
||||
<if test="keywords != null">
|
||||
and access_content like concat('%',#{keywords},'%')
|
||||
</if>
|
||||
<if test="accessSarType != null">
|
||||
and SAR_SAR_ACCESS_INFO.ACCESS_SAR_TYPE = #{accessSarType}
|
||||
</if>
|
||||
<if test="advanceSearchStr != null">
|
||||
and (${advanceSearchStr})
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<select id="selectAccessByRes" resultMap="BaseResultMap"
|
||||
parameterType="com.adc.da.slrs.sarSarAccess.page.SarSarAccessEOPage">
|
||||
select SAR_SAR_ACCESS.* from
|
||||
SAR_SAR_ACCESS_INFO
|
||||
left join SAR_SAR_ACCESS on SAR_SAR_ACCESS_INFO.access_id = SAR_SAR_ACCESS.id
|
||||
where SAR_SAR_ACCESS.valid_flag=0 and SAR_SAR_ACCESS_INFO.valid_flag=0
|
||||
and SAR_SAR_ACCESS_INFO.RES_ID=#{resId,jdbcType=VARCHAR} and SAR_TYPE=#{sarType,jdbcType=VARCHAR}
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user