src/main/java/com/yx/controller/StatisticsController.java
(完整代码) 845Bpackage com.yx.controller;
import com.yx.po.BookInfo;
import com.yx.po.TypeInfo;
import com.yx.service.BookInfoService;
import com.yx.service.TypeInfoService;
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 java.util.List;
@Controller
public class StatisticsController {
@Autowired
private BookInfoService bookInfoService;
@Autowired
private TypeInfoService typeInfoService;
@GetMapping("statisticIndex")
public String statistics(Model model){
//根据图书类型查询图书数量
List<BookInfo> list = bookInfoService.getBookCountByType();
model.addAttribute("list",list);
return "count/statisticIndex";
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。