Browse Source

首页接口

魏超 5 years ago
parent
commit
e053555cdc

+ 1
- 1
src/main/java/com/huiju/estateagents/controller/ExtendContentController.java View File

109
             queryWrapper.ne("status",9);
109
             queryWrapper.ne("status",9);
110
             queryWrapper.eq(status != null, "status", status);
110
             queryWrapper.eq(status != null, "status", status);
111
             queryWrapper.eq( "org_id", getOrgId(request));
111
             queryWrapper.eq( "org_id", getOrgId(request));
112
-            queryWrapper.and(taPersonBuildingList.size() > 0, wapper -> wapper.in("building_id",taPersonBuildingList.stream().map(TaPersonBuilding::getBuildingId).collect(Collectors.toList())).or().isNull("building_id"));
112
+//            queryWrapper.and(taPersonBuildingList.size() > 0, wapper -> wapper.in("building_id",taPersonBuildingList.stream().map(TaPersonBuilding::getBuildingId).collect(Collectors.toList())).or().isNull("building_id"));
113
             queryWrapper.orderByDesc("create_date");
113
             queryWrapper.orderByDesc("create_date");
114
             IPage<ExtendContent> result = iExtendContentService.page(pg, queryWrapper);
114
             IPage<ExtendContent> result = iExtendContentService.page(pg, queryWrapper);
115
 
115
 

+ 1
- 1
src/main/java/com/huiju/estateagents/entity/HelpActivity.java View File

161
      * type(1助力,2拼团)
161
      * type(1助力,2拼团)
162
      */
162
      */
163
     @TableField(exist = false)
163
     @TableField(exist = false)
164
-    private Integer type;
164
+    private String type;
165
 }
165
 }

+ 24
- 0
src/main/java/com/huiju/estateagents/entity/TaPersonVisitRecord.java View File

130
     @TableField(exist = false)
130
     @TableField(exist = false)
131
     private String activityName;
131
     private String activityName;
132
 
132
 
133
+    /**
134
+     * 资讯名称
135
+     */
136
+    @TableField(exist = false)
137
+    private String newsName;
138
+
139
+    /**
140
+     * 助力名称
141
+     */
142
+    @TableField(exist = false)
143
+    private String helpActivityName;
144
+
145
+    /**
146
+     * 拼团名称
147
+     */
148
+    @TableField(exist = false)
149
+    private String groupActivityName;
150
+
151
+    /**
152
+     * H5名称
153
+     */
154
+    @TableField(exist = false)
155
+    private String drainageName;
156
+
133
     /**
157
     /**
134
      * 分享者名称
158
      * 分享者名称
135
      */
159
      */

+ 33
- 2
src/main/resources/mapper/HelpActivityMapper.xml View File

68
 				a.help_activity_id as activityId,
68
 				a.help_activity_id as activityId,
69
 				a.img as img,
69
 				a.img as img,
70
                 a.banner_list_img as bannerListImg,
70
                 a.banner_list_img as bannerListImg,
71
-				1 AS type
71
+                a.title as title,
72
+                a.end_date as endDate,
73
+                a.`status` as status,
74
+				"help" AS type
72
 			FROM
75
 			FROM
73
 				ta_help_activity a
76
 				ta_help_activity a
74
 				WHERE
77
 				WHERE
90
 					s.group_activity_id as activityId,
93
 					s.group_activity_id as activityId,
91
 					s.main_img as img,
94
 					s.main_img as img,
92
                     s.banner_list_img as bannerListImg,
95
                     s.banner_list_img as bannerListImg,
93
-					2 AS type
96
+                    s.activity_name as title,
97
+                    s.end_time as endDate,
98
+                    s.status as status,
99
+					"group" AS type
94
 				FROM
100
 				FROM
95
 					ta_share_activity s
101
 					ta_share_activity s
96
 					WHERE
102
 					WHERE
105
                     and s.building_id = #{buildingId}
111
                     and s.building_id = #{buildingId}
106
                 </if>
112
                 </if>
107
 			)
113
 			)
114
+		UNION ALL
115
+		    (
116
+                SELECT
117
+                t.city_id as cityId,
118
+                t.dynamic_id as activityId,
119
+                t.img_url as img,
120
+                t.banner_list_img as bannerListImg,
121
+                t.title as title,
122
+                t.end_date as endDate,
123
+                t.status as status,
124
+                "activity" AS type
125
+                FROM
126
+                ta_building_dynamic t
127
+                WHERE
128
+                t.org_id =#{orgId} and t.`status` = 1
129
+                <if test="buildingId  == null or  buildingId =='' ">
130
+                    and  t.home = 1
131
+                </if>
132
+                <if test="cityID != null and cityID != ''">
133
+                    and  t.city_id = #{cityID}
134
+                </if>
135
+                <if test="buildingId != null and buildingId != ''">
136
+                    and t.building_id = #{buildingId}
137
+                </if>
138
+            )
108
     </select>
139
     </select>
109
 
140
 
110
     <select id="helpActivityListEffectivePage" resultType="com.huiju.estateagents.entity.HelpActivity">
141
     <select id="helpActivityListEffectivePage" resultType="com.huiju.estateagents.entity.HelpActivity">

+ 11
- 2
src/main/resources/mapper/TaPersonVisitRecordMapper.xml View File

125
         select * from (
125
         select * from (
126
             select
126
             select
127
             <include refid="columnSql"></include>,
127
             <include refid="columnSql"></include>,
128
-            b.name as activityName,
128
+            b.name as drainageName,
129
+            d.building_name as buildingName,
130
+            tn.news_name as newsName,
131
+            tha.title as helpActivityName,
132
+            tsa.activity_name as groupActivityName,
133
+            tbd.title as activityName,
129
             b.drainage_id
134
             b.drainage_id
130
             from ta_person_visit_record t
135
             from ta_person_visit_record t
131
             left join ta_drainage b on t.target_id = b.drainage_id
136
             left join ta_drainage b on t.target_id = b.drainage_id
132
-            left join ta_person c on t.share_person_id = c.person_id
133
             left join ta_building d on t.target_id = d.building_id
137
             left join ta_building d on t.target_id = d.building_id
138
+            left join ta_news tn on t.target_id = tn.news_id
139
+            left join ta_help_activity tha on t.target_id = tha.help_activity_id
140
+            left join ta_share_activity tsa on t.target_id = tsa.group_activity_id
141
+            left join ta_building_dynamic tbd on t.target_id = tbd.dynamic_id
142
+            left join ta_person c on t.share_person_id = c.person_id
134
             where
143
             where
135
             t.share_person_id is not null
144
             t.share_person_id is not null
136
             <if test="orgId != null and orgId != ''">
145
             <if test="orgId != null and orgId != ''">