|
@@ -1,27 +1,40 @@
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!DOCTYPE mapper
|
|
<!DOCTYPE mapper
|
|
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.ruoyi.system.mapper.DoumuProductInfoMapper">
|
|
<mapper namespace="com.ruoyi.system.mapper.DoumuProductInfoMapper">
|
|
-
|
|
|
|
|
|
+
|
|
<resultMap type="DoumuProductInfo" id="DoumuProductInfoResult">
|
|
<resultMap type="DoumuProductInfo" id="DoumuProductInfoResult">
|
|
<result property="productId" column="product_id" />
|
|
<result property="productId" column="product_id" />
|
|
<result property="orderNumber" column="order_number" />
|
|
<result property="orderNumber" column="order_number" />
|
|
<result property="name" column="name" />
|
|
<result property="name" column="name" />
|
|
<result property="deliveryType" column="delivery_type" />
|
|
<result property="deliveryType" column="delivery_type" />
|
|
<result property="phonenumber" column="phonenumber" />
|
|
<result property="phonenumber" column="phonenumber" />
|
|
|
|
+ <result property="quantity" column="quantity" />
|
|
|
|
+ <result property="provinceId" column="province_id" />
|
|
|
|
+ <result property="province" column="province" />
|
|
|
|
+ <result property="cityId" column="city_id" />
|
|
|
|
+ <result property="city" column="city" />
|
|
|
|
+ <result property="countyId" column="county_id" />
|
|
|
|
+ <result property="county" column="county" />
|
|
<result property="address" column="address" />
|
|
<result property="address" column="address" />
|
|
|
|
+ <result property="lon" column="lon" />
|
|
|
|
+ <result property="lat" column="lat" />
|
|
<result property="flowType" column="flow_type" />
|
|
<result property="flowType" column="flow_type" />
|
|
- <result property="mailNo" column="mailNo" />
|
|
|
|
|
|
+ <result property="status" column="status" />
|
|
|
|
+ <result property="mailNo" column="mail_no" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updateBy" column="update_by" />
|
|
<result property="updateBy" column="update_by" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="remark" column="remark" />
|
|
<result property="remark" column="remark" />
|
|
|
|
+
|
|
|
|
+ <result property="beginTime" column="beginTime" />
|
|
|
|
+ <result property="endTime" column="endTime" />
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectDoumuProductInfoVo">
|
|
<sql id="selectDoumuProductInfoVo">
|
|
- select product_id,order_number, name, delivery_type, phonenumber, address, flow_type, mailNo, create_by, create_time, update_by, update_time, remark from doumu_product_info
|
|
|
|
|
|
+ select product_id,order_number, name, delivery_type, phonenumber,quantity,province_id,province,city_id,city,county_id,county,lon,lat,status, address, flow_type, mail_no, create_by, create_time, update_by, update_time, remark from doumu_product_info
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<select id="selectDoumuProductInfoList" parameterType="DoumuProductInfo" resultMap="DoumuProductInfoResult">
|
|
<select id="selectDoumuProductInfoList" parameterType="DoumuProductInfo" resultMap="DoumuProductInfoResult">
|
|
@@ -33,15 +46,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="phonenumber != null and phonenumber != ''"> and phonenumber = #{phonenumber}</if>
|
|
<if test="phonenumber != null and phonenumber != ''"> and phonenumber = #{phonenumber}</if>
|
|
<if test="address != null and address != ''"> and address = #{address}</if>
|
|
<if test="address != null and address != ''"> and address = #{address}</if>
|
|
<if test="flowType != null and flowType != ''"> and flow_type = #{flowType}</if>
|
|
<if test="flowType != null and flowType != ''"> and flow_type = #{flowType}</if>
|
|
|
|
+ <if test="status != null and status != ''"> and status = #{status}</if>
|
|
<if test="mailNo != null and mailNo != ''"> and mailNo = #{mailNo}</if>
|
|
<if test="mailNo != null and mailNo != ''"> and mailNo = #{mailNo}</if>
|
|
|
|
+ <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
|
|
|
+ AND date_format(create_time,'%y%m%d') >= date_format(#{beginTime},'%y%m%d')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
|
|
|
+ AND date_format(create_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d')
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
|
|
+ order by create_time desc
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<select id="selectDoumuProductInfoByProductId" parameterType="Long" resultMap="DoumuProductInfoResult">
|
|
<select id="selectDoumuProductInfoByProductId" parameterType="Long" resultMap="DoumuProductInfoResult">
|
|
<include refid="selectDoumuProductInfoVo"/>
|
|
<include refid="selectDoumuProductInfoVo"/>
|
|
where product_id = #{productId}
|
|
where product_id = #{productId}
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<insert id="insertDoumuProductInfo" parameterType="DoumuProductInfo" useGeneratedKeys="true" keyProperty="productId">
|
|
<insert id="insertDoumuProductInfo" parameterType="DoumuProductInfo" useGeneratedKeys="true" keyProperty="productId">
|
|
insert into doumu_product_info
|
|
insert into doumu_product_info
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
@@ -49,29 +70,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="name != null and name != ''">name,</if>
|
|
<if test="name != null and name != ''">name,</if>
|
|
<if test="deliveryType != null">delivery_type,</if>
|
|
<if test="deliveryType != null">delivery_type,</if>
|
|
<if test="phonenumber != null">phonenumber,</if>
|
|
<if test="phonenumber != null">phonenumber,</if>
|
|
|
|
+ <if test="quantity != null">quantity,</if>
|
|
|
|
+ <if test="provinceId != null">province_id,</if>
|
|
|
|
+ <if test="province != null">province,</if>
|
|
|
|
+ <if test="cityId != null">city_id,</if>
|
|
|
|
+ <if test="city != null">city,</if>
|
|
|
|
+ <if test="countyId != null">county_id,</if>
|
|
|
|
+ <if test="county != null">county,</if>
|
|
<if test="address != null">address,</if>
|
|
<if test="address != null">address,</if>
|
|
|
|
+ <if test="lon != null">lon,</if>
|
|
|
|
+ <if test="lat != null">lat,</if>
|
|
<if test="flowType != null">flow_type,</if>
|
|
<if test="flowType != null">flow_type,</if>
|
|
|
|
+ <if test="status != null">status,</if>
|
|
<if test="mailNo != null">mailNo,</if>
|
|
<if test="mailNo != null">mailNo,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="updateBy != null">update_by,</if>
|
|
<if test="updateBy != null">update_by,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
<if test="remark != null">remark,</if>
|
|
<if test="remark != null">remark,</if>
|
|
- </trim>
|
|
|
|
|
|
+ </trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="orderNumber != null ">#{orderNumber},</if>
|
|
<if test="orderNumber != null ">#{orderNumber},</if>
|
|
<if test="name != null and name != ''">#{name},</if>
|
|
<if test="name != null and name != ''">#{name},</if>
|
|
<if test="deliveryType != null">#{deliveryType},</if>
|
|
<if test="deliveryType != null">#{deliveryType},</if>
|
|
<if test="phonenumber != null">#{phonenumber},</if>
|
|
<if test="phonenumber != null">#{phonenumber},</if>
|
|
|
|
+ <if test="quantity != null">#{quantity},</if>
|
|
|
|
+ <if test="provinceId != null">#{provinceId},</if>
|
|
|
|
+ <if test="province != null">#{province},</if>
|
|
|
|
+ <if test="cityId != null">#{cityId},</if>
|
|
|
|
+ <if test="city != null">#{city},</if>
|
|
|
|
+ <if test="countyId != null">#{countyId},</if>
|
|
|
|
+ <if test="county != null">#{county},</if>
|
|
<if test="address != null">#{address},</if>
|
|
<if test="address != null">#{address},</if>
|
|
|
|
+ <if test="lon != null">#{lon},</if>
|
|
|
|
+ <if test="lat != null">#{lat},</if>
|
|
<if test="flowType != null">#{flowType},</if>
|
|
<if test="flowType != null">#{flowType},</if>
|
|
|
|
+ <if test="status != null">#{status},</if>
|
|
<if test="mailNo != null">#{mailNo},</if>
|
|
<if test="mailNo != null">#{mailNo},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
<if test="remark != null">#{remark},</if>
|
|
<if test="remark != null">#{remark},</if>
|
|
- </trim>
|
|
|
|
|
|
+ </trim>
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<update id="updateDoumuProductInfo" parameterType="DoumuProductInfo">
|
|
<update id="updateDoumuProductInfo" parameterType="DoumuProductInfo">
|
|
@@ -81,8 +122,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="name != null and name != ''">name = #{name},</if>
|
|
<if test="name != null and name != ''">name = #{name},</if>
|
|
<if test="deliveryType != null">delivery_type = #{deliveryType},</if>
|
|
<if test="deliveryType != null">delivery_type = #{deliveryType},</if>
|
|
<if test="phonenumber != null">phonenumber = #{phonenumber},</if>
|
|
<if test="phonenumber != null">phonenumber = #{phonenumber},</if>
|
|
|
|
+ <if test="quantity != null">quantity = #{quantity},</if>
|
|
|
|
+ <if test="provinceId != null">province_id = #{provinceId},</if>
|
|
|
|
+ <if test="province != null">province = #{province},</if>
|
|
|
|
+ <if test="cityId != null">city_id = #{cityId},</if>
|
|
|
|
+ <if test="city != null">city = #{city},</if>
|
|
|
|
+ <if test="countyId != null">county_id = #{countyId},</if>
|
|
|
|
+ <if test="county != null">county = #{county},</if>
|
|
<if test="address != null">address = #{address},</if>
|
|
<if test="address != null">address = #{address},</if>
|
|
|
|
+ <if test="lon != null">lon = #{lon},</if>
|
|
|
|
+ <if test="lat != null">lat = #{lat},</if>
|
|
<if test="flowType != null">flow_type = #{flowType},</if>
|
|
<if test="flowType != null">flow_type = #{flowType},</if>
|
|
|
|
+ <if test="status != null">status = #{status},</if>
|
|
<if test="mailNo != null">mailNo = #{mailNo},</if>
|
|
<if test="mailNo != null">mailNo = #{mailNo},</if>
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
@@ -93,12 +144,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
where product_id = #{productId}
|
|
where product_id = #{productId}
|
|
</update>
|
|
</update>
|
|
|
|
|
|
|
|
+ <update id="updateDoumuProductInfoFlowList">
|
|
|
|
+ update doumu_product_info flow_type = #{flowType} where product_id in
|
|
|
|
+ <foreach collection="productIdList" index="index" item="productId" open="(" separator="," close=")">
|
|
|
|
+ #{productId}
|
|
|
|
+ </foreach>
|
|
|
|
+ </update>
|
|
|
|
+
|
|
<delete id="deleteDoumuProductInfoByProductId" parameterType="Long">
|
|
<delete id="deleteDoumuProductInfoByProductId" parameterType="Long">
|
|
delete from doumu_product_info where product_id = #{productId}
|
|
delete from doumu_product_info where product_id = #{productId}
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteDoumuProductInfoByProductIds" parameterType="String">
|
|
<delete id="deleteDoumuProductInfoByProductIds" parameterType="String">
|
|
- delete from doumu_product_info where product_id in
|
|
|
|
|
|
+ delete from doumu_product_info where product_id in
|
|
<foreach item="productId" collection="array" open="(" separator="," close=")">
|
|
<foreach item="productId" collection="array" open="(" separator="," close=")">
|
|
#{productId}
|
|
#{productId}
|
|
</foreach>
|
|
</foreach>
|