Commit af01e43f by fudahua

会员标签同步-关闭日志

parent 6dc183f5
......@@ -5,6 +5,8 @@ import com.alibaba.fastjson.JSONObject;
import com.gic.commons.util.ToolUtil;
import com.gic.haoban.app.customer.dto.SearchComputeDTO;
import com.gic.haoban.app.customer.dto.SearchDataDTO;
import com.gic.haoban.app.customer.enums.QywxTaskStatusEnum;
import com.gic.haoban.app.customer.service.api.service.QywxTagSyncApiService;
import com.gic.haoban.base.api.common.ServiceResponse;
import com.gic.haoban.common.utils.EntityUtil;
import com.gic.haoban.manage.api.dto.*;
......@@ -81,6 +83,9 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
@Autowired
private MemberTagService memberTagService;
@Autowired
private QywxTagSyncApiService qywxTagSyncApiService;
@Override
public void pullQywxTag(String wxEnterpriseId) {
WxEnterpriseDTO wxEnterpriseDTO = wxEnterpriseService.selectById(wxEnterpriseId);
......@@ -336,7 +341,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
//删除同步 关闭同步
qywxTagService.closeSync(wxEnterpriseDto.getWxEnterpriseId(), relation.getMemberTagId());
qywxTagService.delQywxTag(callbackDTO.getTagId(), wxEnterpriseDto.getWxEnterpriseId());
saveCloseTask(qywxGroupKey.getQywxGroupName(), "-1", relation.getWxEnterpriseId(), relation.getEnterpriseId());
//标签项
} else if (relationTypeEnum.getTagType() == QywxTagRelationTypeEnum.TAG_ITEM.getTagType()) {
TabQywxTagRelation qywxTagRelation = qywxTagService.getQywxTagRelationByQywxKey(wxEnterpriseDto.getWxEnterpriseId(), callbackDTO.getTagId(), QywxTagRelationTypeEnum.TAG_ITEM.getType());
......@@ -348,12 +353,20 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
logger.info("删除标签 关闭同步:{}", qywxTagRelation.getMemberTagId());
//删除同步 关闭同步
this.closeSync(wxEnterpriseDto.getWxEnterpriseId(), qywxTagRelation.getMemberTagId());
TabQywxTag tabQywxTag = qywxTagService.getQywxTagByQywxTagId(qywxTagRelation.getWxEnterpriseId(), qywxTagRelation.getQywxTagId());
saveCloseTask(tabQywxTag.getQywxGroupName(), "-1", qywxTagRelation.getWxEnterpriseId(), qywxTagRelation.getEnterpriseId());
// qywxTagService.closeSync(wxEnterpriseDto.getWxEnterpriseId(), qywxTagRelation.getMemberTagId());
// qywxTagService.delQywxTagItemById(wxEnterpriseDto.getWxEnterpriseId(), qywxTagRelation.getQywxTagItemId());
}
}
private void saveCloseTask(String tagName, String staffId, String wxEnterpriseId, String enterpriseId) {
String content = tagName + "-关闭标签同步成功";
qywxTagSyncApiService.saveCloseTask(staffId, wxEnterpriseId, enterpriseId, content, QywxTaskStatusEnum.ALL_SUCCESS.getType());
}
/**
* 重新同步
*
......
......@@ -80,6 +80,10 @@
<dubbo:reference id="customerApiService"
interface="com.gic.haoban.app.customer.service.api.service.CustomerApiService" timeout="10000"
retries="0" check="false"/>
<dubbo:reference id="qywxTagSyncApiService"
interface="com.gic.haoban.app.customer.service.api.service.QywxTagSyncApiService" timeout="10000"
retries="0" check="false"/>
<dubbo:reference id="enterpriseService" interface="com.gic.enterprise.api.service.EnterpriseService" timeout="10000" retries="0" check="false" />
<dubbo:reference interface="com.gic.haoban.communicate.api.service.SyncHaobanToGicServiceApi" id="syncHaobanToGicServiceApi"/>
......
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