libo пре 4 година
родитељ
комит
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
 import org.apache.ibatis.annotations.Mapper;
5
 import org.apache.ibatis.annotations.Mapper;
6
 import org.apache.ibatis.annotations.Param;
6
 import org.apache.ibatis.annotations.Param;
7
 
7
 
8
+import java.time.LocalDate;
8
 import java.time.LocalDateTime;
9
 import java.time.LocalDateTime;
9
 import java.util.List;
10
 import java.util.List;
10
 
11
 
@@ -26,7 +27,7 @@ public interface UserMapper {
26
     List<UserDto> selectByTimeRegion(@Param("beginTime")LocalDateTime beginTime,
27
     List<UserDto> selectByTimeRegion(@Param("beginTime")LocalDateTime beginTime,
27
                                      @Param("endTime")LocalDateTime endTime);
28
                                      @Param("endTime")LocalDateTime endTime);
28
 
29
 
29
-    List<UserDto> selectDacang(@Param("beginTime")Long beginTime,
30
+    List<UserDto> selectDacang(@Param("beginTime") Long beginTime,
30
                                @Param("endTime")Long endTime);
31
                                @Param("endTime")Long endTime);
31
 
32
 
32
     List<UserDto> selectMerchant(@Param("beginTime")LocalDateTime beginTime,
33
     List<UserDto> selectMerchant(@Param("beginTime")LocalDateTime beginTime,

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

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