Commit 32622de4 by 王祖波

Merge branch 'feature-recommend3' into 'developer'

发送商品

See merge request !2891
parents ab17e77c bc091626
......@@ -30,6 +30,11 @@ public class ContactFollowBatchQDTO implements Serializable {
*/
private String followRemark;
/**
* 关联商品信息
*/
private List<String> goodsInfoList;
public String getEnterpriseId() {
return enterpriseId;
}
......@@ -70,6 +75,14 @@ public class ContactFollowBatchQDTO implements Serializable {
this.followRemark = followRemark;
}
public List<String> getGoodsInfoList() {
return goodsInfoList;
}
public void setGoodsInfoList(List<String> goodsInfoList) {
this.goodsInfoList = goodsInfoList;
}
public static class MemberFollow implements Serializable{
/**
......
......@@ -77,6 +77,7 @@ public class ContactFollowApiServiceImpl implements ContactFollowApiService {
followQDTO.setClerkCode(clerkDTO.getClerkCode());
followQDTO.setFollowRemark(clerkDTO.getClerkName() + qdto.getFollowRemark());
followQDTO.setFollowTime(x.getFollowTime());
followQDTO.setGoodsInfoList(qdto.getGoodsInfoList());
followQDTO.setEnterpriseId(clerkDTO.getEnterpriseId());
return followQDTO;
}).collect(Collectors.toList());
......
......@@ -266,12 +266,14 @@ public class QwSendMsgServiceImpl implements QwSendMsgService {
String followRemark = null;
Integer bizType = finishQwSendBO.getBizType();
List<ClerkShareGoodsLogDTO> shareGoodsList = finishQwSendBO.getShareGoodsList();
List<String> goodsInfoList = null;
if (Objects.equals(bizType, 1)) {
followType = ContactFollowTypeEnum.MATERIAL.getCode();
followRemark = "向客户发送了营销素材";
} else if (Objects.equals(bizType, 2)) {
followType = ContactFollowTypeEnum.PRODUCT.getCode();
followRemark = "向客户发送了" + shareGoodsList.size() + "款商品";
goodsInfoList = shareGoodsList.stream().map(ClerkShareGoodsLogDTO::getBizId).collect(Collectors.toList());
} else {
return;
}
......@@ -281,6 +283,7 @@ public class QwSendMsgServiceImpl implements QwSendMsgService {
batchQDTO.setClerkId(clerkId);
batchQDTO.setFollowType(followType);
batchQDTO.setFollowRemark(followRemark);
batchQDTO.setGoodsInfoList(goodsInfoList);
MqUtils.sendMessageToMQ("saveBatchFollowForMQ", JSON.toJSONString(batchQDTO));
if (Objects.equals(bizType, 2)) {
saveShareMaterialLog(enterpriseId, shareGoodsList, memberList);
......
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