LIVE_YE 1 жил өмнө
parent
commit
d2e4502f27

+ 9 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/appointment/BomanReservatController.java

@@ -101,4 +101,13 @@ public class BomanReservatController extends BaseController
     {
         return toAjax(bomanReservatService.deleteBomanReservatByReservatIds(reservatIds));
     }
+
+    /**
+     * 预约审核
+     */
+    @PreAuthorize("@ss.hasPermi('system:reservat:sh')")
+    @PostMapping("/sh")
+    public AjaxResult examine(@RequestBody BomanReservat bomanReservat) {
+        return bomanReservatService.examine(bomanReservat);
+    }
 }

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/domain/BomanReservat.java

@@ -17,7 +17,7 @@ public class BomanReservat extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
 
-    /** 陵园预约ID */
+    /** 预约ID */
     private Long reservatId;
 
     /** 被访问人员id */

+ 4 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IBomanReservatService.java

@@ -1,6 +1,8 @@
 package com.ruoyi.system.service;
 
 import java.util.List;
+
+import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.system.domain.BomanReservat;
 
 /**
@@ -58,4 +60,6 @@ public interface IBomanReservatService
      * @return 结果
      */
     public int deleteBomanReservatByReservatId(Long reservatId);
+
+    AjaxResult examine(BomanReservat bomanReservat);
 }

+ 9 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BomanReservatServiceImpl.java

@@ -1,6 +1,8 @@
 package com.ruoyi.system.service.impl;
 
 import java.util.List;
+
+import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.utils.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -93,4 +95,11 @@ public class BomanReservatServiceImpl implements IBomanReservatService
     {
         return bomanReservatMapper.deleteBomanReservatByReservatId(reservatId);
     }
+
+    @Override
+    public AjaxResult examine(BomanReservat bomanReservat) {
+        bomanReservat.setUpdateTime(DateUtils.getNowDate());
+        int i = bomanReservatMapper.updateBomanReservat(bomanReservat);
+        return i > 0 ? AjaxResult.success() : AjaxResult.error();
+    }
 }