public async Task <UserRegLoginResp> UserLogin([FromBody] UserRegLoginReq req) { var stateRes = CheckLoginModelState(req); if (!stateRes.IsSuccess()) { return(stateRes.ConvertToResult <UserRegLoginResp>()); } var userRes = await service.LoginUser(req.name, req.pass_word, req.type); return(GenerateUserToken(userRes)); }