|
@@ -0,0 +1,61 @@
|
|
|
|
|
+<?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.tzy.sportcard.api.mapper.GroupOrderExpressMapper">
|
|
|
|
|
+
|
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.tzy.sportcard.api.domain.GroupOrderExpress">
|
|
|
|
|
+ <id column="id" property="id" jdbcType="INTEGER"/>
|
|
|
|
|
+ <result column="order_no" property="orderNo" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="courier_no" property="courierNo" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="sign_status" property="signStatus" jdbcType="INTEGER"/>
|
|
|
|
|
+ <result column="result" property="result" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="sync_time" property="syncTime" jdbcType="TIMESTAMP"/>
|
|
|
|
|
+ <result column="logistics_company" property="logisticsCompany" jdbcType="VARCHAR"/>
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+
|
|
|
|
|
+ <sql id="Base_Column_List">
|
|
|
|
|
+ id, order_no, courier_no, sign_status, result, sync_time, logistics_company
|
|
|
|
|
+ </sql>
|
|
|
|
|
+
|
|
|
|
|
+ <insert id="insert" parameterType="GroupOrderExpress">
|
|
|
|
|
+ INSERT INTO group_order_express
|
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="orderNo != null and orderNo != ''">order_no,</if>
|
|
|
|
|
+ <if test="courierNo != null and courierNo != ''">courier_no,</if>
|
|
|
|
|
+ <if test="signStatus != null">sign_status,</if>
|
|
|
|
|
+ <if test="result != null and result != ''">result,</if>
|
|
|
|
|
+ <if test="logisticsCompany != null and logisticsCompany != ''">logistics_company,</if>
|
|
|
|
|
+ <if test="true">sync_time,</if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ <trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="orderNo != null and orderNo != ''">#{orderNo,jdbcType=VARCHAR},</if>
|
|
|
|
|
+ <if test="courierNo != null and courierNo != ''">#{courierNo,jdbcType=VARCHAR},</if>
|
|
|
|
|
+ <if test="signStatus != null">#{signStatus,jdbcType=INTEGER},</if>
|
|
|
|
|
+ <if test="result != null and result != ''">#{result,jdbcType=LONGVARCHAR},</if>
|
|
|
|
|
+ <if test="logisticsCompany != null and logisticsCompany != ''">#{logisticsCompany,jdbcType=VARCHAR},</if>
|
|
|
|
|
+ <if test="true">now(),</if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ </insert>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectByOrderNo" resultMap="BaseResultMap" parameterType="java.lang.String">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
|
|
+ FROM group_order_express
|
|
|
|
|
+ WHERE order_no = #{orderNo,jdbcType=VARCHAR}
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectByCourierNo" resultMap="BaseResultMap" parameterType="java.lang.String">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
|
|
+ FROM group_order_express
|
|
|
|
|
+ WHERE courier_no = #{courierNo,jdbcType=VARCHAR}
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <update id="updateSignStatus" parameterType="java.util.Map">
|
|
|
|
|
+ UPDATE group_order_express
|
|
|
|
|
+ SET sign_status = #{signStatus,jdbcType=INTEGER},
|
|
|
|
|
+ sync_time = NOW()
|
|
|
|
|
+ WHERE order_no = #{orderNo,jdbcType=VARCHAR}
|
|
|
|
|
+ </update>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+</mapper>
|