Your Name 4 vuotta sitten
vanhempi
commit
f962687b98

+ 8
- 6
src/main/java/com/shigongli/controller/TaHouseSurroundController.java Näytä tiedosto

@@ -20,6 +20,8 @@ import com.shigongli.service.ITaHouseSurroundService;
20 20
 import com.shigongli.entity.TaHouseSurround;
21 21
 import org.springframework.web.bind.annotation.RestController;
22 22
 
23
+import java.util.List;
24
+
23 25
 /**
24 26
  * <p>
25 27
     * 房源周边 前端控制器
@@ -41,7 +43,7 @@ public class TaHouseSurroundController extends BaseController {
41 43
 
42 44
 
43 45
     /**
44
-     * 分页查询列表
46
+     * 分页查询房源周边, 不传房源则代表所有周边
45 47
      * @param pageNum
46 48
      * @param pageSize
47 49
      * @return
@@ -58,16 +60,16 @@ public class TaHouseSurroundController extends BaseController {
58 60
     }
59 61
 
60 62
     /**
61
-     * 保存对象
63
+     * 保存房源周边
62 64
      * @param taHouseSurround 实体对象
63 65
      * @return
64 66
      */
65
-    @RequestMapping(value="/mp/taHouseSurround",method= RequestMethod.POST)
67
+    @RequestMapping(value="/ma/taHouseSurround",method= RequestMethod.POST)
66 68
     @ApiOperation(value="保存", notes = "保存", httpMethod = "POST", response = ResponseBean.class)
67
-    public ResponseBean taHouseSurroundAdd(@ApiParam("保存内容") @RequestBody TaHouseSurround taHouseSurround) throws Exception{
69
+    public ResponseBean taHouseSurroundAdd(@ApiParam("保存内容") @RequestBody List<TaHouseSurround> taHouseSurroundList) throws Exception{
68 70
 
69
-        if (iTaHouseSurroundService.save(taHouseSurround)){
70
-            return ResponseBean.success(taHouseSurround);
71
+        if (iTaHouseSurroundService.saveBatch(taHouseSurroundList)){
72
+            return ResponseBean.success(taHouseSurroundList);
71 73
         }else {
72 74
             return ResponseBean.error("保存失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
73 75
         }