|
@@ -6,13 +6,13 @@
|
|
|
<!--@Table oms_order_courier-->
|
|
|
<id column="id" jdbcType="BIGINT" property="id" />
|
|
|
<result column="company" jdbcType="VARCHAR" property="company" />
|
|
|
- <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
|
|
|
+ <result column="order_id" jdbcType="BIGINT" property="orderId" />
|
|
|
<result column="courier_no" jdbcType="VARCHAR" property="courierNo" />
|
|
|
<result column="logistics" jdbcType="LONGVARCHAR" property="logistics" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
<!--@mbg.generated-->
|
|
|
- id, company, order_no, courier_no, logistics
|
|
|
+ id, company, order_id, courier_no, logistics
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
<!--@mbg.generated-->
|
|
@@ -28,9 +28,9 @@
|
|
|
</delete>
|
|
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yonge.cooleshow.mbg.model.OmsOrderCourier" useGeneratedKeys="true">
|
|
|
<!--@mbg.generated-->
|
|
|
- insert into oms_order_courier (company, order_no, courier_no,
|
|
|
+ insert into oms_order_courier (company, order_id, courier_no,
|
|
|
logistics)
|
|
|
- values (#{company,jdbcType=VARCHAR}, #{orderNo,jdbcType=VARCHAR}, #{courierNo,jdbcType=VARCHAR},
|
|
|
+ values (#{company,jdbcType=VARCHAR}, #{orderId,jdbcType=BIGINT}, #{courierNo,jdbcType=VARCHAR},
|
|
|
#{logistics,jdbcType=LONGVARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yonge.cooleshow.mbg.model.OmsOrderCourier" useGeneratedKeys="true">
|
|
@@ -40,8 +40,8 @@
|
|
|
<if test="company != null">
|
|
|
company,
|
|
|
</if>
|
|
|
- <if test="orderNo != null">
|
|
|
- order_no,
|
|
|
+ <if test="orderId != null">
|
|
|
+ order_id,
|
|
|
</if>
|
|
|
<if test="courierNo != null">
|
|
|
courier_no,
|
|
@@ -54,8 +54,8 @@
|
|
|
<if test="company != null">
|
|
|
#{company,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="orderNo != null">
|
|
|
- #{orderNo,jdbcType=VARCHAR},
|
|
|
+ <if test="orderId != null">
|
|
|
+ #{orderId,jdbcType=BIGINT},
|
|
|
</if>
|
|
|
<if test="courierNo != null">
|
|
|
#{courierNo,jdbcType=VARCHAR},
|
|
@@ -72,8 +72,8 @@
|
|
|
<if test="company != null">
|
|
|
company = #{company,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="orderNo != null">
|
|
|
- order_no = #{orderNo,jdbcType=VARCHAR},
|
|
|
+ <if test="orderId != null">
|
|
|
+ order_id = #{orderId,jdbcType=BIGINT},
|
|
|
</if>
|
|
|
<if test="courierNo != null">
|
|
|
courier_no = #{courierNo,jdbcType=VARCHAR},
|
|
@@ -88,9 +88,27 @@
|
|
|
<!--@mbg.generated-->
|
|
|
update oms_order_courier
|
|
|
set company = #{company,jdbcType=VARCHAR},
|
|
|
- order_no = #{orderNo,jdbcType=VARCHAR},
|
|
|
+ order_id = #{orderId,jdbcType=BIGINT},
|
|
|
courier_no = #{courierNo,jdbcType=VARCHAR},
|
|
|
logistics = #{logistics,jdbcType=LONGVARCHAR}
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
</update>
|
|
|
+ <insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ insert into oms_order_courier
|
|
|
+ (company, order_id, courier_no, logistics)
|
|
|
+ values
|
|
|
+ <foreach collection="list" item="item" separator=",">
|
|
|
+ (#{item.company,jdbcType=VARCHAR}, #{item.orderId,jdbcType=BIGINT}, #{item.courierNo,jdbcType=VARCHAR},
|
|
|
+ #{item.logistics,jdbcType=LONGVARCHAR})
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateByCourierNo">
|
|
|
+ update oms_order_courier set logistics = #{logistics} where courier_no = #{courierNo};
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <select id="queryByCourierNo" resultMap="BaseResultMap">
|
|
|
+ select * from oms_order_courier where courier_no = #{courierNo} order by id desc limit 1
|
|
|
+ </select>
|
|
|
</mapper>
|