|
@@ -19,7 +19,9 @@ import com.fjhx.file.entity.ObsFile;
|
|
|
import com.fjhx.file.service.FileInfoService;
|
|
|
import com.fjhx.file.utils.ObsFileUtil;
|
|
|
import com.ruoyi.common.exception.ServiceException;
|
|
|
+import com.ruoyi.common.utils.SecurityUtils;
|
|
|
import com.ruoyi.common.utils.wrapper.IWrapper;
|
|
|
+import com.ruoyi.system.utils.UserUtil;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -47,9 +49,8 @@ public class CustomerFollowRecordsServiceImpl extends ServiceImpl<CustomerFollow
|
|
|
@Override
|
|
|
public Page<CustomerFollowRecordsVo> getPage(CustomerFollowRecordsSelectDto dto) {
|
|
|
IWrapper<CustomerFollowRecords> wrapper = getWrapper();
|
|
|
- wrapper.eq("cfr", CustomerFollowRecords::getCustomerId, dto.getCustomerId());
|
|
|
- wrapper.orderByDesc("cfr", CustomerFollowRecords::getDate);
|
|
|
- Page<CustomerFollowRecordsVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
|
|
|
+ wrapper.orderByDesc("t1", CustomerFollowRecords::getDate);
|
|
|
+ Page<CustomerFollowRecordsVo> page = this.baseMapper.getPage(dto.getPage(), wrapper, dto.getCustomerId(), SecurityUtils.getTenantId());
|
|
|
List<CustomerFollowRecordsVo> records = page.getRecords();
|
|
|
|
|
|
List<Long> ids = records.stream().map(CustomerFollowRecordsVo::getId).filter(ObjectUtil::isNotNull).distinct().collect(Collectors.toList());
|
|
@@ -61,6 +62,10 @@ public class CustomerFollowRecordsServiceImpl extends ServiceImpl<CustomerFollow
|
|
|
record.setFileList(obsFiles);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ UserUtil.assignmentNickName(records, CustomerFollowRecordsVo::getCreateUser, CustomerFollowRecordsVo::setFollowUpUserName);
|
|
|
+
|
|
|
|
|
|
customerService.attributeAssign(records, CustomerFollowRecordsVo::getCustomerId, (item, customer) -> {
|
|
|
item.setCustomerName(customer.getName());
|