libo 4 年 前
コミット
faf1d4b991

+ 2 - 2
src/main/java/com/tdba/cxb/ares/api/service/UserService.java

@@ -93,7 +93,7 @@ public class UserService {
93
                     //推荐人
93
                     //推荐人
94
                     resultList.add(UserCount.UserCountBuilder.anUserCount()
94
                     resultList.add(UserCount.UserCountBuilder.anUserCount()
95
                             .withCreate_time(currentTime)
95
                             .withCreate_time(currentTime)
96
-                            .withNum(num)
96
+                            .withNum(num + 1)
97
                             .withUser_type(UserTypeEnum.NORMAL.ordinal())
97
                             .withUser_type(UserTypeEnum.NORMAL.ordinal())
98
                             .withUid(row.getSpread_uid())
98
                             .withUid(row.getSpread_uid())
99
                             .withDate(localDate)
99
                             .withDate(localDate)
@@ -105,7 +105,7 @@ public class UserService {
105
                     if((0 < num) && (innerRow.getDate().isBefore(localDate))) {
105
                     if((0 < num) && (innerRow.getDate().isBefore(localDate))) {
106
                         resultList.add(UserCount.UserCountBuilder.anUserCount()
106
                         resultList.add(UserCount.UserCountBuilder.anUserCount()
107
                                 .withCreate_time(currentTime)
107
                                 .withCreate_time(currentTime)
108
-                                .withNum(num)
108
+                                .withNum(num + 1)
109
                                 .withUser_type(UserTypeEnum.NORMAL.ordinal())
109
                                 .withUser_type(UserTypeEnum.NORMAL.ordinal())
110
                                 .withUid(innerRow.getPid())
110
                                 .withUid(innerRow.getPid())
111
                                 .withDate(localDate)
111
                                 .withDate(localDate)

+ 15 - 16
src/main/resources/mapper/UserBindMapper.xml

@@ -8,13 +8,13 @@
8
             <if test="null != uid">
8
             <if test="null != uid">
9
                 uid,
9
                 uid,
10
             </if>
10
             </if>
11
-            <if test="null != createTime">
11
+            <if test="null != create_time">
12
                 create_time,
12
                 create_time,
13
             </if>
13
             </if>
14
-            <if test="null != delFlag">
14
+            <if test="null != del_flag">
15
                 del_flag,
15
                 del_flag,
16
             </if>
16
             </if>
17
-            <if test="null != bindUid">
17
+            <if test="null != bind_uid">
18
                 bind_uid,
18
                 bind_uid,
19
             </if>
19
             </if>
20
             <if test="null != type">
20
             <if test="null != type">
@@ -26,14 +26,14 @@
26
             <if test="null != uid">
26
             <if test="null != uid">
27
                 #{ uid },
27
                 #{ uid },
28
             </if>
28
             </if>
29
-            <if test="null != createTime">
30
-                #{ createTime },
29
+            <if test="null != create_time">
30
+                #{create_time},
31
             </if>
31
             </if>
32
-            <if test="null != delFlag">
33
-                #{ delFlag },
32
+            <if test="null != del_flag">
33
+                #{del_flag},
34
             </if>
34
             </if>
35
-            <if test="null != bindUid">
36
-                #{ bindUid },
35
+            <if test="null != bind_uid">
36
+                #{bind_uid},
37
             </if>
37
             </if>
38
             <if test="null != type">
38
             <if test="null != type">
39
                 #{ type },
39
                 #{ type },
@@ -47,14 +47,14 @@
47
             <if test="null != uid">
47
             <if test="null != uid">
48
                 uid = #{ uid },
48
                 uid = #{ uid },
49
             </if>
49
             </if>
50
-            <if test="null != createTime">
51
-                create_time = #{ createTime },
50
+            <if test="null != create_time">
51
+                create_time = #{create_time},
52
             </if>
52
             </if>
53
-            <if test="null != delFlag">
54
-                del_flag = #{ delFlag },
53
+            <if test="null != del_flag">
54
+                del_flag = #{del_flag},
55
             </if>
55
             </if>
56
-            <if test="null != bindUid">
57
-                bind_uid = #{ bindUid },
56
+            <if test="null != bind_uid">
57
+                bind_uid = #{bind_uid},
58
             </if>
58
             </if>
59
             <if test="null != type">
59
             <if test="null != type">
60
                 type = #{ type },
60
                 type = #{ type },
@@ -70,5 +70,4 @@
70
     <select id="selectUid" resultType="java.lang.Integer">
70
     <select id="selectUid" resultType="java.lang.Integer">
71
         select uid from user_bind where del_flag = 0 and type = 0 and bind_uid = #{bindUid}
71
         select uid from user_bind where del_flag = 0 and type = 0 and bind_uid = #{bindUid}
72
     </select>
72
     </select>
73
-
74
 </mapper>
73
 </mapper>

+ 3 - 1
src/main/resources/mapper/UserRelateMapper.xml

@@ -135,7 +135,9 @@
135
             del_flag = 0
135
             del_flag = 0
136
           and uid = #{uid}
136
           and uid = #{uid}
137
           and pid in
137
           and pid in
138
-        <foreach collection="pidList" item="item" open="(" separator="," close=")"></foreach>
138
+        <foreach collection="pidList" item="item" open="(" separator="," close=")">
139
+            #{item}
140
+        </foreach>
139
     </select>
141
     </select>
140
 
142
 
141
     <select id="selectByPid" resultType="com.tdba.cxb.ares.api.model.DetailListResp">
143
     <select id="selectByPid" resultType="com.tdba.cxb.ares.api.model.DetailListResp">