fund-xjour-mapper.xml
1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?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>