From fa5dd2c847c39a52ea89b07bbb28bd5a9f75c220 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Fri, 16 Jul 2021 14:56:46 +0800
Subject: [PATCH] 202107016

---
 gc-user/src/main/resources/mapper/user/AccountMapper.xml |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/gc-user/src/main/resources/mapper/user/AccountMapper.xml b/gc-user/src/main/resources/mapper/user/AccountMapper.xml
index 1621a96..ef1568b 100644
--- a/gc-user/src/main/resources/mapper/user/AccountMapper.xml
+++ b/gc-user/src/main/resources/mapper/user/AccountMapper.xml
@@ -305,11 +305,12 @@
 
     <select id="selectOrderByHeadUserId" resultType="java.lang.String">
         SELECT
-            IFNULL(SUM(weight),0) as kg
+            IFNULL(SUM(a.weight),0) as kg
         FROM
-            xzx_jhy_order_items
+            xzx_jhy_order_items a
+                 left join xzx_sys_environmental_info b on a.item_type = b.id
         WHERE
-                order_id in (
+            b.item_unit = 'kg' and a.order_id in (
                 SELECT
                     id
                 FROM

--
Gitblit v1.9.1