src/main/java/com/yx/controller/LendListController.java
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package com.yx.controller;
import com.github.pagehelper.PageInfo;
import com.yx.po.BookInfo;
import com.yx.po.LendList;
import com.yx.po.ReaderInfo;
import com.yx.service.BookInfoService;
import com.yx.service.LendListService;
import com.yx.service.ReaderInfoService;
import com.yx.utils.DataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
@Controller
public class LendListController {
@Autowired
private LendListService lendListService;
@Autowired
private ReaderInfoService readerService;
@Autowired
private BookInfoService bookInfoService;
@GetMapping("/lendListIndex")
public String lendListIndex(){
return "lend/lendListIndex";
}
/**
* 查询所有的列表
* 1 request获取
* 2、参数绑定
* 3、对象绑定
*/
@ResponseBody
@RequestMapping("/lendListAll")
public DataInfo lendListAll(Integer type, String readerNumber, String name, Integer status,
@RequestParam(defaultValue = "1")Integer page,@RequestParam(defaultValue = "15")Integer limit){
LendList info=new LendList();
info.setBackType(type);
//创建读者对象
ReaderInfo reader=new ReaderInfo();
reader.setReaderNumber(readerNumber);
//把以上对象交给info
info.setReaderInfo(reader);
//图书对象
BookInfo book=new BookInfo();
后面还有 132 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。