|
@@ -73,7 +73,7 @@
|
|
|
re.create_time,
|
|
|
re.appoint_time,
|
|
|
od.pay_amount,
|
|
|
- re.user_id
|
|
|
+ re.user_id,
|
|
|
re.status
|
|
|
FROM
|
|
|
reservation re
|
|
@@ -106,5 +106,55 @@
|
|
|
</select>
|
|
|
|
|
|
|
|
|
+ <select id="getUserReservationPaging" resultMap="USERRESULT_MAP">
|
|
|
+ SELECT
|
|
|
+ re.id,
|
|
|
+ od.id order_id,
|
|
|
+ re.create_time,
|
|
|
+ re.appoint_time,
|
|
|
+ od.pay_amount,
|
|
|
+ re.user_id,
|
|
|
+ re.status,
|
|
|
+ m.id merchantId
|
|
|
+ m.name ,
|
|
|
+ m.logo
|
|
|
+ FROM
|
|
|
+ reservation re
|
|
|
+ LEFT JOIN oms_order od ON re.order_id = od.id left join merchant m on re.merchant_id = m.id
|
|
|
+ WHERE re.user_id = #{userId}
|
|
|
+ <if test="param.merchantId != null">
|
|
|
+ and re.merchant_id = #{param.merchantId}
|
|
|
+ </if>
|
|
|
+ <if test="param.status != null">
|
|
|
+ and re.status = #{param.status}
|
|
|
+ </if>
|
|
|
+ <if test="param.date != null and param.date != ''">
|
|
|
+ and DATE_FORMAT(re.appoint_time, '%Y-%m-%d') = #{param.date}
|
|
|
+ </if>
|
|
|
+ order by re.appoint_time asc
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+ <resultMap id="USERRESULT_MAP" type="com.chelvc.cloud.vehicle.client.dto.UserReservationDTO">
|
|
|
+ <id column="id" property="id" jdbcType="BIGINT"/>
|
|
|
+ <result column="appoint_time" property="appointTime" jdbcType="TIMESTAMP"/>
|
|
|
+ <result column="status" property="status" jdbcType="VARCHAR"/>
|
|
|
+ <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="payAmount" column="pay_amount" />
|
|
|
+ <result column="order_id" property="orderId" jdbcType="BIGINT"/>
|
|
|
+ <result column="user_id" property="userId" jdbcType="BIGINT"/>
|
|
|
+ <result column="merchantId" property="merchantId" jdbcType="BIGINT"/>
|
|
|
+ <result column="name" property="merchantName" jdbcType="VARCHAR"/>
|
|
|
+ <result column="logo" property="logo" jdbcType="VARCHAR"/>
|
|
|
+ <association property="goodItem" javaType="com.chelvc.cloud.vehicle.client.dto.OrderItemDTO">
|
|
|
+ <result column="goods_id" property="goodsId" jdbcType="BIGINT"/>
|
|
|
+ <result column="goods_name" property="goodsName" jdbcType="VARCHAR"/>
|
|
|
+ <result column="goods_pic" property="goodsPic" jdbcType="VARCHAR"/>
|
|
|
+ <result column="goods_quantity" property="goodsQuantity" jdbcType="INTEGER"/>
|
|
|
+ <result column="goods_price" property="goodsPrice" jdbcType="DOUBLE"/>
|
|
|
+ </association>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+
|
|
|
|
|
|
</mapper>
|