41 lines
1.2 KiB
Java
41 lines
1.2 KiB
Java
|
package com.ruoyi.web.app;
|
||
|
|
||
|
import com.ruoyi.bst.complaint.domain.Complaint;
|
||
|
import com.ruoyi.bst.complaint.service.ComplaintService;
|
||
|
import com.ruoyi.common.core.controller.BaseController;
|
||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||
|
import io.swagger.annotations.Api;
|
||
|
import io.swagger.annotations.ApiOperation;
|
||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
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;
|
||
|
|
||
|
/**
|
||
|
* 投诉建议
|
||
|
* @author 辉
|
||
|
* 2024/3/7
|
||
|
*/
|
||
|
@Api(tags = "投诉建议")
|
||
|
@RestController
|
||
|
@RequestMapping("/app/complaint")
|
||
|
public class AppComplaintController extends BaseController {
|
||
|
|
||
|
@Autowired
|
||
|
private ComplaintService complaintService;
|
||
|
|
||
|
/**
|
||
|
* 创建投诉建议
|
||
|
* @param complaint
|
||
|
* @return
|
||
|
*/
|
||
|
@ApiOperation("创建投诉建议")
|
||
|
@PostMapping
|
||
|
public AjaxResult add(@RequestBody Complaint complaint) {
|
||
|
complaint.setUserId(getUserId());
|
||
|
return AjaxResult.success(complaintService.insertComplaint(complaint));
|
||
|
}
|
||
|
|
||
|
}
|