Commit a88f5e43 authored by lanbaoming's avatar lanbaoming

2024-05-27-5

parent 101a1bd7
......@@ -44,28 +44,32 @@ public class CalculateOrderYeJiTypeListener {
public void CalculateOrderYeJiTypePushEvent(
CalculateOrderYeJiTypeEvent event) {
zTest m=new zTest();
String sMsg="计算业绩类型"+event.getCustomerId();
zTest m = new zTest();
String sMsg = "计算业绩类型" + event.getCustomerId();
OrderDO orderDO = orderService.getById(event.getOrderId());
if (orderDO == null) {
throw exception(ORDER_NOT_EXISTS);
}
//获取订单中计算号的业绩归属客户ID
event.setCustomerId(orderDO.getCustomerId());
CustomerDO customerDO = customerService.getById(event.getCustomerId());
if (customerDO == null) {
throw exception(CUSTOMER_NOT_EXISTS);
//throw exception(CUSTOMER_NOT_EXISTS);
sMsg += ",客户不存在先不计算业绩类型";
m.setTestname(sMsg);
m.setCreatedate(new Date());
zTestService.save(m);
}
int isNew = 0;
if (customerDO.getIsNew() == true) {
isNew = 1;//新客户业绩类型
sMsg+=",新业绩";
}
else {
sMsg += ",新业绩";
} else {
isNew = 0;//老客户业绩类型
sMsg+=",老业绩";
sMsg += ",老业绩";
}
orderService.UpdateOrderYeJiType(event.getOrderId(), isNew);
......
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