qmj vor 6 Monaten
Ursprung
Commit
0aa667257d

+ 141 - 0
ruoyi-system/target/classes/mapper/system/NightMarketMapper.xml

@@ -0,0 +1,141 @@
+<?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.ruoyi.system.mapper.NightMarketMapper">
+
+    <resultMap type="NightMarket" id="NightMarketResult">
+        <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
+        <result property="image"    column="image"    />
+        <result property="area"    column="area"    />
+        <result property="address"    column="address"    />
+        <result property="longitude"    column="longitude"    />
+        <result property="latitude"    column="latitude"    />
+        <result property="briefIntroduction"    column="brief_introduction"    />
+        <result property="openBusiness"    column="open_business"    />
+        <result property="windingUp"    column="winding_up"    />
+        <result property="sort"    column="sort"    />
+        <result property="userId"    column="user_id"    />
+        <result property="cretim"    column="cretim"    />
+        <result property="state"    column="state"    />
+        <result property="telephone"    column="telephone"    />
+        <result property="userName"    column="user_name"    />
+        <result property="logo"    column="logo"    />
+        <result property="offShelf"    column="off_shelf"    />
+        <result property="hygieneLicence"    column="hygiene_licence"    />
+    </resultMap>
+
+    <sql id="selectNightMarketVo">
+        select id, name, image, area, address, longitude, latitude, brief_introduction, open_business, winding_up, sort, user_id, cretim, state, telephone, user_name, logo, off_shelf, hygiene_licence from night_market
+    </sql>
+
+    <select id="selectNightMarketList" parameterType="NightMarket" resultMap="NightMarketResult">
+        <include refid="selectNightMarketVo"/>
+        <where>
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="image != null  and image != ''"> and image = #{image}</if>
+            <if test="area != null  and area != ''"> and area = #{area}</if>
+            <if test="address != null  and address != ''"> and address = #{address}</if>
+            <if test="longitude != null "> and longitude = #{longitude}</if>
+            <if test="latitude != null "> and latitude = #{latitude}</if>
+            <if test="briefIntroduction != null  and briefIntroduction != ''"> and brief_introduction = #{briefIntroduction}</if>
+            <if test="openBusiness != null  and openBusiness != ''"> and open_business = #{openBusiness}</if>
+            <if test="windingUp != null  and windingUp != ''"> and winding_up = #{windingUp}</if>
+            <if test="sort != null "> and sort = #{sort}</if>
+            <if test="userId != null "> and user_id = #{userId}</if>
+            <if test="cretim != null "> and cretim = #{cretim}</if>
+            <if test="state != null "> and state = #{state}</if>
+            <if test="telephone != null  and telephone != ''"> and telephone = #{telephone}</if>
+            <if test="userName != null  and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
+            <if test="logo != null  and logo != ''"> and logo = #{logo}</if>
+            <if test="offShelf != null  and offShelf != ''"> and off_shelf = #{offShelf}</if>
+            <if test="hygieneLicence != null  and hygieneLicence != ''"> and hygiene_licence = #{hygieneLicence}</if>
+        </where>
+    </select>
+
+    <select id="selectNightMarketById" parameterType="Long" resultMap="NightMarketResult">
+        <include refid="selectNightMarketVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertNightMarket" parameterType="NightMarket" useGeneratedKeys="true" keyProperty="id">
+        insert into night_market
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="name != null">name,</if>
+            <if test="image != null">image,</if>
+            <if test="area != null">area,</if>
+            <if test="address != null">address,</if>
+            <if test="longitude != null">longitude,</if>
+            <if test="latitude != null">latitude,</if>
+            <if test="briefIntroduction != null">brief_introduction,</if>
+            <if test="openBusiness != null">open_business,</if>
+            <if test="windingUp != null">winding_up,</if>
+            <if test="sort != null">sort,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="cretim != null">cretim,</if>
+            <if test="state != null">state,</if>
+            <if test="telephone != null">telephone,</if>
+            <if test="userName != null">user_name,</if>
+            <if test="logo != null">logo,</if>
+            <if test="offShelf != null">off_shelf,</if>
+            <if test="hygieneLicence != null">hygiene_licence,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="name != null">#{name},</if>
+            <if test="image != null">#{image},</if>
+            <if test="area != null">#{area},</if>
+            <if test="address != null">#{address},</if>
+            <if test="longitude != null">#{longitude},</if>
+            <if test="latitude != null">#{latitude},</if>
+            <if test="briefIntroduction != null">#{briefIntroduction},</if>
+            <if test="openBusiness != null">#{openBusiness},</if>
+            <if test="windingUp != null">#{windingUp},</if>
+            <if test="sort != null">#{sort},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="cretim != null">#{cretim},</if>
+            <if test="state != null">#{state},</if>
+            <if test="telephone != null">#{telephone},</if>
+            <if test="userName != null">#{userName},</if>
+            <if test="logo != null">#{logo},</if>
+            <if test="offShelf != null">#{offShelf},</if>
+            <if test="hygieneLicence != null">#{hygieneLicence},</if>
+        </trim>
+    </insert>
+
+    <update id="updateNightMarket" parameterType="NightMarket">
+        update night_market
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="name != null">name = #{name},</if>
+            <if test="image != null">image = #{image},</if>
+            <if test="area != null">area = #{area},</if>
+            <if test="address != null">address = #{address},</if>
+            <if test="longitude != null">longitude = #{longitude},</if>
+            <if test="latitude != null">latitude = #{latitude},</if>
+            <if test="briefIntroduction != null">brief_introduction = #{briefIntroduction},</if>
+            <if test="openBusiness != null">open_business = #{openBusiness},</if>
+            <if test="windingUp != null">winding_up = #{windingUp},</if>
+            <if test="sort != null">sort = #{sort},</if>
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="cretim != null">cretim = #{cretim},</if>
+            <if test="state != null">state = #{state},</if>
+            <if test="telephone != null">telephone = #{telephone},</if>
+            <if test="userName != null">user_name = #{userName},</if>
+            <if test="logo != null">logo = #{logo},</if>
+            <if test="offShelf != null">off_shelf = #{offShelf},</if>
+            <if test="hygieneLicence != null">hygiene_licence = #{hygieneLicence},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteNightMarketById" parameterType="Long">
+        delete from night_market where id = #{id}
+    </delete>
+
+    <delete id="deleteNightMarketByIds" parameterType="String">
+        delete from night_market where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 101 - 0
ruoyi-system/target/classes/mapper/system/OrderParentMapper.xml

@@ -0,0 +1,101 @@
+<?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.ruoyi.system.mapper.OrderParentMapper">
+
+    <resultMap type="OrderParent" id="OrderParentResult">
+        <result property="id"    column="id"    />
+        <result property="userId"    column="user_id"    />
+        <result property="orderStatus"    column="order_status"    />
+        <result property="totalAmount"    column="total_amount"    />
+        <result property="totalDiscount"    column="total_discount"    />
+        <result property="actualPayAmount"    column="actual_pay_amount"    />
+        <result property="paymentMethod"    column="payment_method"    />
+        <result property="paymentTime"    column="payment_time"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="ddId"    column="dd_id"    />
+    </resultMap>
+
+    <sql id="selectOrderParentVo">
+        select id, user_id, order_status, total_amount, total_discount, actual_pay_amount, payment_method, payment_time, create_time, update_time, dd_id from order_parent
+    </sql>
+
+    <select id="selectOrderParentList" parameterType="OrderParent" resultMap="OrderParentResult">
+        <include refid="selectOrderParentVo"/>
+        <where>
+            <if test="userId != null "> and user_id = #{userId}</if>
+            <if test="orderStatus != null "> and order_status = #{orderStatus}</if>
+            <if test="totalAmount != null "> and total_amount = #{totalAmount}</if>
+            <if test="totalDiscount != null "> and total_discount = #{totalDiscount}</if>
+            <if test="actualPayAmount != null "> and actual_pay_amount = #{actualPayAmount}</if>
+            <if test="paymentMethod != null  and paymentMethod != ''"> and payment_method = #{paymentMethod}</if>
+            <if test="paymentTime != null "> and payment_time = #{paymentTime}</if>
+            <if test="ddId != null  and ddId != ''"> and dd_id = #{ddId}</if>
+        </where>
+    </select>
+
+    <select id="selectOrderParentById" parameterType="Long" resultMap="OrderParentResult">
+        <include refid="selectOrderParentVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertOrderParent" parameterType="OrderParent">
+        insert into order_parent
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="orderStatus != null">order_status,</if>
+            <if test="totalAmount != null">total_amount,</if>
+            <if test="totalDiscount != null">total_discount,</if>
+            <if test="actualPayAmount != null">actual_pay_amount,</if>
+            <if test="paymentMethod != null">payment_method,</if>
+            <if test="paymentTime != null">payment_time,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="ddId != null">dd_id,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="orderStatus != null">#{orderStatus},</if>
+            <if test="totalAmount != null">#{totalAmount},</if>
+            <if test="totalDiscount != null">#{totalDiscount},</if>
+            <if test="actualPayAmount != null">#{actualPayAmount},</if>
+            <if test="paymentMethod != null">#{paymentMethod},</if>
+            <if test="paymentTime != null">#{paymentTime},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="ddId != null">#{ddId},</if>
+        </trim>
+    </insert>
+
+    <update id="updateOrderParent" parameterType="OrderParent">
+        update order_parent
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="orderStatus != null">order_status = #{orderStatus},</if>
+            <if test="totalAmount != null">total_amount = #{totalAmount},</if>
+            <if test="totalDiscount != null">total_discount = #{totalDiscount},</if>
+            <if test="actualPayAmount != null">actual_pay_amount = #{actualPayAmount},</if>
+            <if test="paymentMethod != null">payment_method = #{paymentMethod},</if>
+            <if test="paymentTime != null">payment_time = #{paymentTime},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="ddId != null">dd_id = #{ddId},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteOrderParentById" parameterType="Long">
+        delete from order_parent where id = #{id}
+    </delete>
+
+    <delete id="deleteOrderParentByIds" parameterType="String">
+        delete from order_parent where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>