|
|
@ -22,13 +22,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<result property="userIdJson" column="user_id_json"/> |
|
|
|
<result property="orderSn" column="order_sn"/> |
|
|
|
<result property="orderId" column="order_id"/> |
|
|
|
<result property="startTime" column="start_time"/> |
|
|
|
<result property="name" column="name"/> |
|
|
|
<result property="phone" column="phone"/> |
|
|
|
<result property="orderStatus" column="order_status"/> |
|
|
|
<result property="orderGiveProportion" column="order_give_proportion"/> |
|
|
|
<result property="orderGivePrice" column="order_give_price"/> |
|
|
|
<result property="isDate" column="is_date"/> |
|
|
|
<result property="isAddress" column="is_address"/> |
|
|
|
<result property="isPet" column="is_pet"/> |
|
|
|
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="selectAppletOrderItemVo"> |
|
|
|
select id, create_time, create_by, update_time, update_by, pay_time, status, price, address, type, reason, user_id, pet_id,num,user_id_json,order_id,order_sn from applet_order_item |
|
|
|
select id, create_time, create_by, update_time, update_by, pay_time, status, price, address, type, reason, user_id, pet_id, num, user_id_json, order_sn, order_id, start_time, name, phone, order_status, order_give_proportion, order_give_price, is_date, is_address, is_pet from applet_order_item |
|
|
|
</sql> |
|
|
|
|
|
|
|
|
|
|
|
<select id="selectAppletOrderItemList" parameterType="AppletOrderItem" resultMap="AppletOrderItemResult"> |
|
|
|
<include refid="selectAppletOrderItemVo"/> |
|
|
|
<where> |
|
|
@ -41,9 +51,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="userId != null "> and user_id = #{userId}</if> |
|
|
|
<if test="petId != null "> and pet_id = #{petId}</if> |
|
|
|
<if test="num != null "> and num = #{num}</if> |
|
|
|
<if test="userIdJson != null "> and user_id_json = #{userIdJson}</if> |
|
|
|
<if test="orderSn != null "> and order_sn = #{orderSn}</if> |
|
|
|
<if test="userIdJson != null and userIdJson != ''"> and user_id_json = #{userIdJson}</if> |
|
|
|
<if test="orderSn != null and orderSn != ''"> and order_sn = #{orderSn}</if> |
|
|
|
<if test="orderId != null "> and order_id = #{orderId}</if> |
|
|
|
<if test="startTime != null "> and start_time = #{startTime}</if> |
|
|
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> |
|
|
|
<if test="phone != null and phone != ''"> and phone = #{phone}</if> |
|
|
|
<if test="orderStatus != null "> and order_status = #{orderStatus}</if> |
|
|
|
<if test="orderGiveProportion != null "> and order_give_proportion = #{orderGiveProportion}</if> |
|
|
|
<if test="orderGivePrice != null "> and order_give_price = #{orderGivePrice}</if> |
|
|
|
<if test="isDate != null "> and is_date = #{isDate}</if> |
|
|
|
<if test="isAddress != null "> and is_address = #{isAddress}</if> |
|
|
|
<if test="isPet != null "> and is_pet = #{isPet}</if> |
|
|
|
</where> |
|
|
|
order by create_time desc |
|
|
|
|
|
|
@ -109,8 +128,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="userIdJson != null">user_id_json,</if> |
|
|
|
<if test="orderSn != null">order_sn,</if> |
|
|
|
<if test="orderId != null">order_id,</if> |
|
|
|
|
|
|
|
|
|
|
|
<if test="startTime != null">start_time,</if> |
|
|
|
<if test="name != null">name,</if> |
|
|
|
<if test="phone != null">phone,</if> |
|
|
|
<if test="orderStatus != null">order_status,</if> |
|
|
|
<if test="orderGiveProportion != null">order_give_proportion,</if> |
|
|
|
<if test="orderGivePrice != null">order_give_price,</if> |
|
|
|
<if test="isDate != null">is_date,</if> |
|
|
|
<if test="isAddress != null">is_address,</if> |
|
|
|
<if test="isPet != null">is_pet,</if> |
|
|
|
</trim> |
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
|
|
<if test="id != null">#{id},</if> |
|
|
@ -130,11 +156,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="userIdJson != null">#{userIdJson},</if> |
|
|
|
<if test="orderSn != null">#{orderSn},</if> |
|
|
|
<if test="orderId != null">#{orderId},</if> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<if test="startTime != null">#{startTime},</if> |
|
|
|
<if test="name != null">#{name},</if> |
|
|
|
<if test="phone != null">#{phone},</if> |
|
|
|
<if test="orderStatus != null">#{orderStatus},</if> |
|
|
|
<if test="orderGiveProportion != null">#{orderGiveProportion},</if> |
|
|
|
<if test="orderGivePrice != null">#{orderGivePrice},</if> |
|
|
|
<if test="isDate != null">#{isDate},</if> |
|
|
|
<if test="isAddress != null">#{isAddress},</if> |
|
|
|
<if test="isPet != null">#{isPet},</if> |
|
|
|
</trim> |
|
|
|
|
|
|
|
</insert> |
|
|
|
|
|
|
|
<update id="updateAppletOrderItem" parameterType="AppletOrderItem"> |
|
|
@ -152,12 +184,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="reason != null">reason = #{reason},</if> |
|
|
|
<if test="userId != null">user_id = #{userId},</if> |
|
|
|
<if test="petId != null">pet_id = #{petId},</if> |
|
|
|
<if test="num != null">num = #{num},</if> |
|
|
|
<if test="userIdJson != null">user_id_json = #{userIdJson},</if> |
|
|
|
<if test="orderSn != null">order_sn = #{orderSn},</if> |
|
|
|
<if test="orderId != null">order_id = #{orderId},</if> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<if test="startTime != null">start_time = #{startTime},</if> |
|
|
|
<if test="name != null">name = #{name},</if> |
|
|
|
<if test="phone != null">phone = #{phone},</if> |
|
|
|
<if test="orderStatus != null">order_status = #{orderStatus},</if> |
|
|
|
<if test="orderGiveProportion != null">order_give_proportion = #{orderGiveProportion},</if> |
|
|
|
<if test="orderGivePrice != null">order_give_price = #{orderGivePrice},</if> |
|
|
|
<if test="isDate != null">is_date = #{isDate},</if> |
|
|
|
<if test="isAddress != null">is_address = #{isAddress},</if> |
|
|
|
<if test="isPet != null">is_pet = #{isPet},</if> |
|
|
|
</trim> |
|
|
|
where id = #{id} |
|
|
|
</update> |
|
|
|