fund-xjour-mapper.xml 1.37 KB
<?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">

<!-- 查询蓝补 @author tongxiaochuan -->
<mapper namespace="com.cjs.cms.dao.report.FundXJourDao">

	<sql id="fund_xjour_field">
		init_date,fund_account,occur_balance,post_balance,business_flag,remark
	</sql>
	
	<select id="search" parameterType="Map" resultType="Map">
		<include refid="common.pageStart" /> 
		select <include refid="fund_xjour_field" /> 
		from HS_HIS.HIS_FUNDXJOUR_VIEW 
		where 1=1 and business_flag = #{businessFlag} 
		<include refid="searchCondition" /> 
		order by init_date desc,fund_account desc 
		<include refid="common.pageEnd" />
	</select>
	
	<sql id="searchCondition">
		<if test="bussinessType != null and bussinessType != ''">
			and REMARK like '%'||#{bussinessType}||'%'  
		</if>
		<if test="fundAccount != '' and fundAccount != null">
			and fund_account = #{fundAccount}
		</if>
		<if test="startDate != '' and startDate != null">
			and init_date >= #{startDate} 
		</if>
		<if test="endDate != '' and endDate != null">
			<![CDATA[and init_date <= #{endDate}]]> 
		</if>
	</sql>
	
	<select id="searchTotal" parameterType="Map" resultType="Integer">
		select count(1) 
		from HS_HIS.HIS_FUNDXJOUR_VIEW 
		where 1=1 and  business_flag = #{businessFlag} 
		<include refid="searchCondition" /> 
	</select>
	
</mapper>