|
@@ -4,10 +4,7 @@ import com.alibaba.fastjson.JSONObject;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.management.platform.entity.*;
|
|
import com.management.platform.entity.*;
|
|
import com.management.platform.entity.vo.UserVO;
|
|
import com.management.platform.entity.vo.UserVO;
|
|
-import com.management.platform.mapper.CompanyMapper;
|
|
|
|
-import com.management.platform.mapper.SysConfigMapper;
|
|
|
|
-import com.management.platform.mapper.UserMapper;
|
|
|
|
-import com.management.platform.mapper.WxCorpInfoMapper;
|
|
|
|
|
|
+import com.management.platform.mapper.*;
|
|
import com.management.platform.service.FeishuInfoService;
|
|
import com.management.platform.service.FeishuInfoService;
|
|
import com.management.platform.service.UserService;
|
|
import com.management.platform.service.UserService;
|
|
import com.management.platform.service.WxCorpInfoService;
|
|
import com.management.platform.service.WxCorpInfoService;
|
|
@@ -66,6 +63,8 @@ public class AuthRedirectController {
|
|
WxCorpInfoService wxCorpInfoService;
|
|
WxCorpInfoService wxCorpInfoService;
|
|
@Resource
|
|
@Resource
|
|
FeishuInfoServiceImpl feishuInfoService;
|
|
FeishuInfoServiceImpl feishuInfoService;
|
|
|
|
+ @Resource
|
|
|
|
+ UserLoginInfoMapper userLoginInfoMapper;
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/corpWXAuth")
|
|
@RequestMapping("/corpWXAuth")
|
|
@@ -152,6 +151,18 @@ public class AuthRedirectController {
|
|
ModelAndView modelAndView = new ModelAndView(
|
|
ModelAndView modelAndView = new ModelAndView(
|
|
new RedirectView(redirecUrl), reqParam);
|
|
new RedirectView(redirecUrl), reqParam);
|
|
|
|
|
|
|
|
+ //存储该公司第一次登录所使用的设备
|
|
|
|
+ if (!reqParam.containsKey("errorMsg")){
|
|
|
|
+ Integer company = userLoginInfoMapper.selectCount(new QueryWrapper<UserLoginInfo>().eq("company_id",companyId));
|
|
|
|
+ if (company.equals(0)){
|
|
|
|
+ UserLoginInfo userLoginInfo = new UserLoginInfo();
|
|
|
|
+ userLoginInfo.setCompanyId(companyId);
|
|
|
|
+ userLoginInfo.setFirstLoginDevice(deviceType);
|
|
|
|
+ userLoginInfo.setWxUserId(wxUserId);
|
|
|
|
+ userLoginInfoMapper.insert(userLoginInfo);
|
|
|
|
+ System.err.println(userLoginInfo.toString());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return modelAndView;
|
|
return modelAndView;
|
|
}
|
|
}
|
|
|
|
|