From cddcf22a61489ee9c2dfee169d817ccd66f95430 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期五, 03 九月 2021 02:23:43 +0800
Subject: [PATCH] 优化代码
---
java110-db/src/main/resources/mapper/goods/StoreOrderCartServiceDaoImplMapper.xml | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/java110-db/src/main/resources/mapper/goods/StoreOrderCartServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/goods/StoreOrderCartServiceDaoImplMapper.xml
old mode 100644
new mode 100755
index 4f7ff79..06b0a06
--- a/java110-db/src/main/resources/mapper/goods/StoreOrderCartServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/goods/StoreOrderCartServiceDaoImplMapper.xml
@@ -20,8 +20,13 @@
select t.value_id,t.value_id valueId,t.product_id,t.product_id productId,t.order_id,t.order_id
orderId,t.cart_id,t.cart_id cartId,t.remark,t.status_cd,t.status_cd statusCd,t.store_id,t.store_id
storeId,t.cart_num,t.cart_num cartNum,t.price,t.pay_price,t.pay_price payPrice,t.person_id,t.person_id
- personId,t.state,t.freight_price,t.freight_price freightPrice
+ personId,t.state,t.freight_price,t.freight_price freightPrice,p.prod_name prodName,so.person_name personName,
+ td.name stateName,t.create_time createTime,psv.spec_id specId,so.total_price totalPrice
from store_order_cart t
+ left join store_order so on t.order_id = so.order_id
+ left join t_dict td on t.state = td.status_cd and td.table_name = 'store_order_cart' and td.table_columns = 'state'
+ left join product p on t.product_id = p.product_id and p.status_cd = '0' and p.store_id = t.store_id
+ left join product_spec_value psv on p.product_id = psv.product_id and psv.store_id = p.store_id and t.value_id = psv.value_id and psv.status_cd = '0'
where 1 =1
<if test="valueId !=null and valueId != ''">
and t.value_id= #{valueId}
@@ -73,18 +78,14 @@
<!-- 淇敼璁㈠崟璐墿杞︿俊鎭� add by wuxw 2018-07-03 -->
<update id="updateStoreOrderCartInfo" parameterType="Map">
update store_order_cart t set t.status_cd = #{statusCd}
- <if test="newBId != null and newBId != ''">
- ,t.b_id = #{newBId}
- </if>
+
<if test="valueId !=null and valueId != ''">
, t.value_id= #{valueId}
</if>
<if test="productId !=null and productId != ''">
, t.product_id= #{productId}
</if>
- <if test="orderId !=null and orderId != ''">
- , t.order_id= #{orderId}
- </if>
+
<if test="remark !=null and remark != ''">
, t.remark= #{remark}
</if>
@@ -113,6 +114,9 @@
<if test="cartId !=null and cartId != ''">
and t.cart_id= #{cartId}
</if>
+ <if test="orderId !=null and orderId != ''">
+ and t.order_id= #{orderId}
+ </if>
</update>
--
Gitblit v1.8.0