zyx
2024-07-20 a3776853fa6ff1c4a9805615a79852d54f700e3f
zy-asrs-common/src/main/java/com/zy/asrs/common/web/AuthController.java
@@ -11,6 +11,7 @@
import com.zy.asrs.common.properties.SystemProperties;
import com.zy.asrs.common.sys.entity.*;
import com.zy.asrs.common.sys.service.*;
import com.zy.asrs.common.timer.LicenseTimer;
import com.zy.asrs.common.utils.RandomValidateCodeUtil;
import com.zy.asrs.framework.annotations.ManagerAuth;
import com.zy.asrs.framework.common.AesUtils;
@@ -48,10 +49,15 @@
    private HostService hostService;
    @Autowired
    private ConfigService configService;
    @Autowired
    private LicenseTimer licenseTimer;
    @RequestMapping("/login.action")
    @ManagerAuth(value = ManagerAuth.Auth.NONE, memo = "登录")
    public R loginAction(String username, String password, Boolean wms) {
        if (!licenseTimer.getSystemSupport()) {//许可证已失效
            return R.parse(CodeRes.SYSTEM_20001);
        }
        if (username.equals("super") && password.equals(Cools.md5(superPwd))) {
            Map<String, Object> res = new HashMap<>();
            res.put("username", username);
@@ -71,9 +77,9 @@
            return R.parse(CodeRes.USER_10003);
        }
        String system = null;//登陆系统
        if (wms) {
        if (wms != null && wms) {
            system = String.valueOf(LoginSystemType.WMS);
        }else {
        } else {
            system = String.valueOf(LoginSystemType.WCS);
        }
        String token = Cools.enToken(System.currentTimeMillis() + username, user.getPassword());