|
|
|
|
|
|
13
|
import com.xxl.job.controller.annotation.PermessionLimit;
|
13
|
import com.xxl.job.controller.annotation.PermessionLimit;
|
|
14
|
import com.xxl.job.controller.interceptor.PermissionInterceptor;
|
14
|
import com.xxl.job.controller.interceptor.PermissionInterceptor;
|
|
15
|
import com.xxl.job.core.model.ReturnT;
|
15
|
import com.xxl.job.core.model.ReturnT;
|
|
|
|
16
|
+import com.xxl.job.core.util.PropertiesUtil;
|
|
16
|
|
17
|
|
|
17
|
/**
|
18
|
/**
|
|
18
|
* index controller
|
19
|
* index controller
|
|
|
|
|
|
|
45
|
public ReturnT<String> loginDo(HttpServletRequest request, HttpServletResponse response, String userName, String password, String ifRemember){
|
46
|
public ReturnT<String> loginDo(HttpServletRequest request, HttpServletResponse response, String userName, String password, String ifRemember){
|
|
46
|
if (!PermissionInterceptor.ifLogin(request)) {
|
47
|
if (!PermissionInterceptor.ifLogin(request)) {
|
|
47
|
if (StringUtils.isNotBlank(userName) && StringUtils.isNotBlank(password)
|
48
|
if (StringUtils.isNotBlank(userName) && StringUtils.isNotBlank(password)
|
|
48
|
- && "admin".equals(userName) && "123456".equals(password)) {
|
|
|
|
|
|
49
|
+ && PropertiesUtil.getString("login.username").equals(userName)
|
|
|
|
50
|
+ && PropertiesUtil.getString("login.password").equals(password)) {
|
|
49
|
boolean ifRem = false;
|
51
|
boolean ifRem = false;
|
|
50
|
if (StringUtils.isNotBlank(ifRemember) && "on".equals(ifRemember)) {
|
52
|
if (StringUtils.isNotBlank(ifRemember) && "on".equals(ifRemember)) {
|
|
51
|
ifRem = true;
|
53
|
ifRem = true;
|