|
|
@ -22,10 +22,12 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
import com.epmet.commons.tools.redis.common.CustomerOrgRedis; |
|
|
|
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
|
|
import com.epmet.commons.tools.redis.common.bean.GridInfoCache; |
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
import com.epmet.commons.tools.utils.EpmetRequestHolder; |
|
|
@ -37,6 +39,7 @@ import com.epmet.dto.form.TagCustomerFormDTO; |
|
|
|
import com.epmet.dto.form.TagCustomerPageFormDTO; |
|
|
|
import com.epmet.dto.form.UpdateTagFormDTO; |
|
|
|
import com.epmet.dto.result.AgencyResultDTO; |
|
|
|
import com.epmet.dto.result.TagInfoResultDTO; |
|
|
|
import com.epmet.dto.result.UpdateTagUseCountsResultDTO; |
|
|
|
import com.epmet.entity.TagCustomerEntity; |
|
|
|
import com.epmet.entity.TagScopeEntity; |
|
|
@ -54,6 +57,7 @@ import org.springframework.scheduling.annotation.Async; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.List; |
|
|
@ -266,4 +270,25 @@ public class TagCustomerServiceImpl extends BaseServiceImpl<TagCustomerDao, TagC |
|
|
|
List<TagCustomerDTO> list=baseDao.getAgencyTag(gridInfoCache.getPid(),gridInfoCache.getCustomerId()); |
|
|
|
return list; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 工作端获取登录用户所属组织下的标签列表 |
|
|
|
* |
|
|
|
* @param staffId |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<TagInfoResultDTO> queryAgencyTag(String customerId,String staffId) { |
|
|
|
CustomerStaffInfoCacheResult staffInfoCacheResult= CustomerStaffRedis.getStaffInfo(customerId,staffId); |
|
|
|
List<TagCustomerDTO> list=baseDao.getAgencyTag(staffInfoCacheResult.getAgencyId(),customerId); |
|
|
|
List<TagInfoResultDTO> resultDTOList=new ArrayList<>(); |
|
|
|
list.forEach(tagCustomerDTO->{ |
|
|
|
TagInfoResultDTO resultDTO=new TagInfoResultDTO(); |
|
|
|
resultDTO.setTagId(tagCustomerDTO.getId()); |
|
|
|
resultDTO.setTagColor(tagCustomerDTO.getTagColor()); |
|
|
|
resultDTO.setTagName(tagCustomerDTO.getTagName()); |
|
|
|
resultDTOList.add(resultDTO); |
|
|
|
}); |
|
|
|
return resultDTOList; |
|
|
|
} |
|
|
|
} |
|
|
|