Prechádzať zdrojové kódy

[update] message:1.漫画curd接口

kelei12399 5 mesiacov pred
rodič
commit
3ff56c47ae
19 zmenil súbory, kde vykonal 752 pridanie a 2 odobranie
  1. 64 0
      admin/src/main/java/com/flyer/foster/controller/CartoonController.java
  2. 16 0
      admin/src/main/java/com/flyer/foster/controller/CartoonUrlController.java
  3. 32 0
      admin/src/main/java/com/flyer/foster/controller/app/AppCartoonController.java
  4. 16 0
      admin/src/main/java/com/flyer/foster/controller/app/AppCartoonUrlController.java
  5. 24 0
      admin/src/main/java/com/flyer/foster/dto/CartoonAddDTO.java
  6. 20 0
      admin/src/main/java/com/flyer/foster/dto/CartoonQueryDTO.java
  7. 43 0
      admin/src/main/java/com/flyer/foster/dto/CartoonRespDTO.java
  8. 25 0
      admin/src/main/java/com/flyer/foster/dto/CartoonUpdateDTO.java
  9. 98 0
      admin/src/main/java/com/flyer/foster/entity/Cartoon.java
  10. 98 0
      admin/src/main/java/com/flyer/foster/entity/CartoonUrl.java
  11. 31 0
      admin/src/main/java/com/flyer/foster/mapper/ICartoonMapper.java
  12. 25 0
      admin/src/main/java/com/flyer/foster/mapper/ICartoonUrlMapper.java
  13. 38 0
      admin/src/main/java/com/flyer/foster/service/ICartoonService.java
  14. 24 0
      admin/src/main/java/com/flyer/foster/service/ICartoonUrlService.java
  15. 147 0
      admin/src/main/java/com/flyer/foster/service/impl/CartoonServiceImpl.java
  16. 26 0
      admin/src/main/java/com/flyer/foster/service/impl/CartoonUrlServiceImpl.java
  17. 0 2
      admin/src/main/java/com/flyer/foster/service/impl/TreePosterContentServiceImpl.java
  18. 14 0
      admin/src/main/resources/mapper/CartoonMapper.xml
  19. 11 0
      admin/src/main/resources/mapper/CartoonUrlMapper.xml

+ 64 - 0
admin/src/main/java/com/flyer/foster/controller/CartoonController.java

@@ -0,0 +1,64 @@
+package com.flyer.foster.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.flyer.foster.dto.*;
+import com.flyer.foster.service.ICartoonService;
+import com.flyer.util.R;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+ * 漫画
+ *
+ * @author flyer
+ * @since 2024-05-25
+ */
+@RestController
+@RequestMapping("/admin/cartoon")
+public class CartoonController {
+    @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));
+    }
+
+    /**
+     * 新增漫画
+     */
+    @PostMapping("")
+    public R addCartoon(@Valid @RequestBody CartoonAddDTO addDTO) {
+        return R.ok().result(iCartoonService.addCartoon(addDTO));
+    }
+
+    /**
+     * 修改漫画
+     *
+     * @return
+     */
+    @PutMapping("/{cartoonId}")
+    public R updateCartoon(@PathVariable Integer cartoonId, @RequestBody CartoonUpdateDTO updateDTO) {
+        updateDTO.setId(cartoonId);
+        return R.ok().result(iCartoonService.updateCartoon(updateDTO));
+    }
+
+    /**
+     * 删除漫画
+     *
+     * @return
+     */
+    @PostMapping("/delete")
+    public R deleteArea(@RequestBody List<Integer> idList) {
+        return R.ok().result(iCartoonService.deleteByIdList(idList));
+    }
+}

+ 16 - 0
admin/src/main/java/com/flyer/foster/controller/CartoonUrlController.java

@@ -0,0 +1,16 @@
+package com.flyer.foster.controller;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 漫画图片(小程序)
+ *
+ * @author flyer
+ * @since 2024-05-25
+ */
+@RestController
+@RequestMapping("/admin/cartoon-url")
+public class CartoonUrlController {
+
+}

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

@@ -0,0 +1,32 @@
+package com.flyer.foster.controller.app;
+
+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.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 漫画(小程序)
+ *
+ * @author flyer
+ * @since 2024-05-25
+ */
+@RestController
+@RequestMapping("/app/cartoon")
+public class AppCartoonController {
+    @Autowired
+    private ICartoonService iCartoonService;
+
+    /**
+     * 漫画列表(小程序)
+     *
+     * @return
+     */
+    @GetMapping("/list")
+    public R getList(CartoonQueryDTO queryDTO) {
+        return R.ok().result(iCartoonService.getLatestCartoon(queryDTO));
+    }
+}

+ 16 - 0
admin/src/main/java/com/flyer/foster/controller/app/AppCartoonUrlController.java

@@ -0,0 +1,16 @@
+package com.flyer.foster.controller.app;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 漫画图片(小程序)
+ *
+ * @author flyer
+ * @since 2024-05-25
+ */
+@RestController
+@RequestMapping("/app/cartoon-url")
+public class AppCartoonUrlController {
+
+}

+ 24 - 0
admin/src/main/java/com/flyer/foster/dto/CartoonAddDTO.java

@@ -0,0 +1,24 @@
+package com.flyer.foster.dto;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * CartoonAddDTO
+ *
+ * @author kelei
+ * @since 2024/5/25/14:33
+ */
+@Data
+public class CartoonAddDTO {
+    /**
+     * 漫画名称
+     */
+    @NotBlank(message = "名称不能为空")
+    private String name;
+
+    private List<String> cartoonUrlList = new ArrayList<>();
+}

+ 20 - 0
admin/src/main/java/com/flyer/foster/dto/CartoonQueryDTO.java

@@ -0,0 +1,20 @@
+package com.flyer.foster.dto;
+
+import lombok.Data;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * CartoonAddDTO
+ *
+ * @author kelei
+ * @since 2024/5/25/14:33
+ */
+@Data
+public class CartoonQueryDTO {
+    /**
+     * 漫画名称
+     */
+    private String name;
+}

+ 43 - 0
admin/src/main/java/com/flyer/foster/dto/CartoonRespDTO.java

@@ -0,0 +1,43 @@
+package com.flyer.foster.dto;
+
+import lombok.Data;
+
+import java.time.LocalDateTime;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * CartoonRespDTO
+ *
+ * @author kelei
+ * @since 2024/5/25/14:41
+ */
+@Data
+public class CartoonRespDTO {
+    /**
+     * 主键
+     */
+    private Integer id;
+
+    /**
+     * 漫画名称
+     */
+    private String name;
+
+    /**
+     * 状态-{0.不可用 1.可用}
+     */
+    private Integer status;
+
+    /**
+     * 创建人
+     */
+    private String createdBy;
+
+    /**
+     * 创建时间
+     */
+    private String createdTime;
+
+    private List<String> cartoonUrlList = new ArrayList<>();
+}

+ 25 - 0
admin/src/main/java/com/flyer/foster/dto/CartoonUpdateDTO.java

@@ -0,0 +1,25 @@
+package com.flyer.foster.dto;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * CartoonAddDTO
+ *
+ * @author kelei
+ * @since 2024/5/25/14:33
+ */
+@Data
+public class CartoonUpdateDTO {
+    private Integer id;
+    /**
+     * 漫画名称
+     */
+    private String name;
+
+    private List<String> cartoonUrlList = new ArrayList<>();
+}

+ 98 - 0
admin/src/main/java/com/flyer/foster/entity/Cartoon.java

@@ -0,0 +1,98 @@
+package com.flyer.foster.entity;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.Version;
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * 漫画
+ * </p>
+ *
+ * @author flyer
+ * @since 2024-05-25
+ */
+@Getter
+@Setter
+@TableName("tb_cartoon")
+public class Cartoon implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 漫画名称
+     */
+    private String name;
+
+    /**
+     * 开始时间
+     */
+    private String startTime;
+
+    /**
+     * 结束时间
+     */
+    private String endTime;
+
+    /**
+     * 状态-{0.不可用 1.可用}
+     */
+    private Integer status;
+
+    /**
+     * 租户号
+     */
+    private Integer tenantId;
+
+    /**
+     * 乐观锁
+     */
+    @Version
+    private Integer version;
+
+    /**
+     * 是否删除
+     */
+    @TableLogic
+    private Integer isDeleted;
+
+    /**
+     * 创建人
+     */
+    @TableField(fill = FieldFill.INSERT)
+    private String createdBy;
+
+    /**
+     * 创建时间
+     */
+    @TableField(fill = FieldFill.INSERT)
+    private LocalDateTime createdTime;
+
+    /**
+     * 更新人
+     */
+    @TableField(fill = FieldFill.UPDATE)
+    private String updatedBy;
+
+    /**
+     * 更新时间
+     */
+    @TableField(fill = FieldFill.UPDATE)
+    private LocalDateTime updatedTime;
+
+
+}

+ 98 - 0
admin/src/main/java/com/flyer/foster/entity/CartoonUrl.java

@@ -0,0 +1,98 @@
+package com.flyer.foster.entity;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.Version;
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * 漫画图片
+ * </p>
+ *
+ * @author flyer
+ * @since 2024-05-25
+ */
+@Getter
+@Setter
+@TableName("tb_cartoon_url")
+public class CartoonUrl implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 漫画表主键
+     */
+    private Integer cartoonId;
+
+    /**
+     * 漫画图片url
+     */
+    private String url;
+
+    /**
+     * 漫画排序序号
+     */
+    private Integer sort;
+
+    /**
+     * 状态-{0.不可用 1.可用}
+     */
+    private Integer status;
+
+    /**
+     * 租户号
+     */
+    private Integer tenantId;
+
+    /**
+     * 乐观锁
+     */
+    @Version
+    private Integer version;
+
+    /**
+     * 是否删除
+     */
+    @TableLogic
+    private Integer isDeleted;
+
+    /**
+     * 创建人
+     */
+    @TableField(fill = FieldFill.INSERT)
+    private String createdBy;
+
+    /**
+     * 创建时间
+     */
+    @TableField(fill = FieldFill.INSERT)
+    private LocalDateTime createdTime;
+
+    /**
+     * 更新人
+     */
+    @TableField(fill = FieldFill.UPDATE)
+    private String updatedBy;
+
+    /**
+     * 更新时间
+     */
+    @TableField(fill = FieldFill.UPDATE)
+    private LocalDateTime updatedTime;
+
+
+}

+ 31 - 0
admin/src/main/java/com/flyer/foster/mapper/ICartoonMapper.java

@@ -0,0 +1,31 @@
+package com.flyer.foster.mapper;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.flyer.foster.dto.CartoonQueryDTO;
+import com.flyer.foster.dto.CartoonRespDTO;
+import com.flyer.foster.entity.Cartoon;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 漫画 Mapper 接口
+ * </p>
+ *
+ * @author flyer
+ * @since 2024-05-25
+ */
+public interface ICartoonMapper extends BaseMapper<Cartoon> {
+
+    IPage<CartoonRespDTO> getPageList(@Param("page") IPage<CartoonRespDTO> page, @Param("queryDTO") CartoonQueryDTO queryDTO);
+
+    /**
+     * 物理删除
+     *
+     * @param idList
+     * @return
+     */
+    boolean deleteByIdList(@Param("idList") List<Integer> idList);
+}

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

@@ -0,0 +1,25 @@
+package com.flyer.foster.mapper;
+
+import com.flyer.foster.entity.CartoonUrl;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 漫画图片 Mapper 接口
+ * </p>
+ *
+ * @author flyer
+ * @since 2024-05-25
+ */
+public interface ICartoonUrlMapper extends BaseMapper<CartoonUrl> {
+
+    /**
+     * 物理删除
+     * @param cartoonIdList
+     * @return
+     */
+    boolean deleteByIdList(@Param("cartoonIdList") List<Integer> cartoonIdList);
+}

+ 38 - 0
admin/src/main/java/com/flyer/foster/service/ICartoonService.java

@@ -0,0 +1,38 @@
+package com.flyer.foster.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.flyer.foster.dto.CartoonAddDTO;
+import com.flyer.foster.dto.CartoonQueryDTO;
+import com.flyer.foster.dto.CartoonRespDTO;
+import com.flyer.foster.dto.CartoonUpdateDTO;
+import com.flyer.foster.entity.Cartoon;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 漫画 服务类
+ * </p>
+ *
+ * @author flyer
+ * @since 2024-05-25
+ */
+public interface ICartoonService extends IService<Cartoon> {
+
+    IPage<CartoonRespDTO> getPageList(IPage<Cartoon> page, CartoonQueryDTO queryDTO);
+
+    boolean addCartoon(CartoonAddDTO addDTO);
+
+    boolean deleteByIdList(List<Integer> idList);
+
+    boolean updateCartoon(CartoonUpdateDTO updateDTO);
+
+    /**
+     * 获取最新的漫画
+     *
+     * @param queryDTO
+     * @return
+     */
+    CartoonRespDTO getLatestCartoon(CartoonQueryDTO queryDTO);
+}

+ 24 - 0
admin/src/main/java/com/flyer/foster/service/ICartoonUrlService.java

@@ -0,0 +1,24 @@
+package com.flyer.foster.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.flyer.foster.entity.CartoonUrl;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 漫画图片 服务类
+ * </p>
+ *
+ * @author flyer
+ * @since 2024-05-25
+ */
+public interface ICartoonUrlService extends IService<CartoonUrl> {
+
+    /**
+     * 物理删除
+     * @param idList
+     * @return
+     */
+    boolean deleteByCartoonIdList(List<Integer> idList);
+}

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

@@ -0,0 +1,147 @@
+package com.flyer.foster.service.impl;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+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;
+import com.flyer.foster.service.ICartoonUrlService;
+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;
+
+/**
+ * <p>
+ * 漫画 服务实现类
+ * </p>
+ *
+ * @author flyer
+ * @since 2024-05-25
+ */
+@Service
+public class CartoonServiceImpl extends ServiceImpl<ICartoonMapper, Cartoon> implements ICartoonService {
+
+    @Autowired
+    private ICartoonUrlService iCartoonUrlService;
+
+    @Override
+    public IPage<CartoonRespDTO> getPageList(IPage<Cartoon> page, CartoonQueryDTO queryDTO) {
+        IPage<CartoonRespDTO> pageResult = new Page<>(page.getCurrent(), page.getSize());
+
+        IPage<Cartoon> pageInfo = this.lambdaQuery()
+                .like(StrUtil.isNotBlank(queryDTO.getName()), Cartoon::getName, queryDTO.getName())
+                .page(page);
+
+        List<CartoonRespDTO> list = new ArrayList<>();
+        CartoonRespDTO respDTO;
+        for (Cartoon cartoon : pageInfo.getRecords()) {
+            respDTO = new CartoonRespDTO();
+            BeanUtil.copyProperties(cartoon, respDTO);
+            list.add(respDTO);
+        }
+        pageResult.setRecords(list);
+        pageResult.setTotal(pageInfo.getTotal());
+        return pageResult;
+    }
+
+    @Transactional
+    @Override
+    public boolean addCartoon(CartoonAddDTO addDTO) {
+        Cartoon cartoon = new Cartoon();
+        BeanUtil.copyProperties(addDTO, cartoon);
+        this.save(cartoon);
+
+        List<CartoonUrl> cartoonUrlList = new ArrayList<>();
+        CartoonUrl cartoonUrl;
+        int sort = 1;
+        for (String url : addDTO.getCartoonUrlList()) {
+            cartoonUrl = new CartoonUrl();
+            cartoonUrl.setCartoonId(cartoon.getId());
+            cartoonUrl.setUrl(url);
+            cartoonUrl.setSort(sort++);
+            cartoonUrlList.add(cartoonUrl);
+        }
+        if (cartoonUrlList.size() != 0) {
+            // 插入漫画地址
+            iCartoonUrlService.saveBatch(cartoonUrlList);
+        }
+        return true;
+    }
+
+    @Transactional
+    @Override
+    public boolean deleteByIdList(List<Integer> idList) {
+        // 删除漫画
+        baseMapper.deleteByIdList(idList);
+        // 删除漫画地址
+        iCartoonUrlService.deleteByCartoonIdList(idList);
+        return true;
+    }
+
+    @Transactional
+    @Override
+    public boolean updateCartoon(CartoonUpdateDTO updateDTO) {
+        Cartoon cartoon = this.lambdaQuery().eq(Cartoon::getId, updateDTO.getId()).one();
+        if (cartoon == null) {
+            throw new BusinessException("无效的漫画id");
+        }
+        BeanUtil.copyProperties(updateDTO, cartoon);
+        this.saveOrUpdate(cartoon);
+
+        if (updateDTO.getCartoonUrlList().size() != 0) {
+            // 删除漫画地址
+            iCartoonUrlService.deleteByCartoonIdList(Collections.singletonList(cartoon.getId()));
+
+            List<CartoonUrl> cartoonUrlList = new ArrayList<>();
+            CartoonUrl cartoonUrl;
+            int sort = 1;
+            for (String url : updateDTO.getCartoonUrlList()) {
+                cartoonUrl = new CartoonUrl();
+                cartoonUrl.setCartoonId(cartoon.getId());
+                cartoonUrl.setUrl(url);
+                cartoonUrl.setSort(sort++);
+                cartoonUrlList.add(cartoonUrl);
+            }
+            if (cartoonUrlList.size() != 0) {
+                // 插入漫画地址
+                iCartoonUrlService.saveBatch(cartoonUrlList);
+            }
+        }
+        return true;
+    }
+
+    @Override
+    public CartoonRespDTO getLatestCartoon(CartoonQueryDTO queryDTO) {
+        CartoonRespDTO respDTO = new CartoonRespDTO();
+
+        Cartoon cartoon = this.lambdaQuery()
+                .like(StrUtil.isNotBlank(queryDTO.getName()), Cartoon::getName, queryDTO.getName())
+                .orderByDesc(Cartoon::getCreatedTime)
+                .last("limit 1")
+                .one();
+        BeanUtil.copyProperties(cartoon, respDTO);
+        // 获取漫画地址
+        if (cartoon != null) {
+            List<CartoonUrl> cartoonUrlList = iCartoonUrlService.lambdaQuery()
+                    .eq(CartoonUrl::getCartoonId, cartoon.getId())
+                    .list();
+            // 地址集合
+            respDTO.setCartoonUrlList(cartoonUrlList.stream().map(CartoonUrl::getUrl).collect(Collectors.toList()));
+        }
+        return respDTO;
+    }
+}

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

@@ -0,0 +1,26 @@
+package com.flyer.foster.service.impl;
+
+import com.flyer.foster.entity.CartoonUrl;
+import com.flyer.foster.mapper.ICartoonUrlMapper;
+import com.flyer.foster.service.ICartoonUrlService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 漫画图片 服务实现类
+ * </p>
+ *
+ * @author flyer
+ * @since 2024-05-25
+ */
+@Service
+public class CartoonUrlServiceImpl extends ServiceImpl<ICartoonUrlMapper, CartoonUrl> implements ICartoonUrlService {
+
+    @Override
+    public boolean deleteByCartoonIdList(List<Integer> cartoonIdList) {
+        return baseMapper.deleteByIdList(cartoonIdList);
+    }
+}

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

@@ -121,8 +121,6 @@ public class TreePosterContentServiceImpl extends ServiceImpl<ITreePosterContent
         LocalDateTime queryDateTime;
         if (StrUtil.isNotBlank(queryDTO.getCreatedTime())) {
             queryDateTime = LocalDate.parse(queryDTO.getCreatedTime()).atStartOfDay();
-//            DateTimeFormatter fmt = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
-//            queryDateTime = LocalDateTime.parse(queryDTO.getCreatedTime(), fmt);
         } else {
             queryDateTime = LocalDateTime.now();
         }

+ 14 - 0
admin/src/main/resources/mapper/CartoonMapper.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.flyer.foster.mapper.ICartoonMapper">
+    <delete id="deleteByIdList">
+        delete from tb_cartoon where id in
+        <foreach collection="idList" item="id" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <select id="getPageList" resultType="com.flyer.foster.dto.CartoonRespDTO">
+
+    </select>
+</mapper>

+ 11 - 0
admin/src/main/resources/mapper/CartoonUrlMapper.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.flyer.foster.mapper.ICartoonUrlMapper">
+
+    <delete id="deleteByIdList">
+        delete from tb_cartoon_url where tb_cartoon_url.cartoon_id in
+        <foreach collection="cartoonIdList" item="id" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>