yangys
2024-03-27 e48aa2ac8dea1be5db11c63edf0b912c4ad5ce65
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package com.qianwen.core.report.endpoint;
 
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.Map;
import com.qianwen.core.mp.support.Condition;
import com.qianwen.core.mp.support.Query;
import com.qianwen.core.report.entity.ReportFileEntity;
import com.qianwen.core.report.service.IReportFileService;
import com.qianwen.core.tool.api.R;
import com.qianwen.core.tool.utils.Func;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
 
@RequestMapping({"/report/rest"})
@ApiIgnore
@RestController
/* loaded from: blade-starter-report-9.3.0.0-SNAPSHOT.jar:org/springblade/core/report/endpoint/ReportEndpoint.class */
public class ReportEndpoint {
    private final IReportFileService service;
 
    public ReportEndpoint(final IReportFileService service) {
        this.service = service;
    }
 
    @GetMapping({"/detail"})
    public R<ReportFileEntity> detail(ReportFileEntity file) {
        ReportFileEntity detail = (ReportFileEntity) this.service.getOne(Condition.getQueryWrapper(file));
        return R.data(detail);
    }
 
    @GetMapping({"/list"})
    public R<IPage<ReportFileEntity>> list(@RequestParam Map<String, Object> file, Query query) {
        IPage<ReportFileEntity> pages = this.service.page(Condition.getPage(query), Condition.getQueryWrapper(file, ReportFileEntity.class));
        return R.data(pages);
    }
 
    @PostMapping({"/remove"})
    public R remove(@RequestParam String ids) {
        boolean temp = this.service.removeByIds(Func.toLongList(ids));
        return R.status(temp);
    }
}