<?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" property="lrGuid" jdbcType="VARCHAR" />
|
<result column="LR_ResourceTitle" property="lrResourcetitle" jdbcType="VARCHAR" />
|
<result column="LR_ResourceLevel" property="lrResourcelevel" jdbcType="INTEGER" />
|
<result column="LR_PicUrl" property="lrPicurl" jdbcType="VARCHAR" />
|
<result column="LR_BodyUrl" property="lrBodyurl" jdbcType="VARCHAR" />
|
<result column="LR_IsForeign" property="lrIsforeign" jdbcType="BIT" />
|
<result column="LR_ResourceTypeId" property="lrResourcetypeid" jdbcType="INTEGER" />
|
<result column="LR_IsOpen" property="lrIsopen" jdbcType="BIT" />
|
<result column="LR_IsUse" property="lrIsuse" jdbcType="BIT" />
|
<result column="LR_ResourceFileType" property="lrResourcefiletype" jdbcType="INTEGER" />
|
<result column="LR_IsUseOutUrls" property="lrIsuseouturls" jdbcType="BIT" />
|
<result column="LR_ResourceOutUrls" property="lrResourceouturls" jdbcType="VARCHAR" />
|
<result column="LR_ResourceUrls" property="lrResourceurls" jdbcType="VARCHAR" />
|
<result column="LR_CreatorId" property="lrCreatorid" jdbcType="VARCHAR" />
|
<result column="LR_Creator" property="lrCreator" jdbcType="VARCHAR" />
|
<result column="LR_CreateDate" property="lrCreatedate" jdbcType="TIMESTAMP" />
|
<result column="LR_ModifierId" property="lrModifierid" jdbcType="VARCHAR" />
|
<result column="LR_Modifier" property="lrModifier" jdbcType="VARCHAR" />
|
<result column="LR_UpdateDate" property="lrUpdatedate" jdbcType="TIMESTAMP" />
|
<result column="LR_PublishId" property="lrPublishid" jdbcType="VARCHAR" />
|
<result column="LR_Publish" property="lrPublish" jdbcType="VARCHAR" />
|
<result column="LR_PublishDate" property="lrPublishdate" jdbcType="TIMESTAMP" />
|
<result column="LR_Version" property="lrVersion" jdbcType="VARCHAR" />
|
<result column="LR_Extension1" property="lrExtension1" jdbcType="VARCHAR" />
|
<result column="LR_Extension2" property="lrExtension2" jdbcType="VARCHAR" />
|
<result column="LR_Extension3" property="lrExtension3" jdbcType="VARCHAR" />
|
<result column="LR_Remark" property="lrRemark" jdbcType="VARCHAR" />
|
</resultMap>
|
<resultMap id="ResultMapWithBLOBs" type="cn.flightfeather.supervision.domain.entity.LawsRegulations" extends="BaseResultMap" >
|
<!--
|
WARNING - @mbg.generated
|
-->
|
<result column="LR_Keywords" property="lrKeywords" jdbcType="LONGVARCHAR" />
|
<result column="LR_ResourceDesc" property="lrResourcedesc" jdbcType="LONGVARCHAR" />
|
</resultMap>
|
<sql id="Base_Column_List" >
|
<!--
|
WARNING - @mbg.generated
|
-->
|
LR_GUID, LR_ResourceTitle, LR_ResourceLevel, LR_PicUrl, LR_BodyUrl, LR_IsForeign,
|
LR_ResourceTypeId, LR_IsOpen, LR_IsUse, LR_ResourceFileType, 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, LR_Extension1,
|
LR_Extension2, LR_Extension3, LR_Remark
|
</sql>
|
<sql id="Blob_Column_List" >
|
<!--
|
WARNING - @mbg.generated
|
-->
|
LR_Keywords, LR_ResourceDesc
|
</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>
|