You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
2.2 KiB
78 lines
2.2 KiB
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;
|
|
|
|
/// <summary>
|
|
/// 客户车辆
|
|
/// </summary>
|
|
[ApiController]
|
|
[Route("api/[controller]")]
|
|
public class AppCustomerVehicleController
|
|
{
|
|
private readonly AppCustomerVehicleService _appCustomerVehicleService;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="appCustomerVehicleService"></param>
|
|
public AppCustomerVehicleController(AppCustomerVehicleService appCustomerVehicleService)
|
|
{
|
|
_appCustomerVehicleService = appCustomerVehicleService;
|
|
}
|
|
/// <summary>
|
|
/// 客户车辆分页
|
|
/// </summary>
|
|
/// <param name="req"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("CustomerVehiclePage")]
|
|
public async Task<PageResult<AppCustomerVehicle>> CustomerVehiclePage(
|
|
[FromBody] PageCustomerVehicleReq req)
|
|
{
|
|
return await _appCustomerVehicleService.Page(req);
|
|
}
|
|
/// <summary>
|
|
/// 车辆新增
|
|
/// </summary>
|
|
/// <param name="input"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("add")]
|
|
public async Task<Result<string>> AddTeam([FromBody] [Required] AddCustomerVehicleReq input)
|
|
{
|
|
var data = await _appCustomerVehicleService.AddCustomerVehicle(input);
|
|
return Result<string>.Success(data);
|
|
}
|
|
/// <summary>
|
|
/// 车辆审核
|
|
/// </summary>
|
|
/// <param name="req"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("AuditVehicle")]
|
|
public async Task<Result<string>> AuditVehicle([FromBody] VehicleAuditReq req)
|
|
{
|
|
return await _appCustomerVehicleService.AuditVehicle(req);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 删除解绑车辆
|
|
/// </summary>
|
|
/// <param name="input"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("delete")]
|
|
public async Task<Result<bool>> Delete([FromBody] [Required] DeleteCustomerVehicleReq input)
|
|
{
|
|
var data = await _appCustomerVehicleService.DeleteCustomerVehicle(input);
|
|
if (data)
|
|
return Result<bool>.Success(data);
|
|
else
|
|
return Result<bool>.Fail(data);
|
|
}
|
|
} |