package org.springblade.modules.app.web.admin;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wn.common.controller.BaseController;
import com.wn.common.datamodel.ResultDTO;
import org.springblade.modules.app.common.dto.ProblemBackDTO;
import org.springblade.modules.app.common.query.ProblemBackQuery;
import org.springblade.modules.app.manager.ProblemBackManager;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName: AdminProblemBackController
 * @Description:
 * @author: zhangk
 * @createTime: 2022-01-14-16:11
 */
@RestController
@RequestMapping("app/admin/problem")
@Api(value = "意见反馈-管理端", tags = "意见反馈-管理端")
public class AdminProblemBackController extends BaseController {

    @Autowired
    private ProblemBackManager problemBackManager;

    //@ApiOperation(value = "分页查询反馈列表")
    @GetMapping("/page")
    public ResponseEntity<ResultDTO<Page<ProblemBackDTO>>> page(ProblemBackQuery query){
        return success(problemBackManager.page(query));
    }

    //@ApiOperation(value = "查询反馈信息")
    @PutMapping("/info/{id}")
    @ApiImplicitParam(name = "id", value = "反馈id", required = true)
    public ResponseEntity<ResultDTO<ProblemBackDTO>> info(@PathVariable("id") Long id){
        return success(problemBackManager.info(id));
    }


}
