|
@@ -1,9 +1,12 @@
|
|
|
package com.fjhx.customer.service.customer.impl;
|
|
|
|
|
|
+import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
+import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
|
|
import com.fjhx.customer.entity.customer.po.CustomerFollowRecords;
|
|
|
import com.fjhx.customer.mapper.customer.CustomerFollowRecordsMapper;
|
|
|
import com.fjhx.customer.service.customer.CustomerFollowRecordsService;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.fjhx.file.utils.ObsFileUtil;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.fjhx.customer.entity.customer.vo.CustomerFollowRecordsVo;
|
|
@@ -11,6 +14,7 @@ import com.fjhx.customer.entity.customer.dto.CustomerFollowRecordsSelectDto;
|
|
|
import com.ruoyi.common.utils.wrapper.IWrapper;
|
|
|
import com.fjhx.customer.entity.customer.dto.CustomerFollowRecordsDto;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
+import oshi.util.FileUtil;
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -39,19 +43,25 @@ public class CustomerFollowRecordsServiceImpl extends ServiceImpl<CustomerFollow
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+ @DSTransactional
|
|
|
@Override
|
|
|
public void add(CustomerFollowRecordsDto customerFollowRecordsDto) {
|
|
|
this.save(customerFollowRecordsDto);
|
|
|
+ ObsFileUtil.saveFile(customerFollowRecordsDto.getFileList(),customerFollowRecordsDto.getId());
|
|
|
}
|
|
|
|
|
|
+ @DSTransactional
|
|
|
@Override
|
|
|
public void edit(CustomerFollowRecordsDto customerFollowRecordsDto) {
|
|
|
this.updateById(customerFollowRecordsDto);
|
|
|
+ ObsFileUtil.editFile(customerFollowRecordsDto.getFileList(),customerFollowRecordsDto.getId());
|
|
|
}
|
|
|
|
|
|
+ @DSTransactional
|
|
|
@Override
|
|
|
public void delete(Long id) {
|
|
|
this.removeById(id);
|
|
|
+ ObsFileUtil.removeFile(id);
|
|
|
}
|
|
|
|
|
|
}
|