<?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="cn.flightfeather.supervision.domain.mapper.LawsRegulationsMapper">
|
<resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.entity.LawsRegulations">
|
<!--
|
WARNING - @mbg.generated
|
-->
|
<id column="LR_GUID" jdbcType="VARCHAR" property="lrGuid" />
|
<result column="LR_ResourceTitle" jdbcType="VARCHAR" property="lrResourcetitle" />
|
<result column="LR_ResourceLevel" jdbcType="INTEGER" property="lrResourcelevel" />
|
<result column="LR_ResourceTypeId" jdbcType="INTEGER" property="lrResourcetypeid" />
|
<result column="LR_ResourceFileType" jdbcType="INTEGER" property="lrResourcefiletype" />
|
<result column="LR_PicUrl" jdbcType="VARCHAR" property="lrPicurl" />
|
<result column="LR_BodyUrl" jdbcType="VARCHAR" property="lrBodyurl" />
|
<result column="LR_IsForeign" jdbcType="BIT" property="lrIsforeign" />
|
<result column="LR_IsOpen" jdbcType="BIT" property="lrIsopen" />
|
<result column="LR_IsUse" jdbcType="BIT" property="lrIsuse" />
|
<result column="LR_IsUseOutUrls" jdbcType="BIT" property="lrIsuseouturls" />
|
<result column="LR_ResourceOutUrls" jdbcType="VARCHAR" property="lrResourceouturls" />
|
<result column="LR_ResourceUrls" jdbcType="VARCHAR" property="lrResourceurls" />
|
<result column="LR_CreatorId" jdbcType="VARCHAR" property="lrCreatorid" />
|
<result column="LR_Creator" jdbcType="VARCHAR" property="lrCreator" />
|
<result column="LR_CreateDate" jdbcType="TIMESTAMP" property="lrCreatedate" />
|
<result column="LR_ModifierId" jdbcType="VARCHAR" property="lrModifierid" />
|
<result column="LR_Modifier" jdbcType="VARCHAR" property="lrModifier" />
|
<result column="LR_UpdateDate" jdbcType="TIMESTAMP" property="lrUpdatedate" />
|
<result column="LR_PublishId" jdbcType="VARCHAR" property="lrPublishid" />
|
<result column="LR_Publish" jdbcType="VARCHAR" property="lrPublish" />
|
<result column="LR_PublishDate" jdbcType="TIMESTAMP" property="lrPublishdate" />
|
<result column="LR_Version" jdbcType="VARCHAR" property="lrVersion" />
|
<result column="BI_Province_Code" jdbcType="VARCHAR" property="biProvinceCode" />
|
<result column="BI_Province_Name" jdbcType="VARCHAR" property="biProvinceName" />
|
<result column="BI_City_Code" jdbcType="VARCHAR" property="biCityCode" />
|
<result column="BI_City_Name" jdbcType="VARCHAR" property="biCityName" />
|
<result column="BI_District_Code" jdbcType="VARCHAR" property="biDistrictCode" />
|
<result column="BI_District_Name" jdbcType="VARCHAR" property="biDistrictName" />
|
<result column="BI_Town_Code" jdbcType="VARCHAR" property="biTownCode" />
|
<result column="BI_Town_Name" jdbcType="VARCHAR" property="biTownName" />
|
<result column="LR_Extension1" jdbcType="VARCHAR" property="lrExtension1" />
|
<result column="LR_Extension2" jdbcType="VARCHAR" property="lrExtension2" />
|
<result column="LR_Extension3" jdbcType="VARCHAR" property="lrExtension3" />
|
<result column="LR_Remark" jdbcType="VARCHAR" property="lrRemark" />
|
</resultMap>
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="cn.flightfeather.supervision.domain.entity.LawsRegulations">
|
<!--
|
WARNING - @mbg.generated
|
-->
|
<result column="LR_ResourceDesc" jdbcType="LONGVARCHAR" property="lrResourcedesc" />
|
<result column="LR_Keywords" jdbcType="LONGVARCHAR" property="lrKeywords" />
|
</resultMap>
|
<sql id="Base_Column_List">
|
<!--
|
WARNING - @mbg.generated
|
-->
|
LR_GUID, LR_ResourceTitle, LR_ResourceLevel, LR_ResourceTypeId, LR_ResourceFileType,
|
LR_PicUrl, LR_BodyUrl, LR_IsForeign, LR_IsOpen, LR_IsUse, LR_IsUseOutUrls, LR_ResourceOutUrls,
|
LR_ResourceUrls, LR_CreatorId, LR_Creator, LR_CreateDate, LR_ModifierId, LR_Modifier,
|
LR_UpdateDate, LR_PublishId, LR_Publish, LR_PublishDate, LR_Version, BI_Province_Code,
|
BI_Province_Name, BI_City_Code, BI_City_Name, BI_District_Code, BI_District_Name,
|
BI_Town_Code, BI_Town_Name, LR_Extension1, LR_Extension2, LR_Extension3, LR_Remark
|
</sql>
|
<sql id="Blob_Column_List">
|
<!--
|
WARNING - @mbg.generated
|
-->
|
LR_ResourceDesc, LR_Keywords
|
</sql>
|
|
<select id="getLawsRegulations" resultMap="BaseResultMap">
|
select t1.*
|
from ec_t_lawsregulations t1
|
where t1.LR_IsForeign = #{param2} and t1.LR_IsOpen = #{param5} and t1.LR_IsUse = #{param6}
|
<if test="param1 != null">
|
and t1.LR_ResourceLevel = #{param1}
|
</if>
|
<if test="param3 != null">
|
and t1.LR_ResourceTypeId = #{param3}
|
</if>
|
<if test="param4 != null">
|
and t1.LR_Keywords like #{param4}
|
</if>
|
<if test="param8 != null">
|
and (LR_Extension1 is NULL or LR_Extension1 like CONCAT('%', #{param8},'%'))
|
</if>
|
# 获取最新的 param7 个资讯
|
<if test="param7 != null">
|
and (select count(*) + 1
|
from ec_t_lawsregulations t2
|
where t2.LR_ResourceTypeId = t1.LR_ResourceTypeId
|
AND t2.LR_PublishDate > t1.LR_PublishDate
|
<if test="param1 != null">
|
and t1.LR_ResourceLevel = #{param1}
|
</if>
|
<if test="param4 != null">
|
and t1.LR_Keywords like #{param4}
|
</if>
|
<if test="param8 != null and param8 != 0">
|
and (LR_Extension1 is NULL or LR_Extension1 like CONCAT('%', #{param8},'%'))
|
</if><![CDATA[
|
)
|
<= #{param7}
|
order by t1.LR_ResourceTypeId,
|
t1.LR_PublishDate DESC
|
]]></if>
|
</select>
|
</mapper>
|