From f2525f8eeb42f7876fa1900b808234d345fb06c7 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Thu, 15 Jul 2021 17:16:13 +0800
Subject: [PATCH] fix

---
 gc-user/src/main/resources/mapper/user/UserHeadRelateMapper.xml     |    1 +
 gc-order/src/main/java/com/xzx/gc/order/service/DistribService.java |    2 +-
 gc-user/src/main/resources/mapper/user/UserHeadDetailsMapper.xml    |    1 +
 3 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/gc-order/src/main/java/com/xzx/gc/order/service/DistribService.java b/gc-order/src/main/java/com/xzx/gc/order/service/DistribService.java
index de2cad0..8dc3aca 100644
--- a/gc-order/src/main/java/com/xzx/gc/order/service/DistribService.java
+++ b/gc-order/src/main/java/com/xzx/gc/order/service/DistribService.java
@@ -122,7 +122,7 @@
         userHeadDetailsMapper.insert(userHeadDetails);
 
         userHeadRelate.setAmount(userHeadRelate.getAmount().add(totalReturnCoin));
-        userHeadRelate.setScore(userHeadDetails.getScore().add(totalReturnScore));
+        userHeadRelate.setScore(userHeadRelate.getScore().add(totalReturnScore));
         userHeadRelateMapper.updateByPrimaryKey(userHeadRelate);
 
         accountInfo.setAccountId(accountInfo.getAccountId());
diff --git a/gc-user/src/main/resources/mapper/user/UserHeadDetailsMapper.xml b/gc-user/src/main/resources/mapper/user/UserHeadDetailsMapper.xml
index 816e165..d6670c3 100644
--- a/gc-user/src/main/resources/mapper/user/UserHeadDetailsMapper.xml
+++ b/gc-user/src/main/resources/mapper/user/UserHeadDetailsMapper.xml
@@ -17,5 +17,6 @@
          inner join xzx_user_info d on b.user_id = d.user_id
         where head_user_id=#{userId}
         group by a.order_no, d.nick_name, a.score, a.amount, b.receiving_time
+        order by b.receiving_time desc
     </select>
 </mapper>
\ No newline at end of file
diff --git a/gc-user/src/main/resources/mapper/user/UserHeadRelateMapper.xml b/gc-user/src/main/resources/mapper/user/UserHeadRelateMapper.xml
index 8b05c8e..2ed7578 100644
--- a/gc-user/src/main/resources/mapper/user/UserHeadRelateMapper.xml
+++ b/gc-user/src/main/resources/mapper/user/UserHeadRelateMapper.xml
@@ -28,5 +28,6 @@
         from xzx_user_head_relate a
                  inner join xzx_user_info b on a.user_id=b.user_id
         where a.head_user_id=#{userId}
+        order by a.id desc
     </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1