|
@@ -0,0 +1,170 @@
|
|
|
|
|
+<?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.fs.hisStore.mapper.FsStoreScrmMapper">
|
|
|
|
|
+
|
|
|
|
|
+ <resultMap type="FsStoreScrm" id="FsStoreScrmResult">
|
|
|
|
|
+ <result property="storeId" column="store_id" />
|
|
|
|
|
+ <result property="cityIds" column="city_ids" />
|
|
|
|
|
+ <result property="storeName" column="store_name" />
|
|
|
|
|
+ <result property="descs" column="descs" />
|
|
|
|
|
+ <result property="logoUrl" column="logo_url" />
|
|
|
|
|
+ <result property="address" column="address" />
|
|
|
|
|
+ <result property="lng" column="lng" />
|
|
|
|
|
+ <result property="lat" column="lat" />
|
|
|
|
|
+ <result property="phone" column="phone" />
|
|
|
|
|
+ <result property="licenseImages" column="license_images" />
|
|
|
|
|
+ <result property="productCount" column="product_count" />
|
|
|
|
|
+ <result property="status" column="status" />
|
|
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
|
|
+ <result property="salesCount" column="sales_count" />
|
|
|
|
|
+ <result property="balance" column="balance" />
|
|
|
|
|
+ <result property="totalMoney" column="total_money" />
|
|
|
|
|
+ <result property="isAudit" column="is_audit" />
|
|
|
|
|
+ <result property="account" column="account" />
|
|
|
|
|
+ <result property="password" column="password" />
|
|
|
|
|
+ <result property="shippingType" column="shipping_type" />
|
|
|
|
|
+ <result property="brokerageType" column="brokerage_type" />
|
|
|
|
|
+ <result property="brokerageRate" column="brokerage_rate" />
|
|
|
|
|
+ <result property="fullName" column="full_name" />
|
|
|
|
|
+ <result property="refundPhone" column="refund_phone" />
|
|
|
|
|
+ <result property="refundAddress" column="refund_address" />
|
|
|
|
|
+ <result property="refundConsignee" column="refund_consignee" />
|
|
|
|
|
+ <result property="deliveryType" column="delivery_type" />
|
|
|
|
|
+ <result property="sendPhone" column="send_phone" />
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+
|
|
|
|
|
+ <sql id="selectFsStoreVo">
|
|
|
|
|
+ select store_id,full_name,delivery_type,send_phone, brokerage_rate,refund_phone,refund_address,refund_consignee,city_ids, store_name, descs, brokerage_type,logo_url, address, lng, lat, phone, license_images, product_count, status, create_time, update_time, sales_count, balance, total_money, is_audit, account, password, shipping_type from fs_store_scrm
|
|
|
|
|
+ </sql>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectFsStoreList" parameterType="FsStoreScrm" resultMap="FsStoreScrmResult">
|
|
|
|
|
+ <include refid="selectFsStoreVo"/>
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="storeName != null and storeName != ''"> and store_name like concat('%', #{storeName}, '%')</if>
|
|
|
|
|
+ <if test="address != null and address != ''"> and address like concat('%', #{address}, '%')</if>
|
|
|
|
|
+ <if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
|
|
|
|
+ <if test="status != null "> and status = #{status}</if>
|
|
|
|
|
+ <if test="isAudit != null "> and is_audit = #{isAudit}</if>
|
|
|
|
|
+ <if test="account != null and account != ''"> and account like concat('%', #{account}, '%')</if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ order by store_id desc
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectFsStoreByStoreId" parameterType="Long" resultMap="FsStoreScrmResult">
|
|
|
|
|
+ <include refid="selectFsStoreVo"/>
|
|
|
|
|
+ where store_id = #{storeId}
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <insert id="insertFsStore" parameterType="FsStoreScrm" useGeneratedKeys="true" keyProperty="storeId">
|
|
|
|
|
+ insert into fs_store_scrm
|
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="cityIds != null">city_ids,</if>
|
|
|
|
|
+ <if test="storeName != null">store_name,</if>
|
|
|
|
|
+ <if test="descs != null">descs,</if>
|
|
|
|
|
+ <if test="logoUrl != null">logo_url,</if>
|
|
|
|
|
+ <if test="address != null">address,</if>
|
|
|
|
|
+ <if test="lng != null">lng,</if>
|
|
|
|
|
+ <if test="lat != null">lat,</if>
|
|
|
|
|
+ <if test="phone != null">phone,</if>
|
|
|
|
|
+ <if test="licenseImages != null">license_images,</if>
|
|
|
|
|
+ <if test="productCount != null">product_count,</if>
|
|
|
|
|
+ <if test="status != null">status,</if>
|
|
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
|
|
+ <if test="salesCount != null">sales_count,</if>
|
|
|
|
|
+ <if test="balance != null">balance,</if>
|
|
|
|
|
+ <if test="totalMoney != null">total_money,</if>
|
|
|
|
|
+ <if test="isAudit != null">is_audit,</if>
|
|
|
|
|
+ <if test="account != null">account,</if>
|
|
|
|
|
+ <if test="password != null">password,</if>
|
|
|
|
|
+ <if test="shippingType != null">shipping_type,</if>
|
|
|
|
|
+ <if test="brokerageType != null">brokerage_type,</if>
|
|
|
|
|
+ <if test="brokerageRate != null">brokerage_rate,</if>
|
|
|
|
|
+ <if test="fullName != null">full_name,</if>
|
|
|
|
|
+ <if test="refundPhone != null">refund_phone,</if>
|
|
|
|
|
+ <if test="refundAddress != null">refund_address,</if>
|
|
|
|
|
+ <if test="refundConsignee != null">refund_consignee,</if>
|
|
|
|
|
+ <if test="deliveryType != null">delivery_type,</if>
|
|
|
|
|
+ <if test="sendPhone != null">send_phone,</if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="cityIds != null">#{cityIds},</if>
|
|
|
|
|
+ <if test="storeName != null">#{storeName},</if>
|
|
|
|
|
+ <if test="descs != null">#{descs},</if>
|
|
|
|
|
+ <if test="logoUrl != null">#{logoUrl},</if>
|
|
|
|
|
+ <if test="address != null">#{address},</if>
|
|
|
|
|
+ <if test="lng != null">#{lng},</if>
|
|
|
|
|
+ <if test="lat != null">#{lat},</if>
|
|
|
|
|
+ <if test="phone != null">#{phone},</if>
|
|
|
|
|
+ <if test="licenseImages != null">#{licenseImages},</if>
|
|
|
|
|
+ <if test="productCount != null">#{productCount},</if>
|
|
|
|
|
+ <if test="status != null">#{status},</if>
|
|
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
|
|
+ <if test="salesCount != null">#{salesCount},</if>
|
|
|
|
|
+ <if test="balance != null">#{balance},</if>
|
|
|
|
|
+ <if test="totalMoney != null">#{totalMoney},</if>
|
|
|
|
|
+ <if test="isAudit != null">#{isAudit},</if>
|
|
|
|
|
+ <if test="account != null">#{account},</if>
|
|
|
|
|
+ <if test="password != null">#{password},</if>
|
|
|
|
|
+ <if test="shippingType != null">#{shippingType},</if>
|
|
|
|
|
+ <if test="brokerageType != null">#{brokerageType},</if>
|
|
|
|
|
+ <if test="brokerageRate != null">#{brokerageRate},</if>
|
|
|
|
|
+ <if test="fullName != null">#{fullName},</if>
|
|
|
|
|
+ <if test="refundPhone != null">#{refundPhone},</if>
|
|
|
|
|
+ <if test="refundAddress != null">#{refundAddress},</if>
|
|
|
|
|
+ <if test="refundConsignee != null">#{refundConsignee},</if>
|
|
|
|
|
+ <if test="deliveryType != null">#{deliveryType},</if>
|
|
|
|
|
+ <if test="sendPhone != null">#{sendPhone},</if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ </insert>
|
|
|
|
|
+
|
|
|
|
|
+ <update id="updateFsStore" parameterType="FsStoreScrm">
|
|
|
|
|
+ update fs_store_scrm
|
|
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
+ <if test="cityIds != null">city_ids = #{cityIds},</if>
|
|
|
|
|
+ <if test="storeName != null">store_name = #{storeName},</if>
|
|
|
|
|
+ <if test="descs != null">descs = #{descs},</if>
|
|
|
|
|
+ <if test="logoUrl != null">logo_url = #{logoUrl},</if>
|
|
|
|
|
+ <if test="address != null">address = #{address},</if>
|
|
|
|
|
+ <if test="lng != null">lng = #{lng},</if>
|
|
|
|
|
+ <if test="lat != null">lat = #{lat},</if>
|
|
|
|
|
+ <if test="phone != null">phone = #{phone},</if>
|
|
|
|
|
+ <if test="licenseImages != null">license_images = #{licenseImages},</if>
|
|
|
|
|
+ <if test="productCount != null">product_count = #{productCount},</if>
|
|
|
|
|
+ <if test="status != null">status = #{status},</if>
|
|
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
|
+ <if test="salesCount != null">sales_count = #{salesCount},</if>
|
|
|
|
|
+ <if test="balance != null">balance = #{balance},</if>
|
|
|
|
|
+ <if test="totalMoney != null">total_money = #{totalMoney},</if>
|
|
|
|
|
+ <if test="isAudit != null">is_audit = #{isAudit},</if>
|
|
|
|
|
+ <if test="account != null">account = #{account},</if>
|
|
|
|
|
+ <if test="password != null">password = #{password},</if>
|
|
|
|
|
+ <if test="shippingType != null">shipping_type = #{shippingType},</if>
|
|
|
|
|
+ <if test="brokerageType != null">brokerage_type = #{brokerageType},</if>
|
|
|
|
|
+ <if test="brokerageRate != null">brokerage_rate = #{brokerageRate},</if>
|
|
|
|
|
+ <if test="fullName != null">full_name = #{fullName},</if>
|
|
|
|
|
+ <if test="refundPhone != null">refund_phone = #{refundPhone},</if>
|
|
|
|
|
+ <if test="refundAddress != null">refund_address = #{refundAddress},</if>
|
|
|
|
|
+ <if test="refundConsignee != null">refund_consignee = #{refundConsignee},</if>
|
|
|
|
|
+ <if test="deliveryType != null">delivery_type = #{deliveryType},</if>
|
|
|
|
|
+ <if test="sendPhone != null">send_phone = #{sendPhone},</if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ where store_id = #{storeId}
|
|
|
|
|
+ </update>
|
|
|
|
|
+
|
|
|
|
|
+ <delete id="deleteFsStoreByStoreId" parameterType="Long">
|
|
|
|
|
+ delete from fs_store_scrm where store_id = #{storeId}
|
|
|
|
|
+ </delete>
|
|
|
|
|
+
|
|
|
|
|
+ <delete id="deleteFsStoreByStoreIds" parameterType="String">
|
|
|
|
|
+ delete from fs_store_scrm where store_id in
|
|
|
|
|
+ <foreach item="storeId" collection="array" open="(" separator="," close=")">
|
|
|
|
|
+ #{storeId}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </delete>
|
|
|
|
|
+</mapper>
|