|
@@ -1,13 +1,18 @@
|
|
|
package com.flyer.foster.controller.app;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.flyer.foster.dto.CartoonQueryDTO;
|
|
|
import com.flyer.foster.service.ICartoonService;
|
|
|
import com.flyer.util.R;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import java.time.LocalDate;
|
|
|
+import java.time.LocalDateTime;
|
|
|
+
|
|
|
/**
|
|
|
* 漫画(小程序)
|
|
|
*
|
|
@@ -20,6 +25,18 @@ public class AppCartoonController {
|
|
|
@Autowired
|
|
|
private ICartoonService iCartoonService;
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 漫画列表-分页
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/list/{current}/{size}")
|
|
|
+ public R getPageList(@PathVariable Integer current, @PathVariable Integer size, CartoonQueryDTO queryDTO) {
|
|
|
+ return R.ok().result(iCartoonService.getPageList(new Page<>(current, size), queryDTO));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 漫画列表(小程序)
|
|
|
*
|
|
@@ -29,4 +46,15 @@ public class AppCartoonController {
|
|
|
public R getLatestCartoon(CartoonQueryDTO queryDTO) {
|
|
|
return R.ok().result(iCartoonService.getLatestCartoon(queryDTO));
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询今天的漫画
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/now")
|
|
|
+ public R getNowCartoon() {
|
|
|
+ return R.ok().result(iCartoonService.getNowCartoon( LocalDateTime.now()
|
|
|
+ ));
|
|
|
+ }
|
|
|
}
|