|
@@ -3,178 +3,4 @@
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.chelvc.cloud.vehicle.server.dao.OmsOrderReturnApplyMapper">
|
|
|
-
|
|
|
- <resultMap type="com.chelvc.cloud.vehicle.server.entity.OmsOrderReturnApply" id="OmsOrderReturnApplyResult">
|
|
|
- <result property="id" column="id" />
|
|
|
- <result property="orderId" column="order_id" />
|
|
|
- <result property="companyAddressId" column="company_address_id" />
|
|
|
- <result property="productId" column="product_id" />
|
|
|
- <result property="orderSn" column="order_sn" />
|
|
|
- <result property="createTime" column="create_time" />
|
|
|
- <result property="memberUsername" column="member_username" />
|
|
|
- <result property="returnAmount" column="return_amount" />
|
|
|
- <result property="returnName" column="return_name" />
|
|
|
- <result property="returnPhone" column="return_phone" />
|
|
|
- <result property="status" column="status" />
|
|
|
- <result property="handleTime" column="handle_time" />
|
|
|
- <result property="productPic" column="product_pic" />
|
|
|
- <result property="productName" column="product_name" />
|
|
|
- <result property="productBrand" column="product_brand" />
|
|
|
- <result property="productAttr" column="product_attr" />
|
|
|
- <result property="productCount" column="product_count" />
|
|
|
- <result property="productPrice" column="product_price" />
|
|
|
- <result property="productRealPrice" column="product_real_price" />
|
|
|
- <result property="reason" column="reason" />
|
|
|
- <result property="description" column="description" />
|
|
|
- <result property="proofPics" column="proof_pics" />
|
|
|
- <result property="handleNote" column="handle_note" />
|
|
|
- <result property="handleMan" column="handle_man" />
|
|
|
- <result property="receiveMan" column="receive_man" />
|
|
|
- <result property="receiveTime" column="receive_time" />
|
|
|
- <result property="receiveNote" column="receive_note" />
|
|
|
- </resultMap>
|
|
|
-
|
|
|
- <sql id="selectOmsOrderReturnApplyVo">
|
|
|
- select id, order_id, company_address_id, product_id, order_sn, create_time, member_username, return_amount, return_name, return_phone, status, handle_time, product_pic, product_name, product_brand, product_attr, product_count, product_price, product_real_price, reason, description, proof_pics, handle_note, handle_man, receive_man, receive_time, receive_note from oms_order_return_apply
|
|
|
- </sql>
|
|
|
-
|
|
|
- <select id="selectOmsOrderReturnApplyList" parameterType="com.chelvc.cloud.vehicle.server.entity.OmsOrderReturnApply" resultMap="OmsOrderReturnApplyResult">
|
|
|
- <include refid="selectOmsOrderReturnApplyVo"/>
|
|
|
- <where>
|
|
|
- <if test="orderId != null "> and order_id = #{orderId}</if>
|
|
|
- <if test="companyAddressId != null "> and company_address_id = #{companyAddressId}</if>
|
|
|
- <if test="productId != null "> and product_id = #{productId}</if>
|
|
|
- <if test="orderSn != null and orderSn != ''"> and order_sn = #{orderSn}</if>
|
|
|
- <if test="memberUsername != null and memberUsername != ''"> and member_username like concat('%', #{memberUsername}, '%')</if>
|
|
|
- <if test="returnAmount != null "> and return_amount = #{returnAmount}</if>
|
|
|
- <if test="returnName != null and returnName != ''"> and return_name like concat('%', #{returnName}, '%')</if>
|
|
|
- <if test="returnPhone != null and returnPhone != ''"> and return_phone = #{returnPhone}</if>
|
|
|
- <if test="status != null "> and status = #{status}</if>
|
|
|
- <if test="handleTime != null "> and handle_time = #{handleTime}</if>
|
|
|
- <if test="productPic != null and productPic != ''"> and product_pic = #{productPic}</if>
|
|
|
- <if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
|
|
- <if test="productBrand != null and productBrand != ''"> and product_brand = #{productBrand}</if>
|
|
|
- <if test="productAttr != null and productAttr != ''"> and product_attr = #{productAttr}</if>
|
|
|
- <if test="productCount != null "> and product_count = #{productCount}</if>
|
|
|
- <if test="productPrice != null "> and product_price = #{productPrice}</if>
|
|
|
- <if test="productRealPrice != null "> and product_real_price = #{productRealPrice}</if>
|
|
|
- <if test="reason != null and reason != ''"> and reason = #{reason}</if>
|
|
|
- <if test="description != null and description != ''"> and description = #{description}</if>
|
|
|
- <if test="proofPics != null and proofPics != ''"> and proof_pics = #{proofPics}</if>
|
|
|
- <if test="handleNote != null and handleNote != ''"> and handle_note = #{handleNote}</if>
|
|
|
- <if test="handleMan != null and handleMan != ''"> and handle_man = #{handleMan}</if>
|
|
|
- <if test="receiveMan != null and receiveMan != ''"> and receive_man = #{receiveMan}</if>
|
|
|
- <if test="receiveTime != null "> and receive_time = #{receiveTime}</if>
|
|
|
- <if test="receiveNote != null and receiveNote != ''"> and receive_note = #{receiveNote}</if>
|
|
|
- </where>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectOmsOrderReturnApplyById" parameterType="Long" resultMap="OmsOrderReturnApplyResult">
|
|
|
- <include refid="selectOmsOrderReturnApplyVo"/>
|
|
|
- where id = #{id}
|
|
|
- </select>
|
|
|
-
|
|
|
- <insert id="insertOmsOrderReturnApply" parameterType="com.chelvc.cloud.vehicle.server.entity.OmsOrderReturnApply" useGeneratedKeys="true" keyProperty="id">
|
|
|
- insert into oms_order_return_apply
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="orderId != null">order_id,</if>
|
|
|
- <if test="companyAddressId != null">company_address_id,</if>
|
|
|
- <if test="productId != null">product_id,</if>
|
|
|
- <if test="orderSn != null">order_sn,</if>
|
|
|
- <if test="createTime != null">create_time,</if>
|
|
|
- <if test="memberUsername != null">member_username,</if>
|
|
|
- <if test="returnAmount != null">return_amount,</if>
|
|
|
- <if test="returnName != null">return_name,</if>
|
|
|
- <if test="returnPhone != null">return_phone,</if>
|
|
|
- <if test="status != null">status,</if>
|
|
|
- <if test="handleTime != null">handle_time,</if>
|
|
|
- <if test="productPic != null">product_pic,</if>
|
|
|
- <if test="productName != null">product_name,</if>
|
|
|
- <if test="productBrand != null">product_brand,</if>
|
|
|
- <if test="productAttr != null">product_attr,</if>
|
|
|
- <if test="productCount != null">product_count,</if>
|
|
|
- <if test="productPrice != null">product_price,</if>
|
|
|
- <if test="productRealPrice != null">product_real_price,</if>
|
|
|
- <if test="reason != null">reason,</if>
|
|
|
- <if test="description != null">description,</if>
|
|
|
- <if test="proofPics != null">proof_pics,</if>
|
|
|
- <if test="handleNote != null">handle_note,</if>
|
|
|
- <if test="handleMan != null">handle_man,</if>
|
|
|
- <if test="receiveMan != null">receive_man,</if>
|
|
|
- <if test="receiveTime != null">receive_time,</if>
|
|
|
- <if test="receiveNote != null">receive_note,</if>
|
|
|
- </trim>
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="orderId != null">#{orderId},</if>
|
|
|
- <if test="companyAddressId != null">#{companyAddressId},</if>
|
|
|
- <if test="productId != null">#{productId},</if>
|
|
|
- <if test="orderSn != null">#{orderSn},</if>
|
|
|
- <if test="createTime != null">#{createTime},</if>
|
|
|
- <if test="memberUsername != null">#{memberUsername},</if>
|
|
|
- <if test="returnAmount != null">#{returnAmount},</if>
|
|
|
- <if test="returnName != null">#{returnName},</if>
|
|
|
- <if test="returnPhone != null">#{returnPhone},</if>
|
|
|
- <if test="status != null">#{status},</if>
|
|
|
- <if test="handleTime != null">#{handleTime},</if>
|
|
|
- <if test="productPic != null">#{productPic},</if>
|
|
|
- <if test="productName != null">#{productName},</if>
|
|
|
- <if test="productBrand != null">#{productBrand},</if>
|
|
|
- <if test="productAttr != null">#{productAttr},</if>
|
|
|
- <if test="productCount != null">#{productCount},</if>
|
|
|
- <if test="productPrice != null">#{productPrice},</if>
|
|
|
- <if test="productRealPrice != null">#{productRealPrice},</if>
|
|
|
- <if test="reason != null">#{reason},</if>
|
|
|
- <if test="description != null">#{description},</if>
|
|
|
- <if test="proofPics != null">#{proofPics},</if>
|
|
|
- <if test="handleNote != null">#{handleNote},</if>
|
|
|
- <if test="handleMan != null">#{handleMan},</if>
|
|
|
- <if test="receiveMan != null">#{receiveMan},</if>
|
|
|
- <if test="receiveTime != null">#{receiveTime},</if>
|
|
|
- <if test="receiveNote != null">#{receiveNote},</if>
|
|
|
- </trim>
|
|
|
- </insert>
|
|
|
-
|
|
|
- <update id="updateOmsOrderReturnApply" parameterType="com.chelvc.cloud.vehicle.server.entity.OmsOrderReturnApply">
|
|
|
- update oms_order_return_apply
|
|
|
- <trim prefix="SET" suffixOverrides=",">
|
|
|
- <if test="orderId != null">order_id = #{orderId},</if>
|
|
|
- <if test="companyAddressId != null">company_address_id = #{companyAddressId},</if>
|
|
|
- <if test="productId != null">product_id = #{productId},</if>
|
|
|
- <if test="orderSn != null">order_sn = #{orderSn},</if>
|
|
|
- <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
- <if test="memberUsername != null">member_username = #{memberUsername},</if>
|
|
|
- <if test="returnAmount != null">return_amount = #{returnAmount},</if>
|
|
|
- <if test="returnName != null">return_name = #{returnName},</if>
|
|
|
- <if test="returnPhone != null">return_phone = #{returnPhone},</if>
|
|
|
- <if test="status != null">status = #{status},</if>
|
|
|
- <if test="handleTime != null">handle_time = #{handleTime},</if>
|
|
|
- <if test="productPic != null">product_pic = #{productPic},</if>
|
|
|
- <if test="productName != null">product_name = #{productName},</if>
|
|
|
- <if test="productBrand != null">product_brand = #{productBrand},</if>
|
|
|
- <if test="productAttr != null">product_attr = #{productAttr},</if>
|
|
|
- <if test="productCount != null">product_count = #{productCount},</if>
|
|
|
- <if test="productPrice != null">product_price = #{productPrice},</if>
|
|
|
- <if test="productRealPrice != null">product_real_price = #{productRealPrice},</if>
|
|
|
- <if test="reason != null">reason = #{reason},</if>
|
|
|
- <if test="description != null">description = #{description},</if>
|
|
|
- <if test="proofPics != null">proof_pics = #{proofPics},</if>
|
|
|
- <if test="handleNote != null">handle_note = #{handleNote},</if>
|
|
|
- <if test="handleMan != null">handle_man = #{handleMan},</if>
|
|
|
- <if test="receiveMan != null">receive_man = #{receiveMan},</if>
|
|
|
- <if test="receiveTime != null">receive_time = #{receiveTime},</if>
|
|
|
- <if test="receiveNote != null">receive_note = #{receiveNote},</if>
|
|
|
- </trim>
|
|
|
- where id = #{id}
|
|
|
- </update>
|
|
|
-
|
|
|
- <delete id="deleteOmsOrderReturnApplyById" parameterType="Long">
|
|
|
- delete from oms_order_return_apply where id = #{id}
|
|
|
- </delete>
|
|
|
-
|
|
|
- <delete id="deleteOmsOrderReturnApplyByIds" parameterType="String">
|
|
|
- delete from oms_order_return_apply where id in
|
|
|
- <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
- #{id}
|
|
|
- </foreach>
|
|
|
- </delete>
|
|
|
</mapper>
|