weiximei hace 6 años
padre
commit
12c532bc30

+ 1
- 1
whole-estate/src/main/java/com/example/wholeestate/controller/AppointmentController.java Ver fichero

@@ -48,7 +48,7 @@ public class AppointmentController extends BaseController {
48 48
     })
49 49
     public ResponseBean openidAppointementList(@PathVariable("openid") String openid, @RequestBody String parameter) {
50 50
         ResponseBean responseBean = new ResponseBean();
51
-        responseBean = iAppointmentService.addAppointment(openid, parameter);
51
+        responseBean = iAppointmentService.addWxAppointment(openid, parameter);
52 52
         return responseBean;
53 53
     }
54 54
 

+ 1
- 1
whole-estate/src/main/java/com/example/wholeestate/service/IAppointmentService.java Ver fichero

@@ -29,6 +29,6 @@ public interface IAppointmentService extends IService<Appointment> {
29 29
      * @param parameter
30 30
      * @return
31 31
      */
32
-    ResponseBean addAppointment(String openid, String parameter);
32
+    ResponseBean addWxAppointment(String openid, String parameter);
33 33
 
34 34
 }

+ 2
- 1
whole-estate/src/main/java/com/example/wholeestate/service/impl/AppointmentServiceImpl.java Ver fichero

@@ -49,7 +49,7 @@ public class AppointmentServiceImpl extends ServiceImpl<AppointmentMapper, Appoi
49 49
     }
50 50
 
51 51
     @Override
52
-    public ResponseBean addAppointment(String openid, String parameter) {
52
+    public ResponseBean addWxAppointment(String openid, String parameter) {
53 53
         ResponseBean responseBean = new ResponseBean();
54 54
         Appointment appointment = JSONObject.parseObject(parameter, Appointment.class);
55 55
 
@@ -59,6 +59,7 @@ public class AppointmentServiceImpl extends ServiceImpl<AppointmentMapper, Appoi
59 59
 
60 60
         appointment.setCustomerId(customer.getCustomerId());
61 61
         appointment.setAppointmentId(idGen.nextId() + "");
62
+        appointment.setStatus(1);
62 63
         appointmentMapper.insert(appointment);
63 64
         responseBean.addSuccess("操作成功!");
64 65
         return responseBean;

+ 4
- 1
whole-estate/src/main/java/com/example/wholeestate/service/impl/BuildingServiceImpl.java Ver fichero

@@ -261,7 +261,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
261 261
          //插入户型图片
262 262
         for (BuildingImg img:buildingImgs){
263 263
             BuildingImg Images = new BuildingImg();
264
-            Images.setImgId(img.getBuildingId());
264
+            Images.setImgId(idGen.nextId() + "");
265 265
             Images.setBuildingId(building.getBuildingId());
266 266
             Images.setImgType(img.getImgType());
267 267
             Images.setUrl(img.getUrl());
@@ -277,6 +277,9 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
277 277
             apartmentImgMapper.insert(apartmentImg);
278 278
 
279 279
         }
280
+
281
+        building.setCreateDate(LocalDateTime.now());
282
+        building.setApartmentId(idGen.nextId() + "");
280 283
         buildingApartmentMapper.insert(building);
281 284
         responseBean.addSuccess("成功");
282 285
         return responseBean;