|
|
|
@ -31,7 +31,9 @@ import com.kiisoo.ic.store.mapper.PoiStoreStaffDOMapper;
|
|
|
|
|
import com.kiisoo.ic.store.mapper.PrivilageCpUserStoreDOMapper;
|
|
|
|
|
import com.kiisoo.ic.store.service.PoiStoreService;
|
|
|
|
|
import com.kiisoo.ic.synchronous.entity.TurnBackDTO;
|
|
|
|
|
import com.kiisoo.ic.system.entity.PrivilageUserDO;
|
|
|
|
|
import com.kiisoo.ic.system.enums.RoleEnum;
|
|
|
|
|
import com.kiisoo.ic.system.mapper.PrivilageUserDOMapper;
|
|
|
|
|
import com.kiisoo.ic.webappmy.vo.StafferInfoVO;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
|
@ -90,6 +92,10 @@ public class CustomerService {
|
|
|
|
|
@Autowired
|
|
|
|
|
private CustomerViewService customerViewService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
public PrivilageUserDOMapper privilageUserDOMapper;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* token
|
|
|
|
|
*/
|
|
|
|
@ -326,9 +332,10 @@ public class CustomerService {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 处理客户和导购的关系
|
|
|
|
|
*
|
|
|
|
|
* @param opCustomer 客户的数据信息
|
|
|
|
|
* @param staffCode 导购Code
|
|
|
|
|
* @param opCustomer
|
|
|
|
|
* @param joinTime
|
|
|
|
|
* @param shopId
|
|
|
|
|
* @param sellerId
|
|
|
|
|
*/
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public void sellerCustomerRelation(OpCustomer opCustomer, Date joinTime, long shopId, long sellerId) {
|
|
|
|
@ -543,6 +550,22 @@ public class CustomerService {
|
|
|
|
|
}else{
|
|
|
|
|
thisList = opSellerCustomerRelationDOMapper.selectFriendListByShopIdAndDate(shopId, sellerId, search, startDate, endDate, type);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(CollectionUtils.isNotEmpty(thisList)){
|
|
|
|
|
for (int i = 0; i < thisList.size(); i++) {
|
|
|
|
|
// 设置导购名称
|
|
|
|
|
if(!thisList.get(i).getInviteSellerId().equals(0L)){
|
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
|
|
map.put("id", thisList.get(i).getInviteSellerId());
|
|
|
|
|
String userName = poiStoreStaffDOMapper.selectUserNameById(thisList.get(i).getInviteSellerId());
|
|
|
|
|
if(StringUtils.isNotEmpty(userName)){
|
|
|
|
|
thisList.get(i).setInviteSellerName(userName);
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
thisList.get(i).setInviteSellerName("");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
// 0、新增好友 1、累计好友
|
|
|
|
|
if(flag == 0){
|
|
|
|
@ -551,8 +574,8 @@ public class CustomerService {
|
|
|
|
|
thisList = opSellerCustomerRelationDOMapper.selectFriendListBySellerAndDate(userId, search, startDate, endDate, type);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
results.put("this", new PageInfo<>(thisList));
|
|
|
|
|
|
|
|
|
|
results.put("this", new PageInfo<>(thisList));
|
|
|
|
|
return results;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|