添加一体机身份证、手机号密码登录接口
This commit is contained in:
@@ -3,8 +3,8 @@ package com.ruoyi.web.controller.system;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.ruoyi.common.annotation.BussinessLog;
|
||||
import com.ruoyi.common.core.domain.model.RegisterBody;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -61,6 +61,11 @@ public class SysLoginController
|
||||
return ajax;
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信小程序登录
|
||||
* @param loginBody
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/app/appLogin")
|
||||
public AjaxResult appLogin(@RequestBody LoginBody loginBody)
|
||||
{
|
||||
@@ -69,6 +74,44 @@ public class SysLoginController
|
||||
return ajax;
|
||||
}
|
||||
|
||||
/**
|
||||
* 一体机身份证登录
|
||||
* @param loginBody
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/app/idCardLogin")
|
||||
public AjaxResult idCardLogin(@RequestBody LoginBody loginBody)
|
||||
{
|
||||
if(loginBody==null||StringUtils.isBlank(loginBody.getIdCard())){
|
||||
return AjaxResult.error("请输入有效的身份证号!");
|
||||
}
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
ajax=loginService.idCardLogin(loginBody);
|
||||
return ajax;
|
||||
}
|
||||
|
||||
/**
|
||||
* 一体机手机号/密码登录
|
||||
* @param loginBody
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/app/phoneLogin")
|
||||
public AjaxResult phoneLogin(@RequestBody LoginBody loginBody)
|
||||
{
|
||||
if(loginBody == null){
|
||||
return AjaxResult.error("登录参数不能为空!");
|
||||
}
|
||||
if(StringUtils.isBlank(loginBody.getUsername())){
|
||||
return AjaxResult.error("用户名为空,请输入用户名!");
|
||||
}
|
||||
if(StringUtils.isBlank(loginBody.getPassword())){
|
||||
return AjaxResult.error("密码为空,请输入密码!");
|
||||
}
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
ajax=loginService.phoneLogin(loginBody);
|
||||
return ajax;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user