推广管理零售公司

master
Caps 6 years ago
parent 6b5b93eb5b
commit db009a05ab

@ -165,7 +165,6 @@ public class CustomerService {
@Transactional(rollbackFor = Exception.class)
public void turnBack(TurnBackDTO turnBackDTOS) throws Exception {
if (turnBackDTOS.getWxData().getUnionId() == null || turnBackDTOS.getUserId() == null) {
log.info("unionId 是空不操作");
return;
}
//客户信息
@ -175,12 +174,10 @@ public class CustomerService {
//店铺信息
PrivilageCpUserStoreDO poiStore = privilageCpUserStoreDOMapper.selectOneCpUser(turnBackDTOS.getUserId());
if (poiStore == null) {
log.info("店铺信息是空的不操作");
return;
}
PoiStoreStaff poiStoreStaff = null;
if (!turnBackDTOS.getEaCode().equals("") && !turnBackDTOS.getEaCode().equals("0")) {
log.info("导购code如果是0或者是空,不处理导购信息");
//导购信息
QueryWrapper<PoiStoreStaff> wrapper = new QueryWrapper<>();
wrapper.eq("staff_code", turnBackDTOS.getEaCode()).eq("store_id", poiStore.getStoreId()).last("limit 1");
@ -194,7 +191,6 @@ public class CustomerService {
insertCustomer.setAvatarUrl(turnBackDTOS.getWxData().getAvatarUrl());
insertCustomer.setPhone(turnBackDTOS.getPhone());
if (null != opCustomer) {
log.info("客户信息存在就修改");
//更新一下
insertCustomer.setId(opCustomer.getId());
opCustomerDOMapper.updateById(insertCustomer);
@ -205,12 +201,10 @@ public class CustomerService {
storeCustomerRelation(opCustomer, poiStore.getStoreId());
}
} else {
log.info("客户信息不存在在就新增");
insertCustomer.setCreateBy(Constants.SYS_OPERATION);
//不存在
opCustomerDOMapper.insert(insertCustomer);
if (poiStoreStaff != null) {
log.info("导购的信息没有就不添加导购客户的关系");
//添加关系
sellerCustomerRelation(insertCustomer, turnBackDTOS.getEaCode(), poiStore.getStoreId(), poiStoreStaff.getUserId());
} else {
@ -220,7 +214,6 @@ public class CustomerService {
//处理客户vip的关系
if (turnBackDTOS.getVipData() != null) {
log.info("如果有vip数据就认为是vip客户然后绑定客户vip关系");
//有vip数据就不需要重新请求bsd的vip接口
vipCheck(turnBackDTOS);
}

@ -86,6 +86,7 @@ public class SynchronousController {
}
return DataImportUtil.succ(1);
}catch (Exception e){
log.error("好友回调报错",e);
return DataImportUtil.fail(e);
}
}

Loading…
Cancel
Save