dingxin před 6 roky
rodič
revize
189aa78f07

+ 21
- 0
whole-estate/src/main/java/com/example/wholeestate/controller/AppointmentController.java Zobrazit soubor

@@ -0,0 +1,21 @@
1
+package com.example.wholeestate.controller;
2
+
3
+
4
+import com.example.wholeestate.common.base.BaseController;
5
+import org.springframework.web.bind.annotation.RequestMapping;
6
+
7
+import org.springframework.web.bind.annotation.RestController;
8
+
9
+/**
10
+ * <p>
11
+ * 预约记录表 前端控制器
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-03-21
16
+ */
17
+@RestController
18
+@RequestMapping("/ta/appointment")
19
+public class AppointmentController extends BaseController {
20
+
21
+}

+ 13
- 0
whole-estate/src/main/java/com/example/wholeestate/controller/BuildingController.java Zobrazit soubor

@@ -95,5 +95,18 @@ public class BuildingController extends BaseController {
95 95
         return responseBean;
96 96
     }
97 97
 
98
+    @ApiOperation(value = "楼盘修改成已发布", notes = "楼盘修改成已发布")
99
+    @ApiImplicitParams({
100
+            @ApiImplicitParam(paramType = "path", dataTypeClass=Integer.class, name = "id", value = "楼盘id"),
101
+    })
102
+
103
+//    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
104
+    @RequestMapping(value = "/building/update/status", method = RequestMethod.PUT)
105
+    public ResponseBean buildingUpdateStatus(@RequestParam("id")Integer id, HttpSession session){
106
+        ResponseBean  responseBean = iBuildingService.buildingUpdateStatus(id);
107
+        return responseBean;
108
+    }
109
+
110
+
98 111
 
99 112
 }

+ 16
- 0
whole-estate/src/main/java/com/example/wholeestate/service/IAppointmentService.java Zobrazit soubor

@@ -0,0 +1,16 @@
1
+package com.example.wholeestate.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.example.wholeestate.model.Appointment;
5
+
6
+/**
7
+ * <p>
8
+ * 预约记录表 服务类
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2019-03-21
13
+ */
14
+public interface IAppointmentService extends IService<Appointment> {
15
+
16
+}

+ 6
- 0
whole-estate/src/main/java/com/example/wholeestate/service/IBuildingService.java Zobrazit soubor

@@ -49,4 +49,10 @@ public interface IBuildingService extends IService<Building> {
49 49
      * @return
50 50
      */
51 51
     ResponseBean buildingAdd(String parameter);
52
+
53
+    /**
54
+     * 修改成已发布
55
+     * @return
56
+     */
57
+    ResponseBean buildingUpdateStatus(Integer id);
52 58
 }

+ 20
- 0
whole-estate/src/main/java/com/example/wholeestate/service/impl/AppointmentServiceImpl.java Zobrazit soubor

@@ -0,0 +1,20 @@
1
+package com.example.wholeestate.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.example.wholeestate.dao.AppointmentMapper;
5
+import com.example.wholeestate.model.Appointment;
6
+import com.example.wholeestate.service.IAppointmentService;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 预约记录表 服务实现类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-03-21
16
+ */
17
+@Service
18
+public class AppointmentServiceImpl extends ServiceImpl<AppointmentMapper, Appointment> implements IAppointmentService {
19
+
20
+}

+ 12
- 0
whole-estate/src/main/java/com/example/wholeestate/service/impl/BuildingServiceImpl.java Zobrazit soubor

@@ -139,6 +139,18 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
139 139
             return response;
140 140
         }
141 141
 
142
+    @Override
143
+    public ResponseBean buildingUpdateStatus(Integer id) {
144
+        Building  building= new Building();
145
+        QueryWrapper<Building> buildingIdQueryWrapper = new QueryWrapper<>();
146
+        buildingIdQueryWrapper.eq("building_id", id);
147
+        building.setBuildingId(String.valueOf(id));
148
+        building.setStatus(1);
149
+        buildingMapper.update(building,buildingIdQueryWrapper);
150
+         ResponseBean ResponseBean= new ResponseBean<>();
151
+        ResponseBean.addSuccess("成功");
152
+        return ResponseBean;
153
+    }
142 154
 
143 155
 
144 156
 }