Commit 13910bf4 by 徐高华

企微托管账号

parent 8a329d27
...@@ -95,5 +95,5 @@ public interface WxEnterpriseMapper { ...@@ -95,5 +95,5 @@ public interface WxEnterpriseMapper {
*/ */
List<String> listWxEnterpriseByCallbackFlag(@Param("callbackFlag")Integer callbackFlag); List<String> listWxEnterpriseByCallbackFlag(@Param("callbackFlag")Integer callbackFlag);
String getWxEnterpriseIdByName(@Param("corpName")String corpName); List<String> getWxEnterpriseIdByName(@Param("corpName")String corpName);
} }
\ No newline at end of file
...@@ -104,6 +104,6 @@ public interface WxEnterpriseService { ...@@ -104,6 +104,6 @@ public interface WxEnterpriseService {
* @param corpName * @param corpName
* @return * @return
*/ */
String getWxEnterpriseIdByName(String corpName) ; List<String> getWxEnterpriseIdByName(String corpName) ;
} }
...@@ -318,7 +318,7 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService { ...@@ -318,7 +318,7 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
} }
@Override @Override
public String getWxEnterpriseIdByName(String corpName) { public List<String> getWxEnterpriseIdByName(String corpName) {
return this.mapper.getWxEnterpriseIdByName(corpName) ; return this.mapper.getWxEnterpriseIdByName(corpName) ;
} }
} }
...@@ -13,6 +13,7 @@ import com.gic.haoban.manage.service.service.OpenStaffService; ...@@ -13,6 +13,7 @@ import com.gic.haoban.manage.service.service.OpenStaffService;
import com.gic.haoban.manage.service.service.WxEnterpriseService; import com.gic.haoban.manage.service.service.WxEnterpriseService;
import com.gic.haoban.manage.service.util.OpenUtils; import com.gic.haoban.manage.service.util.OpenUtils;
import com.gic.redis.data.util.RedisUtil; import com.gic.redis.data.util.RedisUtil;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
...@@ -20,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -20,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* 企微托管账号 * 企微托管账号
...@@ -62,8 +64,8 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService { ...@@ -62,8 +64,8 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
return ServiceResponse.failure("9999","登录错误") ; return ServiceResponse.failure("9999","登录错误") ;
} }
String wxEnterpriseId = openStaff.getWxEnterpriseId() ; String wxEnterpriseId = openStaff.getWxEnterpriseId() ;
String backWxEnterpriseId = this.wxEnterpriseService.getWxEnterpriseIdByName(corpName) ; List<String> backWxEnterpriseIdList = this.wxEnterpriseService.getWxEnterpriseIdByName(corpName) ;
if(StringUtils.isBlank(backWxEnterpriseId) || !backWxEnterpriseId.equals(wxEnterpriseId)) { if(CollectionUtils.isNotEmpty(backWxEnterpriseIdList) || backWxEnterpriseIdList.size()>1 || !backWxEnterpriseIdList.get(0).equals(wxEnterpriseId)) {
OpenUtils.logout(uuid); OpenUtils.logout(uuid);
log.info("登录的企业不对={},{}",uuid,corpName); log.info("登录的企业不对={},{}",uuid,corpName);
return ServiceResponse.failure("9999","登录错误") ; return ServiceResponse.failure("9999","登录错误") ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment