using System.ComponentModel.DataAnnotations; using Entity.DbModel.System.App; using Entity.Dto.Req; using HybirdFrameworkCore.Entity; using Microsoft.AspNetCore.Mvc; using Service.System.App; namespace WebStarter.Controllers.System.App; /// /// 客户车辆 /// [ApiController] [Route("api/[controller]")] public class AppCustomerVehicleController { private readonly AppCustomerVehicleService _appCustomerVehicleService; /// /// /// /// public AppCustomerVehicleController(AppCustomerVehicleService appCustomerVehicleService) { _appCustomerVehicleService = appCustomerVehicleService; } /// /// 客户车辆分页 /// /// /// [HttpPost] [Route("CustomerVehiclePage")] public async Task> CustomerVehiclePage( [FromBody] PageCustomerVehicleReq req) { return await _appCustomerVehicleService.Page(req); } /// /// 车辆新增 /// /// /// [HttpPost] [Route("add")] public async Task> AddTeam([FromBody] [Required] AddCustomerVehicleReq input) { var data = await _appCustomerVehicleService.AddCustomerVehicle(input); return Result.Success(data); } /// /// 车辆审核 /// /// /// [HttpPost] [Route("AuditVehicle")] public async Task> AuditVehicle([FromBody] VehicleAuditReq req) { return await _appCustomerVehicleService.AuditVehicle(req); } /// /// 删除解绑车辆 /// /// /// [HttpPost] [Route("delete")] public async Task> Delete([FromBody] [Required] DeleteCustomerVehicleReq input) { var data = await _appCustomerVehicleService.DeleteCustomerVehicle(input); if (data) return Result.Success(data); else return Result.Fail(data); } }