|  |  | 
 |  |  | import com.doumee.core.haikang.model.param.request.*; | 
 |  |  | import com.doumee.core.haikang.model.param.respose.*; | 
 |  |  | import com.doumee.core.haikang.service.HKService; | 
 |  |  | import com.doumee.core.model.LoginUserInfo; | 
 |  |  | import com.doumee.service.business.third.model.LoginUserInfo; | 
 |  |  | import com.doumee.core.utils.Constants; | 
 |  |  | import com.doumee.core.utils.DESUtil; | 
 |  |  | import com.doumee.core.utils.DateUtil; | 
 |  |  | import com.doumee.dao.business.*; | 
 |  |  | import com.doumee.dao.business.dao.CompanyMapper; | 
 |  |  | import com.doumee.dao.business.dao.MemberMapper; | 
 |  |  | import com.doumee.dao.business.model.*; | 
 |  |  | import com.doumee.dao.business.model.Member; | 
 |  |  | import com.doumee.service.business.impl.hksync.HkSyncBaseServiceImpl; | 
 |  |  | import lombok.extern.slf4j.Slf4j; | 
 |  |  | import org.apache.commons.lang3.StringUtils; | 
 |  |  | import org.apache.shiro.SecurityUtils; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | import org.springframework.data.redis.core.RedisTemplate; | 
 |  |  | import org.springframework.stereotype.Service; | 
 |  |  | 
 |  |  |      */ | 
 |  |  |     @Override | 
 |  |  |     @Transactional | 
 |  |  |     public   void syncOrgData(){ | 
 |  |  |     public   void syncOrgData(LoginUserInfo user){ | 
 |  |  |         if(Constants.DEALING_HK_ORG){ | 
 |  |  |             return ; | 
 |  |  |         } | 
 |  |  | 
 |  |  |             if( Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) != DataSyncConfig.origin.hk){ | 
 |  |  |                 throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对不起,当前不支持组织同步操作~"); | 
 |  |  |             } | 
 |  |  |             LoginUserInfo user =  (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); | 
 |  |  |             TimeRangeListRequest param = new TimeRangeListRequest(); | 
 |  |  |             //获取ERP组织信息(全量同步) | 
 |  |  |             boolean hasNext = true; | 
 |  |  | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     @Override | 
 |  |  |     public   void syncUserData(){ | 
 |  |  |     public   void syncUserData(LoginUserInfo user){ | 
 |  |  |         if(Constants.DEALING_HK_USER){ | 
 |  |  |             return   ; | 
 |  |  |         } | 
 |  |  | 
 |  |  |             if( Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) != DataSyncConfig.origin.hk){ | 
 |  |  |                 throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对不起,当前不支持组织同步操作~"); | 
 |  |  |             } | 
 |  |  |             LoginUserInfo user =  (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); | 
 |  |  |             List<Company> companies = companyMapper.selectList(new QueryWrapper<>()); | 
 |  |  |             if(companies == null || companies.size() == 0){ | 
 |  |  |                 throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对不起,请先同步企业组织信息~"); |