Commit fe2ede79 by 王祖波

同步建联时间

parent bd4d39c0
......@@ -5,6 +5,7 @@ import com.gic.haoban.manage.api.enums.contact.ContactBizTypeEnum;
import com.gic.haoban.manage.api.enums.contact.ContactFollowTypeEnum;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
public class ContactLogQDTO implements Serializable {
......@@ -47,6 +48,16 @@ public class ContactLogQDTO implements Serializable {
private Integer contactAutoType;
/**
* 是否同步建联
*/
private Integer syncContactType;
/**
* 同步建联时间
*/
private Date syncContactTime;
/**
* 业务类型 1潜客(0001)2机会人群(0010)
* @see com.gic.haoban.manage.api.enums.contact.ContactBizTypeEnum
*/
......@@ -138,6 +149,22 @@ public class ContactLogQDTO implements Serializable {
this.contactAutoType = contactAutoType;
}
public Integer getSyncContactType() {
return syncContactType;
}
public void setSyncContactType(Integer syncContactType) {
this.syncContactType = syncContactType;
}
public Date getSyncContactTime() {
return syncContactTime;
}
public void setSyncContactTime(Date syncContactTime) {
this.syncContactTime = syncContactTime;
}
public Integer getBizType() {
return bizType;
}
......
......@@ -175,7 +175,7 @@ public class ContactLogServiceImpl implements ContactLogService {
Integer bizType = qdto.getBizType();
Integer sourceType = qdto.getSourceType();
Long sourceLogId = qdto.getSourceLogId();
DateTime date = DateUtil.date();
Date date = qdto.getSyncContactTime() != null ? qdto.getSyncContactTime() : DateUtil.date();
MemberStoreClerkDTO memberStoreClerk = memberService.getMemberStoreClerk(memberId);
if (memberStoreClerk == null) {
logger.info("无专属导购无法建联");
......@@ -246,7 +246,7 @@ public class ContactLogServiceImpl implements ContactLogService {
// 成为潜客时间 无用暂不写
contactLog.setPotentialTime(null);
contactLog.setSourceType(sourceType);
contactLog.setSourceType(sourceType == null ? bizType : sourceType);
contactLog.setBizType(bizType);
contactLog.setEnterpriseId(enterpriseId);
contactLog.setSourceLogId(sourceLogId);
......@@ -264,7 +264,9 @@ public class ContactLogServiceImpl implements ContactLogService {
contactFollowService.saveFollow(followQDTO);
}
// 同步建联
syncContactSend(contactLog);
if (!Objects.equals(qdto.getSyncContactType(), Constant.FLAG_TRUE)) {
syncContactSend(contactLog);
}
// 冗余机会人群数据
if (Objects.equals(bizType, ContactBizTypeEnum.OPPORTUNITY_CUSTOMER.getType())) {
modifyBizData(memberId, clerkId, enterpriseId, logId);
......@@ -296,6 +298,8 @@ public class ContactLogServiceImpl implements ContactLogService {
private void syncContactSend(TabContactLog contactLog) {
// 同步建联
ContactLogQDTO contactLogQDTO = EntityUtil.changeEntityNew(ContactLogQDTO.class, contactLog);
contactLogQDTO.setSyncContactType(Constant.FLAG_TRUE);
contactLogQDTO.setSyncContactTime(contactLog.getContactTime());
contactLogQDTO.setContactAutoType(null);
contactLogQDTO.setSourceLogId(contactLog.getLogId());
String message = JSON.toJSONString(contactLogQDTO);
......@@ -366,6 +370,7 @@ public class ContactLogServiceImpl implements ContactLogService {
continue;
}
ContactLogQDTO syncQdto = EntityUtil.changeEntityNew(ContactLogQDTO.class, qdto);
syncQdto.setSyncContactType(Constant.FLAG_TRUE);
syncQdto.setBizType(syncBizType);
syncQdto.setSourceType(sourceType);
try {
......
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