lgy vor 6 Jahren
Ursprung
Commit
618043c939

+ 13 - 0
src/main/java/com/persagy/controller/OrdinaryController.java

@@ -228,6 +228,19 @@ public class OrdinaryController {
         return "/ordinary/cancelApplication";
     }
 
+    /**
+     * 根据预约id查看详情
+     * @param id
+     * @return
+     * @throws Exception
+     */
+    @RequestMapping(value = "/findByReservationId", method = RequestMethod.POST)
+    public ReservationVo findByReservationId(@RequestBody String id) throws Exception{
+        JSONObject jsonObject = JSONObject.parseObject(id);
+        Integer cancelID = jsonObject.getInteger("id");
+        ReservationVo reservationVo =reservationService.findByReservationId(cancelID);
+        return reservationVo;
+    }
     //取消预约申请业务实现
     @RequestMapping(value = "/cancelApply", method = RequestMethod.POST)
     public ReservationVo cancelApplication(@RequestBody String id) throws Exception{

+ 1 - 1
src/main/java/com/persagy/dao/RoomMapper.xml

@@ -15,7 +15,7 @@
         INSERT INTO room(id, name, message) VALUES(null,#{name},#{message})
     </insert>
 
-    <select id="findById" parameterType="int" resultType="com.persagy.domain.Room">
+    <select id="findById" parameterMap="" resultType="com.persagy.domain.Room">
         SELECT * FROM room WHERE id=#{id}
     </select>
 

+ 1 - 1
src/main/java/com/persagy/service/RoomService.java

@@ -35,7 +35,7 @@ public interface RoomService {
      * @return
      * @throws Exception
      */
-    public Room findById(Integer id,String date) throws Exception;
+    public Room findById(Integer id) throws Exception;
 
     /**
      * 根据id更新会议室信息

+ 1 - 1
src/main/java/com/persagy/service/impl/RoomServiceImpl.java

@@ -37,7 +37,7 @@ public class RoomServiceImpl implements RoomService {
     }
 
     @Override
-    public Room findById(Integer id,String date) throws Exception {
+    public Room findById(Integer id) throws Exception {
         return roomMapper.findById(id);
     }