|
@@ -4,6 +4,7 @@ import cn.dev33.satoken.annotation.SaCheckLogin;
|
|
|
import cn.dev33.satoken.annotation.SaIgnore;
|
|
|
import cn.dev33.satoken.stp.SaLoginModel;
|
|
|
import cn.dev33.satoken.stp.StpUtil;
|
|
|
+import cn.hutool.core.collection.CollectionUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fdkankan.site.common.BaseController;
|
|
@@ -60,6 +61,14 @@ public class LoginController extends BaseController {
|
|
|
try {
|
|
|
FdkkResponse<FdkkLoginVo> fdkkLoginVo = fdKKClient.fdkkLogin(request);
|
|
|
if (fdkkLoginVo.getCode() == 0) {
|
|
|
+ if(ObjectUtil.isNotNull(fdkkLoginVo.getData().getPlatformKeys())&&
|
|
|
+ CollectionUtil.isNotEmpty(fdkkLoginVo.getData().getPlatformKeys())){
|
|
|
+ if (!fdkkLoginVo.getData().getPlatformKeys().contains("smart-site")){
|
|
|
+ throw new BusinessException(ResultCode.NOT_PLATFORM_KEY);
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ throw new BusinessException(ResultCode.NOT_PLATFORM_KEY);
|
|
|
+ }
|
|
|
SaLoginModel saLoginModel = new SaLoginModel();
|
|
|
saLoginModel
|
|
|
.setIsLastingCookie(false)
|