appraisal-mapper.xml
1.2 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
<?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.user.AppraisalDao">
<sql id="appraisal_field">
FUND_ACCOUNT, CLIENT_NAME, OTC_CODE, OTC_NAME, APPLY_COUNT, APPRAISAL_FARE, REMARK, APPLY_DATE
</sql>
<sql id="searchCondition">
where 1=1
<if test="fundAccount != '' and fundAccount != null">
and fund_account = #{fundAccount}
</if>
<if test="startDate != '' and startDate != null">
and APPLY_DATE >= #{startDate}
</if>
<if test="endDate != '' and endDate != null">
<![CDATA[and APPLY_DATE <= #{endDate}]]>
</if>
</sql>
<select id="search" parameterType="map" resultType="map">
<include refid="common.pageStart" />
select <include refid="appraisal_field" />
from HS_ASSET.TRUSTAPPLY
<include refid="searchCondition" />
order by APPLY_DATE desc, FUND_ACCOUNT asc
<include refid="common.pageEnd" />
</select>
<select id="searchTotal" parameterType="map" resultType="int">
select count(1) from HS_ASSET.TRUSTAPPLY
<include refid="searchCondition" />
</select>
</mapper>