Commit 4afd56e4 by songyinghui

feat: 销售线索

parent 7f113eb4
import com.alibaba.fastjson.JSONObject;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.haoban.manage.api.dto.content.PotentialCustomerDTO;
import com.gic.haoban.manage.api.dto.qdto.content.PotentialCustomerQDTO;
import com.gic.haoban.manage.api.service.content.MallOrderStatusChangeApiService; import com.gic.haoban.manage.api.service.content.MallOrderStatusChangeApiService;
import com.gic.haoban.manage.api.service.content.PotentialCustomerApiService;
import com.gic.haoban.manage.service.pojo.bo.content.message.InteractRecordMessageBO; import com.gic.haoban.manage.service.pojo.bo.content.message.InteractRecordMessageBO;
import com.gic.haoban.manage.service.service.content.PotentialCustomerService;
import com.gic.haoban.manage.service.service.content.message.InteractRecordMessageService; import com.gic.haoban.manage.service.service.content.message.InteractRecordMessageService;
import com.sun.org.apache.bcel.internal.generic.DADD; import com.sun.org.apache.bcel.internal.generic.DADD;
import org.junit.Test; import org.junit.Test;
...@@ -26,6 +33,8 @@ public class InteractRecordMessageServiceTest { ...@@ -26,6 +33,8 @@ public class InteractRecordMessageServiceTest {
InteractRecordMessageService interactRecordMessageService; InteractRecordMessageService interactRecordMessageService;
@Autowired @Autowired
MallOrderStatusChangeApiService mallOrderStatusChangeApiService; MallOrderStatusChangeApiService mallOrderStatusChangeApiService;
@Autowired
private PotentialCustomerApiService potentialCustomerApiService;
String eid = "ff8080815dacd3a2015dacd3ef5c0000"; String eid = "ff8080815dacd3a2015dacd3ef5c0000";
String wxEid = "ca66a01b79474c40b3e7c7f93daf1a3b"; String wxEid = "ca66a01b79474c40b3e7c7f93daf1a3b";
...@@ -60,4 +69,24 @@ public class InteractRecordMessageServiceTest { ...@@ -60,4 +69,24 @@ public class InteractRecordMessageServiceTest {
String params ="{\"orderNumber\":\"6230408781099580\",\"toStatus\":2,\"fromStatus\":1,\"orderId\":\"c08691af8297480db3d25ef5ef19e863\",\"enterpriseId\":\"ff8080815dacd3a2015dacd3ef5c0000\",\"mqTraceId\":\"244806167-1-1680932807.425-/gic-thirdparty/wxmall_payment_result_notice\",\"memberId\":\"ff8080818147efc8018148d1759903c8\"}"; String params ="{\"orderNumber\":\"6230408781099580\",\"toStatus\":2,\"fromStatus\":1,\"orderId\":\"c08691af8297480db3d25ef5ef19e863\",\"enterpriseId\":\"ff8080815dacd3a2015dacd3ef5c0000\",\"mqTraceId\":\"244806167-1-1680932807.425-/gic-thirdparty/wxmall_payment_result_notice\",\"memberId\":\"ff8080818147efc8018148d1759903c8\"}";
mallOrderStatusChangeApiService.mallOrderStatusChange(params); mallOrderStatusChangeApiService.mallOrderStatusChange(params);
} }
@Test
public void dealGoodsRecord(){
String json = "{\"businessUUId\":\"IcB5ZMEvmzir1uvjgc6ohJFMmexraBak\",\"durationTime\":21990,\"enterpriseId\":\"ff8080815dacd3a2015dacd3ef5c0000\",\"eventType\":2,\"goodsId\":\"ff808081890a1b4201890a54b479001d\",\"lastAccessTime\":1692580759467,\"memberId\":\"ff80808189fd5ba6018a01ea3e070673\",\"refUrl\":\"pages/authorize/authorize\",\"unionId\":\"orXl9tyHOI4qP1QxwVcA7A3sB7zg\"}";
InteractRecordMessageBO interactRecordMessageBO = JSONObject.parseObject(json, InteractRecordMessageBO.class);
interactRecordMessageBO.setChannelSource(3);
interactRecordMessageBO.setClerkId("415b123576674913b365005b81037551");
interactRecordMessageService.dealRecord(interactRecordMessageBO);
}
@Test
public void queryPotentialCustomer() {
PotentialCustomerQDTO potentialCustomerQDTO = new PotentialCustomerQDTO();
potentialCustomerQDTO.setEnterpriseId("ff8080815dacd3a2015dacd3ef5c0000");
potentialCustomerQDTO.setClerkId("415b123576674913b365005b81037551");
potentialCustomerQDTO.setWxEnterpriseId("ca66a01b79474c40b3e7c7f93daf1a3b");
ServiceResponse<Page<PotentialCustomerDTO>> pageServiceResponse = potentialCustomerApiService.queryPotentialCustomer(potentialCustomerQDTO);
System.out.println(JSONObject.toJSONString(pageServiceResponse));
}
} }
...@@ -108,6 +108,7 @@ public class PotentialCustomerController { ...@@ -108,6 +108,7 @@ public class PotentialCustomerController {
PotentialCustomerVO temp = new PotentialCustomerVO(); PotentialCustomerVO temp = new PotentialCustomerVO();
BeanUtils.copyProperties(item, temp); BeanUtils.copyProperties(item, temp);
temp.setPotentialCustomerId(item.getPotentialCustomerId()); temp.setPotentialCustomerId(item.getPotentialCustomerId());
if (ShareBizType.MATERIAL.getCode().equals(item.getBizType())) {
ContentMaterialBaseDTO contentMaterialBaseDTO = materialInfoMap.get(Long.parseLong(item.getBizId())); ContentMaterialBaseDTO contentMaterialBaseDTO = materialInfoMap.get(Long.parseLong(item.getBizId()));
if (contentMaterialBaseDTO != null) { if (contentMaterialBaseDTO != null) {
ContentMaterialInfoVO contentMaterialInfoVO = new ContentMaterialInfoVO(); ContentMaterialInfoVO contentMaterialInfoVO = new ContentMaterialInfoVO();
...@@ -126,6 +127,7 @@ public class PotentialCustomerController { ...@@ -126,6 +127,7 @@ public class PotentialCustomerController {
} }
Integer visitNum = memberVisitMap.get(item.getMemberId()); Integer visitNum = memberVisitMap.get(item.getMemberId());
temp.setVisitNum(Optional.ofNullable(visitNum).orElse(0)); temp.setVisitNum(Optional.ofNullable(visitNum).orElse(0));
}
return temp; return temp;
}) })
.collect(Collectors.toList()); .collect(Collectors.toList());
......
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