Commit 9aa9e977 by 徐高华

成员二维码

parent 35ea05b1
...@@ -35,7 +35,6 @@ import com.gic.haoban.manage.service.entity.TabHaobanSyncErrorLog; ...@@ -35,7 +35,6 @@ import com.gic.haoban.manage.service.entity.TabHaobanSyncErrorLog;
import com.gic.haoban.manage.service.service.*; import com.gic.haoban.manage.service.service.*;
import com.gic.haoban.manage.service.util.EmojiFilterUtil; import com.gic.haoban.manage.service.util.EmojiFilterUtil;
import com.gic.redis.data.util.RedisUtil; import com.gic.redis.data.util.RedisUtil;
import com.gic.thirdparty.api.service.QQCloudPicService;
import com.gic.thirdparty.cloudfile.CloudFileUtil; import com.gic.thirdparty.cloudfile.CloudFileUtil;
import com.gic.thirdparty.cloudfile.enums.CloudFileBusinessOptEnum; import com.gic.thirdparty.cloudfile.enums.CloudFileBusinessOptEnum;
import com.gic.thirdparty.cloudfile.enums.CloudFileTypeEnum; import com.gic.thirdparty.cloudfile.enums.CloudFileTypeEnum;
...@@ -83,8 +82,6 @@ public class StaffApiServiceImpl implements StaffApiService { ...@@ -83,8 +82,6 @@ public class StaffApiServiceImpl implements StaffApiService {
@Autowired @Autowired
private SyncErrorLogService syncErrorLogService; private SyncErrorLogService syncErrorLogService;
@Autowired @Autowired
private QQCloudPicService qqCloudPicService;
@Autowired
private StaffClerkRelationService staffClerkRelationService; private StaffClerkRelationService staffClerkRelationService;
@Autowired @Autowired
private SecretSettingService secretSettingService; private SecretSettingService secretSettingService;
...@@ -584,30 +581,9 @@ public class StaffApiServiceImpl implements StaffApiService { ...@@ -584,30 +581,9 @@ public class StaffApiServiceImpl implements StaffApiService {
logger.info("成员没有关联:{}", clerkCode); logger.info("成员没有关联:{}", clerkCode);
return null; return null;
} }
String key = "qrcode-" + relationDTO.getStaffId(); String staffId = relationDTO.getStaffId();
Object url = RedisUtil.getCache(key);
if (null != url) {
resp.setResult((String) url);
return resp;
}
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(relationDTO.getWxEnterpriseId());
SecretSettingDTO secretSetting = secretSettingService.getSecretSetting(qwDTO.getWxEnterpriseId(), SecretTypeEnum.CUSTOMIZED_APP.getVal());
if (null == secretSetting || secretSetting.getCheckFlag() == 0) {
logger.info("没有配置secret:{}", qwDTO.getWxEnterpriseId());
return null;
}
String staffId = relationDTO.getStaffId() ;
TabHaobanStaff staff = this.staffMapper.selectByPrimaryKey(staffId) ; TabHaobanStaff staff = this.staffMapper.selectByPrimaryKey(staffId) ;
String wxUserId = staff.getWxUserId() ; resp.setResult(staff.getQrCode());
if (qwDTO.needOpenUserIdDk()) {
wxUserId = staff.getWxOpenUseId() ;
}
UserDTO user = qywxUserApiService.getSelfWorkWxUser(qwDTO.getDkCorpid(), secretSetting.getSecretVal(), wxUserId);
if (user != null) {
RedisUtil.setCache(key, user.getQr_code(), 2L, TimeUnit.DAYS);
resp.setResult(user.getQr_code());
return resp;
}
return resp; return resp;
} }
......
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