shuhao il y a 5 mois
Parent
commit
445f33a6a7

+ 2 - 2
admin/src/main/java/com/flyer/foster/controller/app/AppCartoonController.java

@@ -25,8 +25,8 @@ public class AppCartoonController {
      *
      * @return
      */
-    @GetMapping("/list")
-    public R getList(CartoonQueryDTO queryDTO) {
+    @GetMapping("/last")
+    public R getLast(CartoonQueryDTO queryDTO) {
         return R.ok().result(iCartoonService.getLatestCartoon(queryDTO));
     }
 }

+ 1 - 1
admin/src/main/java/com/flyer/foster/service/impl/CartoonServiceImpl.java

@@ -134,7 +134,7 @@ public class CartoonServiceImpl extends ServiceImpl<ICartoonMapper, Cartoon> imp
 
         Cartoon cartoon = this.lambdaQuery()
                 .like(StrUtil.isNotBlank(queryDTO.getName()), Cartoon::getName, queryDTO.getName())
-                .orderByDesc(Cartoon::getCreatedTime)
+                .orderByAsc(Cartoon::getCreatedTime)
                 .last("limit 1")
                 .one();
         BeanUtil.copyProperties(cartoon, respDTO);