添加冗余字段

dev
yechenhao 5 years ago
parent 5e192fa3da
commit bc502c673c

@ -295,6 +295,10 @@ public class CustomerService {
insertCustomer.setExternalUserid(turnBackDTOS.getWxData().getUserId()); insertCustomer.setExternalUserid(turnBackDTOS.getWxData().getUserId());
insertCustomer.setCpUserId(turnBackDTOS.getUserId()); insertCustomer.setCpUserId(turnBackDTOS.getUserId());
insertCustomer.setPhone(turnBackDTOS.getPhone()); insertCustomer.setPhone(turnBackDTOS.getPhone());
if (turnBackDTOS.getVipData() != null && !turnBackDTOS.getVipData().getPhone().equals("")) {
//有vip数据就不需要重新请求bsd的vip接口
insertCustomer.setPhone(turnBackDTOS.getVipData().getPhone());
}
if (shop != null && StringUtils.isNotBlank(shop.getName())) { if (shop != null && StringUtils.isNotBlank(shop.getName())) {
insertCustomer.setShopName(shop.getName()); insertCustomer.setShopName(shop.getName());
} }
@ -427,8 +431,12 @@ public class CustomerService {
insertRelation.setCreateTime(joinTime); insertRelation.setCreateTime(joinTime);
insertRelation.setUpdateTime(new Date()); insertRelation.setUpdateTime(new Date());
insertRelation.setCustomerId(opCustomer.getId()); insertRelation.setCustomerId(opCustomer.getId());
PoiStore poiStore = poiStoreDOMapper.selectById(shopId);
insertRelation.setStoreId(shopId); insertRelation.setStoreId(shopId);
insertRelation.setStoreCode(poiStore.getCode());
PoiStoreStaff staff = poiStoreStaffDOMapper.selectById(sellerId);
insertRelation.setUserId(sellerId); insertRelation.setUserId(sellerId);
insertRelation.setStaffCode(staff.getStaffCode());
insertRelation.setCreateBy(Constants.SYS_OPERATION); insertRelation.setCreateBy(Constants.SYS_OPERATION);
insertRelation.setUpdateBy(Constants.SYS_OPERATION); insertRelation.setUpdateBy(Constants.SYS_OPERATION);
@ -446,14 +454,14 @@ public class CustomerService {
opSellerCustomerRelationDOMapper.insert(insertRelation); opSellerCustomerRelationDOMapper.insert(insertRelation);
} else { } else {
//可能是同步过来的数据,此时已经存在的话,用有导购的代替 //可能是同步过来的数据,此时已经存在的话,用有导购的代替
opSellerCustomerRelation.setCreateTime(joinTime); // opSellerCustomerRelation.setCreateTime(joinTime);
opSellerCustomerRelation.setUpdateTime(new Date()); // opSellerCustomerRelation.setUpdateTime(new Date());
opSellerCustomerRelation.setCustomerId(opCustomer.getId()); // opSellerCustomerRelation.setCustomerId(opCustomer.getId());
opSellerCustomerRelation.setStoreId(shopId); // opSellerCustomerRelation.setStoreId(shopId);
opSellerCustomerRelation.setUserId(sellerId); // opSellerCustomerRelation.setUserId(sellerId);
opSellerCustomerRelation.setCreateBy(Constants.SYS_OPERATION); // opSellerCustomerRelation.setCreateBy(Constants.SYS_OPERATION);
opSellerCustomerRelation.setUpdateBy(Constants.SYS_OPERATION); // opSellerCustomerRelation.setUpdateBy(Constants.SYS_OPERATION);
opSellerCustomerRelationDOMapper.updateById(opSellerCustomerRelation); // opSellerCustomerRelationDOMapper.updateById(opSellerCustomerRelation);
} }
} }
@ -499,6 +507,9 @@ public class CustomerService {
} }
insertRelation.setType(3); insertRelation.setType(3);
}else{
PoiStore poiStore = poiStoreDOMapper.selectById(shopId);
insertRelation.setStoreCode(poiStore.getCode());
} }
opSellerCustomerRelationDOMapper.insert(insertRelation); opSellerCustomerRelationDOMapper.insert(insertRelation);
} }

@ -26,16 +26,26 @@ public class OpSellerCustomerRelation {
*/ */
private Long userId; private Long userId;
/**
* code
*/
private String staffCode;
/** /**
* ID * ID
*/ */
private Long customerId; private Long customerId;
/** /**
* ID * code
*/ */
private Long storeId; private Long storeId;
/**
* ID
*/
private String storeCode;
/** /**
* *
*/ */

Loading…
Cancel
Save