|
@@ -6,12 +6,14 @@ import com.chelvc.cloud.vehicle.api.service.ReservationService;
|
|
|
import com.chelvc.framework.base.annotation.ResponseWrapping;
|
|
|
import com.chelvc.framework.common.model.Pagination;
|
|
|
import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
-import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
+import org.springframework.web.bind.annotation.PutMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
+import javax.validation.constraints.Min;
|
|
|
|
|
|
/**
|
|
|
* 预约管理接口
|
|
@@ -36,4 +38,14 @@ public class ReservationController {
|
|
|
public Pagination<ReservationDTO> getReservationPaging(@Valid ReservationPagingParam param) {
|
|
|
return this.reservationService.getReservationPaging(param);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 更新预约单的状态
|
|
|
+ * @param id 预约单ID
|
|
|
+ * @param status 预约单的状态
|
|
|
+ */
|
|
|
+ @PutMapping("/updateReservationsStatus/{id}")
|
|
|
+ public void updateReservationsStatus(@PathVariable("id") @Min(value = 1, message = "主键不能小于1") Long id, @Valid String status) {
|
|
|
+ this.reservationService.updateReservationsStatus(id, status);
|
|
|
+ }
|
|
|
}
|