libo 4 anni fa
parent
commit
4d8bde69c4

+ 2 - 1
src/main/java/com/tdba/cxb/ares/api/repository/UserMapper.java

@@ -5,6 +5,7 @@ import com.tdba.cxb.ares.api.model.UserVo;
5 5
 import org.apache.ibatis.annotations.Mapper;
6 6
 import org.apache.ibatis.annotations.Param;
7 7
 
8
+import java.time.LocalDate;
8 9
 import java.time.LocalDateTime;
9 10
 import java.util.List;
10 11
 
@@ -26,7 +27,7 @@ public interface UserMapper {
26 27
     List<UserDto> selectByTimeRegion(@Param("beginTime")LocalDateTime beginTime,
27 28
                                      @Param("endTime")LocalDateTime endTime);
28 29
 
29
-    List<UserDto> selectDacang(@Param("beginTime")Long beginTime,
30
+    List<UserDto> selectDacang(@Param("beginTime") Long beginTime,
30 31
                                @Param("endTime")Long endTime);
31 32
 
32 33
     List<UserDto> selectMerchant(@Param("beginTime")LocalDateTime beginTime,

+ 4 - 0
src/main/resources/mapper/UserMapper.xml

@@ -28,6 +28,7 @@
28 28
              <![CDATA[ and da.ctime >= #{beginTime} ]]>
29 29
              <![CDATA[ and da.ctime <= #{endTime} ]]>
30 30
             and u.spread_uid > 0
31
+        group by u.spread_uid
31 32
     </select>
32 33
 
33 34
     <select id="selectMerchant" resultType="com.tdba.cxb.ares.api.model.UserDto">
@@ -44,6 +45,7 @@
44 45
             <![CDATA[ and da.create_time >= #{beginTime} ]]>
45 46
             <![CDATA[ and da.create_time <=#{endTime} ]]>
46 47
             and u.spread_uid > 0
48
+        group by u.spread_uid
47 49
     </select>
48 50
 
49 51
     <select id="selectChannel" resultType="com.tdba.cxb.ares.api.model.UserDto">
@@ -60,6 +62,7 @@
60 62
             <![CDATA[ and da.ctime >= #{beginTime} ]]>
61 63
             <![CDATA[ and da.ctime <= #{endTime} ]]>
62 64
             and u.spread_uid > 0
65
+        group by u.spread_uid
63 66
     </select>
64 67
 
65 68
     <select id="selectAgent" resultType="com.tdba.cxb.ares.api.model.UserDto">
@@ -76,6 +79,7 @@
76 79
             <![CDATA[ and da.add_time >= #{beginTime} ]]>
77 80
             <![CDATA[ and da.add_time <= #{endTime} ]]>
78 81
             and u.spread_uid > 0
82
+        group by u.spread_uid
79 83
     </select>
80 84
 
81 85
     <select id="selectByAccount" resultType="com.tdba.cxb.ares.api.model.UserVo">