Your Name 4 年前
父节点
当前提交
f962687b98
共有 1 个文件被更改,包括 8 次插入6 次删除
  1. 8
    6
      src/main/java/com/shigongli/controller/TaHouseSurroundController.java

+ 8
- 6
src/main/java/com/shigongli/controller/TaHouseSurroundController.java 查看文件

20
 import com.shigongli.entity.TaHouseSurround;
20
 import com.shigongli.entity.TaHouseSurround;
21
 import org.springframework.web.bind.annotation.RestController;
21
 import org.springframework.web.bind.annotation.RestController;
22
 
22
 
23
+import java.util.List;
24
+
23
 /**
25
 /**
24
  * <p>
26
  * <p>
25
     * 房源周边 前端控制器
27
     * 房源周边 前端控制器
41
 
43
 
42
 
44
 
43
     /**
45
     /**
44
-     * 分页查询列表
46
+     * 分页查询房源周边, 不传房源则代表所有周边
45
      * @param pageNum
47
      * @param pageNum
46
      * @param pageSize
48
      * @param pageSize
47
      * @return
49
      * @return
58
     }
60
     }
59
 
61
 
60
     /**
62
     /**
61
-     * 保存对象
63
+     * 保存房源周边
62
      * @param taHouseSurround 实体对象
64
      * @param taHouseSurround 实体对象
63
      * @return
65
      * @return
64
      */
66
      */
65
-    @RequestMapping(value="/mp/taHouseSurround",method= RequestMethod.POST)
67
+    @RequestMapping(value="/ma/taHouseSurround",method= RequestMethod.POST)
66
     @ApiOperation(value="保存", notes = "保存", httpMethod = "POST", response = ResponseBean.class)
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
         }else {
73
         }else {
72
             return ResponseBean.error("保存失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
74
             return ResponseBean.error("保存失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
73
         }
75
         }