|
@@ -0,0 +1,111 @@
|
|
|
|
+<?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.iamberry.rst.service.order.mapper.OrderSyncPlatformMapper">
|
|
|
|
+ <resultMap id="BaseResultMap" type="OrderSyncPlatform" >
|
|
|
|
+ <result column="sync_plat_id" property="syncPlatId" />
|
|
|
|
+ <result column="sync_plat_name" property="syncPlatName" />
|
|
|
|
+ <result column="sync_plat_type" property="syncPlatType" />
|
|
|
|
+ <result column="sync_plat_app_key" property="syncPlatAppKey" />
|
|
|
|
+ <result column="sync_plat_app_secret" property="syncPlatAppSecret" />
|
|
|
|
+ <result column="sync_plat_access_token" property="syncPlatAccessToken" />
|
|
|
|
+ <result column="sync_plat_token_date" property="syncPlatTokenDate" />
|
|
|
|
+ <result column="sync_plat_status" property="syncPlatStatus" />
|
|
|
|
+ <result column="sync_plat_create_date" property="syncPlatCreateDate" />
|
|
|
|
+ </resultMap>
|
|
|
|
+ <sql id="Base_List" >
|
|
|
|
+ t.sync_plat_id,
|
|
|
|
+ t.sync_plat_name,
|
|
|
|
+ t.sync_plat_type,
|
|
|
|
+ t.sync_plat_app_key,
|
|
|
|
+ t.sync_plat_app_secret,
|
|
|
|
+ t.sync_plat_access_token,
|
|
|
|
+ t.sync_plat_token_date,
|
|
|
|
+ t.sync_plat_status,
|
|
|
|
+ t.sync_plat_create_date
|
|
|
|
+ </sql>
|
|
|
|
+ <select id="getOrderSyncPlatformList" resultMap="BaseResultMap" parameterType="OrderSyncPlatform" >
|
|
|
|
+ select
|
|
|
|
+ <include refid="Base_List" />
|
|
|
|
+ from tb_rst_order_sync_platform t
|
|
|
|
+ <where>
|
|
|
|
+ <if test="syncPlatId != null ">
|
|
|
|
+ AND t.sync_plat_id = #{syncPlatId}
|
|
|
|
+ </if >
|
|
|
|
+ <if test="syncPlatName != null and syncPlatName != ''">
|
|
|
|
+ AND t.sync_plat_name like CONCAT ('%',#{syncPlatName},'%')
|
|
|
|
+ </if >
|
|
|
|
+ <if test="syncPlatType != null ">
|
|
|
|
+ AND t.sync_plat_type = #{syncPlatType}
|
|
|
|
+ </if >
|
|
|
|
+ <if test="syncPlatAppKey != null and syncPlatAppKey != ''">
|
|
|
|
+ AND t.sync_plat_app_key = #{syncPlatAppKey}
|
|
|
|
+ </if >
|
|
|
|
+ <if test="syncPlatAppSecret != null and syncPlatAppSecret != ''">
|
|
|
|
+ AND t.sync_plat_app_secret = #{syncPlatAppSecret}
|
|
|
|
+ </if >
|
|
|
|
+ <if test="syncPlatAccessToken != null and syncPlatAccessToken != ''">
|
|
|
|
+ AND t.sync_plat_access_token = #{syncPlatAccessToken}
|
|
|
|
+ </if >
|
|
|
|
+ <if test="syncPlatStatus != null ">
|
|
|
|
+ AND t.sync_plat_status = #{syncPlatStatus}
|
|
|
|
+ </if >
|
|
|
|
+ </where>
|
|
|
|
+ </select>
|
|
|
|
+ <select id="getOrderSyncPlatformById" resultMap="BaseResultMap" parameterType="Integer" >
|
|
|
|
+ select
|
|
|
|
+ <include refid="Base_List" />
|
|
|
|
+ from tb_rst_order_sync_platform t
|
|
|
|
+ where t.sync_plat_id= #{syncPlatId}
|
|
|
|
+ </select>
|
|
|
|
+ <insert id="save" parameterType="OrderSyncPlatform" >
|
|
|
|
+ insert into
|
|
|
|
+ tb_rst_order_sync_platform
|
|
|
|
+ (
|
|
|
|
+ sync_plat_name,
|
|
|
|
+ sync_plat_type,
|
|
|
|
+ sync_plat_app_key,
|
|
|
|
+ sync_plat_app_secret,
|
|
|
|
+ sync_plat_access_token,
|
|
|
|
+ sync_plat_token_date,
|
|
|
|
+ sync_plat_status
|
|
|
|
+ )
|
|
|
|
+ values
|
|
|
|
+ (
|
|
|
|
+ #{syncPlatName},
|
|
|
|
+ #{syncPlatType},
|
|
|
|
+ #{syncPlatAppKey},
|
|
|
|
+ #{syncPlatAppSecret},
|
|
|
|
+ #{syncPlatAccessToken},
|
|
|
|
+ #{syncPlatTokenDate},
|
|
|
|
+ #{syncPlatStatus}
|
|
|
|
+ )
|
|
|
|
+ </insert>
|
|
|
|
+ <update id="update" parameterType="OrderSyncPlatform" >
|
|
|
|
+ update
|
|
|
|
+ tb_rst_order_sync_platform
|
|
|
|
+ <set >
|
|
|
|
+ <if test="syncPlatName != null and syncPlatName != ''">
|
|
|
|
+ sync_plat_name = #{syncPlatName},
|
|
|
|
+ </if >
|
|
|
|
+ <if test="syncPlatType != null ">
|
|
|
|
+ sync_plat_type = #{syncPlatType},
|
|
|
|
+ </if >
|
|
|
|
+ <if test="syncPlatAppKey != null and syncPlatAppKey != ''">
|
|
|
|
+ sync_plat_app_key = #{syncPlatAppKey},
|
|
|
|
+ </if >
|
|
|
|
+ <if test="syncPlatAppSecret != null and syncPlatAppSecret != ''">
|
|
|
|
+ sync_plat_app_secret = #{syncPlatAppSecret},
|
|
|
|
+ </if >
|
|
|
|
+ <if test="syncPlatAccessToken != null and syncPlatAccessToken != ''">
|
|
|
|
+ sync_plat_access_token = #{syncPlatAccessToken},
|
|
|
|
+ </if >
|
|
|
|
+ <if test="syncPlatTokenDate != null and syncPlatTokenDate != ''">
|
|
|
|
+ sync_plat_token_date = #{syncPlatTokenDate},
|
|
|
|
+ </if >
|
|
|
|
+ <if test="syncPlatStatus != null ">
|
|
|
|
+ sync_plat_status = #{syncPlatStatus},
|
|
|
|
+ </if >
|
|
|
|
+ </set >
|
|
|
|
+ where sync_plat_id= #{syncPlatId}
|
|
|
|
+ </update>
|
|
|
|
+</mapper>
|