DuibaOrdersMapper.xml
2.26 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
<?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.runsa.crmapp.points.mapper.DuibaOrdersMapper">
<select id="selectcount" resultType="Integer" parameterType="cn.runsa.duiba.orders.entity.Orders">
select count(1) from duiba_points_order where ordernum=#{ordernum,jdbcType=VARCHAR}
</select>
<select id="selectstatus" resultType="String" parameterType="cn.runsa.duiba.orders.entity.Orders">
select ifnull(max(res_status),'') from duiba_points_order where ordernum=#{ordernum,jdbcType=VARCHAR}
</select>
<insert id="insertrow" parameterType="cn.runsa.duiba.orders.entity.Orders">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into duiba_points_order
(`uid`,
`credits`,
`appkey`,
`timestamp`,
`description`,
`ordernum`,
`type`,
`faceprice`,
`actualprice`,
`ip`,
`waitaudit`,
`params`,
`sign`,
`res_status`,
`res_bizid`,
`res_errormessage`,
`res_balance`,
`gxrq`,`pointno`)
values (
#{uid,jdbcType=VARCHAR},
#{credits,jdbcType=INTEGER},
#{appkey,jdbcType=VARCHAR},
#{timestamp,jdbcType=VARCHAR},
#{description,jdbcType=VARCHAR},
#{ordernum,jdbcType=VARCHAR},
#{type,jdbcType=VARCHAR},
#{faceprice,jdbcType=INTEGER},
#{actualprice,jdbcType=INTEGER},
#{ip,jdbcType=VARCHAR},
#{waitaudit,jdbcType=INTEGER},
#{params,jdbcType=VARCHAR},
#{sign,jdbcType=VARCHAR},
#{res_status,jdbcType=VARCHAR},
#{res_bizid,jdbcType=VARCHAR},
#{res_errormessage,jdbcType=VARCHAR},
#{res_balance,jdbcType=INTEGER},
#{gxrq,jdbcType=VARCHAR},
#{pointno,jdbcType=VARCHAR}
)
</insert>
<update id="updatestatus" parameterType="cn.runsa.duiba.orders.entity.Orders">
update duiba_points_order
set res_status=#{res_status},res_balance=#{res_balance},res_errormessage=#{res_errormessage}
where ordernum=#{ordernum}
</update>
<select id="selectByNum" resultType="cn.runsa.duiba.orders.entity.Orders" parameterType="String">
select uid,credits,res_status,pointno from duiba_points_order where ordernum = #{num}
</select>
</mapper>