魏熙美 il y a 5 ans
Parent
révision
e1f124c6c6

+ 11
- 8
src/main/java/com/huiju/estateagents/controller/TaGoodsController.java Voir le fichier

@@ -20,13 +20,7 @@ import io.swagger.annotations.ApiOperation;
20 20
 import org.slf4j.Logger;
21 21
 import org.slf4j.LoggerFactory;
22 22
 import org.springframework.beans.factory.annotation.Autowired;
23
-import org.springframework.web.bind.annotation.PathVariable;
24
-import org.springframework.web.bind.annotation.RequestBody;
25
-import org.springframework.web.bind.annotation.RequestMapping;
26
-import org.springframework.web.bind.annotation.RequestMethod;
27
-import org.springframework.web.bind.annotation.RequestParam;
28
-import org.springframework.web.bind.annotation.ResponseBody;
29
-import org.springframework.web.bind.annotation.RestController;
23
+import org.springframework.web.bind.annotation.*;
30 24
 
31 25
 import javax.servlet.http.HttpServletRequest;
32 26
 import java.lang.invoke.ConstantCallSite;
@@ -239,7 +233,16 @@ public class TaGoodsController extends BaseController {
239 233
         }
240 234
         return responseBean;
241 235
     }
242
-    
236
+
237
+
238
+    @ApiOperation(value = "微信 查询有商品的项目", notes = "微信 查询有商品的项目")
239
+    @GetMapping(value = "/wx/goodsToBuilding")
240
+    public ResponseBean wxGoodsToBuilding(HttpServletRequest request) {
241
+        ResponseBean responseBean = new ResponseBean();
242
+
243
+        return responseBean;
244
+    }
245
+
243 246
     /**
244 247
      * 分页查询列表
245 248
      * @param pageNum

+ 3
- 0
src/main/java/com/huiju/estateagents/entity/HelpActivity.java Voir le fichier

@@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
8 8
 import com.baomidou.mybatisplus.annotation.TableId;
9 9
 import java.time.LocalDateTime;
10 10
 import java.io.Serializable;
11
+import java.util.List;
12
+
11 13
 import lombok.Data;
12 14
 import lombok.EqualsAndHashCode;
13 15
 import lombok.experimental.Accessors;
@@ -131,4 +133,5 @@ public class HelpActivity implements Serializable {
131 133
      */
132 134
     @TableField(exist = false)
133 135
     private Integer successNum;
136
+
134 137
 }

+ 12
- 0
src/main/java/com/huiju/estateagents/entity/TaBuilding.java Voir le fichier

@@ -237,4 +237,16 @@ public class TaBuilding implements Serializable {
237 237
 
238 238
     @TableField(exist = false)
239 239
     private List<TaShareContent> shareContents;
240
+
241
+    /**
242
+     * 助力活动
243
+     */
244
+    @TableField(exist = false)
245
+    private List<HelpActivity> helpActivityList;
246
+
247
+    /**
248
+     * 拼团活动
249
+     */
250
+    @TableField(exist = false)
251
+    private List<TaShareActivity> shareActivityList;
240 252
 }

+ 13
- 0
src/main/java/com/huiju/estateagents/service/impl/TaBuildingServiceImpl.java Voir le fichier

@@ -198,9 +198,22 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
198 198
         building.setShareContents(taShareContentService.getPostersForTarget(id,CommConstant.POSTER_CONTENT_TYPE_BUILDING));
199 199
 
200 200
         // 助力活动
201
+        QueryWrapper<HelpActivity> helpActivityQueryWrapper = new QueryWrapper<>();
202
+        helpActivityQueryWrapper.eq("building_id", id);
203
+        helpActivityQueryWrapper.eq("status", 1);
204
+        helpActivityQueryWrapper.in("activity_status", 0, 1);
205
+        List<HelpActivity> helpActivityList = helpActivityMapper.selectList(helpActivityQueryWrapper);
201 206
 
207
+        building.setHelpActivityList(helpActivityList);
202 208
 
203 209
         // 拼团活动
210
+        QueryWrapper<TaShareActivity> shareActivityQueryWrapper = new QueryWrapper<>();
211
+        shareActivityQueryWrapper.eq("building_id", id);
212
+        shareActivityQueryWrapper.eq("status", 1);
213
+        shareActivityQueryWrapper.in("activity_status", 0, 1);
214
+        List<TaShareActivity> shareActivityList = taShareActivityMapper.selectList(shareActivityQueryWrapper);
215
+
216
+        building.setShareActivityList(shareActivityList);
204 217
 
205 218
 
206 219
         return ResponseBean.success(building);