package com.dk.mdm.controller.mst;

import com.dk.common.model.pojo.PageList;
import com.dk.common.model.response.mst.OrgResponse;
import com.dk.common.model.vo.mst.OrgVO;
import com.dk.common.response.ResponseResultVO;
import com.dk.mdm.model.pojo.mst.PrintRemark;
import com.dk.common.controller.BaseController;
import com.dk.common.service.BaseService;
import com.dk.mdm.model.query.mst.OrgQuery;
import com.dk.mdm.model.query.mst.PrintRemarkQuery;
import com.dk.mdm.model.response.mst.PrintRemarkResponse;
import com.dk.mdm.model.vo.mst.PrintRemarkVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import io.swagger.annotations.Api;
import com.dk.mdm.service.mst.PrintRemarkService;

import java.util.List;

@Api(tags = "打印备注设置API接口")
@RestController
@RequestMapping("/mst/printRemark")
public class PrintRemarkController{

    public BaseService<PrintRemark> getService() {
        return printRemarkService;
    }

    @Autowired
    private PrintRemarkService printRemarkService;

    /**
     * @desc   : 条件查询
     * @author : 王英杰
     * @date   : 2024/9/3 10:48
     */
    @ApiOperation( value = "分页、关联、条件查询", notes = "分页、关联、条件查询" )
    @PostMapping({"list_by"})
    public ResponseResultVO<List<PrintRemarkResponse>> selectByCond(@RequestBody PrintRemarkQuery printRemarkQuery) {
        return printRemarkService.selectByCond(printRemarkQuery);
    }

    /**
        * @desc   : 新建打印备注设置
        * @author : 王英杰
        * @date   : 2024/9/3 10:48
        */
    @ApiOperation( value = "新建打印备注设置", notes = "新建打印备注设置" )
    @PostMapping({"insert"})
    public ResponseResultVO<?> insert(@RequestBody PrintRemarkVO printRemarkVO) {
        return printRemarkService.insert(printRemarkVO);
    }


}
