//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package org.jeecg.modules.jmreport.desreport.a;

import java.util.List;

import org.jeecg.modules.jmreport.common.vo.Result;
import org.jeecg.modules.jmreport.desreport.entity.JimuReportLink;
import org.jeecg.modules.jmreport.desreport.service.IJimuReportLinkService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController("jimuReportLinkController")
@RequestMapping({"/jmreport/link"})
public class d {
    private static final Logger a = LoggerFactory.getLogger(d.class);
    @Autowired
    private IJimuReportLinkService reportLinkService;

    public d() {
    }

    @PostMapping({"/saveAndEdit"})
    public Result<String> a(@RequestBody JimuReportLink var1) {
        Result var2 = new Result();
        String var3 = this.reportLinkService.saveAndEdit(var1);
        var2.setSuccess(true);
        var2.setResult(var3);
        return var2;
    }

    @PostMapping({"/delete"})
    public Result<?> b(@RequestBody JimuReportLink var1) {
        this.reportLinkService.removeById(var1.getId());
        return Result.OK("删除成功!");
    }

    @GetMapping({"/queryByIds"})
    public Result<?> a(@RequestParam(name = "ids", required = true) String var1) {
        List var2 = this.reportLinkService.queryByIds(var1);
        return Result.OK(var2);
    }

    @GetMapping({"/getLinkData"})
    public Result<?> a(@RequestParam(name = "linkType") String var1, @RequestParam(name = "reportId") String var2) {
        List var3 = this.reportLinkService.getLinkData(var1, var2);
        return Result.OK(var3);
    }
}
