|
@@ -0,0 +1,95 @@
|
|
|
+<?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.cm.mapper.StoreShipMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="StoreShip" >
|
|
|
+ <result column="store_ship_id" property="storeShipId" />
|
|
|
+ <result column="store_id" property="storeId" />
|
|
|
+ <result column="store_ship_name" property="storeShipName" />
|
|
|
+ <result column="store_ship_tel" property="storeShipTel" />
|
|
|
+ <result column="store_ship_province" property="storeShipProvince" />
|
|
|
+ <result column="store_ship_city" property="storeShipCity" />
|
|
|
+ <result column="store_ship_address" property="storeShipAddress" />
|
|
|
+ <result column="store_ship_create_date" property="storeShipCreateDate" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_List" >
|
|
|
+ t.store_ship_id,
|
|
|
+ t.store_id,
|
|
|
+ t.store_ship_name,
|
|
|
+ t.store_ship_tel,
|
|
|
+ t.store_ship_province,
|
|
|
+ t.store_ship_city,
|
|
|
+ t.store_ship_address,
|
|
|
+ t.store_ship_create_date
|
|
|
+ </sql>
|
|
|
+ <select id="getStoreShipList" resultMap="BaseResultMap" parameterType="StoreShip" >
|
|
|
+ select
|
|
|
+ <include refid="Base_List" />
|
|
|
+ from tb_rst_store_ship t
|
|
|
+ <where>
|
|
|
+ <if test="storeShipId != null ">
|
|
|
+ AND t.store_ship_id = #{storeShipId}
|
|
|
+ </if >
|
|
|
+ <if test="storeId != null ">
|
|
|
+ AND t.store_id = #{storeId}
|
|
|
+ </if >
|
|
|
+ <if test="storeShipName != null and storeShipName != ''">
|
|
|
+ AND t.store_ship_name like CONCAT ('%',#{storeShipName},'%')
|
|
|
+ </if >
|
|
|
+ <if test="storeShipTel != null and storeShipTel != ''">
|
|
|
+ AND t.store_ship_tel like CONCAT ('%',#{storeShipTel},'%')
|
|
|
+ </if >
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+ <select id="getStoreShipById" resultMap="BaseResultMap" parameterType="Integer" >
|
|
|
+ select
|
|
|
+ <include refid="Base_List" />
|
|
|
+ from tb_rst_store_ship t
|
|
|
+ where t.store_ship_id= #{storeShipId}
|
|
|
+ </select>
|
|
|
+ <insert id="save" parameterType="StoreShip" >
|
|
|
+ insert into
|
|
|
+ tb_rst_store_ship
|
|
|
+ (
|
|
|
+ store_id,
|
|
|
+ store_ship_name,
|
|
|
+ store_ship_tel,
|
|
|
+ store_ship_province,
|
|
|
+ store_ship_city,
|
|
|
+ store_ship_address
|
|
|
+ )
|
|
|
+ values
|
|
|
+ (
|
|
|
+ #{storeId},
|
|
|
+ #{storeShipName},
|
|
|
+ #{storeShipTel},
|
|
|
+ #{storeShipProvince},
|
|
|
+ #{storeShipCity},
|
|
|
+ #{storeShipAddress}
|
|
|
+ )
|
|
|
+ </insert>
|
|
|
+ <update id="update" parameterType="StoreShip" >
|
|
|
+ update
|
|
|
+ tb_rst_store_ship
|
|
|
+ <set >
|
|
|
+ <if test="storeId != null ">
|
|
|
+ store_id = #{storeId},
|
|
|
+ </if >
|
|
|
+ <if test="storeShipName != null and storeShipName != ''">
|
|
|
+ store_ship_name = #{storeShipName},
|
|
|
+ </if >
|
|
|
+ <if test="storeShipTel != null and storeShipTel != ''">
|
|
|
+ store_ship_tel = #{storeShipTel},
|
|
|
+ </if >
|
|
|
+ <if test="storeShipProvince != null and storeShipProvince != ''">
|
|
|
+ store_ship_province = #{storeShipProvince},
|
|
|
+ </if >
|
|
|
+ <if test="storeShipCity != null and storeShipCity != ''">
|
|
|
+ store_ship_city = #{storeShipCity},
|
|
|
+ </if >
|
|
|
+ <if test="storeShipAddress != null and storeShipAddress != ''">
|
|
|
+ store_ship_address = #{storeShipAddress},
|
|
|
+ </if >
|
|
|
+ </set >
|
|
|
+ where store_ship_id= #{storeShipId}
|
|
|
+ </update>
|
|
|
+</mapper>
|