package com.ruoyi.management.controller; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.web.domain.AjaxResult; import com.ruoyi.common.core.web.page.PageInfo; import com.ruoyi.common.security.service.TokenService; import com.ruoyi.management.domain.TFeedback; import com.ruoyi.management.domain.TUseGuide; import com.ruoyi.management.dto.FeedbackQuery; import com.ruoyi.management.query.UseGuideQuery; import com.ruoyi.management.service.ITFeedbackService; import com.ruoyi.management.vo.FeedbackVO; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; import java.util.ArrayList; import java.util.List; /** *

* 用户反馈 前端控制器 *

* * @author 无关风月 * @since 2024-04-26 */ @Controller @RequestMapping("/tFeedback") public class TFeedbackController { @Autowired private ITFeedbackService feedbackService; @PostMapping("/addFeedBack") @ApiOperation(value = "反馈", tags = {"家长端-意见反馈"}) public R addFeedBack(@RequestBody TFeedback dto) { feedbackService.save(dto); return R.ok(); } @ResponseBody @PostMapping("/listAll") @ApiOperation(value = "列表查询", tags = {"反馈管理"}) public AjaxResult> listAll(FeedbackQuery query){ // if (query.getEndTime()!=null){ // query.getEndTime().setHours(23); // query.getEndTime().setMinutes(59); // query.getEndTime().setSeconds(59); // } List list = feedbackService.listAll(query); PageInfo res = new PageInfo<>(query.getPageNumber(), query.getPageSize()); res.setRecords(list); return AjaxResult.success(res); } @ResponseBody @GetMapping("/detail") @ApiOperation(value = "查看详情", tags = {"反馈管理"}) public AjaxResult detail(Integer id){ TFeedback feedback = feedbackService.getById(id); return AjaxResult.success(feedback); } @ResponseBody @GetMapping("/handle") @ApiOperation(value = "处理", tags = {"反馈管理"}) public AjaxResult handle(Integer id){ TFeedback feedback = feedbackService.getById(id); feedback.setState(2); feedbackService.updateById(feedback); return AjaxResult.success(); } }