Doing1OrderMapper.xml
2.8 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
<?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.Doing1OrderDao">
<resultMap type="com.sibu.orderHelper.integral.reponse.Order1BeanResponse" id="doing1Order">
<result column="product_id" property="productId"/>
<result column="order1_id" property="order1Id"/>
</resultMap>
<select resultMap="doing1Order" parameterType="java.lang.String" id="selectDoing1Order">
select product_id,order1_id from ${tableName} where erp_code ='' OR erp_code IS NULL
</select>
<update id="updateOrder1" parameterType="java.util.Map">
update ${tableName}
<trim prefix="set" suffixOverrides=",">
<if test="erpCode!=null and erpCode!=''">
erp_code=#{erpCode},
</if>
<if test="productName!=null and productName!=''">
name=#{productName},
</if>
<if test="thumbImage!=null and thumbImage!=''">
thumb_img=#{thumbImage},
</if>
<if test="marketPrice!=null and marketPrice!=''">
market_price=#{marketPrice}
</if>
</trim>
where order1_id=#{order1Id}
</update>
<resultMap type="com.sibu.orderHelper.integral.model.IMDoingOrder1Bean" id="doing1OrderBean">
<result column="order1_id" property="order1Id"/>
<result column="member_id" property="memberId"/>
<result column="order_id" property="orderId"/>
<result column="sort_index" property="sortIndex"/>
<result column="product_id" property="productId"/>
<result column="purchase_quantity" property="purchaseQuantity"/>
<result column="shipped_quantity" property="shippedQuantity"/>
<result column="integral" property="integral"/>
<result column="line_integral" property="lineIntegral"/>
<result column="price" property="price"/>
<result column="line_price" property="linePrice"/>
<result column="discount_price" property="discountPrice"/>
<result column="discount_line_price" property="discountLinePrice"/>
<result column="is_evaluate" property="isEvaluate"/>
<result column="sku_id" property="skuId"/>
<result column="erp_code" property="erpCode"/>
<result column="spec_detail" property="specDetail"/>
<result column="name" property="name"/>
<result column="thumb_img" property="thumbImg"/>
<result column="market_price" property="marketPrice"/>
<result column="deduction_product_vb" property="deductionProductVb"/>
<result column="deduction_line_vb" property="deductionLineVb"/>
<result column="refund_status" property="refundStatus"/>
</resultMap>
<select id="listDoing1Order" parameterType="java.lang.String" resultMap="doing1OrderBean">
select * from ${tableName} where order1_id=#{order1Id}
</select>
<update id="updateOrder1RefundStatusByOrder1Id" parameterType="map">
update ${tableName} set refund_status = ${refundStatus} where order1_id=#{order1Id}
</update>
</mapper>