From ea5ec6cc6839485487e6eb8cb8e166eeec31db46 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Wed, 10 Nov 2021 16:01:29 +0800
Subject: [PATCH] fix

---
 gc-order/src/test/java/com/xzx/order/XcTest.java                    |   25 +++++++++++++++++++++++++
 gc-order/src/main/java/com/xzx/gc/order/service/DistribService.java |    4 ++--
 2 files changed, 27 insertions(+), 2 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 65b15db..4cca147 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
@@ -67,7 +67,7 @@
         }
 
         Integer count = userHeadDetailsMapper.selectDetailsCount(userId);
-//        UserInfo userInfo = userMapper.selectByPrimaryKey(userId);
+        UserInfo userInfo = userMapper.selectByPrimaryKey(userId);
         AccountInfo accountInfo = accountMapper.selectAccountInfoByUserId(userHeadRelate.getHeadUserId());
 
         if (AccountInfo.IS_PROHIBIT_Y.equals(accountInfo.getIsProhibit())) {
@@ -165,7 +165,7 @@
         sysMessage.setUserId(userHeadRelate.getHeadUserId());
         sysMessage.setMessageType("4");
         sysMessage.setMessageSubTypeName("返利消息");
-        sysMessage.setMessage("收到用户:" + accountInfo.getAccountName().replaceAll("(\\w{3})\\w*(\\w{4})", "$1****$2") + "的订单返利, 积分:" + totalReturnScore +", 环保币:" + totalReturnCoin);
+        sysMessage.setMessage("收到用户:" + userInfo.getMobilePhone().replaceAll("(\\w{3})\\w*(\\w{4})", "$1****$2") + "的订单返利, 积分:" + totalReturnScore +", 环保币:" + totalReturnCoin);
         sysMessage.setFlag("2");
         sysMessageMapper.insert(sysMessage);
     }
diff --git a/gc-order/src/test/java/com/xzx/order/XcTest.java b/gc-order/src/test/java/com/xzx/order/XcTest.java
new file mode 100644
index 0000000..debdea3
--- /dev/null
+++ b/gc-order/src/test/java/com/xzx/order/XcTest.java
@@ -0,0 +1,25 @@
+package com.xzx.order;
+
+import com.xzx.gc.GcOrderApplication;
+import com.xzx.gc.order.service.DistribService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = {GcOrderApplication.class})
+@ActiveProfiles(profiles = {"xc"})
+public class XcTest {
+
+
+    @Autowired
+    DistribService distribService;
+
+    @Test
+    public void distribTest() {
+        distribService.distribRecord(740L, "YH1402174298026016768");
+    }
+}

--
Gitblit v1.9.1