删除客户导购关系

dev_0531
yechenhao 5 years ago
parent 970dbe0b57
commit bef2989d07

@ -228,6 +228,7 @@ public class CustomerService {
* @date 2020/05/24 13:46 * @date 2020/05/24 13:46
*/ */
private void handleAddCustomer(TurnBackDTO turnBackDTOS) throws Exception { private void handleAddCustomer(TurnBackDTO turnBackDTOS) throws Exception {
log.error("没有jointime"+new Gson().toJson(turnBackDTOS));
OpCustomer opCustomer = null; OpCustomer opCustomer = null;
if (turnBackDTOS.getWxData().getUnionId() == null && turnBackDTOS.getWxData().getUserId() != null) { if (turnBackDTOS.getWxData().getUnionId() == null && turnBackDTOS.getWxData().getUserId() != null) {
//此时说明是企业微信扫码添加 //此时说明是企业微信扫码添加
@ -285,7 +286,6 @@ public class CustomerService {
if (StringUtils.isNotBlank(turnBackDTOS.getJoinTime())) { if (StringUtils.isNotBlank(turnBackDTOS.getJoinTime())) {
insertCustomer.setCreateTime(sdf.parse(turnBackDTOS.getJoinTime())); insertCustomer.setCreateTime(sdf.parse(turnBackDTOS.getJoinTime()));
} else { } else {
log.error("没有jointime"+new Gson().toJson(turnBackDTOS));
return; return;
} }
if (null != opCustomer) { if (null != opCustomer) {
@ -478,17 +478,6 @@ public class CustomerService {
insertRelation.setType(2); insertRelation.setType(2);
} }
opSellerCustomerRelationDOMapper.insert(insertRelation); opSellerCustomerRelationDOMapper.insert(insertRelation);
} else {
//可能是同步过来的数据,此时已经存在的话,用有导购的代替
opSellerCustomerRelation.setCreateTime(joinTime);
opSellerCustomerRelation.setUpdateTime(new Date());
opSellerCustomerRelation.setCustomerId(opCustomer.getId());
opSellerCustomerRelation.setStoreId(shopId);
opSellerCustomerRelation.setUserId(sellerId);
opSellerCustomerRelation.setCreateBy(Constants.SYS_OPERATION);
opSellerCustomerRelation.setUpdateBy(Constants.SYS_OPERATION);
opSellerCustomerRelation.setCpUserId(opCustomer.getCpUserId());
opSellerCustomerRelationDOMapper.updateById(opSellerCustomerRelation);
} }
} }

Loading…
Cancel
Save