Yansen 2 yıl önce
ebeveyn
işleme
31545316c0

+ 1
- 1
deploy/bootstrap Dosyayı Görüntüle

@@ -2,4 +2,4 @@
2 2
 #
3 3
 #
4 4
 
5
-java -jar ./avatar-0.0.1.jar
5
+java -jar ./avatar-0.0.2.jar

+ 1
- 1
deploy/s.yml Dosyayı Görüntüle

@@ -15,7 +15,7 @@ services:
15 15
         name: change-avatar-service
16 16
         description: '换头像'
17 17
         ossBucket: yz-serverless
18
-        ossKey: yunzhi/avatar-0.0.1.zip
18
+        ossKey: yunzhi/avatar-0.0.2.zip
19 19
         handler: 'com.njyunzhi.avatar.AvatarApplication::main'
20 20
         memorySize: 1024
21 21
         timeout: 30

+ 1
- 1
pom.xml Dosyayı Görüntüle

@@ -10,7 +10,7 @@
10 10
 	</parent>
11 11
 	<groupId>com.njyunzhi</groupId>
12 12
 	<artifactId>avatar</artifactId>
13
-	<version>0.0.1-SNAPSHOT</version>
13
+	<version>0.0.2</version>
14 14
 	<name>avatar</name>
15 15
 	<description>Change avatar</description>
16 16
 	<properties>

+ 8
- 3
src/main/java/com/njyunzhi/avatar/person/service/impl/StRankServiceImpl.java Dosyayı Görüntüle

@@ -57,10 +57,15 @@ public class StRankServiceImpl extends BaseServiceImpl<StRankMapper, StRank> imp
57 57
         // 先将当前人员的 +1
58 58
         baseMapper.increment("person", personId.toString());
59 59
 
60
-        // 递归更新
61 60
         TaPerson taPerson = taPersonMapper.selectById(personId);
62
-        if (null != taPerson && null != taPerson.getRecommender()) {
63
-            updateByPerson(taPerson.getRecommender());
61
+        if (null != taPerson && !StringUtils.isEmpty(taPerson.getAreaCode())) {
62
+            baseMapper.increment("area", taPerson.getAreaCode());
63
+        }
64
+
65
+        // 递归更新
66
+        TaPerson recommender = taPersonMapper.selectById(personId);
67
+        if (null != recommender && null != recommender.getRecommender()) {
68
+            updateByPerson(recommender.getRecommender());
64 69
         }
65 70
     }
66 71