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; /// /// App用户 /// [ApiController] [Route("api/[controller]")] public class AppCustomerController { private readonly AppCustomerService _appCustomerService; /// /// /// /// public AppCustomerController(AppCustomerService appCustomerService) { _appCustomerService = appCustomerService; } /// /// App用户注册 /// /// /// [HttpPost] [Route("add")] public async Task> AddAppCustomer([FromBody] [Required] AddAppCustomerReq input) { var data = await _appCustomerService.AddAppCustomer(input); return Result.Success(data); } /// /// 获取用户基础信息 /// /// /// [HttpGet] [Route("GetInfo")] public async Task> GetBaseInfo(String loginNo) { return Result.Success(await _appCustomerService.GetBaseInfo(loginNo)); } /// /// 修改用户基础信息 /// /// /// [HttpPost] [Route("UpdateInfo")] public async Task> UpdateInfo([FromBody] UpdateAppCustomerReq user) { return await _appCustomerService.UpdateBaseInfo(user); } /// /// 车队绑定 /// /// /// [HttpPost] [Route("BindTeam")] public async Task> BindTeam([FromBody] CustomerTeamReq user) { return await _appCustomerService.BindTeam(user); } /// /// 修改密码 /// /// /// [HttpPost] [Route("UpdateInfoPwd")] public async Task> UpdateInfoPwd([FromBody] CustomerPwdReq input) { var data = await _appCustomerService.UpdateCustomerPsd(input); return Result.Success(data); } }