Doing1OrderMapper.xml 2.8 KB
<?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>