Browse Source

Merge branch 'blue' of http://39.105.160.25:10880/post-project-api/post

 Conflicts:
	ruoyi-admin/src/main/resources/application-druid.yml
	ruoyi-admin/src/main/resources/application.yml
tangzetong 2 years ago
parent
commit
25cee5928f
33 changed files with 3176 additions and 170 deletions
  1. 107 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/PoCollectionController.java
  2. 1 2
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/PoNewsController.java
  3. 282 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/PoTetherController.java
  4. 105 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/PoTetherandcollectionController.java
  5. 2 2
      ruoyi-admin/src/main/resources/application-druid.yml
  6. 55 10
      ruoyi-admin/src/main/resources/application.yml
  7. 7 0
      ruoyi-common/pom.xml
  8. 132 132
      ruoyi-framework/src/main/java/com/ruoyi/framework/config/MyBatisConfig.java
  9. 19 0
      ruoyi-framework/src/main/java/com/ruoyi/framework/config/MybatisPlusConfig.java
  10. 222 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/PoCollection.java
  11. 201 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/PoTether.java
  12. 226 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/PoTetherandcollection.java
  13. 37 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/TetherVo.java
  14. 79 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/PoCollectionMapper.java
  15. 4 1
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/PoNewsFileMapper.java
  16. 6 3
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/PoNewsMapper.java
  17. 2 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/PoNoticeMapper.java
  18. 2 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/PoOperLogMapper.java
  19. 152 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/PoTetherMapper.java
  20. 70 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/PoTetherandcollectionMapper.java
  21. 2 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/PoUserMapper.java
  22. 76 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/IPoCollectionService.java
  23. 143 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/IPoTetherService.java
  24. 63 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/IPoTetherandcollectionService.java
  25. 127 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PoCollectionServiceImpl.java
  26. 10 3
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PoNewsServiceImpl.java
  27. 343 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PoTetherServiceImpl.java
  28. 98 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PoTetherandcollectionServiceImpl.java
  29. 173 0
      ruoyi-system/src/main/resources/mapper/system/PoCollectionMapper.xml
  30. 1 14
      ruoyi-system/src/main/resources/mapper/system/PoNewsMapper.xml
  31. 3 3
      ruoyi-system/src/main/resources/mapper/system/PoNoticeMapper.xml
  32. 287 0
      ruoyi-system/src/main/resources/mapper/system/PoTetherMapper.xml
  33. 139 0
      ruoyi-system/src/main/resources/mapper/system/PoTetherandcollectionMapper.xml

+ 107 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/PoCollectionController.java

@@ -0,0 +1,107 @@
+package com.ruoyi.web.controller.system;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.system.domain.PoCollection;
+import com.ruoyi.system.service.IPoCollectionService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 藏品 信息操作处理
+ *
+ * @author ruoyi
+ */
+@RestController
+@RequestMapping("/collections")
+public class PoCollectionController extends BaseController {
+    @Autowired
+    private IPoCollectionService collectionService;
+
+    /**
+     * 获取藏品列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:collection:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(PoCollection poCollection)
+    {
+        startPage();
+        List<PoCollection> list = collectionService.selectPoCollectionList(poCollection);
+        return getDataTable(list);
+    }
+
+    /**
+     * 获取藏品列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:collection:export')")
+    @Log(title = "获取藏品列表", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, PoCollection poCollection)
+    {
+        List<PoCollection> list = collectionService.selectPoCollectionList(poCollection);
+        ExcelUtil<PoCollection> util = new ExcelUtil<PoCollection>(PoCollection.class);
+        util.exportExcel(response, list, "藏品数据");
+    }
+
+    /**
+     * 根据藏品编号获取详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:collection:query')")
+    @GetMapping(value = "/{collectionId}")
+    public AjaxResult getInfo(@PathVariable("collectionId") Long collectionId)
+    {
+        return success(collectionService.selectCollectionById(collectionId));
+    }
+
+    /**
+     * 新增藏品
+     */
+    @PreAuthorize("@ss.hasPermi('collection:add')")
+    @Log(title = "藏品", businessType = BusinessType.INSERT)
+    @ApiOperation("添加藏品")
+    @PostMapping
+    public AjaxResult add(@Validated @RequestBody PoCollection collection) {
+        List<PoCollection> collectionList = collectionService.selectPoCollectionList(collection);
+        if (collectionList != null && !collectionList.isEmpty())
+            return error("重复的藏品");
+        return toAjax(collectionService.insertCollection(collection));
+    }
+
+    /**
+     * 修改藏品
+     */
+    @PreAuthorize("@ss.hasPermi('collection:edit')")
+    @Log(title = "藏品", businessType = BusinessType.UPDATE)
+    @ApiOperation("编辑藏品")
+    @PutMapping
+    public AjaxResult edit(@Validated @RequestBody PoCollection collection) {
+        PoCollection collection1 = collectionService.selectCollectionById(collection.getCollectionId());
+        if (collection1 == null)
+            return error("要修改的藏品不存在");
+        if (collection1.getCochain() == 0)
+            return error("要修改的藏品已上链");
+        collection.setUpdateBy(getUsername());
+        return toAjax(collectionService.updateCollection(collection));
+    }
+
+    /**
+     * 删除藏品
+     */
+    @PreAuthorize("@ss.hasPermi('system:collection:remove')")
+    @Log(title = "删除藏品", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{collectionIds}")
+    public AjaxResult remove(@PathVariable Long[] collectionIds)
+    {
+        return toAjax(collectionService.deletePoCollectionByCollectionIds(collectionIds));
+    }
+}

+ 1 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/PoNewsController.java

@@ -4,7 +4,6 @@ import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.constant.UserConstants;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.poi.ExcelUtil;
@@ -84,7 +83,7 @@ public class PoNewsController extends BaseController
     @Log(title = "标题和时间搜索")
     @PreAuthorize("@ss.hasPermi('system:news:querynews')")
     @GetMapping("/queryNews")
-    public TableDataInfo list(@RequestParam(value="title",required = false)String title,
+    public TableDataInfo list(@RequestParam(value="newsTitle",required = false)String title,
                               @RequestParam(value="newsTimeStart",required = false)Date newsTimeStart,
                               @RequestParam(value="newsTimeEnd",required = false) Date newsTimeEnd)
     {

+ 282 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/PoTetherController.java

@@ -0,0 +1,282 @@
+package com.ruoyi.web.controller.system;
+
+import java.util.Date;
+import java.util.List;
+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;
+import org.springframework.web.bind.annotation.*;
+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.PoTether;
+import com.ruoyi.system.service.IPoTetherService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 套系Controller
+ *
+ * @author ruoyi
+ * @date 2023-02-12
+ */
+@RestController
+@RequestMapping("/system/tether")
+public class PoTetherController extends BaseController
+{
+    @Autowired
+    private IPoTetherService poTetherService;
+
+    @Autowired
+    private IPoUserService poUserService;
+
+    /**
+     * 标题和时间搜索消息列表
+     */
+    @ApiOperation("标题和时间搜索消息列表")
+    @Log(title = "标题和时间搜索")
+    @PreAuthorize("@ss.hasPermi('system:tether:queryTether')")
+    @GetMapping("/queryTether")
+    public TableDataInfo list(@RequestParam(value="tetherName",required = false)String tetherName,
+                              @RequestParam(value="tetherTimeStart",required = false) Date tetherTimeStart,
+                              @RequestParam(value="tetherTimeEnd",required = false) Date tetherTimeEnd)
+    {
+        startPage();
+        List<PoTether> list= poTetherService.selectListByTitleAndTime(tetherName,tetherTimeStart,tetherTimeEnd);
+        return getDataTable(list);
+    }
+    /**
+     * 查询套系列表 数量
+     */
+    @PreAuthorize("@ss.hasPermi('system:tether:list')")
+    @GetMapping("/list")
+    @ApiOperation("查询套系列表 在售")
+    public TableDataInfo Total(PoTether poTether)
+    {
+        startPage();
+        List<PoTether> sellingList = poTetherService.selectPoTetherCollectionList(poTether);
+        return getDataTable(sellingList);
+    }
+
+    /**
+     * 查询套系列表 在售
+     */
+    @PreAuthorize("@ss.hasPermi('system:tether:sellingList')")
+    @GetMapping("/sellingList")
+    @ApiOperation("查询套系列表 在售")
+    public TableDataInfo sellingList(PoTether poTether)
+    {
+        startPage();
+        List<PoTether> sellingList = poTetherService.selectPoTetherSellingList(poTether);
+        return getDataTable(sellingList);
+    }
+    /**
+     * 查询套系列表 预售
+     */
+    @ApiOperation("查询套系列表 预售")
+    @PreAuthorize("@ss.hasPermi('system:tether:advanceList')")
+    @GetMapping("/advanceList")
+    public TableDataInfo advanceList(PoTether poTether)
+    {
+        startPage();
+        List<PoTether> advanceList = poTetherService.selectPoTetherAdvanceList(poTether);
+        return getDataTable(advanceList);
+    }
+    /**
+     * 查询套系列表 已过期
+     */
+    @ApiOperation("查询套系列表 已过期")
+    @PreAuthorize("@ss.hasPermi('system:tether:selledList')")
+    @GetMapping("/selledList")
+    public TableDataInfo selledList(PoTether poTether)
+    {
+        startPage();
+        List<PoTether> selledList = poTetherService.selectPoTetherSelledList(poTether);
+        return getDataTable(selledList);
+    }
+
+    /**
+     * 导出套系列表
+     */
+    @ApiOperation("导出套系列表")
+    @PreAuthorize("@ss.hasPermi('system:tether:export')")
+    @Log(title = "套系", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, PoTether poTether)
+    {
+        List<PoTether> list = poTetherService.selectPoTetherList(poTether);
+        ExcelUtil<PoTether> util = new ExcelUtil<PoTether>(PoTether.class);
+        util.exportExcel(response, list, "套系数据");
+    }
+
+
+    /**
+     * 藏品列表
+     */
+    @ApiOperation("藏品列表")
+    @PreAuthorize("@ss.hasPermi('system:tether:collectionList')")
+    @GetMapping("/collectionList/{tetherId}")
+    public TableDataInfo collectionList( @PathVariable("tetherId") Long tetherId){
+
+        startPage();
+        List<PoTetherandcollection> collectionList = poTetherService.selectPoCollectionListById(tetherId);
+        return getDataTable(collectionList);
+    }
+
+    /**
+     * 新增套系
+     */
+    @ApiOperation("新增套系")
+    @PreAuthorize("@ss.hasPermi('system:tether:add')")
+    @Log(title = "套系", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    public AjaxResult add(@RequestBody TetherVo tetherVo,
+                          @RequestBody @Param("poUser") PoUser poUser,
+                          @RequestBody PoTetherandcollection poTetherandcollection)
+    {
+        //判断当前用户是否有操作的权限
+        poUserService.checkUserAllowed(poUser);
+
+        if (UserConstants.NOT_UNIQUE.equals(poTetherService.checkPostTetherNameUnique(tetherVo))){
+            return AjaxResult.error("新增失败"+tetherVo.getTetherName()+"已经存在");
+        }
+        if(UserConstants.NOT_UNIQUE.equals(poTetherService.checkPostTetherImageUnique(tetherVo))){
+            return AjaxResult.error("新增失败"+tetherVo.getImage()+"已经存在");
+        }
+
+        tetherVo.setCreateBy(getUsername());
+        tetherVo.setCreateTime(new Date());
+
+        Date nowTime = new Date();
+        nowTime = DateUtils.getNowDate();
+
+        if (nowTime.after(tetherVo.getShowTimeEnd())){
+            tetherVo.setSellStatus(2);
+        }
+        else if (nowTime.before(tetherVo.getShowTimeStart())){
+            tetherVo.setSellStatus(1);
+        }else{
+            tetherVo.setSellStatus(0);
+        }
+        poTetherService.insertPoTetherWithCollection(tetherVo,poTetherandcollection);
+        return success("新增成功");
+    }
+
+    /**
+     * 通过id获取套系详细信息
+     */
+    @ApiOperation("通过id获取套系详细信息")
+    @PreAuthorize("@ss.hasPermi('system:tether:query')")
+    @GetMapping(value = "/{tetherId}")
+    public AjaxResult getInfo(@PathVariable("tetherId") Long tetherId)
+    {
+       TetherVo byIdWithCollection = poTetherService.selectPoTetherByTetherIdWithCollection(tetherId);
+       return success(byIdWithCollection);
+    }
+
+    /**
+     * 修改套系
+     */
+    @ApiOperation("修改套系")
+    @PreAuthorize("@ss.hasPermi('system:tether:edit')")
+    @Log(title = "套系", businessType = BusinessType.UPDATE)
+    @PutMapping("edit")
+    public AjaxResult edit(@RequestBody TetherVo tetherVo,@RequestBody PoUser poUser)
+    {
+        //校验是否有操作的权限
+        poUserService.checkUserAllowed(poUser);
+
+        TetherVo tetherVo1 = poTetherService.selectPoTetherByTetherIdWithCollection(tetherVo.getTetherId());
+
+        if (tetherVo1 == null){
+            return error("没有对应的数据");
+        }
+        if (tetherVo1.getCochain() == 0){
+            return error("已经上链");
+        }
+
+        if (UserConstants.NOT_UNIQUE.equals(poTetherService.checkPostTetherNameUnique(tetherVo))){
+            return AjaxResult.error("修改失败"+tetherVo.getTetherName()+"已经存在");
+        }
+        if(UserConstants.NOT_UNIQUE.equals(poTetherService.checkPostTetherImageUnique(tetherVo))){
+            return AjaxResult.error("修改失败"+tetherVo.getImage()+"已经存在");
+        }
+
+        tetherVo.setUpdateBy(getUsername());
+        tetherVo.setUpdateTime(new Date());
+        poTetherService.updatePoTetherWithCollection(tetherVo);
+        return success("修改成功");
+    }
+
+    /**
+     * 删除套系
+     */
+    @ApiOperation("删除套系")
+    @PreAuthorize("@ss.hasPermi('system:tether:remove')")
+    @Log(title = "套系", businessType = BusinessType.DELETE)
+    @DeleteMapping("/remove/{tetherIds}")
+    public AjaxResult remove(@PathVariable Long[] tetherIds) throws Exception {
+        if (!getUsername().equals("admin")){
+            return AjaxResult.error("删除消息失败当前用户不是管理员");
+        }
+        poTetherService.deletePoTetherByTetherIdsWithCollection(tetherIds);
+        return success("删除成功");
+    }
+
+    /**
+     * 修改状态 是否上链
+     */
+    @ApiOperation("修改状态 是否上链")
+    @PreAuthorize("@ss.hasPermi('system:tether:isCochain')")
+    @PostMapping("/isCochain/{cochain}/{tetherId}")
+    public AjaxResult isCochain( @PathVariable("cochain") Integer cochain , @PathVariable("tetherId") Long tetherId){
+
+        if (!getUsername().equals("admin")){
+            return AjaxResult.error("不是管理员不可以修改上下链状态");
+        }
+
+        TetherVo tetherVo = poTetherService.selectPoTetherByTetherIdWithCollection(tetherId);
+        if (tetherVo.getCochain() == 0){
+            return error("禁止重复上链");
+        }
+        return toAjax(poTetherService.updatePoTetherIsCochain(cochain,tetherId));
+    }
+    /**
+     * 修改状态 是否上架
+     */
+    @ApiOperation("修改状态 是否上架")
+    @PreAuthorize("@ss.hasPermi('system:tether:isGrounding')")
+    @PostMapping("/isGrounding/{grounding}/{tetherId}")
+    public AjaxResult isGrounding( @PathVariable("grounding") Integer grounding , @PathVariable("tetherId") Long tetherId){
+
+        if (!getUsername().equals("admin")){
+            return AjaxResult.error("不是管理员不可以修改上下架状态");
+        }
+        TetherVo tetherVo = poTetherService.selectPoTetherByTetherIdWithCollection(tetherId);
+
+        if (tetherVo.getCochain() == 0 ){
+
+            return error("此套系为上链状态禁止上架");
+        }
+        if (tetherVo.getGrounding() == 0){
+            return error("禁止重复上架");
+        }
+        return toAjax(poTetherService.updatePoTetherIsGrounding(grounding,tetherId));
+    }
+
+
+
+}
+

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

@@ -0,0 +1,105 @@
+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));
+    }
+}
+

+ 2 - 2
ruoyi-admin/src/main/resources/application-druid.yml

@@ -6,7 +6,7 @@ spring:
         druid:
             # 主库数据源
             master:
-                url: jdbc:mysql://localhost:3306/ruoyi?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                url: jdbc:mysql://localhost:3306/ruoyi?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true
                 username: root
                 password: zhangyang0311
             # 从库数据源
@@ -51,7 +51,7 @@ spring:
                     # 慢SQL记录
                     log-slow-sql: true
                     slow-sql-millis: 1000
-                    merge-sql: true
+                    merge-sql: false
                 wall:
                     config:
                         multi-statement-allow: true   

+ 55 - 10
ruoyi-admin/src/main/resources/application.yml

@@ -67,12 +67,12 @@ spring:
     restart:
       # 热部署开关
       enabled: true
-  # redis 配置
+    # redis 配置
   redis:
     # 地址
     host: localhost
     # 端口,默认为6379
-    port: 26379
+    port: 6379
     # 数据库索引
     database: 0
     # 密码
@@ -99,14 +99,59 @@ token:
     # 令牌有效期(默认30分钟)
     expireTime: 30
   
-# MyBatis配置
-mybatis:
-    # 搜索指定包别名
-    typeAliasesPackage: com.ruoyi.**.domain
-    # 配置mapper的扫描,找到所有的mapper.xml映射文件
-    mapperLocations: classpath*:mapper/**/*Mapper.xml
-    # 加载全局的配置文件
-    configLocation: classpath:mybatis/mybatis-config.xml
+## MyBatis配置
+#mybatis:
+#    # 搜索指定包别名
+#    typeAliasesPackage: com.ruoyi.**.domain
+#    # 配置mapper的扫描,找到所有的mapper.xml映射文件
+#    mapperLocations: classpath*:mapper/**/*Mapper.xml
+#    # 加载全局的配置文件
+#    configLocation: classpath:mybatis/mybatis-config.xml
+# MyBatis Plus配置
+mybatis-plus:
+  # 不支持多包, 如有需要可在注解配置 或 提升扫包等级
+  # 例如 com.**.**.mapper
+  mapperPackage: com.ruoyi.**.mapper
+
+
+  # 对应的 XML 文件位置
+  mapperLocations: classpath*:mapper/**/*Mapper.xml
+  # 实体扫描,多个package用逗号或者分号分隔
+  typeAliasesPackage: com.ruoyi.**.domain
+  # 启动时是否检查 MyBatis XML 文件的存在,默认不检查
+  checkConfigLocation: false
+  configuration:
+    # 自动驼峰命名规则(camel case)映射
+    mapUnderscoreToCamelCase: true
+    # MyBatis 自动映射策略
+    # NONE:不启用 PARTIAL:只对非嵌套 resultMap 自动映射 FULL:对所有 resultMap 自动映射
+    autoMappingBehavior: PARTIAL
+    # MyBatis 自动映射时未知列或未知属性处理策
+    # NONE:不做处理 WARNING:打印相关警告 FAILING:抛出异常和详细信息
+    autoMappingUnknownColumnBehavior: NONE
+    # 更详细的日志输出 会有性能损耗 org.apache.ibatis.logging.stdout.StdOutImpl
+    # 关闭日志记录 (可单纯使用 p6spy 分析) org.apache.ibatis.logging.nologging.NoLoggingImpl
+    # 默认日志输出 org.apache.ibatis.logging.slf4j.Slf4jImpl
+    logImpl: org.apache.ibatis.logging.slf4j.Slf4jImpl
+  global-config:
+    # 是否打印 Logo banner
+    banner: false
+    dbConfig:
+      # 主键类型
+      # AUTO 自增 NONE 空 INPUT 用户输入 ASSIGN_ID 雪花 ASSIGN_UUID 唯一 UUID
+      idType: ASSIGN_ID
+      # 逻辑已删除值
+      logicDeleteValue: 2
+      # 逻辑未删除值
+      logicNotDeleteValue: 0
+      # 字段验证策略之 insert,在 insert 的时候的字段验证策略
+      # IGNORED 忽略 NOT_NULL 非NULL NOT_EMPTY 非空 DEFAULT 默认 NEVER 不加入 SQL
+      insertStrategy: NOT_NULL
+      # 字段验证策略之 update,在 update 的时候的字段验证策略
+      updateStrategy: NOT_NULL
+      # 字段验证策略之 select,在 select 的时候的字段验证策略既 wrapper 根据内部 entity 生成的 where 条件
+      where-strategy: NOT_NULL
+
 
 # PageHelper分页插件
 pagehelper: 

+ 7 - 0
ruoyi-common/pom.xml

@@ -23,6 +23,13 @@
             <artifactId>spring-context-support</artifactId>
         </dependency>
 
+        <!--整合mybatis-plus-->
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+            <version>3.5.2</version>
+        </dependency>
+
         <!-- SpringWeb模块 -->
         <dependency>
             <groupId>org.springframework</groupId>

+ 132 - 132
ruoyi-framework/src/main/java/com/ruoyi/framework/config/MyBatisConfig.java

@@ -1,132 +1,132 @@
-package com.ruoyi.framework.config;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import javax.sql.DataSource;
-import org.apache.ibatis.io.VFS;
-import org.apache.ibatis.session.SqlSessionFactory;
-import org.mybatis.spring.SqlSessionFactoryBean;
-import org.mybatis.spring.boot.autoconfigure.SpringBootVFS;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.core.env.Environment;
-import org.springframework.core.io.DefaultResourceLoader;
-import org.springframework.core.io.Resource;
-import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
-import org.springframework.core.io.support.ResourcePatternResolver;
-import org.springframework.core.type.classreading.CachingMetadataReaderFactory;
-import org.springframework.core.type.classreading.MetadataReader;
-import org.springframework.core.type.classreading.MetadataReaderFactory;
-import org.springframework.util.ClassUtils;
-import com.ruoyi.common.utils.StringUtils;
-
-/**
- * Mybatis支持*匹配扫描包
- * 
- * @author ruoyi
- */
-@Configuration
-public class MyBatisConfig
-{
-    @Autowired
-    private Environment env;
-
-    static final String DEFAULT_RESOURCE_PATTERN = "**/*.class";
-
-    public static String setTypeAliasesPackage(String typeAliasesPackage)
-    {
-        ResourcePatternResolver resolver = (ResourcePatternResolver) new PathMatchingResourcePatternResolver();
-        MetadataReaderFactory metadataReaderFactory = new CachingMetadataReaderFactory(resolver);
-        List<String> allResult = new ArrayList<String>();
-        try
-        {
-            for (String aliasesPackage : typeAliasesPackage.split(","))
-            {
-                List<String> result = new ArrayList<String>();
-                aliasesPackage = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX
-                        + ClassUtils.convertClassNameToResourcePath(aliasesPackage.trim()) + "/" + DEFAULT_RESOURCE_PATTERN;
-                Resource[] resources = resolver.getResources(aliasesPackage);
-                if (resources != null && resources.length > 0)
-                {
-                    MetadataReader metadataReader = null;
-                    for (Resource resource : resources)
-                    {
-                        if (resource.isReadable())
-                        {
-                            metadataReader = metadataReaderFactory.getMetadataReader(resource);
-                            try
-                            {
-                                result.add(Class.forName(metadataReader.getClassMetadata().getClassName()).getPackage().getName());
-                            }
-                            catch (ClassNotFoundException e)
-                            {
-                                e.printStackTrace();
-                            }
-                        }
-                    }
-                }
-                if (result.size() > 0)
-                {
-                    HashSet<String> hashResult = new HashSet<String>(result);
-                    allResult.addAll(hashResult);
-                }
-            }
-            if (allResult.size() > 0)
-            {
-                typeAliasesPackage = String.join(",", (String[]) allResult.toArray(new String[0]));
-            }
-            else
-            {
-                throw new RuntimeException("mybatis typeAliasesPackage 路径扫描错误,参数typeAliasesPackage:" + typeAliasesPackage + "未找到任何包");
-            }
-        }
-        catch (IOException e)
-        {
-            e.printStackTrace();
-        }
-        return typeAliasesPackage;
-    }
-
-    public Resource[] resolveMapperLocations(String[] mapperLocations)
-    {
-        ResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver();
-        List<Resource> resources = new ArrayList<Resource>();
-        if (mapperLocations != null)
-        {
-            for (String mapperLocation : mapperLocations)
-            {
-                try
-                {
-                    Resource[] mappers = resourceResolver.getResources(mapperLocation);
-                    resources.addAll(Arrays.asList(mappers));
-                }
-                catch (IOException e)
-                {
-                    // ignore
-                }
-            }
-        }
-        return resources.toArray(new Resource[resources.size()]);
-    }
-
-    @Bean
-    public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception
-    {
-        String typeAliasesPackage = env.getProperty("mybatis.typeAliasesPackage");
-        String mapperLocations = env.getProperty("mybatis.mapperLocations");
-        String configLocation = env.getProperty("mybatis.configLocation");
-        typeAliasesPackage = setTypeAliasesPackage(typeAliasesPackage);
-        VFS.addImplClass(SpringBootVFS.class);
-
-        final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
-        sessionFactory.setDataSource(dataSource);
-        sessionFactory.setTypeAliasesPackage(typeAliasesPackage);
-        sessionFactory.setMapperLocations(resolveMapperLocations(StringUtils.split(mapperLocations, ",")));
-        sessionFactory.setConfigLocation(new DefaultResourceLoader().getResource(configLocation));
-        return sessionFactory.getObject();
-    }
-}
+//package com.ruoyi.framework.config;
+//
+//import java.io.IOException;
+//import java.util.ArrayList;
+//import java.util.Arrays;
+//import java.util.HashSet;
+//import java.util.List;
+//import javax.sql.DataSource;
+//import org.apache.ibatis.io.VFS;
+//import org.apache.ibatis.session.SqlSessionFactory;
+//import org.mybatis.spring.SqlSessionFactoryBean;
+//import org.mybatis.spring.boot.autoconfigure.SpringBootVFS;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.context.annotation.Bean;
+//import org.springframework.context.annotation.Configuration;
+//import org.springframework.core.env.Environment;
+//import org.springframework.core.io.DefaultResourceLoader;
+//import org.springframework.core.io.Resource;
+//import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
+//import org.springframework.core.io.support.ResourcePatternResolver;
+//import org.springframework.core.type.classreading.CachingMetadataReaderFactory;
+//import org.springframework.core.type.classreading.MetadataReader;
+//import org.springframework.core.type.classreading.MetadataReaderFactory;
+//import org.springframework.util.ClassUtils;
+//import com.ruoyi.common.utils.StringUtils;
+//
+///**
+// * Mybatis支持*匹配扫描包
+// *
+// * @author ruoyi
+// */
+//@Configuration
+//public class MyBatisConfig
+//{
+//    @Autowired
+//    private Environment env;
+//
+//    static final String DEFAULT_RESOURCE_PATTERN = "**/*.class";
+//
+//    public static String setTypeAliasesPackage(String typeAliasesPackage)
+//    {
+//        ResourcePatternResolver resolver = (ResourcePatternResolver) new PathMatchingResourcePatternResolver();
+//        MetadataReaderFactory metadataReaderFactory = new CachingMetadataReaderFactory(resolver);
+//        List<String> allResult = new ArrayList<String>();
+//        try
+//        {
+//            for (String aliasesPackage : typeAliasesPackage.split(","))
+//            {
+//                List<String> result = new ArrayList<String>();
+//                aliasesPackage = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX
+//                        + ClassUtils.convertClassNameToResourcePath(aliasesPackage.trim()) + "/" + DEFAULT_RESOURCE_PATTERN;
+//                Resource[] resources = resolver.getResources(aliasesPackage);
+//                if (resources != null && resources.length > 0)
+//                {
+//                    MetadataReader metadataReader = null;
+//                    for (Resource resource : resources)
+//                    {
+//                        if (resource.isReadable())
+//                        {
+//                            metadataReader = metadataReaderFactory.getMetadataReader(resource);
+//                            try
+//                            {
+//                                result.add(Class.forName(metadataReader.getClassMetadata().getClassName()).getPackage().getName());
+//                            }
+//                            catch (ClassNotFoundException e)
+//                            {
+//                                e.printStackTrace();
+//                            }
+//                        }
+//                    }
+//                }
+//                if (result.size() > 0)
+//                {
+//                    HashSet<String> hashResult = new HashSet<String>(result);
+//                    allResult.addAll(hashResult);
+//                }
+//            }
+//            if (allResult.size() > 0)
+//            {
+//                typeAliasesPackage = String.join(",", (String[]) allResult.toArray(new String[0]));
+//            }
+//            else
+//            {
+//                throw new RuntimeException("mybatis typeAliasesPackage 路径扫描错误,参数typeAliasesPackage:" + typeAliasesPackage + "未找到任何包");
+//            }
+//        }
+//        catch (IOException e)
+//        {
+//            e.printStackTrace();
+//        }
+//        return typeAliasesPackage;
+//    }
+//
+//    public Resource[] resolveMapperLocations(String[] mapperLocations)
+//    {
+//        ResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver();
+//        List<Resource> resources = new ArrayList<Resource>();
+//        if (mapperLocations != null)
+//        {
+//            for (String mapperLocation : mapperLocations)
+//            {
+//                try
+//                {
+//                    Resource[] mappers = resourceResolver.getResources(mapperLocation);
+//                    resources.addAll(Arrays.asList(mappers));
+//                }
+//                catch (IOException e)
+//                {
+//                    // ignore
+//                }
+//            }
+//        }
+//        return resources.toArray(new Resource[resources.size()]);
+//    }
+//
+//    @Bean
+//    public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception
+//    {
+//        String typeAliasesPackage = env.getProperty("mybatis.typeAliasesPackage");
+//        String mapperLocations = env.getProperty("mybatis.mapperLocations");
+//        String configLocation = env.getProperty("mybatis.configLocation");
+//        typeAliasesPackage = setTypeAliasesPackage(typeAliasesPackage);
+//        VFS.addImplClass(SpringBootVFS.class);
+//
+//        final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
+//        sessionFactory.setDataSource(dataSource);
+//        sessionFactory.setTypeAliasesPackage(typeAliasesPackage);
+//        sessionFactory.setMapperLocations(resolveMapperLocations(StringUtils.split(mapperLocations, ",")));
+//        sessionFactory.setConfigLocation(new DefaultResourceLoader().getResource(configLocation));
+//        return sessionFactory.getObject();
+//    }
+//}

+ 19 - 0
ruoyi-framework/src/main/java/com/ruoyi/framework/config/MybatisPlusConfig.java

@@ -0,0 +1,19 @@
+package com.ruoyi.framework.config;
+
+import com.baomidou.mybatisplus.annotation.DbType;
+import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class MybatisPlusConfig {
+    @Bean
+    public MybatisPlusInterceptor mybatisPlusInterceptor() {
+        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
+        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
+        return interceptor;
+    }
+}
+
+

+ 222 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/PoCollection.java

@@ -0,0 +1,222 @@
+package com.ruoyi.system.domain;
+
+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;
+
+/**
+ * 【藏品管理】藏品 po_collection
+ *
+ * @author ruoyi
+ * @date 2023-02-12
+ */
+public class PoCollection extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 藏品Id */
+    private Long collectionId;
+
+    private Long tetherId;
+
+    /** 藏品名字 */
+    @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;
+
+
+    public void setTetherId(Long tetherId) {
+        this.tetherId = tetherId;
+    }
+
+    public Long getTetherId() {
+        return 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;
+    }
+
+    @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();
+    }
+}
+

+ 201 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/PoTether.java

@@ -0,0 +1,201 @@
+package com.ruoyi.system.domain;
+
+import java.util.Date;
+
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 套系对象 po_tether
+ *
+ * @author ruoyi
+ * @date 2023-02-12
+ */
+public class PoTether extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 套系id */
+    private Long tetherId;
+
+    /** 套系名字 */
+    @Excel(name = "套系名字")
+    private String tetherName;
+    /**
+     * 套系售卖状态
+     */
+    private Integer sellStatus;
+
+    /**
+     * 是否可以线下交换
+     */
+    private Integer exchange;
+
+    /**
+     * 套系图片
+     */
+    private String image;
+
+    /** 展示时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "展示时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date showTimeStart;
+
+    /** 展示时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "展示时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date showTimeEnd;
+
+    /** 数量 */
+    @Excel(name = "数量")
+    private Long total;
+
+    /** 状态 */
+    @Excel(name = "状态")
+    private Integer status;
+
+    /**
+     * 上架
+     */
+    private Integer grounding;
+
+    /**
+     * 上链
+     */
+    private Integer cochain;
+
+    /**
+     * 逻辑删除
+     */
+    private String delFlag;
+
+    public void setShowTimeEnd(Date showTimeEnd) {
+        this.showTimeEnd = showTimeEnd;
+    }
+
+    public Date getShowTimeEnd() {
+        return showTimeEnd;
+    }
+
+    public void setExchange(Integer exchange) {
+        this.exchange = exchange;
+    }
+
+    public Integer getExchange() {
+        return exchange;
+    }
+
+    public void setGrounding(Integer grounding) {
+        this.grounding = grounding;
+    }
+
+    public Integer getGrounding() {
+        return grounding;
+    }
+
+    public void setCochain(Integer cochain) {
+        this.cochain = cochain;
+    }
+
+    public Integer getCochain() {
+        return cochain;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() {
+        return delFlag;
+    }
+
+    public void setTetherId(Long tetherId)
+    {
+        this.tetherId = tetherId;
+    }
+
+    public Long getTetherId()
+    {
+        return tetherId;
+    }
+
+    public void setImage(String image) {
+        this.image = image;
+    }
+
+    public String getImage() {
+        return image;
+    }
+
+    public void setSellStatus(Integer sellStatus) {
+        this.sellStatus = sellStatus;
+    }
+
+    public Integer getSellStatus() {
+        return sellStatus;
+    }
+
+    public void setTetherName(String tetherName)
+    {
+        this.tetherName = tetherName;
+    }
+
+    public String getTetherName()
+    {
+        return tetherName;
+    }
+    public void setShowTimeStart(Date showTime)
+    {
+        this.showTimeStart = showTime;
+    }
+
+    public Date getShowTimeStart()
+    {
+        return showTimeStart;
+    }
+    public void setTotal(Long total)
+    {
+        this.total = total;
+    }
+
+    public Long getTotal()
+    {
+        return total;
+    }
+    public void setStatus(Integer status)
+    {
+        this.status = status;
+    }
+
+    public Integer getStatus()
+    {
+        return status;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+                .append("tetherId", getTetherId())
+                .append("tetherName", getTetherName())
+                .append("showTimeStart", getShowTimeStart())
+                .append("showTimeEnd",getShowTimeEnd())
+                .append("createBy", getCreateBy())
+                .append("createTime", getCreateTime())
+                .append("updateBy", getUpdateBy())
+                .append("updateTime", getUpdateTime())
+                .append("total", getTotal())
+                .append("status", getStatus())
+                .append("remark", getRemark())
+                .append("sellStatus",getSellStatus())
+                .append("delFlag",getDelFlag())
+                .append("image",getImage())
+                .append("exchange",getExchange())
+                .append("grounding",getGrounding())
+                .append("cochain",getCochain())
+                .toString();
+    }
+}

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

@@ -0,0 +1,226 @@
+package com.ruoyi.system.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+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 */
+    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();
+    }
+}
+

+ 37 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/TetherVo.java

@@ -0,0 +1,37 @@
+package com.ruoyi.system.domain.vo;
+
+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  ; //套系对应的藏品信息
+
+
+    public TetherVo(){}
+
+    public TetherVo(List<PoTetherandcollection> poTetherandcollections ){
+        this.poTetherandcollections = poTetherandcollections;
+
+    }
+
+    public void setPoTetherandcollections(List<PoTetherandcollection> poTetherandcollections) {
+        this.poTetherandcollections = poTetherandcollections;
+    }
+
+    public List<PoTetherandcollection> getPoTetherandcollections() {
+        return poTetherandcollections;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("poTetherandcollections", getPoTetherandcollections())
+                .toString();
+    }
+}

+ 79 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/PoCollectionMapper.java

@@ -0,0 +1,79 @@
+package com.ruoyi.system.mapper;
+
+import com.ruoyi.system.domain.PoCollection;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 藏品表 数据层
+ *
+ * @author blue
+ */
+@Mapper
+public interface PoCollectionMapper {
+    /**
+     * 查询多个藏品信息
+     *
+     * @param collectionIdList 藏品ID
+     * @return 藏品信息
+     */
+     List<PoCollection> selectCollectionById(Long[] collectionIdList);
+
+    /**
+     * 查询藏品列表
+     *
+     * @param poCollection 藏品信息
+     * @return 藏品集合
+     */
+    List<PoCollection> selectPoCollectionList(PoCollection poCollection);
+
+    /**
+     * 查询单个藏品信息
+     *
+     * @param collectionId 藏品ID
+     * @return 藏品信息
+     */
+    PoCollection selectCollectionById(Long collectionId);
+
+
+    /**
+     * 新增藏品
+     *
+     * @param collections 藏品信息
+     * @return 结果
+     */
+    int insertPoCollection(PoCollection collections);
+
+    /**
+     * 新增藏品
+     *
+     * @param collections 藏品信息
+     * @return 结果
+     */
+    int batchInsertPoCollection(List<PoCollection> collections);
+
+    /**
+     * 修改藏品
+     *
+     * @param collections 藏品信息
+     * @return 结果
+     */
+    int updatePoCollection(PoCollection collections);
+
+    /**
+     * 删除藏品
+     *
+     * @param collectionId 藏品ID
+     * @return 结果
+     */
+    public int deletePoCollectionByCollectionId(Long collectionId);
+
+    /**
+     * 批量删除藏品信息
+     *
+     * @param collectionIds 需要删除的藏品ID
+     * @return 结果
+     */
+    public int deletePoCollectionByCollectionIds(Long[] collectionIds);
+}

+ 4 - 1
ruoyi-system/src/main/java/com/ruoyi/system/mapper/PoNewsFileMapper.java

@@ -1,11 +1,14 @@
 package com.ruoyi.system.mapper;
 
-import java.util.List;
 import com.ruoyi.system.domain.PoNewsFile;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
 
 /**
  * 信息文件Mapper接口
  */
+@Mapper
 public interface PoNewsFileMapper
 {
     /**

+ 6 - 3
ruoyi-system/src/main/java/com/ruoyi/system/mapper/PoNewsMapper.java

@@ -1,6 +1,8 @@
 package com.ruoyi.system.mapper;
 
 import com.ruoyi.system.domain.PoNews;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.Date;
 import java.util.List;
@@ -9,6 +11,7 @@ import java.util.List;
  * 消息Mapper接口
  * @date 2023-01-15
  */
+@Mapper
 public interface PoNewsMapper
 {
     /**
@@ -60,14 +63,14 @@ public interface PoNewsMapper
      * @param newsTimeEnd
      * @return
      */
-    List<PoNews> selectPoNewsListByTitleAndNewsTimeStartAndNewsTimeEnd(String title, Date newsTimeStart, Date newsTimeEnd);
+    List<PoNews> selectPoNewsListByTitleAndNewsTimeStartAndNewsTimeEnd(@Param("newsTitle") String title, @Param("newsTimeStart") Date newsTimeStart, @Param("newsTimeEnd") Date newsTimeEnd);
 
     /**
      * 标题不为空时间为空
      * @param title
      * @return
      */
-    List<PoNews> selectPoNewsListByTitle(String title);
+    //List<PoNews> selectPoNewsListByTitle(String title);
 
     /**
      * 标题为空时间不为空
@@ -75,7 +78,7 @@ public interface PoNewsMapper
      * @param newsTimeEnd
      * @return
      */
-    List<PoNews> selectPoNewsByTime(Date newsTimeStart, Date newsTimeEnd);
+    //List<PoNews> selectPoNewsByTime( Date newsTimeStart,  Date newsTimeEnd);
 
     /**
      * 获取详细消息内容

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/PoNoticeMapper.java

@@ -1,6 +1,7 @@
 package com.ruoyi.system.mapper;
 
 import com.ruoyi.system.domain.PoNotice;
+import org.apache.ibatis.annotations.Mapper;
 
 import java.util.List;
 
@@ -9,6 +10,7 @@ import java.util.List;
  *
  * @author blue
  */
+@Mapper
 public interface PoNoticeMapper {
     /**
      * 查询公告信息

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/PoOperLogMapper.java

@@ -1,6 +1,7 @@
 package com.ruoyi.system.mapper;
 
 import com.ruoyi.system.domain.PoOperLog;
+import org.apache.ibatis.annotations.Mapper;
 
 import java.util.List;
 
@@ -8,6 +9,7 @@ import java.util.List;
  * 操作日志记录Mapper接口
  * @date 2023-01-15
  */
+@Mapper
 public interface PoOperLogMapper
 {
     /**

+ 152 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/PoTetherMapper.java

@@ -0,0 +1,152 @@
+package com.ruoyi.system.mapper;
+
+import java.util.Date;
+import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.system.domain.PoTether;
+import com.ruoyi.system.domain.PoTetherandcollection;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 套系Mapper接口
+ *
+ * @author ruoyi
+ * @date 2023-02-12
+ */
+public interface PoTetherMapper extends BaseMapper<PoTether>
+{
+    /**
+     * 查询套系
+     *
+     * @param tetherId 套系主键
+     * @return 套系
+     */
+    public PoTether selectPoTetherByTetherId(Long tetherId);
+
+    /**
+     * 查询套系列表
+     *
+     * @param poTether 套系
+     * @return 套系集合
+     */
+    public List<PoTether> selectPoTetherSellingList(PoTether poTether);
+
+    /**
+     * 新增套系
+     *
+     * @param poTether 套系
+     * @return 结果
+     */
+    public int insertPoTether(PoTether poTether);
+
+    /**
+     * 修改套系
+     *
+     * @param poTether 套系
+     * @return 结果
+     */
+    public int updatePoTether(PoTether poTether);
+
+    /**
+     * 删除套系
+     *
+     * @param tetherId 套系主键
+     * @return 结果
+     */
+    public int deletePoTetherByTetherId(Long tetherId);
+
+    /**
+     * 批量删除套系
+     *
+     * @param tetherIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deletePoTetherByTetherIds(Long[] tetherIds);
+
+    /**
+     * 按照标题和时间搜索
+     * @param title
+     * @param tetherTimeStart
+     * @param tetherTimeEnd
+     * @return
+     */
+    List<PoTether> selectPoTetherListByTitleAndTetherTimeStartAndTetherTimeEnd(@Param("tetherName") String title,
+                                                                               @Param("tetherTimeStart") Date tetherTimeStart,
+                                                                               @Param("tetherTimeEnd") Date tetherTimeEnd);
+
+    /**
+     * 预售
+     * @param poTether
+     * @return
+     */
+    List<PoTether> selectPoTetherAdvanceList(PoTether poTether);
+
+    /**
+     * 已过期
+     * @param poTether
+     * @return
+     */
+    List<PoTether> selectPoTetherSelledList(PoTether poTether);
+
+    /**
+     * 在售
+     * @param poTether
+     * @return
+     */
+    List<PoTether> selectPoTetherList(PoTether poTether);
+
+
+    /**
+     * 通过id查询藏品详细信息
+     *
+     * @param tetherId
+     * @return
+     */
+    List<PoTetherandcollection> selectPoCollectionListById(Long tetherId);
+
+    /**
+     * 检验标题是否重复
+     * @param tetherId
+     * @return
+     */
+    PoTether checkPostTetherTitleUnique(String tetherId);
+
+    /**
+     * 检验图片是否重复
+     * @param image
+     * @return
+     */
+    PoTether checkPostTetherImageUnique(String image);
+
+    PoTether selectPoTetherByTetherIds(Long[] tetherIds);
+
+    /**
+     * 修改状态 是否上链
+     * @param cochain
+     * @param tetherId
+     * @return
+     */
+    boolean updatePoTetherIsCochain( @Param("cochain") Integer cochain, @Param("tetherId") Long tetherId);
+
+    /**
+     * 状态修改 是否上架
+     * @param grounding
+     * @param tetherId
+     * @return
+     */
+    boolean updatePoTetherIsGrounding(Integer grounding, Long tetherId);
+
+    /**
+     * 更新种类
+     * @param poTether
+     */
+    void updatePostTetherCollection(PoTether poTether);
+
+    /**
+     * 查询更新完的种类
+     * @param poTether
+     * @return
+     */
+    List<PoTether> selectPoTetherCollectionList(PoTether poTether);
+}

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

@@ -0,0 +1,70 @@
+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 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/PoUserMapper.java

@@ -1,6 +1,7 @@
 package com.ruoyi.system.mapper;
 
 import com.ruoyi.system.domain.PoUser;
+import org.apache.ibatis.annotations.Mapper;
 
 import java.util.List;
 
@@ -10,6 +11,7 @@ import java.util.List;
  * @author ruoyi
  * @date 2023-01-17
  */
+@Mapper
 public interface PoUserMapper
 {
     /**

+ 76 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IPoCollectionService.java

@@ -0,0 +1,76 @@
+package com.ruoyi.system.service;
+
+import com.ruoyi.system.domain.PoCollection;
+
+import java.util.List;
+
+/**
+ * 消息接口
+ */
+public interface IPoCollectionService {
+    /**
+     * 批量查询藏品
+     *
+     * @param collectionList
+     * @return
+     */
+    public List<PoCollection> selectPoCollectionsByCollections(List<PoCollection> collectionList);
+
+
+    /**
+     * 获取藏品详细内容
+     *
+     * @param collectionId 藏品ID
+     * @return 藏品信息
+     */
+    PoCollection selectCollectionById(Long collectionId);
+
+    /**
+     * 查询藏品列表
+     *
+     * @param poCollection
+     * @return
+     */
+    public List<PoCollection> selectPoCollectionList(PoCollection poCollection);
+
+    /**
+     * 增加
+     *
+     * @param collection 藏品信息
+     * @return 操作状态
+     */
+    public int insertCollection(PoCollection collection);
+
+    /**
+     * 批量增加
+     *
+     * @param collection 藏品信息
+     * @return 操作状态
+     */
+    public int batchInsertCollection(List<PoCollection> collection);
+
+    /**
+     * 修改
+     *
+     * @param collection 更新的藏品信息
+     * @return 操作状态
+     */
+    public int updateCollection(PoCollection collection);
+
+    /**
+     * 批量删除藏品
+     *
+     * @param collectionIds
+     * @return
+     */
+    public int deletePoCollectionByCollectionIds(Long[] collectionIds);
+
+    /**
+     * 删除藏品
+     *
+     * @param collectionId
+     * @return 结果
+     */
+    public int deletePoCollectionByCollectionId(Long collectionId);
+}
+

+ 143 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IPoTetherService.java

@@ -0,0 +1,143 @@
+package com.ruoyi.system.service;
+
+import java.util.Date;
+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;
+
+/**
+ * 套系Service接口
+ *
+ * @author ruoyi
+ * @date 2023-02-12
+ */
+public interface IPoTetherService extends IService<PoTether>
+{
+
+    /**
+     * 查询套系列表
+     *
+     * @param poTether 套系 在售
+     * @return 套系集合
+     */
+    public List<PoTether> selectPoTetherSellingList(PoTether poTether);
+
+
+    /**
+     * 按照标题和时间查询
+     * @param tetherName
+     * @param tetherTimeStart
+     * @param tetherTimeEnd
+     * @return
+     */
+    List<PoTether> selectListByTitleAndTime(String tetherName, Date tetherTimeStart, Date tetherTimeEnd);
+
+    /**
+     * 预售
+     * @param poTether
+     * @return
+     */
+    List<PoTether> selectPoTetherAdvanceList(PoTether poTether);
+
+    /**
+     * 已过期
+     * @param poTether
+     * @return
+     */
+    List<PoTether> selectPoTetherSelledList(PoTether poTether);
+
+    /**
+     * 在售
+     * @param poTether
+     * @return
+     */
+    List<PoTether> selectPoTetherList(PoTether poTether);
+
+    /**
+     * 藏品按钮
+     * @param
+     * @return
+     */
+    List<PoTetherandcollection> selectPoCollectionListById(Long tetherId);
+
+    /**
+     * 新增套系
+     * @param tetherVo
+     * @return
+     */
+    void insertPoTetherWithCollection(TetherVo tetherVo,PoTetherandcollection poTetherandcollection);
+
+    /**
+     * 通过id查询套系信息和对应的藏品信息
+     * @param tetherId
+     * @return
+     */
+    TetherVo selectPoTetherByTetherIdWithCollection(Long tetherId);
+
+    /**
+     * 修改套系
+     * @param tetherVo
+     * @return
+     */
+
+    void updatePoTetherWithCollection(TetherVo tetherVo);
+
+
+
+    /**
+     * 同时删除套系和藏品的关联关系
+     * @param tetherIds
+     * @return
+     */
+    void deletePoTetherByTetherIdsWithCollection(Long[] tetherIds) throws Exception;
+
+    /**
+     * 校验套系名称是否存在
+     * @param tetherVo
+     * @return
+     */
+    String checkPostTetherNameUnique(TetherVo tetherVo);
+
+    /**
+     * 检验图片是否重复
+     * @param tetherVo
+     * @return
+     */
+    String checkPostTetherImageUnique(TetherVo tetherVo);
+
+    /**
+     * 批量查询套系信息
+     * @param tetherIds
+     * @return
+     */
+    TetherVo selectPoTetherByTetherIdsWithCollection(Long[] tetherIds);
+
+    /**
+     * 修改状态 是否上链
+     * @param cochain
+     * @param tetherId
+     * @return
+     */
+    boolean updatePoTetherIsCochain(Integer cochain, Long tetherId);
+
+    /**
+     * 修改状态 是否上架
+     * @param grounding
+     * @param tetherId
+     * @return
+     */
+    boolean updatePoTetherIsGrounding(Integer grounding, Long tetherId);
+
+    /**
+     * 藏品种类个数
+     * @param poTether
+     * @return
+     */
+    List<PoTether> selectPoTetherCollectionList(PoTether poTether);
+
+}
+

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

@@ -0,0 +1,63 @@
+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);
+}

+ 127 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PoCollectionServiceImpl.java

@@ -0,0 +1,127 @@
+package com.ruoyi.system.service.impl;
+
+import com.ruoyi.system.domain.PoCollection;
+import com.ruoyi.system.mapper.PoCollectionMapper;
+import com.ruoyi.system.service.IPoCollectionService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+@Service
+public class PoCollectionServiceImpl implements IPoCollectionService {
+    @Autowired
+    PoCollectionMapper poCollectionMapper;
+
+    /**
+     * 查询藏品
+     *
+     * @param collectionList
+     * @return
+     */
+    @Override
+    public List<PoCollection> selectPoCollectionsByCollections(List<PoCollection> collectionList) {
+        List<PoCollection> result = new ArrayList<>();
+        for (PoCollection collection1 : collectionList) {
+            List<PoCollection> list = poCollectionMapper.selectPoCollectionList(collection1);
+            if (list == null || list.isEmpty())
+                continue;
+            result = Stream.of(result, list).flatMap(List::stream).distinct().collect(Collectors.toList());
+        }
+        return result;
+    }
+
+    /**
+     * 查询藏品列表
+     *
+     * @param poCollection
+     * @return
+     */
+    @Override
+    public List<PoCollection> selectPoCollectionList(PoCollection poCollection)
+    {
+        return poCollectionMapper.selectPoCollectionList(poCollection);
+    }
+
+
+    /**
+     * 获取藏品详细内容
+     *
+     * @param collectionId 藏品ID
+     * @return 藏品信息
+     */
+    @Override
+    public PoCollection selectCollectionById(Long collectionId) {
+        return poCollectionMapper.selectCollectionById(collectionId);
+    }
+
+
+    /**
+     * 增加
+     *
+     * @param collection 藏品信息
+     * @return 操作状态
+     */
+    @Override
+    public int insertCollection(PoCollection collection) {
+        List<PoCollection> poCollection = poCollectionMapper.selectPoCollectionList(collection);
+        if (poCollection != null)
+            return -1;
+        return poCollectionMapper.insertPoCollection(collection);
+    }
+
+    /**
+     * 批量增加
+     *
+     * @param collection 藏品信息
+     * @return 操作状态
+     */
+    @Override
+    public int batchInsertCollection(List<PoCollection> collection) {
+        for (PoCollection collection1 : collection) {
+            List<PoCollection> list = poCollectionMapper.selectPoCollectionList(collection1);
+            if (list == null || list.isEmpty())
+                continue;
+            return -1;
+        }
+        return poCollectionMapper.batchInsertPoCollection(collection);
+    }
+
+    /**
+     * 修改
+     *
+     * @param collection 更新的藏品信息
+     * @return 操作状态
+     */
+    @Override
+    public int updateCollection(PoCollection collection) {
+        return poCollectionMapper.updatePoCollection(collection);
+    }
+
+    /**
+     * 批量删除藏品
+     *
+     * @param collectionIds 需要删除的藏品主键
+     * @return
+     */
+    @Override
+    public int deletePoCollectionByCollectionIds(Long[] collectionIds)
+    {
+        return poCollectionMapper.deletePoCollectionByCollectionIds(collectionIds);
+    }
+
+    /**
+     * 删除藏品
+     *
+     * @param collectionId
+     * @return
+     */
+    @Override
+    public int deletePoCollectionByCollectionId(Long collectionId)
+    {
+        return poCollectionMapper.deletePoCollectionByCollectionId(collectionId);
+    }
+}

+ 10 - 3
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PoNewsServiceImpl.java

@@ -152,21 +152,28 @@ public class PoNewsServiceImpl implements IPoNewsService {
                 }
                 if (newsTimeStart.before(newsTimeEnd)) {
                     return poNewsMapper.selectPoNewsListByTitleAndNewsTimeStartAndNewsTimeEnd(title, newsTimeStart, newsTimeEnd);
-                } else if ((newsTimeStart != null && newsTimeEnd == null) || (newsTimeStart == null && newsTimeEnd != null)) {
+                } else{
                     //有一个时间不为空返回提示信息
                     List list = new ArrayList();
                     list.add("请选择正确的时间段");
                     return list;
                 }
             } else {//时间都为空
-                return poNewsMapper.selectPoNewsListByTitle(title);
+                return poNewsMapper.selectPoNewsListByTitleAndNewsTimeStartAndNewsTimeEnd(title,newsTimeStart,newsTimeEnd);
             }
         }
         //标题为空
         else {
             //时间不为空
             if (newsTimeStart != null && newsTimeEnd != null) {
-                return poNewsMapper.selectPoNewsByTime(newsTimeStart, newsTimeEnd);
+                if (newsTimeStart.before(newsTimeEnd)){
+                    return poNewsMapper.selectPoNewsListByTitleAndNewsTimeStartAndNewsTimeEnd(title,newsTimeStart,newsTimeEnd);
+                }else{
+                    //有一个时间不为空返回提示信息
+                    List list = new ArrayList();
+                    list.add("请选择正确的时间段");
+                    return list;
+                }
             }
         }
         //都为空执行分页查询

+ 343 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PoTetherServiceImpl.java

@@ -0,0 +1,343 @@
+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;
+import com.ruoyi.system.domain.PoTether;
+import com.ruoyi.system.service.IPoTetherService;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * 套系Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2023-02-12
+ */
+@Service
+public class PoTetherServiceImpl extends ServiceImpl<PoTetherMapper,PoTether> implements IPoTetherService
+{
+    @Autowired
+    private PoTetherMapper poTetherMapper;
+    @Autowired
+    private PoTetherandcollectionMapper poTetherandcollectionMapper;
+
+    @Autowired
+    private PoTetherandcollectionServiceImpl poTetherandcollectionService;
+
+    @Autowired
+    private PoTetherServiceImpl poTetherService;
+
+    /**
+     * 在售
+     * @param poTether 套系 在售
+     * @return
+     */
+    @Override
+    public List<PoTether> selectPoTetherSellingList(PoTether poTether)
+    {
+        return poTetherMapper.selectPoTetherSellingList(poTether);
+    }
+
+    /**
+     * 按照标题和时间搜索
+     * @param tetherName
+     * @param tetherTimeStart
+     * @param tetherTimeEnd
+     * @return
+     */
+    @Override
+    public List<PoTether> selectListByTitleAndTime(String tetherName, Date tetherTimeStart, Date tetherTimeEnd) {
+
+        if (tetherName != null) {
+            //标题不为空且开始时间和结束时间都不为空
+            if (tetherTimeStart != null && tetherTimeEnd != null) {
+
+                if (DateUtils.getNowDate().before(tetherTimeEnd)){
+                    tetherTimeEnd = DateUtils.getNowDate();
+                }
+                if (tetherTimeStart.before(tetherTimeEnd)) {
+                    return poTetherMapper.selectPoTetherListByTitleAndTetherTimeStartAndTetherTimeEnd(tetherName, tetherTimeStart, tetherTimeEnd);
+                } else{
+                    //有一个时间不为空返回提示信息
+                    List list = new ArrayList();
+                    list.add("请选择正确的时间段");
+                    return list;
+                }
+            } else {//时间都为空
+                return poTetherMapper.selectPoTetherListByTitleAndTetherTimeStartAndTetherTimeEnd(tetherName,tetherTimeStart,tetherTimeEnd);
+            }
+        }
+        //标题为空
+        else {
+            //时间不为空
+            if (tetherTimeStart != null && tetherTimeEnd != null) {
+                if (tetherTimeStart.before(tetherTimeEnd)){
+                    return poTetherMapper.selectPoTetherListByTitleAndTetherTimeStartAndTetherTimeEnd(tetherName,tetherTimeStart,tetherTimeEnd);
+                }else{
+                    //有一个时间不为空返回提示信息
+                    List list = new ArrayList();
+                    list.add("请选择正确的时间段");
+                    return list;
+                }
+            }
+        }
+        //都为空执行分页查询
+        PoTether poTether = new PoTether();
+        return poTetherMapper.selectPoTetherList(poTether);
+    }
+
+    /**
+     * 预售
+     * @param poTether
+     * @return
+     */
+    @Override
+    public List<PoTether> selectPoTetherAdvanceList(PoTether poTether) {
+        return poTetherMapper.selectPoTetherAdvanceList(poTether);
+
+    }
+
+    /**
+     * 已过期
+     * @param poTether
+     * @return
+     */
+    @Override
+    public List<PoTether> selectPoTetherSelledList(PoTether poTether) {
+        return poTetherMapper.selectPoTetherSelledList(poTether);
+    }
+
+    /**
+     * 查询套系列表
+     * @param poTether
+     * @return
+     */
+    @Override
+    public List<PoTether> selectPoTetherList(PoTether poTether) {
+        return poTetherMapper.selectPoTetherList(poTether);
+    }
+
+    /**
+     * 藏品按钮
+     * @param
+     * @return
+     */
+    @Override
+    public List<PoTetherandcollection> selectPoCollectionListById(Long tetherId) {
+
+        return poTetherMapper.selectPoCollectionListById(tetherId);
+    }
+
+    /**
+     * 新增套系 同时保存对应的藏品数据到中间表
+     *
+     * @param tetherVo
+     * @return
+     */
+    @Override
+    @Transactional
+    public void insertPoTetherWithCollection(TetherVo tetherVo,PoTetherandcollection poTetherandcollection) {
+        //保存套系的基本数据到套系表tether
+        this.poTetherMapper.insertPoTether(tetherVo);
+        //套系包含藏品
+        //保存藏品数据到中间表 批量增加
+        System.out.println(tetherVo.getPoTetherandcollections().size());
+        for (int i = 0 ; i < tetherVo.getPoTetherandcollections().size();i++) {
+            System.out.println(tetherVo.getPoTetherandcollections().get(i).getCollectionTitle());
+            PoTetherandcollection poTetherandcollection1 = new PoTetherandcollection();
+            poTetherandcollection1.setCollectionTitle(tetherVo.getPoTetherandcollections().get(i).getCollectionTitle());
+            poTetherandcollection1.setCollectionType(tetherVo.getPoTetherandcollections().get(i).getCollectionType());
+            poTetherandcollection1.setTetherId(tetherVo.getTetherId());
+            poTetherandcollectionService.insertPoTetherandcollection(poTetherandcollection1);
+        }
+    }
+    /**
+     * 通过id查询套系信息和对应的藏品信息
+     * @param tetherId
+     * @return
+     */
+    @Override
+    public TetherVo selectPoTetherByTetherIdWithCollection(Long tetherId) {
+        //查询套系基本信息 po_tether
+        PoTether poTether = this.poTetherMapper.selectPoTetherByTetherId(tetherId);
+        TetherVo tetherVo = new TetherVo();
+        if (poTether != null) {
+            BeanUtils.copyProperties(poTether, tetherVo);
+        }
+        return  tetherVo;
+    }
+
+    /**
+     * 修改套系信息
+     * @param tetherVo
+     * @return
+     */
+    @Override
+    @Transactional
+    public void updatePoTetherWithCollection(TetherVo tetherVo) {
+        //更新po_tether表基本信息
+        this.poTetherMapper.updatePoTether(tetherVo);
+        //清理po_collection表数据
+        LambdaQueryWrapper<PoTetherandcollection> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+        lambdaQueryWrapper.eq(PoTetherandcollection::getTetherId,tetherVo.getTetherId());
+        poTetherandcollectionService.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();
+            poTetherandcollection1.setCollectionTitle(tetherVo.getPoTetherandcollections().get(i).getCollectionTitle());
+            poTetherandcollection1.setCollectionType(tetherVo.getPoTetherandcollections().get(i).getCollectionType());
+            poTetherandcollection1.setTetherId(tetherVo.getTetherId());
+            poTetherandcollectionService.insertPoTetherandcollection(poTetherandcollection1);
+        }
+
+    }
+
+
+    /**
+     * 同时删除套系和藏品的关联关系
+     * @param tetherIds
+     * @return
+     */
+    @Override
+    public void deletePoTetherByTetherIdsWithCollection(Long[] tetherIds) throws Exception {
+        //查询套系状态确认是否可以删除
+        LambdaQueryWrapper<PoTether> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+        LambdaQueryWrapper<PoTetherandcollection> lambdaQueryWrapper1 = new LambdaQueryWrapper<>();
+
+        //判断套系是否已经被删除
+        lambdaQueryWrapper.in(PoTether::getTetherId,tetherIds);
+        lambdaQueryWrapper.eq(PoTether::getDelFlag ,1);
+        long count2 = this.count(lambdaQueryWrapper);
+        if (count2 > 0){
+            throw new Exception("套系已经被删除");
+        }
+        //判断套系是否上链
+        lambdaQueryWrapper.in(PoTether::getTetherId,tetherIds);
+        lambdaQueryWrapper.eq(PoTether::getCochain,0);
+        long count = this.count(lambdaQueryWrapper);
+        if (count>0){
+                throw new Exception("套系已经上链");
+        }
+        //判断套系是否上架
+        lambdaQueryWrapper.in(PoTether::getTetherId,tetherIds);
+        lambdaQueryWrapper.eq(PoTether::getGrounding,0);
+        long count1 = this.count(lambdaQueryWrapper);
+        if (count1>0){
+
+            throw new Exception("套系已经上架");
+        }
+        //如果可以删除 先删除套系po_tether表中的数据
+        this.poTetherMapper.deletePoTetherByTetherIds(tetherIds);
+        //删除po_collection表中的数据
+        lambdaQueryWrapper1.in(PoTetherandcollection::getTetherId,tetherIds);
+        poTetherandcollectionService.remove(lambdaQueryWrapper1);
+    }
+    /**
+     * 校验套系名称是否存在
+     * @param tetherVo
+     * @return
+     */
+
+    @Override
+    public String checkPostTetherNameUnique(TetherVo tetherVo) {
+        Long tetherId = StringUtils.isNull(tetherVo.getTetherId()) ? -1L : tetherVo.getTetherId();
+        PoTether info = poTetherMapper.checkPostTetherTitleUnique(tetherVo.getTetherName());
+        if (StringUtils.isNotNull(info) && info.getTetherId() != tetherId) {
+            return UserConstants.NOT_UNIQUE;
+        }
+            return UserConstants.UNIQUE;
+    }
+    /**
+     * 检验图片是否重复
+     * @param tetherVo
+     * @return
+     */
+    @Override
+    public String checkPostTetherImageUnique(TetherVo tetherVo) {
+
+        Long tetherId = StringUtils.isNull(tetherVo.getTetherId()) ? -1L : tetherVo.getTetherId();
+
+        PoTether info = poTetherMapper.checkPostTetherImageUnique(tetherVo.getImage());
+        if (StringUtils.isNotNull(info) && info.getTetherId() != tetherId) {
+            return UserConstants.NOT_UNIQUE;
+        }
+        return UserConstants.UNIQUE;
+
+    }
+
+    /**
+     * 批量查询套系信息
+     * @param tetherIds
+     * @return
+     */
+    @Override
+    public TetherVo selectPoTetherByTetherIdsWithCollection(Long[] tetherIds) {
+
+        //查询套系基本信息 po_tether
+        PoTether poTether = this.poTetherMapper.selectPoTetherByTetherIds(tetherIds);
+        TetherVo tetherVo = new TetherVo();
+        if (poTether != null) {
+            BeanUtils.copyProperties(poTether, tetherVo);
+        }
+        return  tetherVo;
+    }
+
+    /**
+     * 修改状态 是否上链
+     * @param cochain
+     * @param tetherId
+     * @return
+     */
+    @Override
+    public boolean updatePoTetherIsCochain(Integer cochain, Long tetherId) {
+
+       return  poTetherMapper.updatePoTetherIsCochain(cochain,tetherId);
+
+    }
+
+    /**
+     * 修改状态 是否上架
+     * @param grounding
+     * @param tetherId
+     * @return
+     */
+    @Override
+    public boolean updatePoTetherIsGrounding(Integer grounding, Long tetherId) {
+        return poTetherMapper.updatePoTetherIsGrounding(grounding,  tetherId);
+    }
+
+    /**
+     * 藏品种类个数
+     * @param poTether
+     * @return
+     */
+    @Override
+    public List<PoTether> selectPoTetherCollectionList(PoTether poTether) {
+
+        poTetherMapper.updatePostTetherCollection(poTether);
+        return poTetherMapper.selectPoTetherCollectionList(poTether);
+    }
+
+}
+

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

@@ -0,0 +1,98 @@
+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);
+    }
+}

+ 173 - 0
ruoyi-system/src/main/resources/mapper/system/PoCollectionMapper.xml

@@ -0,0 +1,173 @@
+<?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.PoCollectionMapper">
+
+    <resultMap type="PoCollection" id="PoCollectionResult">
+        <result property="collectionId" column="collection_id"/>
+        <result property="collectionTitle" column="collection_title"/>
+        <result property="collectionType" column="collection_type"/>
+        <result property="status" column="status"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="delFlag" column="del_flag"/>
+        <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="grouding"/>
+        <result property="cochain" column="cochain"/>
+        <result property="tetherId" column="tetherId"/>
+    </resultMap>
+
+    <sql id="selectPoCollectionVo">
+        select collection_id,
+               collection_title,
+               collection_type,
+               status,
+               create_by,
+               create_time,
+               update_by,
+               update_time,
+               remark,
+               del_flag,
+               publisher_name,
+               formwork,
+               price,
+               story,
+               grounding,
+               cochain,
+               tether_id
+        from po_collection
+    </sql>
+
+    <select id="selectCollectionById" parameterType="Long" resultMap="PoCollectionResult">
+        <include refid="selectPoCollectionVo"/>
+        where collection_id = #{collectionId}
+    </select>
+
+    <select id="selectPoCollectionList" parameterType="PoCollection" resultMap="PoCollectionResult">
+        <include refid="selectPoCollectionVo"/>
+        <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>
+
+    <insert id="insertPoCollection" parameterType="PoCollection">
+        insert into po_collection (
+        <if test="collectionTitle != null and collectionTitle != '' ">collection_title,</if>
+        <if test="collectionType != null and collectionType != '' ">collection_type,</if>
+        <if test="status != null and status != '' ">status,</if>
+        <if test="remark != null and remark != ''">remark,</if>
+        <if test="createBy != null and createBy != ''">create_by,</if>
+        <if test="publisherName != null and publisherName != ''">publisher_name,</if>
+        <if test="formwork != null and formwork != ''">formwork,</if>
+        <if test="price != null and price != ''">price,</if>
+        <if test="story != null and story != ''">story,</if>
+        <if test="grouding != null and grouding != ''">grounding,</if>
+        <if test="cochain != null and cochain != ''">cochain,</if>
+        <if test="tetherId != null and tetherId != ''">tether_id,</if>
+        del_flag,
+        create_time
+        )values(
+        <if test="collectionTitle != null and collectionTitle != ''">#{collectionTitle},</if>
+        <if test="collectionType != null and collectionType != ''">#{collectionType},</if>
+        <if test="status != null and status != ''">#{status},</if>
+        <if test="remark != null and remark != ''">#{remark},</if>
+        <if test="createBy != null and createBy != ''">#{createBy},</if>
+        <if test="publisherName != null and publisherName != ''">#{publisherName},</if>
+        <if test="formwork != null and formwork != ''">#{formwork},</if>
+        <if test="price != null and price != ''">#{price},</if>
+        <if test="story != null and story != ''">#{story},</if>
+        <if test="grouding != null and grouding != ''">#{grounding},</if>
+        <if test="cochain != null and cochain != ''">#{cochain},</if>
+        <if test="tetherId != null and tetherId != ''">#{tetherId},</if>
+        0,
+        sysdate()
+        )
+    </insert>
+
+    <insert id="batchInsertPoCollection" parameterType="PoCollection">
+        insert into po_collection (
+        <if test="collectionTitle != null and collectionTitle != '' ">collection_title,</if>
+        <if test="collectionType != null and collectionType != '' ">collection_type,</if>
+        <if test="status != null and status != '' ">status,</if>
+        <if test="remark != null and remark != ''">remark,</if>
+        <if test="createBy != null and createBy != ''">create_by,</if>
+        <if test="publisherName != null and publisherName != ''">publisher_name,</if>
+        <if test="formwork != null and formwork != ''">formwork,</if>
+        <if test="price != null and price != ''">price,</if>
+        <if test="story != null and story != ''">story,</if>
+        <if test="grouding != null and grouding != ''">grounding,</if>
+        <if test="cochain != null and cochain != ''">cochain,</if>
+        <if test="tetherId != null and tetherId != ''">tether_id,</if>
+        del_flag,
+        create_time
+        )values(
+        <foreach collection="collections" item="PoCollection" separator=",">
+            <if test="collectionTitle != null and collectionTitle != ''">#{collectionTitle},</if>
+            <if test="collectionType != null and collectionType != ''">#{collectionType},</if>
+            <if test="status != null and status != ''">#{status},</if>
+            <if test="remark != null and remark != ''">#{remark},</if>
+            <if test="createBy != null and createBy != ''">#{createBy},</if>
+            <if test="publisherName != null and publisherName != ''">#{publisherName},</if>
+            <if test="formwork != null and formwork != ''">#{formwork},</if>
+            <if test="price != null and price != ''">#{price},</if>
+            <if test="story != null and story != ''">#{story},</if>
+            <if test="grouding != null and grouding != ''">#{grounding},</if>
+            <if test="cochain != null and cochain != ''">#{cochain},</if>
+            <if test="tetherId != null and tetherId != ''">#{tetherId},</if>
+            0,
+            sysdate()
+        </foreach>
+        )
+    </insert>
+
+    <update id="updatePoCollection" parameterType="PoCollection">
+        update po_collection
+        <set>
+            <if test="collectionTitle != null and collectionTitle != ''">collection_title = #{collectionTitle},</if>
+            <if test="collectionType != null and collectionType != ''">collection_type = #{collectionType},</if>
+            <if test="status != null and status != ''">status = #{status},</if>
+            <if test="remark != null and remark != ''">remark = #{remark},</if>
+            <if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
+            <if test="publisherName != null and publisherName != ''">publisher_name = #{publisherName},</if>
+            <if test="formwork != null and formwork != ''">formwork = #{formwork},</if>
+            <if test="price != null and price != ''">price = #{price},</if>
+            <if test="story != null and story != ''">story = #{story},</if>
+            <if test="grouding != null and grouding != ''">grouding = #{grounding},</if>
+            <if test="cochain != null and cochain != ''">cochain = #{cochain},</if>
+            <if test="tetherId != null and tetherId != ''">tetherId = #{tetherId},</if>
+            update_time = sysdate()
+        </set>
+        where collection_id = #{collectionId}
+    </update>
+
+    <delete id="deletePoCollectionByCollectionId" parameterType="Long">
+        delete from po_collection where collection_id = #{collectionId}
+    </delete>
+
+    <delete id="deletePoCollectionByCollectionIds" parameterType="String">
+        delete from po_collection where collection_id in
+        <foreach item="collectionId" collection="array" open="(" separator="," close=")">
+            #{collectionId}
+        </foreach>
+    </delete>
+
+</mapper>

+ 1 - 14
ruoyi-system/src/main/resources/mapper/system/PoNewsMapper.xml

@@ -134,21 +134,8 @@
     </where>
     </select>
 
-<!--    标题不为空时间为空-->
-    <select id="selectPoNewsListByTitle" resultType="PoNews" resultMap="PoNewsResult">
-        <include refid="selectPoNewsVo"></include>
-        <where>
-            <if test="newsTitle != null and newsTitle != ''">and news_title like concat('%', #{newsTitle}, '%')</if>
-        </where>
-    </select>
 
-<!--    标题为空时间不为空-->
-    <select id="selectPoNewsByTime" resultType="PoNews" resultMap="PoNewsResult">
-        <include refid="selectPoNewsVo"></include>
-        <where>
-            <if test="newsTimeStart != null and newsTimeEnd != null "> and news_time between #{newsTimeStart} and #{newsTimeEnd}</if>
-        </where>
-    </select>
+
 
 <!--    查询详细内容-->
     <select id="selectContentByNewsId" resultType="PoNews" resultMap="PoNewsResult">

+ 3 - 3
ruoyi-system/src/main/resources/mapper/system/PoNoticeMapper.xml

@@ -86,9 +86,9 @@
         <if test="status != null and status != ''">#{status},</if>
         <if test="remark != null and remark != ''">#{remark},</if>
         <if test="createBy != null and createBy != ''">#{createBy},</if>
-        <if test="publisherId != null and publisherId != ''">#{publisher_id},</if>
-        <if test="userId != null and userId != ''">#{user_id},</if>
-        <if test="readUserId != null and readUserId != ''">#{read_userid},</if>
+        <if test="publisherId != null and publisherId != ''">#{publisherId},</if>
+        <if test="userId != null and userId != ''">#{userId},</if>
+        <if test="readUserId != null and readUserId != ''">#{readUserId},</if>
         0,
         sysdate()
         )

+ 287 - 0
ruoyi-system/src/main/resources/mapper/system/PoTetherMapper.xml

@@ -0,0 +1,287 @@
+<?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.PoTetherMapper">
+
+    <resultMap type="PoTether" id="PoTetherResult">
+        <result property="tetherId"    column="tether_id"    />
+        <result property="tetherName"    column="tether_name"    />
+        <result property="showTimeStart"    column="show_time_start"    />
+        <result property="showTimeEnd" column="show_time_end"/>
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="total"    column="total"    />
+        <result property="status"    column="status"    />
+        <result property="remark"    column="remark"    />
+        <result property="sellStatus" column="sell_status"/>
+        <result property="delFlag" column="del_flag"/>
+        <result property="image"    column="image"    />
+        <result property="exchange" column="exchange"/>
+        <result property="grounding"    column="grounding"    />
+        <result property="cochain"    column="cochain"    />
+    </resultMap>
+
+    <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="selectPoTetherVo">
+        select tether_id, tether_name, show_time_start, show_time_end, create_by, create_time, update_by, update_time, total, status, remark ,sell_status,del_flag,image,exchange ,grounding,cochain ,tether_id from po_tether
+    </sql>
+
+<!--在售-->
+    <select id="selectPoTetherSellingList" parameterType="PoTether" resultMap="PoTetherResult">
+        <include refid="selectPoTetherVo"/>
+        <where>
+            <if test="tetherName != null  and tetherName != ''"> and tether_name like concat('%', #{tetherName}, '%')</if>
+            <if test="showTimeStart != null "> and show_time_start = #{showTimeStart}</if>
+            <if test="showTimeEnd != null">and show_time_end = #{showTimeEnd}</if>
+            <if test="total != null "> and total = #{total}</if>
+            <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="image != null and image != '' ">and image = #{image}</if>
+            <if test="exchange != null">and exchange = #{exchange}</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>
+            and del_flag = '0'
+            and sell_status = 0
+        </where>
+    </select>
+
+<!--获取详细信息-->
+    <select id="selectPoTetherByTetherId" parameterType="Long" resultMap="PoTetherResult">
+        <include refid="selectPoTetherVo"/>
+        where tether_id = #{tetherId}
+    </select>
+
+    <!--    标题时间都不为空-->
+    <select id="selectPoTetherListByTitleAndTetherTimeStartAndTetherTimeEnd"
+            resultType="PoTether" resultMap="PoTetherResult">
+        <include refid="selectPoTetherVo"></include>
+        <where>
+            <if test="tetherName != null  and tetherName != ''"> and tether_name like concat('%', #{tetherName}, '%')</if>
+            <if test="tetherTimeStart != null "> and show_time_start = #{tetherTimeStart}</if>
+            <if test="tetherTimeEnd != null">and show_time_end = #{tetherTimeEnd}</if>
+        </where>
+    </select>
+
+<!--预售-->
+    <select id="selectPoTetherAdvanceList" resultType="PoTether" resultMap="PoTetherResult">
+        <include refid="selectPoTetherVo"/>
+        <where>
+            <if test="tetherName != null  and tetherName != ''"> and tether_name like concat('%', #{tetherName}, '%')</if>
+            <if test="showTimeStart != null "> and show_time_start = #{showTimeStart}</if>
+            <if test="showTimeEnd != null">and show_time_end = #{showTimeEnd}</if>
+            <if test="total != null "> and total = #{total}</if>
+            <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="image != null and image != '' ">and image = #{image}</if>
+            <if test="exchange != null">and exchange = #{exchange}</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>
+            and del_flag = '0'
+            and sell_status = 1
+        </where>
+    </select>
+
+<!--已过期-->
+    <select id="selectPoTetherSelledList" resultType="PoTether" resultMap="PoTetherResult">
+        <include refid="selectPoTetherVo"/>
+        <where>
+            <if test="tetherName != null  and tetherName != ''"> and tether_name like concat('%', #{tetherName}, '%')</if>
+            <if test="showTimeStart != null "> and show_time_start = #{showTimeStart}</if>
+            <if test="showTimeEnd != null">and show_time_end = #{showTimeEnd}</if>
+            <if test="total != null "> and total = #{total}</if>
+            <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="image != null and image != '' ">and image = #{image}</if>
+            <if test="exchange != null">and exchange = #{exchange}</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>
+            and del_flag = '0'
+            and sell_status = 2
+        </where>
+    </select>
+
+<!--全为空时-->
+    <select id="selectPoTetherList" resultType="PoTether" resultMap="PoTetherResult">
+        <include refid="selectPoTetherVo"/>
+        <where>
+            <if test="tetherName != null  and tetherName != ''"> and tether_name like concat('%', #{tetherName}, '%')</if>
+            <if test="showTimeStart != null "> and show_time_start = #{showTimeStart}</if>
+            <if test="showTimeEnd != null">and show_time_end = #{showTimeEnd}</if>
+            <if test="total != null "> and total = #{total}</if>
+            <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="image != null and image != '' ">and image = #{image}</if>
+            <if test="exchange != null">and exchange = #{exchange}</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>
+            and del_flag = '0'
+        </where>
+
+    </select>
+
+<!--    根据套系id 查询对应藏品按钮里面的藏品信息-->
+    <select id="selectPoCollectionListById" resultMap="PoTetherandcollectionResult" >
+        select c.collection_title , c.image , c.collection_type , c.create_time , c.create_by
+             , c.total , c.status , c.price , c.story , c.grounding , c.cochain ,c.tether_id from po_Tetherandcollection c
+             left join po_tether t on t.tether_id = c.tether_id where t.tether_id = #{tetherId}
+
+    </select>
+
+<!--    检验标题是否重复-->
+    <select id="checkPostTetherTitleUnique" resultType="String" resultMap="PoTetherResult">
+        select tether_id, tether_name from po_tether where tether_name = #{tetherName} and del_flag = '0' limit 1
+    </select>
+
+<!--    检验图片是否重复-->
+    <select id="checkPostTetherImageUnique" resultType="String" resultMap="PoTetherResult">
+        select tether_id,image from po_tether where image = #{image} and del_flag = '0' limit 1
+    </select>
+
+<!--    通过id批量查询套系信息-->
+    <select id="selectPoTetherByTetherIds" resultType="PoTether">
+        <include refid="selectPoTetherVo"/>
+        where tether_id in
+        <foreach item="tetherId" collection="array" open="(" separator="," close=")">
+            #{tetherId}
+        </foreach>
+    </select>
+
+<!--    查询更新完种类数的套系信息-->
+    <select id="selectPoTetherCollectionList" resultType="PoTether" resultMap="PoTetherResult">
+        <include refid="selectPoTetherVo"/>
+        <if test="tetherName != null  and tetherName != ''"> and tether_name like concat('%', #{tetherName}, '%')</if>
+        <if test="showTimeStart != null "> and show_time_start = #{showTimeStart}</if>
+        <if test="showTimeEnd != null">and show_time_end = #{showTimeEnd}</if>
+        <if test="total != null "> and total = #{total}</if>
+        <if test="status != null  and status != ''"> and status = #{status}</if>
+        <if test="image != null and image != '' ">and image = #{image}</if>
+        <if test="exchange != null">and exchange = #{exchange}</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>
+    </select>
+
+    <!--新增-->
+    <insert id="insertPoTether" parameterType="PoTether" useGeneratedKeys="true" keyProperty="tetherId">
+        insert into po_tether
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="tetherName != null">tether_name,</if>
+            <if test="showTimeStart != null">show_time_start,</if>
+            <if test="showTimeEnd != null">show_time_end,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="total != null">total,</if>
+            <if test="status != null">status,</if>
+            <if test="remark != null">remark,</if>
+            <if test="sellStatus != null">sell_status,</if>
+            <if test="image != null and image != ''">image,</if>
+            <if test="exchange != null">exchange,</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="tetherName != null">#{tetherName},</if>
+            <if test="showTimeStart != null">#{showTimeStart},</if>
+            <if test="showTimeEnd != null">#{showTimeEnd},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="total != null">#{total},</if>
+            <if test="status != null">#{status},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="sellStatus != null">#{sellStatus},</if>
+            <if test="image != null and image != ''">#{image},</if>
+            <if test="exchange != null ">#{exchange},</if>
+            <if test="grounding != null">#{grounding},</if>
+            <if test="cochain != null">#{cochain},</if>
+            <if test="tetherId != null">#{tetherId},</if>
+        </trim>
+    </insert>
+
+    <update id="updatePoTether" parameterType="PoTether">
+        update po_tether
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="tetherName != null and tetherName != ''">tether_name = #{tetherName},</if>
+            <if test="showTimeStart != null">show_time_start = #{showTimeStart},</if>
+            <if test="showTimeEnd != null">show_time_end = #{showTimeEnd},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="total != null">total = #{total},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="sellStatus != null">sell_status = #{sellStatus},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="image != null">image = #{image},</if>
+            <if test="exchange != null">exchange = #{exchange},</if>
+            <if test="grounding != null">grounding = #{grounding},</if>
+            <if test="cochain != null">cochain = #{cochain},</if>
+        </trim>
+        where tether_id = #{tetherId}
+    </update>
+
+<!--通过Id删除-->
+    <delete id="deletePoTetherByTetherId" parameterType="Long">
+        delete from po_tether where tether_id = #{tetherId}
+    </delete>
+
+<!--    逻辑删除接口-->
+    <update id="deletePoTetherByTetherIds" parameterType="String">
+        update  po_tether set del_flag = '1'  where tether_id in
+        <foreach item="tetherId" collection="array" open="(" separator="," close=")">
+            #{tetherId}
+        </foreach>
+    </update>
+
+<!--    修改状态 是否上链-->
+    <update id="updatePoTetherIsCochain" parameterType="PoTether">
+        update po_tether set cochain = #{cochain} where tether_id = #{tetherId}
+    </update>
+<!--    修改状态 是否上架-->
+    <update id="updatePoTetherIsGrounding" parameterType="PoTether">
+        update po_tether set grounding = #{grounding} where tether_id = #{tetherId}
+    </update>
+<!--    更新种类-->
+    <update id="updatePostTetherCollection" parameterType="PoTether">
+        UPDATE po_tether INNER JOIN (
+            SELECT
+            po_tether.tether_id,
+            ( SELECT COUNT( po_Tetherandcollection.tether_id )
+            FROM po_Tetherandcollection WHERE po_tether.tether_id = po_Tetherandcollection.tether_id ) AS total
+            FROM
+            po_tether
+            ) a
+        ON po_tether.tether_id = a.tether_id
+            SET po_tether.total = a.total
+    </update>
+</mapper>
+

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

@@ -0,0 +1,139 @@
+<?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>
+