代码拉取完成,页面将自动刷新
package com.example.bootdemo2.controller;
import com.example.bootdemo2.common.MyPageInfo;
import com.example.bootdemo2.common.SessionParameter;
import com.example.bootdemo2.entity.Admin;
import com.example.bootdemo2.service.AdminService;
import com.example.bootdemo2.service.BooksService;
import com.example.bootdemo2.service.WfService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
@Controller
@RequestMapping("/wfanalysis")
public class WfController {
@Autowired
private WfService wfService;
@Autowired
private BooksService booksService;
@RequestMapping("/list")
@ResponseBody
public ModelAndView doMain(HttpServletRequest request , ModelAndView mv)
{
//String bookID = request.getParameter("bookID");
//String bookName = request.getParameter("bookName");
mv.setViewName("/wfanalysis/list");
//List<Books> booksList = booksService.findall();
MyPageInfo myPageInfo = wfService.findBySearch(request);
mv.addObject("pageInfo",myPageInfo);
return mv;
}
@RequestMapping("/delete/{bookID}")
public String delete(@PathVariable("bookID") int id){
wfService.deleteById(id);
return "redirect:/wfanalysis/list";
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。