Преглед изворни кода

[update] message:1.修改方法名称、参数名称

kelei12399 пре 5 месеци
родитељ
комит
16c5224fbd

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

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

+ 1 - 1
admin/src/main/java/com/flyer/foster/mapper/ICartoonUrlMapper.java

@@ -28,5 +28,5 @@ public interface ICartoonUrlMapper extends BaseMapper<CartoonUrl> {
      * @param cartoonId
      * @return
      */
-    List<String> urlsByCartoonId(@Param("cartoonId") Integer cartoonId);
+    List<String> getUrlList(@Param("cartoonId") Integer cartoonId);
 }

+ 4 - 2
admin/src/main/java/com/flyer/foster/service/ICartoonUrlService.java

@@ -17,6 +17,7 @@ public interface ICartoonUrlService extends IService<CartoonUrl> {
 
     /**
      * 物理删除
+     *
      * @param idList
      * @return
      */
@@ -24,8 +25,9 @@ public interface ICartoonUrlService extends IService<CartoonUrl> {
 
     /**
      * 根据漫画id 查询图片url集合
-     * @param id
+     *
+     * @param cartoonId
      * @return
      */
-    List<String> urlsByCartoonId(Integer id);
+    List<String> getUrlList(Integer cartoonId);
 }

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

@@ -8,7 +8,6 @@ import com.flyer.exception.BusinessException;
 import com.flyer.foster.dto.*;
 import com.flyer.foster.entity.Cartoon;
 import com.flyer.foster.entity.CartoonUrl;
-import com.flyer.foster.entity.PosterLib;
 import com.flyer.foster.mapper.ICartoonMapper;
 import com.flyer.foster.service.ICartoonService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -17,9 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
-import java.time.LocalDateTime;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
@@ -55,7 +52,7 @@ public class CartoonServiceImpl extends ServiceImpl<ICartoonMapper, Cartoon> imp
             list.add(respDTO);
         }
         for(CartoonRespDTO bean : list) {
-            bean.setCartoonUrlList(iCartoonUrlService.urlsByCartoonId(bean.getId()));
+            bean.setCartoonUrlList(iCartoonUrlService.getUrlList(bean.getId()));
         }
         pageResult.setRecords(list);
         pageResult.setTotal(pageInfo.getTotal());

+ 2 - 2
admin/src/main/java/com/flyer/foster/service/impl/CartoonUrlServiceImpl.java

@@ -25,7 +25,7 @@ public class CartoonUrlServiceImpl extends ServiceImpl<ICartoonUrlMapper, Cartoo
     }
 
     @Override
-    public List<String> urlsByCartoonId(Integer id) {
-        return baseMapper.urlsByCartoonId(id);
+    public List<String> getUrlList(Integer cartoonId) {
+        return baseMapper.getUrlList(cartoonId);
     }
 }

+ 1 - 1
admin/src/main/resources/mapper/CartoonUrlMapper.xml

@@ -9,7 +9,7 @@
         </foreach>
     </delete>
 
-    <select id="urlsByCartoonId" resultType="java.lang.String">
+    <select id="getUrlList" resultType="java.lang.String">
         select url
         from tb_cartoon_url
         where cartoon_id = #{cartoonId}