|
|
@ -33,6 +33,7 @@ import com.kiisoo.ic.synchronous.entity.VipDataDTO;
|
|
|
|
import com.kiisoo.ic.system.enums.RoleEnum;
|
|
|
|
import com.kiisoo.ic.system.enums.RoleEnum;
|
|
|
|
import com.kiisoo.ic.webappmy.vo.StafferInfoVO;
|
|
|
|
import com.kiisoo.ic.webappmy.vo.StafferInfoVO;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
@ -439,10 +440,28 @@ public class CustomerService {
|
|
|
|
Long shopId = stafferInfoVOS.get(0).getStoreId();
|
|
|
|
Long shopId = stafferInfoVOS.get(0).getStoreId();
|
|
|
|
if (roleCode.equals(RoleEnum.ROLE_CODE_DZ.getRoleCode())) {
|
|
|
|
if (roleCode.equals(RoleEnum.ROLE_CODE_DZ.getRoleCode())) {
|
|
|
|
List<FriendDTO> thisList = opSellerCustomerRelationDOMapper.selectFriendListByShopId(shopId, sellerId, search, thisDate, thisDate, type);
|
|
|
|
List<FriendDTO> thisList = opSellerCustomerRelationDOMapper.selectFriendListByShopId(shopId, sellerId, search, thisDate, thisDate, type);
|
|
|
|
results.put("this", thisList);
|
|
|
|
thisList.forEach(friendDTO -> {
|
|
|
|
|
|
|
|
String inviteSellerName = opSellerCustomerRelationDOMapper.selectStaffName(friendDTO.getInviteSellerId());
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(inviteSellerName)) {
|
|
|
|
|
|
|
|
friendDTO.setInviteSellerName(inviteSellerName);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
List<FriendDTO> lastList = opSellerCustomerRelationDOMapper.selectFriendListByShopId(shopId, sellerId, search, lastDate, lastDate, type);
|
|
|
|
List<FriendDTO> lastList = opSellerCustomerRelationDOMapper.selectFriendListByShopId(shopId, sellerId, search, lastDate, lastDate, type);
|
|
|
|
results.put("last", lastList);
|
|
|
|
lastList.forEach(friendDTO -> {
|
|
|
|
|
|
|
|
String inviteSellerName = opSellerCustomerRelationDOMapper.selectStaffName(friendDTO.getInviteSellerId());
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(inviteSellerName)) {
|
|
|
|
|
|
|
|
friendDTO.setInviteSellerName(inviteSellerName);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
List<FriendDTO> earlyList = opSellerCustomerRelationDOMapper.selectFriendListByShopId(shopId, sellerId, search, null, earlyDate, type);
|
|
|
|
List<FriendDTO> earlyList = opSellerCustomerRelationDOMapper.selectFriendListByShopId(shopId, sellerId, search, null, earlyDate, type);
|
|
|
|
|
|
|
|
earlyList.forEach(friendDTO -> {
|
|
|
|
|
|
|
|
String inviteSellerName = opSellerCustomerRelationDOMapper.selectStaffName(friendDTO.getInviteSellerId());
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(inviteSellerName)) {
|
|
|
|
|
|
|
|
friendDTO.setInviteSellerName(inviteSellerName);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
results.put("this", thisList);
|
|
|
|
|
|
|
|
results.put("last", lastList);
|
|
|
|
results.put("early", earlyList);
|
|
|
|
results.put("early", earlyList);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
List<FriendDTO> thisList = opSellerCustomerRelationDOMapper.selectFriendListBySeller(userId, search, thisDate, thisDate, type);
|
|
|
|
List<FriendDTO> thisList = opSellerCustomerRelationDOMapper.selectFriendListBySeller(userId, search, thisDate, thisDate, type);
|
|
|
|