Commit fe2ede79 by 王祖波

同步建联时间

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