|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using Entity.Dto.Req.App;
|
|
|
|
|
using Entity.Dto.Resp;
|
|
|
|
|
using HybirdFrameworkCore.Entity;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
using Service.System.App;
|
|
|
|
|
|
|
|
|
|
namespace WebStarter.Controllers.System.App;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// App用户
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ApiController]
|
|
|
|
|
[Route("api/[controller]")]
|
|
|
|
|
public class AppCustomerController
|
|
|
|
|
{
|
|
|
|
|
private readonly AppCustomerService _appCustomerService;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="appCustomerService"></param>
|
|
|
|
|
public AppCustomerController(AppCustomerService appCustomerService)
|
|
|
|
|
{
|
|
|
|
|
_appCustomerService = appCustomerService;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// App用户注册
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="input"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("add")]
|
|
|
|
|
public async Task<Result<string>> AddAppCustomer([FromBody] [Required] AddAppCustomerReq input)
|
|
|
|
|
{
|
|
|
|
|
var data = await _appCustomerService.AddAppCustomer(input);
|
|
|
|
|
return Result<string>.Success(data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取用户基础信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="loginNo"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet]
|
|
|
|
|
[Route("GetInfo")]
|
|
|
|
|
public async Task<Result<AppCustomerResp>> GetBaseInfo(String loginNo)
|
|
|
|
|
{
|
|
|
|
|
return Result<AppCustomerResp>.Success(await _appCustomerService.GetBaseInfo(loginNo));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 修改用户基础信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="user"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("UpdateInfo")]
|
|
|
|
|
public async Task<Result<string>> UpdateInfo([FromBody] UpdateAppCustomerReq user)
|
|
|
|
|
{
|
|
|
|
|
return await _appCustomerService.UpdateBaseInfo(user);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 车队绑定
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="user"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("BindTeam")]
|
|
|
|
|
public async Task<Result<string>> BindTeam([FromBody] CustomerTeamReq user)
|
|
|
|
|
{
|
|
|
|
|
return await _appCustomerService.BindTeam(user);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 修改密码
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="input"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("UpdateInfoPwd")]
|
|
|
|
|
public async Task<Result<string>> UpdateInfoPwd([FromBody] CustomerPwdReq input)
|
|
|
|
|
{
|
|
|
|
|
var data = await _appCustomerService.UpdateCustomerPsd(input);
|
|
|
|
|
return Result<string>.Success(data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|