提交 e9c2c47b authored 作者: 吴德鹏's avatar 吴德鹏

修改订单详情bug

上级 0026d770
......@@ -3,123 +3,122 @@
<mapper namespace="com.platform.dao.TbCfOrderListDao">
<resultMap type="com.platform.entity.TbCfOrderListEntity" id="tbCfOrderListMap">
<result property="orderId" column="order_id"/>
<result property="orderNo" column="order_no"/>
<result property="userName" column="user_name"/>
<result property="orderTime" column="order_time"/>
<result property="realityPay" column="reality_pay"/>
<result property="itemsPrice" column="items_price"/>
<result property="deliveryAddress" column="delivery_address"/>
<result property="deliveryName" column="delivery_name"/>
<result property="deliveryPhone" column="delivery_phone"/>
<result property="payWayCode" column="pay_way_code"/>
<result property="orderStatus" column="order_status"/>
<result property="payId" column="pay_id"/>
<result property="tax" column="tax"/>
<result property="fee" column="fee"/>
<result property="couponId" column="coupon_id"/>
<result property="couponTitle" column="coupon_title"/>
<result property="deliveryFlag" column="delivery_flag"/>
</resultMap>
<!--查询订单列表-->
<select id="queryOrderList" resultType="com.platform.entity.TbCfOrderListEntity">
select
o.order_id,
o.order_no,
o.user_name,
o.order_time,
o.reality_pay,
o.delivery_name,
o.delivery_phone,
o.delivery_address,
f.pay_way_code,
o.order_status,
o.pay_id,
o.tax,
o.fee,
c.coupon_id,
c.coupon_title,
o.delivery_flag
from tb_cf_order o
LEFT JOIN tb_cf_finance f on f.order_id=o.order_id
LEFT JOIN tb_cf_user_info u on u.user_id=o.user_id
LEFT JOIN tb_cf_coupon c on c.coupon_id=o.coupon_id
WHERE 1=1 and o.enable_flag=1
<if test="name != null and name.trim() != ''">
AND o.order_no LIKE concat('%',#{name},'%')
</if>
<if test="userName != null and userName.trim() != ''">
AND o.user_name LIKE concat('%',#{userName},'%')
</if>
<if test="orderStatus != null and orderStatus.trim() != ''">
AND o.order_status LIKE concat('%',#{orderStatus},'%')
</if>
<if test="start != null and start.trim() != '' ">
AND o.order_time <![CDATA[>=]]> CONCAT('', #{start},' 00:00:00')
</if>
<if test="end != null and end.trim() != '' ">
AND o.order_time <![CDATA[<=]]> CONCAT('', #{end},' 23:59:59')
</if>
<if test="payWayCode != null and payWayCode.trim() != ''">
AND f.pay_way_code =#{payWayCode}
</if>
<if test="deliveryFlag != null and deliveryFlag.trim() != ''">
AND o.delivery_flag =#{deliveryFlag}
</if>
<if test="payStatus != null and payStatus.trim() != ''">
AND o.pay_status =#{payStatus}
</if>
<choose>
<when test="sidx != null and sidx.trim() != ''">
order by ${sidx} ${order}
</when>
<otherwise>
order by order_id desc
</otherwise>
</choose>
<if test="offset != null and limit != null">
limit #{offset}, #{limit}
</if>
</select>
<!--查询总记录数-->
<select id="queryTotal" resultType="int">
select count(*)
from tb_cf_order o
LEFT JOIN tb_cf_finance f on f.order_id=o.order_id
LEFT JOIN tb_cf_user_info u on u.user_id=o.user_id
LEFT JOIN tb_cf_coupon c on c.coupon_id=o.coupon_id
WHERE 1=1 and o.enable_flag=1
<if test="name != null and name.trim() != ''">
AND o.order_no LIKE concat('%',#{name},'%')
</if>
<if test="userName != null and userName.trim() != ''">
AND o.user_name LIKE concat('%',#{userName},'%')
</if>
<if test="orderStatus != null and orderStatus.trim() != ''">
AND o.order_status LIKE concat('%',#{orderStatus},'%')
</if>
<if test="start != null and start.trim() != '' ">
AND o.order_time <![CDATA[>=]]> CONCAT('', #{start},' 00:00:00')
</if>
<if test="end != null and end.trim() != '' ">
AND o.order_time <![CDATA[<=]]> CONCAT('', #{end},' 23:59:59')
</if>
<if test="payWayCode != null and payWayCode.trim() != ''">
AND f.pay_way_code =#{payWayCode}
</if>
<if test="deliveryFlag != null and deliveryFlag.trim() != ''">
AND o.delivery_flag =#{deliveryFlag}
</if>
<resultMap type="com.platform.entity.TbCfOrderListEntity" id="tbCfOrderListMap">
<result property="orderId" column="order_id"/>
<result property="orderNo" column="order_no"/>
<result property="userName" column="user_name"/>
<result property="orderTime" column="order_time"/>
<result property="realityPay" column="reality_pay"/>
<result property="itemsPrice" column="items_price"/>
<result property="deliveryAddress" column="delivery_address"/>
<result property="deliveryName" column="delivery_name"/>
<result property="deliveryPhone" column="delivery_phone"/>
<result property="payWayCode" column="pay_way_code"/>
<result property="orderStatus" column="order_status"/>
<result property="payId" column="pay_id"/>
<result property="tax" column="tax"/>
<result property="fee" column="fee"/>
<result property="couponId" column="coupon_id"/>
<result property="couponTitle" column="coupon_title"/>
<result property="deliveryFlag" column="delivery_flag"/>
</resultMap>
<!--查询订单列表-->
<select id="queryOrderList" resultType="com.platform.entity.TbCfOrderListEntity">
select
o.order_id,
o.order_no,
o.user_name,
o.order_time,
o.reality_pay,
o.delivery_name,
o.delivery_phone,
o.delivery_address,
f.pay_way_code,
o.order_status,
o.pay_id,
o.tax,
o.fee,
c.coupon_id,
c.coupon_title,
o.delivery_flag
from tb_cf_order o
LEFT JOIN tb_cf_finance f on f.order_id=o.order_id
LEFT JOIN tb_cf_user_info u on u.user_id=o.user_id
LEFT JOIN tb_cf_coupon c on c.coupon_id=o.coupon_id
WHERE 1=1 and o.enable_flag=1
<if test="name != null and name.trim() != ''">
AND o.order_no LIKE concat('%',#{name},'%')
</if>
<if test="userName != null and userName.trim() != ''">
AND o.user_name LIKE concat('%',#{userName},'%')
</if>
<if test="orderStatus != null and orderStatus.trim() != ''">
AND o.order_status LIKE concat('%',#{orderStatus},'%')
</if>
<if test="start != null and start.trim() != '' ">
AND o.order_time <![CDATA[>=]]> CONCAT('', #{start},' 00:00:00')
</if>
<if test="end != null and end.trim() != '' ">
AND o.order_time <![CDATA[<=]]> CONCAT('', #{end},' 23:59:59')
</if>
<if test="payWayCode != null and payWayCode.trim() != ''">
AND f.pay_way_code =#{payWayCode}
</if>
<if test="deliveryFlag != null and deliveryFlag.trim() != ''">
AND o.delivery_flag =#{deliveryFlag}
</if>
<if test="payStatus != null and payStatus.trim() != ''">
AND o.pay_status =#{payStatus}
</if>
</select>
<choose>
<when test="sidx != null and sidx.trim() != ''">
order by ${sidx} ${order}
</when>
<otherwise>
order by order_id desc
</otherwise>
</choose>
<if test="offset != null and limit != null">
limit #{offset}, #{limit}
</if>
</select>
<!--查询代购订单列表-->
<select id="queryOrderDeliveryList" resultType="com.platform.vo.DeliveryOrderVo">
<!--查询总记录数-->
<select id="queryTotal" resultType="int">
select count(*)
from tb_cf_order o
LEFT JOIN tb_cf_finance f on f.order_id=o.order_id
LEFT JOIN tb_cf_user_info u on u.user_id=o.user_id
LEFT JOIN tb_cf_coupon c on c.coupon_id=o.coupon_id
WHERE 1=1 and o.enable_flag=1
<if test="name != null and name.trim() != ''">
AND o.order_no LIKE concat('%',#{name},'%')
</if>
<if test="userName != null and userName.trim() != ''">
AND o.user_name LIKE concat('%',#{userName},'%')
</if>
<if test="orderStatus != null and orderStatus.trim() != ''">
AND o.order_status LIKE concat('%',#{orderStatus},'%')
</if>
<if test="start != null and start.trim() != '' ">
AND o.order_time <![CDATA[>=]]> CONCAT('', #{start},' 00:00:00')
</if>
<if test="end != null and end.trim() != '' ">
AND o.order_time <![CDATA[<=]]> CONCAT('', #{end},' 23:59:59')
</if>
<if test="payWayCode != null and payWayCode.trim() != ''">
AND f.pay_way_code =#{payWayCode}
</if>
<if test="deliveryFlag != null and deliveryFlag.trim() != ''">
AND o.delivery_flag =#{deliveryFlag}
</if>
<if test="payStatus != null and payStatus.trim() != ''">
AND o.pay_status =#{payStatus}
</if>
</select>
<!--查询代购订单列表-->
<select id="queryOrderDeliveryList" resultType="com.platform.vo.DeliveryOrderVo">
select
r.order_item_id ordersId,
o.order_id,
......@@ -128,7 +127,7 @@
i.item_img,
i.item_title,
r.item_num,
i.item_price,
g.discount_price itemPrice,
i.item_sku,
i.source_item_id,
r.delivery_flag,
......@@ -139,12 +138,13 @@
from tb_cf_item_order_r r
LEFT JOIN tb_cf_order o on o.order_id=r.order_id
LEFT JOIN tb_cf_item_detail i on i.item_id = r.item_id
LEFT JOIN tb_cf_station_item g on i.goods_id=g.item_id
LEFT JOIN tb_cf_platform_order p on p.relative_id =r.order_item_id
LEFT JOIN tb_cf_coupon c on c.coupon_id =o.coupon_id
where r.order_id=#{orderId}
</select>
<!--查询代购订单列表总记录数-->
<select id="queryOrderDeliveryTotal" resultType="int">
<!--查询代购订单列表总记录数-->
<select id="queryOrderDeliveryTotal" resultType="int">
select count( *)
from tb_cf_item_order_r r
LEFT JOIN tb_cf_order o on o.order_id=r.order_id
......@@ -154,8 +154,8 @@
where r.order_id=#{orderId}
</select>
<!--订单详情页数据 -->
<select id="queryorderBasic" resultType="com.platform.vo.OrderBasicVo">
<!--订单详情页数据 -->
<select id="queryorderBasic" resultType="com.platform.vo.OrderBasicVo">
select
o.items_price ,
o.order_id,
......@@ -184,8 +184,8 @@
</select>
<!--查询总记录数-->
<select id="queryOrderTotal" resultType="int">
<!--查询总记录数-->
<select id="queryOrderTotal" resultType="int">
select count( distinct i.order_id)
from tb_cf_order o
INNER JOIN tb_cf_item_order_r i on o.order_id=i.order_id
......@@ -193,7 +193,7 @@
INNER JOIN tb_cf_user_info u on u.user_id=o.user_id
WHERE 1=1 and i.enable_flag=1 and f.pay_way_code!='null'
</select>
<select id="totalPay">
<select id="totalPay">
select sum(o.reality_pay)
from tb_cf_order o
left join tb_cf_item_order_r i on o.order_id=i.order_id
......@@ -204,11 +204,11 @@
WHERE 1=1 and f.pay_way_code!='null'
</select>
<update id="closeOrder">
<update id="closeOrder">
update tb_cf_order set order_status=60 where order_id=#{orderId}
</update>
<select id="getMemoOrder" resultType="com.platform.vo.OrderBasicVo">
<select id="getMemoOrder" resultType="com.platform.vo.OrderBasicVo">
select
order_id,
remark_info,
......@@ -216,14 +216,14 @@
from tb_cf_order where order_id=#{orderId}
</select>
<update id="saveOrUpdatemMemoOrder" parameterType="com.platform.vo.OrderBasicVo">
update
tb_cf_order
<set>
<if test="orderId != null">order_id = #{orderId}, </if>
<if test="remarkInfo != null">remark_info= #{remarkInfo}, </if>
<if test="updateTime != null">update_time = #{updateTime}, </if>
</set>
where order_id=#{orderId}
</update>
<update id="saveOrUpdatemMemoOrder" parameterType="com.platform.vo.OrderBasicVo">
update
tb_cf_order
<set>
<if test="orderId != null">order_id = #{orderId},</if>
<if test="remarkInfo != null">remark_info= #{remarkInfo},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</set>
where order_id=#{orderId}
</update>
</mapper>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论