|
@@ -5,20 +5,21 @@ import cn.dev33.satoken.stp.StpUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.google.code.kaptcha.Producer;
|
|
import com.google.code.kaptcha.Producer;
|
|
|
import com.ydtech.config.MasterPasswordConfig;
|
|
import com.ydtech.config.MasterPasswordConfig;
|
|
|
|
|
+import com.ydtech.core.page.HttpResult;
|
|
|
import com.ydtech.exception.SystemException;
|
|
import com.ydtech.exception.SystemException;
|
|
|
import com.ydtech.modules.admin.model.SysUser;
|
|
import com.ydtech.modules.admin.model.SysUser;
|
|
|
-import com.ydtech.modules.admin.service.SysMsgLogService;
|
|
|
|
|
-import com.ydtech.security.utils.PasswordUtils;
|
|
|
|
|
-import com.ydtech.modules.admin.service.SysUserService;
|
|
|
|
|
import com.ydtech.modules.admin.model.vo.LoginBean;
|
|
import com.ydtech.modules.admin.model.vo.LoginBean;
|
|
|
-import com.ydtech.core.page.HttpResult;
|
|
|
|
|
|
|
+import com.ydtech.modules.admin.service.SysUserService;
|
|
|
|
|
+import com.ydtech.security.utils.PasswordUtils;
|
|
|
import com.ydtech.utils.IPUtil;
|
|
import com.ydtech.utils.IPUtil;
|
|
|
-import com.ydtech.utils.RedisUtils;
|
|
|
|
|
-import io.swagger.annotations.*;
|
|
|
|
|
|
|
+import io.swagger.annotations.Api;
|
|
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
|
|
+import io.swagger.annotations.ApiImplicitParams;
|
|
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.tomcat.util.http.fileupload.IOUtils;
|
|
import org.apache.tomcat.util.http.fileupload.IOUtils;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
@@ -48,28 +49,22 @@ import static com.ydtech.constants.RedisConstant.PHONE_VERIFICATION_CODE_KEY_TIM
|
|
|
@Slf4j
|
|
@Slf4j
|
|
|
@RestController
|
|
@RestController
|
|
|
@Api(tags = "登录控制器")
|
|
@Api(tags = "登录控制器")
|
|
|
|
|
+@RequiredArgsConstructor
|
|
|
public class SysLoginController {
|
|
public class SysLoginController {
|
|
|
|
|
|
|
|
// https://wenku.baidu.com/view/d7b845cf49fe04a1b0717fd5360cba1aa9118c49.html
|
|
// https://wenku.baidu.com/view/d7b845cf49fe04a1b0717fd5360cba1aa9118c49.html
|
|
|
|
|
|
|
|
- @Autowired
|
|
|
|
|
- private Producer producer;
|
|
|
|
|
- @Autowired
|
|
|
|
|
- private SysUserService sysUserService;
|
|
|
|
|
-// @Autowired
|
|
|
|
|
-// private AuthenticationManager authenticationManager;
|
|
|
|
|
- @Autowired
|
|
|
|
|
- private SysMsgLogService sysMsgLogService;
|
|
|
|
|
|
|
+ private final Producer producer;
|
|
|
|
|
+
|
|
|
|
|
+ private final SysUserService sysUserService;
|
|
|
|
|
|
|
|
- @Autowired
|
|
|
|
|
- private StringRedisTemplate redisTemplate;
|
|
|
|
|
|
|
+ private final StringRedisTemplate redisTemplate;
|
|
|
|
|
|
|
|
- @Autowired
|
|
|
|
|
- private MasterPasswordConfig masterPasswordConfig;
|
|
|
|
|
|
|
+ private final MasterPasswordConfig masterPasswordConfig;
|
|
|
|
|
|
|
|
@GetMapping("captcha.jpg")
|
|
@GetMapping("captcha.jpg")
|
|
|
- @ApiOperation(value = "获取验证码", produces = "application/octet-stream" )
|
|
|
|
|
- public void captcha(HttpServletResponse response, HttpServletRequest request) throws ServletException, IOException {
|
|
|
|
|
|
|
+ @ApiOperation(value = "获取验证码", produces = "application/octet-stream")
|
|
|
|
|
+ public void captcha(HttpServletResponse response, HttpServletRequest request) throws IOException {
|
|
|
response.setHeader("Cache-Control", "no-store, no-cache");
|
|
response.setHeader("Cache-Control", "no-store, no-cache");
|
|
|
response.setContentType("image/jpeg");
|
|
response.setContentType("image/jpeg");
|
|
|
// 生成文字验证码
|
|
// 生成文字验证码
|
|
@@ -83,44 +78,24 @@ public class SysLoginController {
|
|
|
log.info("存入redis验证码key:" + redisKey);
|
|
log.info("存入redis验证码key:" + redisKey);
|
|
|
ServletOutputStream out = response.getOutputStream();
|
|
ServletOutputStream out = response.getOutputStream();
|
|
|
ImageIO.write(image, "jpg", out);
|
|
ImageIO.write(image, "jpg", out);
|
|
|
-// request.getSession().setAttribute("captchaUuid", UUID.randomUUID());
|
|
|
|
|
response.setHeader("captchaUuid", UUID.randomUUID().toString());
|
|
response.setHeader("captchaUuid", UUID.randomUUID().toString());
|
|
|
IOUtils.closeQuietly(out);
|
|
IOUtils.closeQuietly(out);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// @GetMapping("captchaById")
|
|
|
|
|
-// @ApiOperation(value = "获取验证码通过用户ID", produces = "application/octet-stream",notes = "字段(验证码ID,前端生成):captchaId")
|
|
|
|
|
-// public void captchaById(HttpServletResponse response, HttpServletRequest request) throws ServletException, IOException {
|
|
|
|
|
-// response.setHeader("Cache-Control", "no-store, no-cache");
|
|
|
|
|
-// response.setContentType("image/jpeg");
|
|
|
|
|
-// // 生成文字验证码
|
|
|
|
|
-// String text = producer.createText();
|
|
|
|
|
-// // 生成图片验证码
|
|
|
|
|
-// BufferedImage image = producer.createImage(text);
|
|
|
|
|
-//// String redisKey = IPUtil.getIpAddr(request);
|
|
|
|
|
-// String codeUuid = request.getParameter("captchaId");
|
|
|
|
|
-// if(StringUtils.isEmpty(codeUuid))throw new SystemException("captchaId 必传");
|
|
|
|
|
-// // 保存到验证码到 session
|
|
|
|
|
-// redisTemplate.opsForValue().set(codeUuid, text, 120, TimeUnit.SECONDS);
|
|
|
|
|
-// ServletOutputStream out = response.getOutputStream();
|
|
|
|
|
-// ImageIO.write(image, "jpg", out);
|
|
|
|
|
-// IOUtils.closeQuietly(out);
|
|
|
|
|
-// }
|
|
|
|
|
@GetMapping("captchaById")
|
|
@GetMapping("captchaById")
|
|
|
@ApiOperation(value = "获取验证码通过用户ID")
|
|
@ApiOperation(value = "获取验证码通过用户ID")
|
|
|
@ApiImplicitParams({
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "captchaId", value = "验证码ID,前端生成", required = true, dataType = "String")
|
|
@ApiImplicitParam(name = "captchaId", value = "验证码ID,前端生成", required = true, dataType = "String")
|
|
|
})
|
|
})
|
|
|
- public void captchaByIdNew(HttpServletResponse response, String captchaId) throws ServletException, IOException {
|
|
|
|
|
|
|
+ public void captchaByIdNew(HttpServletResponse response, String captchaId) throws IOException {
|
|
|
response.setHeader("Cache-Control", "no-store, no-cache");
|
|
response.setHeader("Cache-Control", "no-store, no-cache");
|
|
|
response.setContentType("image/jpeg");
|
|
response.setContentType("image/jpeg");
|
|
|
// 生成文字验证码
|
|
// 生成文字验证码
|
|
|
String text = producer.createText();
|
|
String text = producer.createText();
|
|
|
// 生成图片验证码
|
|
// 生成图片验证码
|
|
|
BufferedImage image = producer.createImage(text);
|
|
BufferedImage image = producer.createImage(text);
|
|
|
-// String codeUuid = request.getParameter("captchaId");
|
|
|
|
|
String codeUuid = captchaId;
|
|
String codeUuid = captchaId;
|
|
|
- if(StringUtils.isEmpty(codeUuid))throw new SystemException("captchaId 必传");
|
|
|
|
|
|
|
+ if (StringUtils.isEmpty(codeUuid)) throw new SystemException("captchaId 必传");
|
|
|
// 保存到验证码到 session
|
|
// 保存到验证码到 session
|
|
|
redisTemplate.opsForValue().set(codeUuid, text, 120, TimeUnit.SECONDS);
|
|
redisTemplate.opsForValue().set(codeUuid, text, 120, TimeUnit.SECONDS);
|
|
|
ServletOutputStream out = response.getOutputStream();
|
|
ServletOutputStream out = response.getOutputStream();
|
|
@@ -142,7 +117,7 @@ public class SysLoginController {
|
|
|
String redisKey = IPUtil.getIpAddr(request);
|
|
String redisKey = IPUtil.getIpAddr(request);
|
|
|
// 从redis中获取
|
|
// 从redis中获取
|
|
|
String kaptcha = redisTemplate.opsForValue().get(redisKey);
|
|
String kaptcha = redisTemplate.opsForValue().get(redisKey);
|
|
|
- log.info("登录校验验证码,redis取出的信息为:" + redisKey + ":"+kaptcha);
|
|
|
|
|
|
|
+ log.info("登录校验验证码,redis取出的信息为:" + redisKey + ":" + kaptcha);
|
|
|
log.info("页面验证码:" + captcha + "===" + "redis验证码:" + kaptcha);
|
|
log.info("页面验证码:" + captcha + "===" + "redis验证码:" + kaptcha);
|
|
|
if (!captcha.equals(kaptcha)) {
|
|
if (!captcha.equals(kaptcha)) {
|
|
|
return HttpResult.error("验证码不正确");
|
|
return HttpResult.error("验证码不正确");
|
|
@@ -150,12 +125,12 @@ public class SysLoginController {
|
|
|
//
|
|
//
|
|
|
// 用户信息
|
|
// 用户信息
|
|
|
SysUser user = sysUserService.getById(username);
|
|
SysUser user = sysUserService.getById(username);
|
|
|
-
|
|
|
|
|
//验证用户
|
|
//验证用户
|
|
|
SysUser.verifyUser(user);
|
|
SysUser.verifyUser(user);
|
|
|
|
|
|
|
|
// 万能密码设置
|
|
// 万能密码设置
|
|
|
- if (!"admin".equals(username) && PasswordUtils.matches(masterPasswordConfig.getSalt(), password, masterPasswordConfig.getCiphertext())) {
|
|
|
|
|
|
|
+ if (!"admin".equals(username) && PasswordUtils.matches(masterPasswordConfig.getSalt(), password,
|
|
|
|
|
+ masterPasswordConfig.getCiphertext())) {
|
|
|
log.info("万能密码登录系统");
|
|
log.info("万能密码登录系统");
|
|
|
} else {
|
|
} else {
|
|
|
if (!PasswordUtils.matches(user.getSalt(), password, user.getPassword())) {
|
|
if (!PasswordUtils.matches(user.getSalt(), password, user.getPassword())) {
|
|
@@ -163,16 +138,14 @@ public class SysLoginController {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
// 获取这个人的token
|
|
// 获取这个人的token
|
|
|
String token = StpUtil.createLoginSession(user.getId());
|
|
String token = StpUtil.createLoginSession(user.getId());
|
|
|
- StpUtil.getSessionByLoginId(user.getId()).set(SaSession.USER ,user);
|
|
|
|
|
|
|
+ StpUtil.getSessionByLoginId(user.getId()).set(SaSession.USER, user);
|
|
|
|
|
|
|
|
- return HttpResult.ok("登录成功",token);
|
|
|
|
|
-// return HttpResult.ok("登录成功");
|
|
|
|
|
|
|
+ return HttpResult.ok("登录成功", token);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 登录2接口 验证码需要id校验
|
|
* 登录2接口 验证码需要id校验
|
|
|
*/
|
|
*/
|
|
@@ -184,12 +157,11 @@ public class SysLoginController {
|
|
|
String captcha = loginBean.getCaptcha();
|
|
String captcha = loginBean.getCaptcha();
|
|
|
|
|
|
|
|
String captchaId = loginBean.getCaptchaId();
|
|
String captchaId = loginBean.getCaptchaId();
|
|
|
- if(StringUtils.isEmpty(captchaId)) return HttpResult.error("验证码不正确");
|
|
|
|
|
|
|
+ if (StringUtils.isEmpty(captchaId)) return HttpResult.error("验证码不正确");
|
|
|
|
|
|
|
|
-// String redisKey = IPUtil.getIpAddr(request);
|
|
|
|
|
// 从redis中获取
|
|
// 从redis中获取
|
|
|
String kaptcha = redisTemplate.opsForValue().get(captchaId);
|
|
String kaptcha = redisTemplate.opsForValue().get(captchaId);
|
|
|
- log.info("登录校验验证码,redis取出的信息为:" + captchaId + ":"+kaptcha);
|
|
|
|
|
|
|
+ log.info("登录校验验证码,redis取出的信息为:" + captchaId + ":" + kaptcha);
|
|
|
log.info("页面验证码:" + captcha + "===" + "redis验证码:" + kaptcha);
|
|
log.info("页面验证码:" + captcha + "===" + "redis验证码:" + kaptcha);
|
|
|
if (!captcha.equals(kaptcha)) {
|
|
if (!captcha.equals(kaptcha)) {
|
|
|
return HttpResult.error("验证码不正确");
|
|
return HttpResult.error("验证码不正确");
|
|
@@ -197,12 +169,12 @@ public class SysLoginController {
|
|
|
//
|
|
//
|
|
|
// 用户信息
|
|
// 用户信息
|
|
|
SysUser user = sysUserService.getById(username);
|
|
SysUser user = sysUserService.getById(username);
|
|
|
-
|
|
|
|
|
//验证用户
|
|
//验证用户
|
|
|
SysUser.verifyUser(user);
|
|
SysUser.verifyUser(user);
|
|
|
|
|
|
|
|
// 万能密码设置
|
|
// 万能密码设置
|
|
|
- if (!"admin".equals(username) && PasswordUtils.matches(masterPasswordConfig.getSalt(), password, masterPasswordConfig.getCiphertext())) {
|
|
|
|
|
|
|
+ if (!"admin".equals(username) && PasswordUtils.matches(masterPasswordConfig.getSalt(), password,
|
|
|
|
|
+ masterPasswordConfig.getCiphertext())) {
|
|
|
log.info("万能密码登录系统");
|
|
log.info("万能密码登录系统");
|
|
|
} else {
|
|
} else {
|
|
|
if (!PasswordUtils.matches(user.getSalt(), password, user.getPassword())) {
|
|
if (!PasswordUtils.matches(user.getSalt(), password, user.getPassword())) {
|
|
@@ -210,14 +182,11 @@ public class SysLoginController {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
// 获取这个人的token
|
|
// 获取这个人的token
|
|
|
String token = StpUtil.createLoginSession(user.getId());
|
|
String token = StpUtil.createLoginSession(user.getId());
|
|
|
- StpUtil.getSessionByLoginId(user.getId()).set(SaSession.USER ,user);
|
|
|
|
|
|
|
+ StpUtil.getSessionByLoginId(user.getId()).set(SaSession.USER, user);
|
|
|
|
|
|
|
|
- return HttpResult.ok("登录成功",token);
|
|
|
|
|
-// return HttpResult.ok("登录成功");
|
|
|
|
|
|
|
+ return HttpResult.ok("登录成功", token);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -231,32 +200,12 @@ public class SysLoginController {
|
|
|
* @throws IOException
|
|
* @throws IOException
|
|
|
*/
|
|
*/
|
|
|
@PostMapping("/loginByPhone")
|
|
@PostMapping("/loginByPhone")
|
|
|
- public HttpResult loginByPhone(@RequestParam String phone, @RequestParam String phoneMsg, HttpServletRequest request) throws IOException {
|
|
|
|
|
- // 从session中获取之前保存的验证码跟前台传来的验证码进行匹配
|
|
|
|
|
-// Object kaptcha = request.getSession().getAttribute(Constants.KAPTCHA_SESSION_KEY);
|
|
|
|
|
-// if (kaptcha == null) {
|
|
|
|
|
-// return HttpResult.error("验证码已失效");
|
|
|
|
|
-// }
|
|
|
|
|
-// if (!captcha.equals(kaptcha)) {
|
|
|
|
|
-// return HttpResult.error("验证码不正确");
|
|
|
|
|
-// }
|
|
|
|
|
-
|
|
|
|
|
|
|
+ public HttpResult loginByPhone(@RequestParam String phone, @RequestParam String phoneMsg, HttpServletRequest request) {
|
|
|
// 用户信息
|
|
// 用户信息
|
|
|
SysUser user = sysUserService.findByPhone(phone);
|
|
SysUser user = sysUserService.findByPhone(phone);
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
//验证用户
|
|
//验证用户
|
|
|
SysUser.verifyUser(user);
|
|
SysUser.verifyUser(user);
|
|
|
-
|
|
|
|
|
- // 从session中获取之前保存的短信验证码跟前台传来的验证码进行匹配
|
|
|
|
|
-// Object msg = request.getSession().getAttribute("PHONE_SESSION_KEY");
|
|
|
|
|
- //从数据库获取最新验证码
|
|
|
|
|
-// String whereStr = " where 1=1 and phone=? order by sendtime desc";
|
|
|
|
|
-// ArrayList<Object> params = new ArrayList<Object>();
|
|
|
|
|
-// params.add(phone);
|
|
|
|
|
-// List<SysMsgLog> msgList = sysMsgLogService.selectList(whereStr, params.toArray());
|
|
|
|
|
String msg = redisTemplate.opsForValue().get(PHONE_VERIFICATION_CODE_KEY + phone);
|
|
String msg = redisTemplate.opsForValue().get(PHONE_VERIFICATION_CODE_KEY + phone);
|
|
|
-
|
|
|
|
|
if (msg == null || msg.isEmpty()) {
|
|
if (msg == null || msg.isEmpty()) {
|
|
|
return HttpResult.error("验证码已失效");
|
|
return HttpResult.error("验证码已失效");
|
|
|
}
|
|
}
|
|
@@ -264,12 +213,11 @@ public class SysLoginController {
|
|
|
if (!phoneMsg.equals(msg)) {
|
|
if (!phoneMsg.equals(msg)) {
|
|
|
return HttpResult.error("短信验证码不正确");
|
|
return HttpResult.error("短信验证码不正确");
|
|
|
}
|
|
}
|
|
|
|
|
+ // 获取这个人的token
|
|
|
|
|
+ String token = StpUtil.createLoginSession(user.getId());
|
|
|
|
|
+ StpUtil.getSessionByLoginId(user.getId()).set(SaSession.USER, user);
|
|
|
|
|
|
|
|
- String token = "";
|
|
|
|
|
-// // 系统登录认证
|
|
|
|
|
-// JwtAuthenticatioToken token = SecurityUtils.login(request, user.getId(), "", authenticationManager);
|
|
|
|
|
-
|
|
|
|
|
- return HttpResult.ok(token);
|
|
|
|
|
|
|
+ return HttpResult.ok("登录成功", token);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -290,21 +238,9 @@ public class SysLoginController {
|
|
|
Random rand = new Random();
|
|
Random rand = new Random();
|
|
|
// randNumber 将被赋值为一个 MIN 和 MAX 范围内的随机数
|
|
// randNumber 将被赋值为一个 MIN 和 MAX 范围内的随机数
|
|
|
int randNumber = rand.nextInt(9999 - 1000 + 1) + 1000;
|
|
int randNumber = rand.nextInt(9999 - 1000 + 1) + 1000;
|
|
|
-
|
|
|
|
|
-// System.out.println(randNumber);
|
|
|
|
|
- // 保存到验证码到 session
|
|
|
|
|
-// request.getSession().setAttribute("PHONE_SESSION_KEY", String.valueOf(randNumber));
|
|
|
|
|
- // 保存验证码到数据库
|
|
|
|
|
// 保存验证码到redis
|
|
// 保存验证码到redis
|
|
|
- redisTemplate.opsForValue().set(PHONE_VERIFICATION_CODE_KEY + phone, String.valueOf(randNumber), PHONE_VERIFICATION_CODE_KEY_TIME, TimeUnit.MINUTES);
|
|
|
|
|
-
|
|
|
|
|
-// SysMsgLog sysMsgLog = new SysMsgLog();
|
|
|
|
|
-// Date date = new Date();
|
|
|
|
|
-// sysMsgLog.setId(String.valueOf(date.getTime()));
|
|
|
|
|
-// sysMsgLog.setPhone(phone);
|
|
|
|
|
-// sysMsgLog.setMsg(String.valueOf(randNumber));
|
|
|
|
|
-// sysMsgLog.setSendtime(date);
|
|
|
|
|
-// sysMsgLogService.insert(sysMsgLog);
|
|
|
|
|
|
|
+ redisTemplate.opsForValue().set(PHONE_VERIFICATION_CODE_KEY + phone, String.valueOf(randNumber), PHONE_VERIFICATION_CODE_KEY_TIME
|
|
|
|
|
+ , TimeUnit.MINUTES);
|
|
|
|
|
|
|
|
String result = null;
|
|
String result = null;
|
|
|
String url = "http://v.juhe.cn/sms/send";//请求接口地址
|
|
String url = "http://v.juhe.cn/sms/send";//请求接口地址
|
|
@@ -312,7 +248,8 @@ public class SysLoginController {
|
|
|
params.put("mobile", phone);//接收短信的手机号码
|
|
params.put("mobile", phone);//接收短信的手机号码
|
|
|
params.put("tpl_id", "71853");//短信模板ID,请参考个人中心短信模板设置
|
|
params.put("tpl_id", "71853");//短信模板ID,请参考个人中心短信模板设置
|
|
|
String textVal = "#code#=" + randNumber;
|
|
String textVal = "#code#=" + randNumber;
|
|
|
- params.put("tpl_value", textVal);//变量名和变量值对。如果你的变量名或者变量值中带有#&=中的任意一个特殊符号,请先分别进行urlencode编码后再传递,<a href="http://www.juhe.cn/news/index/id/50" target="_blank">详细说明></a>
|
|
|
|
|
|
|
+ params.put("tpl_value", textVal);//变量名和变量值对。如果你的变量名或者变量值中带有#&=中的任意一个特殊符号,请先分别进行urlencode编码后再传递,<a href="http://www.juhe.cn/news/index/id/50"
|
|
|
|
|
+ // target="_blank">详细说明></a>
|
|
|
params.put("key", "fbe7b165e9e13e52f3b1f2654eab9c0e");//应用APPKEY(应用详细页查询)
|
|
params.put("key", "fbe7b165e9e13e52f3b1f2654eab9c0e");//应用APPKEY(应用详细页查询)
|
|
|
params.put("dtype", "json");//返回数据的格式,xml或json,默认json
|
|
params.put("dtype", "json");//返回数据的格式,xml或json,默认json
|
|
|
|
|
|
|
@@ -410,8 +347,6 @@ public class SysLoginController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
@PostMapping(value = "/loginOut")
|
|
@PostMapping(value = "/loginOut")
|
|
|
@ApiOperation(value = "登出")
|
|
@ApiOperation(value = "登出")
|
|
|
public HttpResult loginOut() {
|
|
public HttpResult loginOut() {
|