|
@@ -17,6 +17,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import lombok.val;
|
|
|
import org.springframework.context.annotation.Lazy;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -34,6 +35,7 @@ import java.util.stream.Collectors;
|
|
|
@RequiredArgsConstructor(onConstructor_ = {@Lazy})
|
|
|
public class ReportService extends ServiceImpl<ReportMapper, Report> {
|
|
|
private final OutInterfaceService outInterfaceService;
|
|
|
+ private final ReportMapper reportMapper;
|
|
|
|
|
|
/**
|
|
|
* @param report 报告类
|
|
@@ -119,9 +121,18 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
|
|
|
|
|
|
return reports;
|
|
|
}
|
|
|
+// public String reportDele(int id) throws IOException{
|
|
|
+// this.removeById(id);
|
|
|
+// return Response.success();
|
|
|
+// }
|
|
|
public String reportDele(int id) throws IOException{
|
|
|
- this.removeById(id);
|
|
|
- return Response.success();
|
|
|
+ int dele = reportMapper.dele(id);
|
|
|
+ if(dele>0){
|
|
|
+ return Response.success();
|
|
|
+ }
|
|
|
+ return Response.error("没有数据");
|
|
|
+
|
|
|
}
|
|
|
|
|
|
+
|
|
|
}
|