package com.diaoyun.zion.chinafrica.controller;

import com.diaoyun.zion.chinafrica.entity.TbCfFeedbackEntity;
import com.diaoyun.zion.chinafrica.entity.TbCfFeedbackRecordEntity;
import com.diaoyun.zion.chinafrica.service.TbCfFeedbackRecordService;
import com.diaoyun.zion.chinafrica.service.TbCfFeedbackService;
import com.diaoyun.zion.chinafrica.vo.TbCfFeedbackRecordListVo;
import com.diaoyun.zion.master.base.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 反馈情况Controller
 *
 * @author lipengjun
 * @date 2019-09-05 16:51:07
 */
@Api(tags = "反馈情况")
@RestController
@RequestMapping("/feedback")
public class TbCfFeedbackController {
    @Autowired
    private TbCfFeedbackService tbCfFeedbackService;
    @Autowired
    private TbCfFeedbackRecordService tbCfFeedbackRecordService;

    @ApiOperation("提交反馈")
    @PostMapping
    public Result saveFeedbackList(@ApiParam("反馈情况") @RequestBody TbCfFeedbackRecordListVo tbCfFeedbackRecordListVo) {
        return tbCfFeedbackRecordService.saveFeedbackList(tbCfFeedbackRecordListVo);
    }

    @ApiOperation("获取反馈问题")
    @GetMapping
    public Result getFeedbackList() {
        return tbCfFeedbackService.getFeedbackList();
    }


}
