|
@@ -8,6 +8,7 @@ import com.ozs.common.core.controller.BaseController;
|
|
import com.ozs.common.core.domain.model.LoginUser;
|
|
import com.ozs.common.core.domain.model.LoginUser;
|
|
import com.ozs.common.core.redis.RedisCache;
|
|
import com.ozs.common.core.redis.RedisCache;
|
|
import com.ozs.common.utils.StringUtils;
|
|
import com.ozs.common.utils.StringUtils;
|
|
|
|
+import com.ozs.common.utils.stateSecrets.SymmetryTest;
|
|
import com.ozs.framework.web.service.TokenService;
|
|
import com.ozs.framework.web.service.TokenService;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -59,8 +60,9 @@ public class SysLoginController extends BaseController {
|
|
@PostMapping("/login")
|
|
@PostMapping("/login")
|
|
public AjaxResult login(@RequestBody LoginBody loginBody) {
|
|
public AjaxResult login(@RequestBody LoginBody loginBody) {
|
|
AjaxResult ajax = AjaxResult.success();
|
|
AjaxResult ajax = AjaxResult.success();
|
|
|
|
+ String decrypt = SymmetryTest.decrypt(loginBody.getPassword(), "1234567890abcdef");
|
|
// 生成令牌
|
|
// 生成令牌
|
|
- String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),
|
|
|
|
|
|
+ String token = loginService.login(loginBody.getUsername(), decrypt, loginBody.getCode(),
|
|
loginBody.getUuid());
|
|
loginBody.getUuid());
|
|
ajax.put(Constants.TOKEN, token);
|
|
ajax.put(Constants.TOKEN, token);
|
|
LoginUser loginedUser = tokenService.getLoginedUserByToken(token);
|
|
LoginUser loginedUser = tokenService.getLoginedUserByToken(token);
|