package com.flossom.miniProgram.controller;

import com.flossom.common.core.domain.entity.CtLeaveMessage;
import com.flossom.common.core.web.controller.BaseController;
import com.flossom.common.core.web.domain.AjaxResult;
import com.flossom.common.log.annotation.Log;
import com.flossom.common.log.enums.BusinessType;
import com.flossom.common.security.annotation.RequiresPermissions;
import com.flossom.miniProgram.service.ICtleaveMeassageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
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;

/**
 *  共创管理-信息反馈api模块
 */
@RestController
@RequestMapping("/api/leaveMessage")
public class CtleaveMessageApiController extends BaseController {
    @Autowired
    private ICtleaveMeassageService ctleaveMeassageService;
    /**
     * 新增共创管理-信息反馈
     */
    @Log(title = "共创管理-留言管理", businessType = BusinessType.INSERT)
    @PostMapping("/saveMessage")
    public AjaxResult add(@RequestBody @Validated CtLeaveMessage ctLeaveMessage)
    {
        return toAjax(ctleaveMeassageService.saveCtleaveMeassage(ctLeaveMessage));
    }
}
