浏览代码

去除一个表

zhangyang 2 年之前
父节点
当前提交
7a5207a40d

+ 1 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/PoTetherController.java

@@ -7,12 +7,9 @@ import javax.servlet.http.HttpServletResponse;
 import com.ruoyi.common.constant.UserConstants;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.system.domain.PoCollection;
-import com.ruoyi.system.domain.PoTetherandcollection;
-import com.ruoyi.system.domain.PoUser;
 import com.ruoyi.system.domain.vo.TetherVo;
 import com.ruoyi.system.service.IPoUserService;
 import io.swagger.annotations.ApiOperation;
-import org.springframework.data.repository.query.Param;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
@@ -131,7 +128,7 @@ public class PoTetherController extends BaseController
     public TableDataInfo collectionList( @PathVariable("tetherId") Long tetherId){
 
         startPage();
-        List<PoTetherandcollection> collectionList = poTetherService.selectPoCollectionListById(tetherId);
+        List<PoCollection> collectionList = poTetherService.selectPoCollectionListById(tetherId);
         return getDataTable(collectionList);
     }
 

+ 0 - 105
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/PoTetherandcollectionController.java

@@ -1,105 +0,0 @@
-package com.ruoyi.web.controller.system;
-
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.annotation.Log;
-import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.enums.BusinessType;
-import com.ruoyi.system.domain.PoTetherandcollection;
-import com.ruoyi.system.service.IPoTetherandcollectionService;
-import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.common.core.page.TableDataInfo;
-
-/**
- * 【请填写功能名称】Controller
- *
- * @author ruoyi
- * @date 2023-02-14
- */
-@RestController
-@RequestMapping("/system/TetherAndcollection")
-class PoTetherandcollectionController extends BaseController
-{
-    @Autowired
-    private IPoTetherandcollectionService poTetherandcollectionService;
-
-    /**
-     * 查询【请填写功能名称】列表
-     */
-    @PreAuthorize("@ss.hasPermi('system:TetherAndcollection:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(PoTetherandcollection poTetherandcollection)
-    {
-        startPage();
-        List<PoTetherandcollection> list = poTetherandcollectionService.selectPoTetherandcollectionList(poTetherandcollection);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出【请填写功能名称】列表
-     */
-    @PreAuthorize("@ss.hasPermi('system:TetherAndcollection:export')")
-    @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, PoTetherandcollection poTetherandcollection)
-    {
-        List<PoTetherandcollection> list = poTetherandcollectionService.selectPoTetherandcollectionList(poTetherandcollection);
-        ExcelUtil<PoTetherandcollection> util = new ExcelUtil<PoTetherandcollection>(PoTetherandcollection.class);
-        util.exportExcel(response, list, "【请填写功能名称】数据");
-    }
-
-    /**
-     * 获取【请填写功能名称】详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('system:TetherAndcollection:query')")
-    @GetMapping(value = "/{collectionId}")
-    public AjaxResult getInfo(@PathVariable("collectionId") Long collectionId)
-    {
-        return success(poTetherandcollectionService.selectPoTetherandcollectionByCollectionId(collectionId));
-    }
-
-    /**
-     * 新增【请填写功能名称】
-     */
-    @PreAuthorize("@ss.hasPermi('system:TetherAndcollection:add')")
-    @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody PoTetherandcollection poTetherandcollection)
-    {
-        return toAjax(poTetherandcollectionService.insertPoTetherandcollection(poTetherandcollection));
-    }
-
-    /**
-     * 修改【请填写功能名称】
-     */
-    @PreAuthorize("@ss.hasPermi('system:TetherAndcollection:edit')")
-    @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody PoTetherandcollection poTetherandcollection)
-    {
-        return toAjax(poTetherandcollectionService.updatePoTetherandcollection(poTetherandcollection));
-    }
-
-    /**
-     * 删除【请填写功能名称】
-     */
-    @PreAuthorize("@ss.hasPermi('system:TetherAndcollection:remove')")
-    @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{collectionIds}")
-    public AjaxResult remove(@PathVariable Long[] collectionIds)
-    {
-        return toAjax(poTetherandcollectionService.deletePoTetherandcollectionByCollectionIds(collectionIds));
-    }
-}
-

+ 0 - 228
ruoyi-system/src/main/java/com/ruoyi/system/domain/PoTetherandcollection.java

@@ -1,228 +0,0 @@
-package com.ruoyi.system.domain;
-
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.ruoyi.common.annotation.Excel;
-import com.ruoyi.common.core.domain.BaseEntity;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-import java.io.Serializable;
-
-/**
- * 【请填写功能名称】对象 po_TetherAndcollection
- *
- * @author ruoyi
- * @date 2023-02-14
- */
-public class PoTetherandcollection extends BaseEntity implements Serializable
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 藏品Id */
-    @TableId
-    private Long collectionId;
-
-    /** 藏品名字 */
-    @Excel(name = "藏品名字")
-    private String collectionTitle;
-
-    /** 藏品状态(0正常 1禁止) */
-    @Excel(name = "藏品状态", readConverterExp = "0=正常,1=禁止")
-    private String status;
-
-    /** 藏品类型(0=邮票 1其他) */
-    @Excel(name = "藏品类型", readConverterExp = "0=邮票,1=其他")
-    private Long collectionType;
-
-    /** 是否删除(1删除 0未删除) */
-    private Long delFlag;
-
-    /** 藏品数量 */
-    @Excel(name = "藏品数量")
-    private Long total;
-
-    /** 藏品图片 */
-    @Excel(name = "藏品图片")
-    private String image;
-
-    /** 模版 */
-    @Excel(name = "模版")
-    private String formwork;
-
-    /** 藏品价格 */
-    @Excel(name = "藏品价格")
-    private Long price;
-
-    /** 发行方 */
-    @Excel(name = "发行方")
-    private Long publisherName;
-
-    /** 作者故事 */
-    @Excel(name = "作者故事")
-    private String story;
-
-    /** 是否上架(0上架 1未上架) */
-    @Excel(name = "是否上架", readConverterExp = "0=上架,1=未上架")
-    private Long grounding;
-
-    /** 是否上链(0上链1未上链) */
-    @Excel(name = "是否上链", readConverterExp = "0=上链1未上链")
-    private Long cochain;
-
-    /** 套系id */
-    @Excel(name = "套系id")
-    private Long tetherId;
-
-    public void setCollectionId(Long collectionId)
-    {
-        this.collectionId = collectionId;
-    }
-
-    public Long getCollectionId()
-    {
-        return collectionId;
-    }
-    public void setCollectionTitle(String collectionTitle)
-    {
-        this.collectionTitle = collectionTitle;
-    }
-
-    public String getCollectionTitle()
-    {
-        return collectionTitle;
-    }
-    public void setStatus(String status)
-    {
-        this.status = status;
-    }
-
-    public String getStatus()
-    {
-        return status;
-    }
-    public void setCollectionType(Long collectionType)
-    {
-        this.collectionType = collectionType;
-    }
-
-    public Long getCollectionType()
-    {
-        return collectionType;
-    }
-    public void setDelFlag(Long delFlag)
-    {
-        this.delFlag = delFlag;
-    }
-
-    public Long getDelFlag()
-    {
-        return delFlag;
-    }
-    public void setTotal(Long total)
-    {
-        this.total = total;
-    }
-
-    public Long getTotal()
-    {
-        return total;
-    }
-    public void setImage(String image)
-    {
-        this.image = image;
-    }
-
-    public String getImage()
-    {
-        return image;
-    }
-    public void setFormwork(String formwork)
-    {
-        this.formwork = formwork;
-    }
-
-    public String getFormwork()
-    {
-        return formwork;
-    }
-    public void setPrice(Long price)
-    {
-        this.price = price;
-    }
-
-    public Long getPrice()
-    {
-        return price;
-    }
-    public void setPublisherName(Long publisherName)
-    {
-        this.publisherName = publisherName;
-    }
-
-    public Long getPublisherName()
-    {
-        return publisherName;
-    }
-    public void setStory(String story)
-    {
-        this.story = story;
-    }
-
-    public String getStory()
-    {
-        return story;
-    }
-    public void setGrounding(Long grounding)
-    {
-        this.grounding = grounding;
-    }
-
-    public Long getGrounding()
-    {
-        return grounding;
-    }
-    public void setCochain(Long cochain)
-    {
-        this.cochain = cochain;
-    }
-
-    public Long getCochain()
-    {
-        return cochain;
-    }
-    public void setTetherId(Long tetherId)
-    {
-        this.tetherId = tetherId;
-    }
-
-    public Long getTetherId()
-    {
-        return tetherId;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-                .append("collectionId", getCollectionId())
-                .append("collectionTitle", getCollectionTitle())
-                .append("status", getStatus())
-                .append("collectionType", getCollectionType())
-                .append("createTime", getCreateTime())
-                .append("createBy", getCreateBy())
-                .append("updateTime", getUpdateTime())
-                .append("updateBy", getUpdateBy())
-                .append("delFlag", getDelFlag())
-                .append("total", getTotal())
-                .append("remark", getRemark())
-                .append("image", getImage())
-                .append("formwork", getFormwork())
-                .append("price", getPrice())
-                .append("publisherName", getPublisherName())
-                .append("story", getStory())
-                .append("grounding", getGrounding())
-                .append("cochain", getCochain())
-                .append("tetherId", getTetherId())
-                .toString();
-    }
-}
-

+ 5 - 6
ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/TetherVo.java

@@ -1,30 +1,29 @@
 package com.ruoyi.system.domain.vo;
 
+import com.ruoyi.system.domain.PoCollection;
 import com.ruoyi.system.domain.PoTether;
-import com.ruoyi.system.domain.PoTetherandcollection;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 
-import java.util.ArrayList;
 import java.util.List;
 
 public class TetherVo extends PoTether {
 
-    private List<PoTetherandcollection> poTetherandcollections  ; //套系对应的藏品信息
+    private List<PoCollection> poTetherandcollections  ; //套系对应的藏品信息
 
 
     public TetherVo(){}
 
-    public TetherVo(List<PoTetherandcollection> poTetherandcollections ){
+    public TetherVo(List<PoCollection> poTetherandcollections ){
         this.poTetherandcollections = poTetherandcollections;
 
     }
 
-    public void setPoTetherandcollections(List<PoTetherandcollection> poTetherandcollections) {
+    public void setPoTetherandcollections(List<PoCollection> poTetherandcollections) {
         this.poTetherandcollections = poTetherandcollections;
     }
 
-    public List<PoTetherandcollection> getPoTetherandcollections() {
+    public List<PoCollection> getPoTetherandcollections() {
         return poTetherandcollections;
     }
 

+ 2 - 3
ruoyi-system/src/main/java/com/ruoyi/system/mapper/PoTetherMapper.java

@@ -1,8 +1,8 @@
 package com.ruoyi.system.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.system.domain.PoCollection;
 import com.ruoyi.system.domain.PoTether;
-import com.ruoyi.system.domain.PoTetherandcollection;
 import com.ruoyi.system.domain.vo.TetherVo;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
@@ -106,7 +106,7 @@ public interface PoTetherMapper extends BaseMapper<PoTether>
      * @param tetherId
      * @return
      */
-    List<PoTetherandcollection> selectPoCollectionListById(Long tetherId);
+    List<PoCollection> selectPoCollectionListById(Long tetherId);
 
     /**
      * 检验标题是否重复
@@ -145,7 +145,6 @@ public interface PoTetherMapper extends BaseMapper<PoTether>
      * @param poTether
      */
     void updatePostTetherCollection(PoTether poTether);
-
     /**
      * 查询更新完的种类
      * @param poTether

+ 0 - 70
ruoyi-system/src/main/java/com/ruoyi/system/mapper/PoTetherandcollectionMapper.java

@@ -1,70 +0,0 @@
-package com.ruoyi.system.mapper;
-
-import java.util.List;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.system.domain.PoTetherandcollection;
-import org.apache.ibatis.annotations.Param;
-
-/**
- * 【请填写功能名称】Mapper接口
- *
- * @author ruoyi
- * @date 2023-02-14
- */
-public interface PoTetherandcollectionMapper extends BaseMapper<PoTetherandcollection>
-{
-    /**
-     * 查询【请填写功能名称】
-     *
-     * @param collectionId 【请填写功能名称】主键
-     * @return 【请填写功能名称】
-     */
-    public PoTetherandcollection selectPoTetherandcollectionByCollectionId(Long collectionId);
-
-    /**
-     * 查询【请填写功能名称】列表
-     *
-     * @param poTetherandcollection 【请填写功能名称】
-     * @return 【请填写功能名称】集合
-     */
-    public List<PoTetherandcollection> selectPoTetherandcollectionList(PoTetherandcollection poTetherandcollection);
-
-    /**
-     * 新增【请填写功能名称】
-     *
-     * @param poTetherandcollection 【请填写功能名称】
-     * @return 结果
-     */
-    public int insertPoTetherandcollection(PoTetherandcollection poTetherandcollection);
-
-    /**
-     * 修改【请填写功能名称】
-     *
-     * @param poTetherandcollection 【请填写功能名称】
-     * @return 结果
-     */
-    public int updatePoTetherandcollection(PoTetherandcollection poTetherandcollection);
-
-    /**
-     * 删除【请填写功能名称】
-     *
-     * @param collectionId 【请填写功能名称】主键
-     * @return 结果
-     */
-    public int deletePoTetherandcollectionByCollectionId(Long collectionId);
-
-    /**
-     * 批量删除【请填写功能名称】
-     *
-     * @param collectionIds 需要删除的数据主键集合
-     * @return 结果
-     */
-    public int deletePoTetherandcollectionByCollectionIds(Long[] collectionIds);
-
-
-
-
-
-}
-

+ 2 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/IPoCollectionService.java

@@ -1,5 +1,6 @@
 package com.ruoyi.system.service;
 
+import com.baomidou.mybatisplus.extension.service.IService;
 import com.ruoyi.system.domain.PoCollection;
 
 import java.util.Date;
@@ -8,7 +9,7 @@ import java.util.List;
 /**
  * 消息接口
  */
-public interface IPoCollectionService {
+public interface IPoCollectionService extends IService<PoCollection> {
     /**
      * 获取藏品详细内容
      *

+ 1 - 2
ruoyi-system/src/main/java/com/ruoyi/system/service/IPoTetherService.java

@@ -6,7 +6,6 @@ import java.util.List;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.ruoyi.system.domain.PoCollection;
 import com.ruoyi.system.domain.PoTether;
-import com.ruoyi.system.domain.PoTetherandcollection;
 import com.ruoyi.system.domain.vo.TetherVo;
 
 /**
@@ -62,7 +61,7 @@ public interface IPoTetherService extends IService<PoTether>
      * @param
      * @return
      */
-    List<PoTetherandcollection> selectPoCollectionListById(Long tetherId);
+    List<PoCollection> selectPoCollectionListById(Long tetherId);
 
     /**
      * 新增套系

+ 0 - 63
ruoyi-system/src/main/java/com/ruoyi/system/service/IPoTetherandcollectionService.java

@@ -1,63 +0,0 @@
-package com.ruoyi.system.service;
-
-import java.util.List;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.system.domain.PoTetherandcollection;
-
-/**
- * 【请填写功能名称】Service接口
- *
- * @author ruoyi
- * @date 2023-02-14
- */
-public interface IPoTetherandcollectionService extends IService<PoTetherandcollection>
-{
-    /**
-     * 查询【请填写功能名称】
-     *
-     * @param collectionId 【请填写功能名称】主键
-     * @return 【请填写功能名称】
-     */
-    public PoTetherandcollection selectPoTetherandcollectionByCollectionId(Long collectionId);
-
-    /**
-     * 查询【请填写功能名称】列表
-     *
-     * @param poTetherandcollection 【请填写功能名称】
-     * @return 【请填写功能名称】集合
-     */
-    public List<PoTetherandcollection> selectPoTetherandcollectionList(PoTetherandcollection poTetherandcollection);
-
-    /**
-     * 新增【请填写功能名称】
-     *
-     * @param poTetherandcollection 【请填写功能名称】
-     * @return 结果
-     */
-    public int insertPoTetherandcollection(PoTetherandcollection poTetherandcollection);
-
-    /**
-     * 修改【请填写功能名称】
-     *
-     * @param poTetherandcollection 【请填写功能名称】
-     * @return 结果
-     */
-    public int updatePoTetherandcollection(PoTetherandcollection poTetherandcollection);
-
-    /**
-     * 批量删除【请填写功能名称】
-     *
-     * @param collectionIds 需要删除的【请填写功能名称】主键集合
-     * @return 结果
-     */
-    public int deletePoTetherandcollectionByCollectionIds(Long[] collectionIds);
-
-    /**
-     * 删除【请填写功能名称】信息
-     *
-     * @param collectionId 【请填写功能名称】主键
-     * @return 结果
-     */
-    public int deletePoTetherandcollectionByCollectionId(Long collectionId);
-}

+ 2 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PoCollectionServiceImpl.java

@@ -1,6 +1,7 @@
 package com.ruoyi.system.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ruoyi.system.domain.PoCollection;
 import com.ruoyi.system.mapper.PoCollectionMapper;
 import com.ruoyi.system.service.IPoCollectionService;
@@ -12,7 +13,7 @@ import java.util.Date;
 import java.util.List;
 
 @Service
-public class PoCollectionServiceImpl implements IPoCollectionService {
+public class PoCollectionServiceImpl extends ServiceImpl<PoCollectionMapper,PoCollection> implements IPoCollectionService {
     @Autowired
     PoCollectionMapper poCollectionMapper;
 

+ 13 - 19
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PoTetherServiceImpl.java

@@ -3,22 +3,15 @@ package com.ruoyi.system.service.impl;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
-import java.util.stream.Collectors;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ruoyi.common.constant.UserConstants;
 import com.ruoyi.common.utils.DateUtils;
-import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.bean.BeanUtils;
 import com.ruoyi.system.domain.PoCollection;
-import com.ruoyi.system.domain.PoNews;
-import com.ruoyi.system.domain.PoTetherandcollection;
 import com.ruoyi.system.domain.vo.TetherVo;
-import com.ruoyi.system.mapper.PoTetherandcollectionMapper;
-import org.apache.ibatis.session.SqlSession;
-import org.apache.ibatis.session.SqlSessionFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.system.mapper.PoTetherMapper;
@@ -38,8 +31,9 @@ public class PoTetherServiceImpl extends ServiceImpl<PoTetherMapper,PoTether> im
     @Autowired
     private PoTetherMapper poTetherMapper;
 
+
     @Autowired
-    private PoTetherandcollectionServiceImpl poTetherandcollectionService;
+    private PoCollectionServiceImpl poCollectionService;
 
 
     /**
@@ -138,7 +132,7 @@ public class PoTetherServiceImpl extends ServiceImpl<PoTetherMapper,PoTether> im
      * @return
      */
     @Override
-    public List<PoTetherandcollection> selectPoCollectionListById(Long tetherId) {
+    public List<PoCollection> selectPoCollectionListById(Long tetherId) {
 
         return poTetherMapper.selectPoCollectionListById(tetherId);
     }
@@ -165,11 +159,11 @@ public class PoTetherServiceImpl extends ServiceImpl<PoTetherMapper,PoTether> im
 
             for (int i = 0; i < tetherVo.getPoTetherandcollections().size(); i++) {
                 System.out.println(tetherVo.getPoTetherandcollections().get(i).getCollectionTitle());
-                PoTetherandcollection poTetherandcollection1 = new PoTetherandcollection();
+                PoCollection poTetherandcollection1 = new PoCollection();
                 poTetherandcollection1.setCollectionTitle(tetherVo.getPoTetherandcollections().get(i).getCollectionTitle());
                 poTetherandcollection1.setCollectionType(tetherVo.getPoTetherandcollections().get(i).getCollectionType());
                 poTetherandcollection1.setTetherId(tetherVo.getTetherId());
-                poTetherandcollectionService.insertPoTetherandcollection(poTetherandcollection1);
+                poCollectionService.insertCollection(poTetherandcollection1);
             }
         }
     }
@@ -205,18 +199,18 @@ public class PoTetherServiceImpl extends ServiceImpl<PoTetherMapper,PoTether> im
 
             this.poTetherMapper.updatePoTether(tetherVo);
             //清理po_collection表数据
-            LambdaQueryWrapper<PoTetherandcollection> lambdaQueryWrapper = new LambdaQueryWrapper<>();
-            lambdaQueryWrapper.eq(PoTetherandcollection::getTetherId, tetherVo.getTetherId());
-            poTetherandcollectionService.remove(lambdaQueryWrapper);
+            LambdaQueryWrapper<PoCollection> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+            lambdaQueryWrapper.eq(PoCollection::getTetherId, tetherVo.getTetherId());
+            poCollectionService.remove(lambdaQueryWrapper);
 //        //添加当前提交过来的藏品数据--po_Tetherandcollection表的insert操作
 
             for (int i = 0; i < tetherVo.getPoTetherandcollections().size(); i++) {
                 System.out.println(tetherVo.getPoTetherandcollections().get(i).getCollectionTitle());
-                PoTetherandcollection poTetherandcollection1 = new PoTetherandcollection();
+                PoCollection poTetherandcollection1 = new PoCollection();
                 poTetherandcollection1.setCollectionTitle(tetherVo.getPoTetherandcollections().get(i).getCollectionTitle());
                 poTetherandcollection1.setCollectionType(tetherVo.getPoTetherandcollections().get(i).getCollectionType());
                 poTetherandcollection1.setTetherId(tetherVo.getTetherId());
-                poTetherandcollectionService.insertPoTetherandcollection(poTetherandcollection1);
+                poCollectionService.insertCollection(poTetherandcollection1);
             }
         }
     }
@@ -231,7 +225,7 @@ public class PoTetherServiceImpl extends ServiceImpl<PoTetherMapper,PoTether> im
     public void deletePoTetherByTetherIdsWithCollection(Long[] tetherIds) throws Exception {
         //查询套系状态确认是否可以删除
         LambdaQueryWrapper<PoTether> lambdaQueryWrapper = new LambdaQueryWrapper<>();
-        LambdaQueryWrapper<PoTetherandcollection> lambdaQueryWrapper1 = new LambdaQueryWrapper<>();
+        LambdaQueryWrapper<PoCollection> lambdaQueryWrapper1 = new LambdaQueryWrapper<>();
 
         //判断套系是否已经被删除
         lambdaQueryWrapper.in(PoTether::getTetherId,tetherIds);
@@ -258,8 +252,8 @@ public class PoTetherServiceImpl extends ServiceImpl<PoTetherMapper,PoTether> im
         //如果可以删除 先删除套系po_tether表中的数据
         this.poTetherMapper.deletePoTetherByTetherIds(tetherIds);
         //删除po_collection表中的数据
-        lambdaQueryWrapper1.in(PoTetherandcollection::getTetherId,tetherIds);
-        poTetherandcollectionService.remove(lambdaQueryWrapper1);
+        lambdaQueryWrapper1.in(PoCollection::getTetherId,tetherIds);
+        poCollectionService.remove(lambdaQueryWrapper1);
     }
     /**
      * 校验套系名称是否存在

+ 0 - 98
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PoTetherandcollectionServiceImpl.java

@@ -1,98 +0,0 @@
-package com.ruoyi.system.service.impl;
-
-import java.util.List;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.common.utils.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.ruoyi.system.mapper.PoTetherandcollectionMapper;
-import com.ruoyi.system.domain.PoTetherandcollection;
-import com.ruoyi.system.service.IPoTetherandcollectionService;
-
-/**
- * 【请填写功能名称】Service业务层处理
- *
- * @author ruoyi
- * @date 2023-02-14
- */
-@Service
-public class PoTetherandcollectionServiceImpl extends ServiceImpl<PoTetherandcollectionMapper,PoTetherandcollection> implements IPoTetherandcollectionService
-{
-    @Autowired
-    private PoTetherandcollectionMapper poTetherandcollectionMapper;
-
-    /**
-     * 查询【请填写功能名称】
-     *
-     * @param collectionId 【请填写功能名称】主键
-     * @return 【请填写功能名称】
-     */
-    @Override
-    public PoTetherandcollection selectPoTetherandcollectionByCollectionId(Long collectionId)
-    {
-        return poTetherandcollectionMapper.selectPoTetherandcollectionByCollectionId(collectionId);
-    }
-
-    /**
-     * 查询【请填写功能名称】列表
-     *
-     * @param poTetherandcollection 【请填写功能名称】
-     * @return 【请填写功能名称】
-     */
-    @Override
-    public List<PoTetherandcollection> selectPoTetherandcollectionList(PoTetherandcollection poTetherandcollection)
-    {
-        return poTetherandcollectionMapper.selectPoTetherandcollectionList(poTetherandcollection);
-    }
-
-    /**
-     * 新增【请填写功能名称】
-     *
-     * @param poTetherandcollection 【请填写功能名称】
-     * @return 结果
-     */
-    @Override
-    public int insertPoTetherandcollection(PoTetherandcollection poTetherandcollection)
-    {
-        poTetherandcollection.setCreateTime(DateUtils.getNowDate());
-        return poTetherandcollectionMapper.insertPoTetherandcollection(poTetherandcollection);
-    }
-
-    /**
-     * 修改【请填写功能名称】
-     *
-     * @param poTetherandcollection 【请填写功能名称】
-     * @return 结果
-     */
-    @Override
-    public int updatePoTetherandcollection(PoTetherandcollection poTetherandcollection)
-    {
-        poTetherandcollection.setUpdateTime(DateUtils.getNowDate());
-        return poTetherandcollectionMapper.updatePoTetherandcollection(poTetherandcollection);
-    }
-
-    /**
-     * 批量删除【请填写功能名称】
-     *
-     * @param collectionIds 需要删除的【请填写功能名称】主键
-     * @return 结果
-     */
-    @Override
-    public int deletePoTetherandcollectionByCollectionIds(Long[] collectionIds)
-    {
-        return poTetherandcollectionMapper.deletePoTetherandcollectionByCollectionIds(collectionIds);
-    }
-
-    /**
-     * 删除【请填写功能名称】信息
-     *
-     * @param collectionId 【请填写功能名称】主键
-     * @return 结果
-     */
-    @Override
-    public int deletePoTetherandcollectionByCollectionId(Long collectionId)
-    {
-        return poTetherandcollectionMapper.deletePoTetherandcollectionByCollectionId(collectionId);
-    }
-}

+ 0 - 139
ruoyi-system/src/main/resources/mapper/system/PoTetherandcollectionMapper.xml

@@ -1,139 +0,0 @@
-<?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.ruoyi.system.mapper.PoTetherandcollectionMapper">
-
-    <resultMap type="PoTetherandcollection" id="PoTetherandcollectionResult">
-        <result property="collectionId"    column="collection_id"    />
-        <result property="collectionTitle"    column="collection_title"    />
-        <result property="status"    column="status"    />
-        <result property="collectionType"    column="collection_type"    />
-        <result property="createTime"    column="create_time"    />
-        <result property="createBy"    column="create_by"    />
-        <result property="updateTime"    column="update_time"    />
-        <result property="updateBy"    column="update_by"    />
-        <result property="delFlag"    column="del_flag"    />
-        <result property="total"    column="total"    />
-        <result property="remark"    column="remark"    />
-        <result property="image"    column="image"    />
-        <result property="formwork"    column="formwork"    />
-        <result property="price"    column="price"    />
-        <result property="publisherName"    column="publisher_name"    />
-        <result property="story"    column="story"    />
-        <result property="grounding"    column="grounding"    />
-        <result property="cochain"    column="cochain"    />
-        <result property="tetherId"    column="tether_id"    />
-    </resultMap>
-
-    <sql id="selectPoTetherandcollectionVo">
-        select collection_id, collection_title, status, collection_type, create_time, create_by, update_time, update_by, del_flag, total, remark, image, formwork, price, publisher_name, story, grounding, cochain, tether_id from po_TetherAndcollection
-    </sql>
-
-    <select id="selectPoTetherandcollectionList" parameterType="PoTetherandcollection" resultMap="PoTetherandcollectionResult">
-        <include refid="selectPoTetherandcollectionVo"/>
-        <where>
-            <if test="collectionTitle != null  and collectionTitle != ''"> and collection_title = #{collectionTitle}</if>
-            <if test="status != null  and status != ''"> and status = #{status}</if>
-            <if test="collectionType != null "> and collection_type = #{collectionType}</if>
-            <if test="total != null "> and total = #{total}</if>
-            <if test="image != null  and image != ''"> and image = #{image}</if>
-            <if test="formwork != null  and formwork != ''"> and formwork = #{formwork}</if>
-            <if test="price != null "> and price = #{price}</if>
-            <if test="publisherName != null "> and publisher_name like concat('%', #{publisherName}, '%')</if>
-            <if test="story != null  and story != ''"> and story = #{story}</if>
-            <if test="grounding != null "> and grounding = #{grounding}</if>
-            <if test="cochain != null "> and cochain = #{cochain}</if>
-            <if test="tetherId != null "> and tether_id = #{tetherId}</if>
-        </where>
-    </select>
-
-    <select id="selectPoTetherandcollectionByCollectionId" parameterType="Long" resultMap="PoTetherandcollectionResult">
-        <include refid="selectPoTetherandcollectionVo"/>
-        where collection_id = #{collectionId}
-    </select>
-
-
-
-    <insert id="insertPoTetherandcollection" parameterType="PoTetherandcollection" useGeneratedKeys="true" keyProperty="collectionId">
-        insert into po_TetherAndcollection
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="collectionTitle != null and collectionTitle != ''">collection_title,</if>
-            <if test="status != null">status,</if>
-            <if test="collectionType != null">collection_type,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="updateTime != null">update_time,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="delFlag != null">del_flag,</if>
-            <if test="total != null">total,</if>
-            <if test="remark != null">remark,</if>
-            <if test="image != null">image,</if>
-            <if test="formwork != null">formwork,</if>
-            <if test="price != null">price,</if>
-            <if test="publisherName != null">publisher_name,</if>
-            <if test="story != null">story,</if>
-            <if test="grounding != null">grounding,</if>
-            <if test="cochain != null">cochain,</if>
-            <if test="tetherId != null">tether_id,</if>
-        </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="collectionTitle != null and collectionTitle != ''">#{collectionTitle},</if>
-            <if test="status != null">#{status},</if>
-            <if test="collectionType != null">#{collectionType},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="delFlag != null">#{delFlag},</if>
-            <if test="total != null">#{total},</if>
-            <if test="remark != null">#{remark},</if>
-            <if test="image != null">#{image},</if>
-            <if test="formwork != null">#{formwork},</if>
-            <if test="price != null">#{price},</if>
-            <if test="publisherName != null">#{publisherName},</if>
-            <if test="story != null">#{story},</if>
-            <if test="grounding != null">#{grounding},</if>
-            <if test="cochain != null">#{cochain},</if>
-            <if test="tetherId != null">#{tetherId},</if>
-        </trim>
-    </insert>
-
-
-    <update id="updatePoTetherandcollection" parameterType="PoTetherandcollection">
-        update po_TetherAndcollection
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="collectionTitle != null and collectionTitle != ''">collection_title = #{collectionTitle},</if>
-            <if test="status != null">status = #{status},</if>
-            <if test="collectionType != null">collection_type = #{collectionType},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime},</if>
-            <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="delFlag != null">del_flag = #{delFlag},</if>
-            <if test="total != null">total = #{total},</if>
-            <if test="remark != null">remark = #{remark},</if>
-            <if test="image != null">image = #{image},</if>
-            <if test="formwork != null">formwork = #{formwork},</if>
-            <if test="price != null">price = #{price},</if>
-            <if test="publisherName != null">publisher_name = #{publisherName},</if>
-            <if test="story != null">story = #{story},</if>
-            <if test="grounding != null">grounding = #{grounding},</if>
-            <if test="cochain != null">cochain = #{cochain},</if>
-            <if test="tetherId != null">tether_id = #{tetherId},</if>
-        </trim>
-        where collection_id = #{collectionId}
-    </update>
-
-    <delete id="deletePoTetherandcollectionByCollectionId" parameterType="Long">
-        delete from po_TetherAndcollection where collection_id = #{collectionId}
-    </delete>
-
-    <delete id="deletePoTetherandcollectionByCollectionIds" parameterType="String">
-        delete from po_TetherAndcollection where collection_id in
-        <foreach item="collectionId" collection="array" open="(" separator="," close=")">
-            #{collectionId}
-        </foreach>
-    </delete>
-</mapper>
-