|
|
@ -38,6 +38,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
|
|
import java.text.DateFormat;
|
|
|
|
import java.text.DateFormat;
|
|
|
|
|
|
|
|
import java.text.ParseException;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
|
@ -161,7 +162,6 @@ public class CustomerService {
|
|
|
|
* @param turnBackDTOS 数据实体
|
|
|
|
* @param turnBackDTOS 数据实体
|
|
|
|
* @return 是否成功
|
|
|
|
* @return 是否成功
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
|
|
|
public void turnBack(TurnBackDTO turnBackDTOS) throws Exception {
|
|
|
|
public void turnBack(TurnBackDTO turnBackDTOS) throws Exception {
|
|
|
|
if (turnBackDTOS.getWxData().getUnionId() == null || turnBackDTOS.getUserId() == null) {
|
|
|
|
if (turnBackDTOS.getWxData().getUnionId() == null || turnBackDTOS.getUserId() == null) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -189,6 +189,13 @@ public class CustomerService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//做插入使用 --如果没有客户信息就先创建客户信息如果有就判断是否有客户导购得关系,如果没有就添加有就不管
|
|
|
|
//做插入使用 --如果没有客户信息就先创建客户信息如果有就判断是否有客户导购得关系,如果没有就添加有就不管
|
|
|
|
|
|
|
|
vipDataUpdate(turnBackDTOS, shop, opCustomer, poiStoreStaff, poiStore);
|
|
|
|
|
|
|
|
//todo 发送websocket放开
|
|
|
|
|
|
|
|
// WebSocketController.sendInfo(new Gson().toJson(insertCustomer));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
|
|
|
public void vipDataUpdate(TurnBackDTO turnBackDTOS, PoiStore shop, OpCustomer opCustomer, PoiStoreStaff poiStoreStaff, PrivilageCpUserStoreDO poiStore) throws Exception {
|
|
|
|
OpCustomer insertCustomer = new OpCustomer();
|
|
|
|
OpCustomer insertCustomer = new OpCustomer();
|
|
|
|
insertCustomer.setWechatUniId(turnBackDTOS.getWxData().getUnionId());
|
|
|
|
insertCustomer.setWechatUniId(turnBackDTOS.getWxData().getUnionId());
|
|
|
|
insertCustomer.setName(turnBackDTOS.getName());
|
|
|
|
insertCustomer.setName(turnBackDTOS.getName());
|
|
|
@ -258,8 +265,6 @@ public class CustomerService {
|
|
|
|
//有vip数据就不需要重新请求bsd的vip接口
|
|
|
|
//有vip数据就不需要重新请求bsd的vip接口
|
|
|
|
vipCheck(turnBackDTOS);
|
|
|
|
vipCheck(turnBackDTOS);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//todo 发送websocket放开
|
|
|
|
|
|
|
|
// WebSocketController.sendInfo(new Gson().toJson(insertCustomer));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|