package com.corewing.app.modules.app;

import com.corewing.app.common.Result;
import com.corewing.app.common.annotation.CommonLog;
import com.corewing.app.entity.ContactMsg;
import com.corewing.app.service.ContactMsgService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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.RestController;

import javax.annotation.Resource;

@Api(tags = "官网反馈消息接口")
@RestController
@RequestMapping("/contactMsg")
public class AppContactMsgController {

    @Resource
    private ContactMsgService contactMsgService;

    @CommonLog("反馈消息")
    @ApiOperation("消息保存接口")
    @PostMapping("/save")
    public Result<String> save(@RequestBody ContactMsg contactMsg) {
        return Result.isBool(contactMsgService.save(contactMsg));
    }

}
