2025-03-31 01:43:43 +08:00
|
|
|
package com.ruoyi.web.app;
|
|
|
|
|
2025-04-22 12:00:46 +08:00
|
|
|
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;
|
|
|
|
|
2025-03-31 01:43:43 +08:00
|
|
|
import com.ruoyi.bst.complaint.domain.Complaint;
|
|
|
|
import com.ruoyi.bst.complaint.service.ComplaintService;
|
2025-04-22 12:00:46 +08:00
|
|
|
import com.ruoyi.common.annotation.Log;
|
2025-03-31 01:43:43 +08:00
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
2025-04-22 12:00:46 +08:00
|
|
|
import com.ruoyi.common.enums.BusinessType;
|
|
|
|
import com.ruoyi.common.enums.LogBizType;
|
|
|
|
|
2025-03-31 01:43:43 +08:00
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 投诉建议
|
|
|
|
* @author 辉
|
|
|
|
* 2024/3/7
|
|
|
|
*/
|
|
|
|
@Api(tags = "投诉建议")
|
|
|
|
@RestController
|
|
|
|
@RequestMapping("/app/complaint")
|
|
|
|
public class AppComplaintController extends BaseController {
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
private ComplaintService complaintService;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 创建投诉建议
|
|
|
|
* @param complaint
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
@ApiOperation("创建投诉建议")
|
|
|
|
@PostMapping
|
2025-04-22 12:00:46 +08:00
|
|
|
@Log(title = "创建投诉建议", businessType = BusinessType.OTHER, bizIdName = "arg0", bizType = LogBizType.COMPLAINT)
|
2025-03-31 01:43:43 +08:00
|
|
|
public AjaxResult add(@RequestBody Complaint complaint) {
|
|
|
|
complaint.setUserId(getUserId());
|
|
|
|
return AjaxResult.success(complaintService.insertComplaint(complaint));
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|