问题反馈
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
package com.peanut.modules.common.controller;
|
||||
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.modules.common.entity.SysFeedback;
|
||||
import com.peanut.modules.common.service.SysFeedbackService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 问题反馈
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController("commonSysFeedback")
|
||||
@RequestMapping("common/sysFeedback")
|
||||
public class SysFeedbackController {
|
||||
|
||||
@Autowired
|
||||
private SysFeedbackService sysFeedbackService;
|
||||
|
||||
@RequestMapping("/addSysFeedback")
|
||||
public R addSysFeedback(@RequestBody SysFeedback sysFeedback){
|
||||
if (sysFeedbackService.addSysFeedback(sysFeedback)>0){
|
||||
return R.ok();
|
||||
}else {
|
||||
return R.error("添加失败");
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping("/getList")
|
||||
public R getList(@RequestBody Map<String,Object> params){
|
||||
List<SysFeedback> res = sysFeedbackService.getList(params);
|
||||
return R.ok().put("res",res);
|
||||
}
|
||||
|
||||
@RequestMapping("/getById")
|
||||
public R getById(@RequestBody Map<String,Object> params){
|
||||
return R.ok().put("sysFeedback",sysFeedbackService.getById(params));
|
||||
}
|
||||
|
||||
@RequestMapping("/delById")
|
||||
public R delById(@RequestBody Map<String,Object> params){
|
||||
if (sysFeedbackService.delById(params)>0){
|
||||
return R.ok();
|
||||
}else {
|
||||
return R.error("删除失败");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user