IMRefundHistoryMapper.xml
2.5 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?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="com.sibu.orderHelper.integral.web.dao.IMWebRefundHistroyDao">
<resultMap type="com.sibu.orderHelper.integral.model.IMRefundHistroyBean" id="refundHistroyResultMap">
<id column="id" property="id"/>
<result column="created_dt" property="createdDt" />
<result column="content" property="content" />
<result column="operator_name" property="operatorName" />
</resultMap>
<insert id="addRefundHistroy" parameterType="com.sibu.orderHelper.integral.model.IMRefundHistroyBean">
INSERT INTO im_refund_history (id,created_dt,content,operator_name )
VALUES ( #{id}, NOW(),#{content},#{operatorName})
</insert>
<select id="listRefundHistroy" resultMap="refundHistroyResultMap" parameterType="java.util.Map">
select * from im_refund_history
where 1=1
<if test="keyword != null and keyword !=''">
and content like concat('%',#{keyword},'%')
</if>
<if test="startCreateDt != null and startCreateDt !=''">
and created_dt >= #{startCreateDt}
</if>
<if test="endCreateDt != null and endCreateDt != ''">
<![CDATA[
and created_dt <= #{endCreateDt}
]]>
</if>
ORDER BY created_dt DESC
LIMIT ${pageNow}, ${pageSize}
</select>
<select id="totalRefundHistroy" resultType="java.lang.Integer" parameterType="java.util.Map">
select COUNT(*) from im_refund_history
where 1=1
<if test="keyword != null and keyword !=''">
and content like concat('%',#{keyword},'%')
</if>
<if test="startCreateDt != null and startCreateDt !=''">
and created_dt >= #{startCreateDt}
</if>
<if test="endCreateDt != null and endCreateDt != ''">
<![CDATA[
and created_dt <= #{endCreateDt}
]]>
</if>
</select>
<delete id="deleteRefundHistroy" parameterType="java.lang.String">
delete from im_refund_history where id=#{id}
</delete>
<select id="getRefundHistroyTemplateExcelData" resultMap="refundHistroyResultMap" parameterType="java.util.Map">
select * from im_refund_history
where 1=1
<if test="keyword != null and keyword !=''">
and content like concat('%',#{keyword},'%')
</if>
<if test="startCreateDt != null and startCreateDt !=''">
and created_dt >= #{startCreateDt}
</if>
<if test="endCreateDt != null and endCreateDt != ''">
<![CDATA[
and created_dt <= #{endCreateDt}
]]>
</if>
ORDER BY created_dt DESC
</select>
</mapper>