魏超 5 gadus atpakaļ
vecāks
revīzija
8d7f20a65f

+ 2
- 3
src/main/java/com/huiju/estateagents/service/impl/ExtendContentServiceImpl.java Parādīt failu

@@ -187,12 +187,11 @@ public class ExtendContentServiceImpl extends ServiceImpl<ExtendContentMapper, E
187 187
             taExtendContentQueryWrapper.eq("org_id", orgId);
188 188
             taExtendContentQueryWrapper.eq("status", 1);
189 189
             taExtendContentQueryWrapper.eq("show_type", extendContent.getShowType());
190
+            taExtendContentQueryWrapper.eq("show_position", extendContent.getShowPosition());
190 191
             if (null != extendContent.getContentId()){
191 192
                 taExtendContentQueryWrapper.ne("content_id", extendContent.getContentId());
192 193
             }
193
-            if (CommConstant.BANNER_BUILDING.equals(extendContent.getShowPosition())){
194
-                taExtendContentQueryWrapper.eq("building_id", extendContent.getBuildingId());
195
-            }
194
+            taExtendContentQueryWrapper.eq("building_id", extendContent.getBuildingId());
196 195
             List<ExtendContent> extContentInfo = extendContentMapper.selectList(taExtendContentQueryWrapper);
197 196
             if (!Collections.isEmpty(extContentInfo)){
198 197
                 return false;

+ 3
- 4
src/main/resources/mapper/statistic/TsPersonFromStatisticMapper.xml Parādīt failu

@@ -50,8 +50,7 @@
50 50
         select ifnull(tp.from_num, 0) as from_num , ifnull(tp.registered_num, 0) AS registered_num , ifnull(tp.create_time, date.date) AS create_time, ifnull(tp.scene_type, 'other') as scene_type from (
51 51
 
52 52
         SELECT
53
-        DATE_FORMAT(
54
-        DATE_ADD( STR_TO_DATE(#{startDate}, '%Y-%m-%d' ), INTERVAL rownum DAY ), '%Y-%m-%d' ) AS date
53
+        DATE_FORMAT( DATE_SUB( now( ), INTERVAL rownum DAY ), '%Y-%m-%d' ) AS date
55 54
         FROM sequence
56 55
         WHERE rownum &lt; DATEDIFF(STR_TO_DATE( #{endDate}, '%Y-%m-%d' ), STR_TO_DATE( #{startDate}, '%Y-%m-%d' )) ) as date
57 56
 
@@ -73,8 +72,7 @@
73 72
         select ifnull(tp.from_num, 0) as from_num , ifnull(tp.registered_num, 0) AS registered_num , ifnull(tp.create_time, date.date) AS create_time, ifnull(tp.scene_type, 'other') as scene_type from (
74 73
 
75 74
         SELECT
76
-        DATE_FORMAT(
77
-        DATE_ADD( STR_TO_DATE(#{startDate}, '%Y-%m-%d' ), INTERVAL rownum DAY ), '%Y-%m-%d' ) AS date
75
+        DATE_FORMAT( DATE_SUB( now( ), INTERVAL rownum DAY ), '%Y-%m-%d' ) AS date
78 76
         FROM sequence
79 77
         WHERE rownum &lt; DATEDIFF(STR_TO_DATE( #{endDate}, '%Y-%m-%d' ), STR_TO_DATE( #{startDate}, '%Y-%m-%d' )) ) as date
80 78
 
@@ -99,5 +97,6 @@
99 97
         DATE_FORMAT( tp.create_date, '%Y-%m-%d' )
100 98
         ORDER BY tp.create_date
101 99
         ) as tp on date.date = tp.create_time
100
+        order by date.date
102 101
     </select>
103 102
 </mapper>

+ 1
- 1
src/main/resources/mapper/statistic/TsUserBehaviorStatisticMapper.xml Parādīt failu

@@ -62,7 +62,7 @@
62 62
             td_biz_event_type b
63 63
             <trim prefix="where">
64 64
                 <if test="startDate != null or endDate != null">
65
-                    a.rownum <![CDATA[ <= ]]> datediff(#{endDate}, #{startDate})
65
+                    a.rownum <![CDATA[ < ]]> datediff(#{endDate}, #{startDate})
66 66
                 </if>
67 67
             </trim>
68 68
         ) AS temp_date