chenzhengming 2 жил өмнө
parent
commit
c61e0a1b7c
19 өөрчлөгдсөн 440 нэмэгдсэн , 311 устгасан
  1. 3 0
      .gitignore
  2. 4 0
      Dockerfile
  3. 33 0
      Jenkinsfile
  4. 10 0
      docker-compose.yml
  5. 23 23
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/PostCollectionsController.java
  6. 16 16
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/PostCollectionsSystemController.java
  7. 79 0
      ruoyi-admin/src/main/resources/application-prod.yml
  8. 2 2
      ruoyi-system/src/main/java/com/ruoyi/system/domain/PostCollections.java
  9. 2 2
      ruoyi-system/src/main/java/com/ruoyi/system/domain/PostCollectionsSystem.java
  10. 11 11
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/PostCollectionsMapper.java
  11. 11 11
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/PostCollectionsSystemMapper.java
  12. 11 11
      ruoyi-system/src/main/java/com/ruoyi/system/service/IPostCollectionsService.java
  13. 11 11
      ruoyi-system/src/main/java/com/ruoyi/system/service/IPostCollectionsSystemService.java
  14. 0 96
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CollectionServiceImpl.java
  15. 0 96
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CollectionSystemServiceImpl.java
  16. 96 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PostCollectionsServiceImpl.java
  17. 96 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PostCollectionsSystemServiceImpl.java
  18. 16 16
      ruoyi-system/src/main/resources/mapper/system/PostCollectionsMapper.xml
  19. 16 16
      ruoyi-system/src/main/resources/mapper/system/PostCollectionsSystemMapper.xml

+ 3 - 0
.gitignore

@@ -45,3 +45,6 @@ nbdist/
 !*/build/*.java
 !*/build/*.html
 !*/build/*.xml
+
+.vscode/
+git

+ 4 - 0
Dockerfile

@@ -0,0 +1,4 @@
+FROM openjdk:8
+COPY ./ruoyi-admin/target/ruoyi-admin.jar /tmp/app.jar
+EXPOSE 8080
+ENTRYPOINT java -Xms256m -Xmx512m -jar /tmp/app.jar --spring.profiles.active=prod

+ 33 - 0
Jenkinsfile

@@ -0,0 +1,33 @@
+pipeline {
+    agent any
+    environment {
+        BRANCH_NAME="${env.BRANCH_NAME}".toLowerCase()
+    }
+    stages {
+        stage('pullCode'){
+            steps{
+                echo 'This is a pullCode step'
+                checkout scm
+            }
+        }
+        stage('Build') {
+            steps {
+                echo 'Building..'
+                sh 'docker-compose down'
+                sh '~/tools/apache-maven-3.6.3/bin/mvn  clean install -Dmaven.test.skip=true'
+                sh 'docker build -t ${BRANCH_NAME}:${BUILD_NUMBER} .'
+            }
+        }
+        stage('Test') {
+            steps {
+                echo 'Testing..'
+            }
+        }
+        stage('Deploy') {
+            steps {
+                echo 'Deploying....'
+                sh 'docker-compose up -d'
+            }
+        }
+    }
+}

+ 10 - 0
docker-compose.yml

@@ -0,0 +1,10 @@
+services:
+  post-project-api:
+    image: ${BRANCH_NAME}:${BUILD_NUMBER}
+    ports:
+      - 8183:8080
+    networks:
+      - local_public
+networks:
+  local_public:
+    external: true

+ 23 - 23
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/CollectionController.java → ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/PostCollectionsController.java

@@ -1,4 +1,4 @@
-package com.ruoyi.system.controller;
+package com.ruoyi.web.controller.system;
 
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
@@ -16,8 +16,8 @@ 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.Collection;
-import com.ruoyi.system.service.ICollectionService;
+import com.ruoyi.system.domain.PostCollections;
+import com.ruoyi.system.service.IPostCollectionsService;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.common.core.page.TableDataInfo;
 
@@ -28,77 +28,77 @@ import com.ruoyi.common.core.page.TableDataInfo;
  * @date 2023-02-14
  */
 @RestController
-@RequestMapping("/system/collection")
-public class CollectionController extends BaseController
+@RequestMapping("/system/collections")
+public class PostCollectionsController extends BaseController
 {
     @Autowired
-    private ICollectionService collectionService;
+    private IPostCollectionsService postCollectionsService;
 
     /**
      * 查询【请填写功能名称】列表
      */
-    @PreAuthorize("@ss.hasPermi('system:collection:list')")
+    @PreAuthorize("@ss.hasPermi('system:collections:list')")
     @GetMapping("/list")
-    public TableDataInfo list(Collection collection)
+    public TableDataInfo list(PostCollections postCollections)
     {
         startPage();
-        List<Collection> list = collectionService.selectCollectionList(collection);
+        List<PostCollections> list = postCollectionsService.selectPostCollectionsList(postCollections);
         return getDataTable(list);
     }
 
     /**
      * 导出【请填写功能名称】列表
      */
-    @PreAuthorize("@ss.hasPermi('system:collection:export')")
+    @PreAuthorize("@ss.hasPermi('system:collections:export')")
     @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, Collection collection)
+    public void export(HttpServletResponse response, PostCollections postCollections)
     {
-        List<Collection> list = collectionService.selectCollectionList(collection);
-        ExcelUtil<Collection> util = new ExcelUtil<Collection>(Collection.class);
+        List<PostCollections> list = postCollectionsService.selectPostCollectionsList(postCollections);
+        ExcelUtil<PostCollections> util = new ExcelUtil<PostCollections>(PostCollections.class);
         util.exportExcel(response, list, "【请填写功能名称】数据");
     }
 
     /**
      * 获取【请填写功能名称】详细信息
      */
-    @PreAuthorize("@ss.hasPermi('system:collection:query')")
+    @PreAuthorize("@ss.hasPermi('system:collections:query')")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id)
     {
-        return success(collectionService.selectCollectionById(id));
+        return success(postCollectionsService.selectPostCollectionsById(id));
     }
 
     /**
      * 新增【请填写功能名称】
      */
-    @PreAuthorize("@ss.hasPermi('system:collection:add')")
+    @PreAuthorize("@ss.hasPermi('system:collections:add')")
     @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody Collection collection)
+    public AjaxResult add(@RequestBody PostCollections postCollections)
     {
-        return toAjax(collectionService.insertCollection(collection));
+        return toAjax(postCollectionsService.insertPostCollections(postCollections));
     }
 
     /**
      * 修改【请填写功能名称】
      */
-    @PreAuthorize("@ss.hasPermi('system:collection:edit')")
+    @PreAuthorize("@ss.hasPermi('system:collections:edit')")
     @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody Collection collection)
+    public AjaxResult edit(@RequestBody PostCollections postCollections)
     {
-        return toAjax(collectionService.updateCollection(collection));
+        return toAjax(postCollectionsService.updatePostCollections(postCollections));
     }
 
     /**
      * 删除【请填写功能名称】
      */
-    @PreAuthorize("@ss.hasPermi('system:collection:remove')")
+    @PreAuthorize("@ss.hasPermi('system:collections:remove')")
     @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids)
     {
-        return toAjax(collectionService.deleteCollectionByIds(ids));
+        return toAjax(postCollectionsService.deletePostCollectionsByIds(ids));
     }
 }

+ 16 - 16
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/CollectionSystemController.java → ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/PostCollectionsSystemController.java

@@ -1,4 +1,4 @@
-package com.ruoyi.system.controller;
+package com.ruoyi.web.controller.system;
 
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
@@ -16,8 +16,8 @@ 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.CollectionSystem;
-import com.ruoyi.system.service.ICollectionSystemService;
+import com.ruoyi.system.domain.PostCollectionsSystem;
+import com.ruoyi.system.service.IPostCollectionsSystemService;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.common.core.page.TableDataInfo;
 
@@ -29,20 +29,20 @@ import com.ruoyi.common.core.page.TableDataInfo;
  */
 @RestController
 @RequestMapping("/system/system")
-public class CollectionSystemController extends BaseController
+public class PostCollectionsSystemController extends BaseController
 {
     @Autowired
-    private ICollectionSystemService collectionSystemService;
+    private IPostCollectionsSystemService postCollectionsSystemService;
 
     /**
      * 查询【请填写功能名称】列表
      */
     @PreAuthorize("@ss.hasPermi('system:system:list')")
     @GetMapping("/list")
-    public TableDataInfo list(CollectionSystem collectionSystem)
+    public TableDataInfo list(PostCollectionsSystem postCollectionsSystem)
     {
         startPage();
-        List<CollectionSystem> list = collectionSystemService.selectCollectionSystemList(collectionSystem);
+        List<PostCollectionsSystem> list = postCollectionsSystemService.selectPostCollectionsSystemList(postCollectionsSystem);
         return getDataTable(list);
     }
 
@@ -52,10 +52,10 @@ public class CollectionSystemController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:system:export')")
     @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, CollectionSystem collectionSystem)
+    public void export(HttpServletResponse response, PostCollectionsSystem postCollectionsSystem)
     {
-        List<CollectionSystem> list = collectionSystemService.selectCollectionSystemList(collectionSystem);
-        ExcelUtil<CollectionSystem> util = new ExcelUtil<CollectionSystem>(CollectionSystem.class);
+        List<PostCollectionsSystem> list = postCollectionsSystemService.selectPostCollectionsSystemList(postCollectionsSystem);
+        ExcelUtil<PostCollectionsSystem> util = new ExcelUtil<PostCollectionsSystem>(PostCollectionsSystem.class);
         util.exportExcel(response, list, "【请填写功能名称】数据");
     }
 
@@ -66,7 +66,7 @@ public class CollectionSystemController extends BaseController
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id)
     {
-        return success(collectionSystemService.selectCollectionSystemById(id));
+        return success(postCollectionsSystemService.selectPostCollectionsSystemById(id));
     }
 
     /**
@@ -75,9 +75,9 @@ public class CollectionSystemController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:system:add')")
     @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody CollectionSystem collectionSystem)
+    public AjaxResult add(@RequestBody PostCollectionsSystem postCollectionsSystem)
     {
-        return toAjax(collectionSystemService.insertCollectionSystem(collectionSystem));
+        return toAjax(postCollectionsSystemService.insertPostCollectionsSystem(postCollectionsSystem));
     }
 
     /**
@@ -86,9 +86,9 @@ public class CollectionSystemController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:system:edit')")
     @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody CollectionSystem collectionSystem)
+    public AjaxResult edit(@RequestBody PostCollectionsSystem postCollectionsSystem)
     {
-        return toAjax(collectionSystemService.updateCollectionSystem(collectionSystem));
+        return toAjax(postCollectionsSystemService.updatePostCollectionsSystem(postCollectionsSystem));
     }
 
     /**
@@ -99,6 +99,6 @@ public class CollectionSystemController extends BaseController
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids)
     {
-        return toAjax(collectionSystemService.deleteCollectionSystemByIds(ids));
+        return toAjax(postCollectionsSystemService.deletePostCollectionsSystemByIds(ids));
     }
 }

+ 79 - 0
ruoyi-admin/src/main/resources/application-prod.yml

@@ -0,0 +1,79 @@
+# 数据源配置
+spring:
+    datasource:
+        type: com.alibaba.druid.pool.DruidDataSource
+        driverClassName: com.mysql.cj.jdbc.Driver
+        druid:
+            # 主库数据源
+            master:
+                url: jdbc:mysql://mysql8-compose:3306/yellow?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: post
+                password: post
+            # 从库数据源
+            slave:
+                # 从数据源开关/默认关闭
+                enabled: false
+                url: 
+                username: 
+                password: 
+            # 初始连接数
+            initialSize: 5
+            # 最小连接池数量
+            minIdle: 10
+            # 最大连接池数量
+            maxActive: 20
+            # 配置获取连接等待超时的时间
+            maxWait: 60000
+            # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+            timeBetweenEvictionRunsMillis: 60000
+            # 配置一个连接在池中最小生存的时间,单位是毫秒
+            minEvictableIdleTimeMillis: 300000
+            # 配置一个连接在池中最大生存的时间,单位是毫秒
+            maxEvictableIdleTimeMillis: 900000
+            # 配置检测连接是否有效
+            validationQuery: SELECT 1 FROM DUAL
+            testWhileIdle: true
+            testOnBorrow: false
+            testOnReturn: false
+            webStatFilter: 
+                enabled: true
+            statViewServlet:
+                enabled: true
+                # 设置白名单,不填则允许所有访问
+                allow:
+                url-pattern: /druid/*
+                # 控制台管理用户名和密码
+                login-username: admin
+                login-password: 123456
+            filter:
+                stat:
+                    enabled: true
+                    # 慢SQL记录
+                    log-slow-sql: true
+                    slow-sql-millis: 1000
+                    merge-sql: true
+                wall:
+                    config:
+                        multi-statement-allow: true   
+    # redis 配置
+    redis:
+        # 地址
+        host: redis-compose
+        # 端口,默认为6379
+        port: 6379
+        # 数据库索引
+        database: 3
+        # 密码
+        password: 
+        # 连接超时时间
+        timeout: 10s
+        lettuce:
+          pool:
+            # 连接池中的最小空闲连接
+            min-idle: 0
+            # 连接池中的最大空闲连接
+            max-idle: 8
+            # 连接池的最大数据库连接数
+            max-active: 8
+            # #连接池最大阻塞等待时间(使用负值表示没有限制)
+            max-wait: -1ms

+ 2 - 2
ruoyi-system/src/main/java/com/ruoyi/system/domain/Collection.java → ruoyi-system/src/main/java/com/ruoyi/system/domain/PostCollections.java

@@ -8,12 +8,12 @@ import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
 
 /**
- * 【请填写功能名称】对象 collection
+ * 【请填写功能名称】对象 post_collections
  *
  * @author ruoyi
  * @date 2023-02-14
  */
-public class Collection extends BaseEntity
+public class PostCollections extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
 

+ 2 - 2
ruoyi-system/src/main/java/com/ruoyi/system/domain/CollectionSystem.java → ruoyi-system/src/main/java/com/ruoyi/system/domain/PostCollectionsSystem.java

@@ -8,12 +8,12 @@ import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
 
 /**
- * 【请填写功能名称】对象 collection_system
+ * 【请填写功能名称】对象 post_collections_system
  *
  * @author ruoyi
  * @date 2023-02-14
  */
-public class CollectionSystem extends BaseEntity
+public class PostCollectionsSystem extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
 

+ 11 - 11
ruoyi-system/src/main/java/com/ruoyi/system/mapper/CollectionMapper.java → ruoyi-system/src/main/java/com/ruoyi/system/mapper/PostCollectionsMapper.java

@@ -1,7 +1,7 @@
 package com.ruoyi.system.mapper;
 
 import java.util.List;
-import com.ruoyi.system.domain.Collection;
+import com.ruoyi.system.domain.PostCollections;
 
 /**
  * 【请填写功能名称】Mapper接口
@@ -9,7 +9,7 @@ import com.ruoyi.system.domain.Collection;
  * @author ruoyi
  * @date 2023-02-14
  */
-public interface CollectionMapper
+public interface PostCollectionsMapper
 {
     /**
      * 查询【请填写功能名称】
@@ -17,31 +17,31 @@ public interface CollectionMapper
      * @param id 【请填写功能名称】主键
      * @return 【请填写功能名称】
      */
-    public Collection selectCollectionById(Long id);
+    public PostCollections selectPostCollectionsById(Long id);
 
     /**
      * 查询【请填写功能名称】列表
      *
-     * @param collection 【请填写功能名称】
+     * @param postCollections 【请填写功能名称】
      * @return 【请填写功能名称】集合
      */
-    public List<Collection> selectCollectionList(Collection collection);
+    public List<PostCollections> selectPostCollectionsList(PostCollections postCollections);
 
     /**
      * 新增【请填写功能名称】
      *
-     * @param collection 【请填写功能名称】
+     * @param postCollections 【请填写功能名称】
      * @return 结果
      */
-    public int insertCollection(Collection collection);
+    public int insertPostCollections(PostCollections postCollections);
 
     /**
      * 修改【请填写功能名称】
      *
-     * @param collection 【请填写功能名称】
+     * @param postCollections 【请填写功能名称】
      * @return 结果
      */
-    public int updateCollection(Collection collection);
+    public int updatePostCollections(PostCollections postCollections);
 
     /**
      * 删除【请填写功能名称】
@@ -49,7 +49,7 @@ public interface CollectionMapper
      * @param id 【请填写功能名称】主键
      * @return 结果
      */
-    public int deleteCollectionById(Long id);
+    public int deletePostCollectionsById(Long id);
 
     /**
      * 批量删除【请填写功能名称】
@@ -57,5 +57,5 @@ public interface CollectionMapper
      * @param ids 需要删除的数据主键集合
      * @return 结果
      */
-    public int deleteCollectionByIds(Long[] ids);
+    public int deletePostCollectionsByIds(Long[] ids);
 }

+ 11 - 11
ruoyi-system/src/main/java/com/ruoyi/system/mapper/CollectionSystemMapper.java → ruoyi-system/src/main/java/com/ruoyi/system/mapper/PostCollectionsSystemMapper.java

@@ -1,7 +1,7 @@
 package com.ruoyi.system.mapper;
 
 import java.util.List;
-import com.ruoyi.system.domain.CollectionSystem;
+import com.ruoyi.system.domain.PostCollectionsSystem;
 
 /**
  * 【请填写功能名称】Mapper接口
@@ -9,7 +9,7 @@ import com.ruoyi.system.domain.CollectionSystem;
  * @author ruoyi
  * @date 2023-02-14
  */
-public interface CollectionSystemMapper
+public interface PostCollectionsSystemMapper
 {
     /**
      * 查询【请填写功能名称】
@@ -17,31 +17,31 @@ public interface CollectionSystemMapper
      * @param id 【请填写功能名称】主键
      * @return 【请填写功能名称】
      */
-    public CollectionSystem selectCollectionSystemById(Long id);
+    public PostCollectionsSystem selectPostCollectionsSystemById(Long id);
 
     /**
      * 查询【请填写功能名称】列表
      *
-     * @param collectionSystem 【请填写功能名称】
+     * @param postCollectionsSystem 【请填写功能名称】
      * @return 【请填写功能名称】集合
      */
-    public List<CollectionSystem> selectCollectionSystemList(CollectionSystem collectionSystem);
+    public List<PostCollectionsSystem> selectPostCollectionsSystemList(PostCollectionsSystem postCollectionsSystem);
 
     /**
      * 新增【请填写功能名称】
      *
-     * @param collectionSystem 【请填写功能名称】
+     * @param postCollectionsSystem 【请填写功能名称】
      * @return 结果
      */
-    public int insertCollectionSystem(CollectionSystem collectionSystem);
+    public int insertPostCollectionsSystem(PostCollectionsSystem postCollectionsSystem);
 
     /**
      * 修改【请填写功能名称】
      *
-     * @param collectionSystem 【请填写功能名称】
+     * @param postCollectionsSystem 【请填写功能名称】
      * @return 结果
      */
-    public int updateCollectionSystem(CollectionSystem collectionSystem);
+    public int updatePostCollectionsSystem(PostCollectionsSystem postCollectionsSystem);
 
     /**
      * 删除【请填写功能名称】
@@ -49,7 +49,7 @@ public interface CollectionSystemMapper
      * @param id 【请填写功能名称】主键
      * @return 结果
      */
-    public int deleteCollectionSystemById(Long id);
+    public int deletePostCollectionsSystemById(Long id);
 
     /**
      * 批量删除【请填写功能名称】
@@ -57,5 +57,5 @@ public interface CollectionSystemMapper
      * @param ids 需要删除的数据主键集合
      * @return 结果
      */
-    public int deleteCollectionSystemByIds(Long[] ids);
+    public int deletePostCollectionsSystemByIds(Long[] ids);
 }

+ 11 - 11
ruoyi-system/src/main/java/com/ruoyi/system/service/ICollectionService.java → ruoyi-system/src/main/java/com/ruoyi/system/service/IPostCollectionsService.java

@@ -1,7 +1,7 @@
 package com.ruoyi.system.service;
 
 import java.util.List;
-import com.ruoyi.system.domain.Collection;
+import com.ruoyi.system.domain.PostCollections;
 
 /**
  * 【请填写功能名称】Service接口
@@ -9,7 +9,7 @@ import com.ruoyi.system.domain.Collection;
  * @author ruoyi
  * @date 2023-02-14
  */
-public interface ICollectionService
+public interface IPostCollectionsService
 {
     /**
      * 查询【请填写功能名称】
@@ -17,31 +17,31 @@ public interface ICollectionService
      * @param id 【请填写功能名称】主键
      * @return 【请填写功能名称】
      */
-    public Collection selectCollectionById(Long id);
+    public PostCollections selectPostCollectionsById(Long id);
 
     /**
      * 查询【请填写功能名称】列表
      *
-     * @param collection 【请填写功能名称】
+     * @param postCollections 【请填写功能名称】
      * @return 【请填写功能名称】集合
      */
-    public List<Collection> selectCollectionList(Collection collection);
+    public List<PostCollections> selectPostCollectionsList(PostCollections postCollections);
 
     /**
      * 新增【请填写功能名称】
      *
-     * @param collection 【请填写功能名称】
+     * @param postCollections 【请填写功能名称】
      * @return 结果
      */
-    public int insertCollection(Collection collection);
+    public int insertPostCollections(PostCollections postCollections);
 
     /**
      * 修改【请填写功能名称】
      *
-     * @param collection 【请填写功能名称】
+     * @param postCollections 【请填写功能名称】
      * @return 结果
      */
-    public int updateCollection(Collection collection);
+    public int updatePostCollections(PostCollections postCollections);
 
     /**
      * 批量删除【请填写功能名称】
@@ -49,7 +49,7 @@ public interface ICollectionService
      * @param ids 需要删除的【请填写功能名称】主键集合
      * @return 结果
      */
-    public int deleteCollectionByIds(Long[] ids);
+    public int deletePostCollectionsByIds(Long[] ids);
 
     /**
      * 删除【请填写功能名称】信息
@@ -57,5 +57,5 @@ public interface ICollectionService
      * @param id 【请填写功能名称】主键
      * @return 结果
      */
-    public int deleteCollectionById(Long id);
+    public int deletePostCollectionsById(Long id);
 }

+ 11 - 11
ruoyi-system/src/main/java/com/ruoyi/system/service/ICollectionSystemService.java → ruoyi-system/src/main/java/com/ruoyi/system/service/IPostCollectionsSystemService.java

@@ -1,7 +1,7 @@
 package com.ruoyi.system.service;
 
 import java.util.List;
-import com.ruoyi.system.domain.CollectionSystem;
+import com.ruoyi.system.domain.PostCollectionsSystem;
 
 /**
  * 【请填写功能名称】Service接口
@@ -9,7 +9,7 @@ import com.ruoyi.system.domain.CollectionSystem;
  * @author ruoyi
  * @date 2023-02-14
  */
-public interface ICollectionSystemService
+public interface IPostCollectionsSystemService
 {
     /**
      * 查询【请填写功能名称】
@@ -17,31 +17,31 @@ public interface ICollectionSystemService
      * @param id 【请填写功能名称】主键
      * @return 【请填写功能名称】
      */
-    public CollectionSystem selectCollectionSystemById(Long id);
+    public PostCollectionsSystem selectPostCollectionsSystemById(Long id);
 
     /**
      * 查询【请填写功能名称】列表
      *
-     * @param collectionSystem 【请填写功能名称】
+     * @param postCollectionsSystem 【请填写功能名称】
      * @return 【请填写功能名称】集合
      */
-    public List<CollectionSystem> selectCollectionSystemList(CollectionSystem collectionSystem);
+    public List<PostCollectionsSystem> selectPostCollectionsSystemList(PostCollectionsSystem postCollectionsSystem);
 
     /**
      * 新增【请填写功能名称】
      *
-     * @param collectionSystem 【请填写功能名称】
+     * @param postCollectionsSystem 【请填写功能名称】
      * @return 结果
      */
-    public int insertCollectionSystem(CollectionSystem collectionSystem);
+    public int insertPostCollectionsSystem(PostCollectionsSystem postCollectionsSystem);
 
     /**
      * 修改【请填写功能名称】
      *
-     * @param collectionSystem 【请填写功能名称】
+     * @param postCollectionsSystem 【请填写功能名称】
      * @return 结果
      */
-    public int updateCollectionSystem(CollectionSystem collectionSystem);
+    public int updatePostCollectionsSystem(PostCollectionsSystem postCollectionsSystem);
 
     /**
      * 批量删除【请填写功能名称】
@@ -49,7 +49,7 @@ public interface ICollectionSystemService
      * @param ids 需要删除的【请填写功能名称】主键集合
      * @return 结果
      */
-    public int deleteCollectionSystemByIds(Long[] ids);
+    public int deletePostCollectionsSystemByIds(Long[] ids);
 
     /**
      * 删除【请填写功能名称】信息
@@ -57,5 +57,5 @@ public interface ICollectionSystemService
      * @param id 【请填写功能名称】主键
      * @return 结果
      */
-    public int deleteCollectionSystemById(Long id);
+    public int deletePostCollectionsSystemById(Long id);
 }

+ 0 - 96
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CollectionServiceImpl.java

@@ -1,96 +0,0 @@
-package com.ruoyi.system.service.impl;
-
-import java.util.List;
-import com.ruoyi.common.utils.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.ruoyi.system.mapper.CollectionMapper;
-import com.ruoyi.system.domain.Collection;
-import com.ruoyi.system.service.ICollectionService;
-
-/**
- * 【请填写功能名称】Service业务层处理
- *
- * @author ruoyi
- * @date 2023-02-14
- */
-@Service
-public class CollectionServiceImpl implements ICollectionService
-{
-    @Autowired
-    private CollectionMapper collectionMapper;
-
-    /**
-     * 查询【请填写功能名称】
-     *
-     * @param id 【请填写功能名称】主键
-     * @return 【请填写功能名称】
-     */
-    @Override
-    public Collection selectCollectionById(Long id)
-    {
-        return collectionMapper.selectCollectionById(id);
-    }
-
-    /**
-     * 查询【请填写功能名称】列表
-     *
-     * @param collection 【请填写功能名称】
-     * @return 【请填写功能名称】
-     */
-    @Override
-    public List<Collection> selectCollectionList(Collection collection)
-    {
-        return collectionMapper.selectCollectionList(collection);
-    }
-
-    /**
-     * 新增【请填写功能名称】
-     *
-     * @param collection 【请填写功能名称】
-     * @return 结果
-     */
-    @Override
-    public int insertCollection(Collection collection)
-    {
-        collection.setCreateTime(DateUtils.getNowDate());
-        return collectionMapper.insertCollection(collection);
-    }
-
-    /**
-     * 修改【请填写功能名称】
-     *
-     * @param collection 【请填写功能名称】
-     * @return 结果
-     */
-    @Override
-    public int updateCollection(Collection collection)
-    {
-        collection.setUpdateTime(DateUtils.getNowDate());
-        return collectionMapper.updateCollection(collection);
-    }
-
-    /**
-     * 批量删除【请填写功能名称】
-     *
-     * @param ids 需要删除的【请填写功能名称】主键
-     * @return 结果
-     */
-    @Override
-    public int deleteCollectionByIds(Long[] ids)
-    {
-        return collectionMapper.deleteCollectionByIds(ids);
-    }
-
-    /**
-     * 删除【请填写功能名称】信息
-     *
-     * @param id 【请填写功能名称】主键
-     * @return 结果
-     */
-    @Override
-    public int deleteCollectionById(Long id)
-    {
-        return collectionMapper.deleteCollectionById(id);
-    }
-}

+ 0 - 96
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CollectionSystemServiceImpl.java

@@ -1,96 +0,0 @@
-package com.ruoyi.system.service.impl;
-
-import java.util.List;
-import com.ruoyi.common.utils.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.ruoyi.system.mapper.CollectionSystemMapper;
-import com.ruoyi.system.domain.CollectionSystem;
-import com.ruoyi.system.service.ICollectionSystemService;
-
-/**
- * 【请填写功能名称】Service业务层处理
- *
- * @author ruoyi
- * @date 2023-02-14
- */
-@Service
-public class CollectionSystemServiceImpl implements ICollectionSystemService
-{
-    @Autowired
-    private CollectionSystemMapper collectionSystemMapper;
-
-    /**
-     * 查询【请填写功能名称】
-     *
-     * @param id 【请填写功能名称】主键
-     * @return 【请填写功能名称】
-     */
-    @Override
-    public CollectionSystem selectCollectionSystemById(Long id)
-    {
-        return collectionSystemMapper.selectCollectionSystemById(id);
-    }
-
-    /**
-     * 查询【请填写功能名称】列表
-     *
-     * @param collectionSystem 【请填写功能名称】
-     * @return 【请填写功能名称】
-     */
-    @Override
-    public List<CollectionSystem> selectCollectionSystemList(CollectionSystem collectionSystem)
-    {
-        return collectionSystemMapper.selectCollectionSystemList(collectionSystem);
-    }
-
-    /**
-     * 新增【请填写功能名称】
-     *
-     * @param collectionSystem 【请填写功能名称】
-     * @return 结果
-     */
-    @Override
-    public int insertCollectionSystem(CollectionSystem collectionSystem)
-    {
-        collectionSystem.setCreateTime(DateUtils.getNowDate());
-        return collectionSystemMapper.insertCollectionSystem(collectionSystem);
-    }
-
-    /**
-     * 修改【请填写功能名称】
-     *
-     * @param collectionSystem 【请填写功能名称】
-     * @return 结果
-     */
-    @Override
-    public int updateCollectionSystem(CollectionSystem collectionSystem)
-    {
-        collectionSystem.setUpdateTime(DateUtils.getNowDate());
-        return collectionSystemMapper.updateCollectionSystem(collectionSystem);
-    }
-
-    /**
-     * 批量删除【请填写功能名称】
-     *
-     * @param ids 需要删除的【请填写功能名称】主键
-     * @return 结果
-     */
-    @Override
-    public int deleteCollectionSystemByIds(Long[] ids)
-    {
-        return collectionSystemMapper.deleteCollectionSystemByIds(ids);
-    }
-
-    /**
-     * 删除【请填写功能名称】信息
-     *
-     * @param id 【请填写功能名称】主键
-     * @return 结果
-     */
-    @Override
-    public int deleteCollectionSystemById(Long id)
-    {
-        return collectionSystemMapper.deleteCollectionSystemById(id);
-    }
-}

+ 96 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PostCollectionsServiceImpl.java

@@ -0,0 +1,96 @@
+package com.ruoyi.system.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.mapper.PostCollectionsMapper;
+import com.ruoyi.system.domain.PostCollections;
+import com.ruoyi.system.service.IPostCollectionsService;
+
+/**
+ * 【请填写功能名称】Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2023-02-14
+ */
+@Service
+public class PostCollectionsServiceImpl implements IPostCollectionsService
+{
+    @Autowired
+    private PostCollectionsMapper postCollectionsMapper;
+
+    /**
+     * 查询【请填写功能名称】
+     *
+     * @param id 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    @Override
+    public PostCollections selectPostCollectionsById(Long id)
+    {
+        return postCollectionsMapper.selectPostCollectionsById(id);
+    }
+
+    /**
+     * 查询【请填写功能名称】列表
+     *
+     * @param postCollections 【请填写功能名称】
+     * @return 【请填写功能名称】
+     */
+    @Override
+    public List<PostCollections> selectPostCollectionsList(PostCollections postCollections)
+    {
+        return postCollectionsMapper.selectPostCollectionsList(postCollections);
+    }
+
+    /**
+     * 新增【请填写功能名称】
+     *
+     * @param postCollections 【请填写功能名称】
+     * @return 结果
+     */
+    @Override
+    public int insertPostCollections(PostCollections postCollections)
+    {
+        postCollections.setCreateTime(DateUtils.getNowDate());
+        return postCollectionsMapper.insertPostCollections(postCollections);
+    }
+
+    /**
+     * 修改【请填写功能名称】
+     *
+     * @param postCollections 【请填写功能名称】
+     * @return 结果
+     */
+    @Override
+    public int updatePostCollections(PostCollections postCollections)
+    {
+        postCollections.setUpdateTime(DateUtils.getNowDate());
+        return postCollectionsMapper.updatePostCollections(postCollections);
+    }
+
+    /**
+     * 批量删除【请填写功能名称】
+     *
+     * @param ids 需要删除的【请填写功能名称】主键
+     * @return 结果
+     */
+    @Override
+    public int deletePostCollectionsByIds(Long[] ids)
+    {
+        return postCollectionsMapper.deletePostCollectionsByIds(ids);
+    }
+
+    /**
+     * 删除【请填写功能名称】信息
+     *
+     * @param id 【请填写功能名称】主键
+     * @return 结果
+     */
+    @Override
+    public int deletePostCollectionsById(Long id)
+    {
+        return postCollectionsMapper.deletePostCollectionsById(id);
+    }
+}

+ 96 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PostCollectionsSystemServiceImpl.java

@@ -0,0 +1,96 @@
+package com.ruoyi.system.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.mapper.PostCollectionsSystemMapper;
+import com.ruoyi.system.domain.PostCollectionsSystem;
+import com.ruoyi.system.service.IPostCollectionsSystemService;
+
+/**
+ * 【请填写功能名称】Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2023-02-14
+ */
+@Service
+public class PostCollectionsSystemServiceImpl implements IPostCollectionsSystemService
+{
+    @Autowired
+    private PostCollectionsSystemMapper postCollectionsSystemMapper;
+
+    /**
+     * 查询【请填写功能名称】
+     *
+     * @param id 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    @Override
+    public PostCollectionsSystem selectPostCollectionsSystemById(Long id)
+    {
+        return postCollectionsSystemMapper.selectPostCollectionsSystemById(id);
+    }
+
+    /**
+     * 查询【请填写功能名称】列表
+     *
+     * @param postCollectionsSystem 【请填写功能名称】
+     * @return 【请填写功能名称】
+     */
+    @Override
+    public List<PostCollectionsSystem> selectPostCollectionsSystemList(PostCollectionsSystem postCollectionsSystem)
+    {
+        return postCollectionsSystemMapper.selectPostCollectionsSystemList(postCollectionsSystem);
+    }
+
+    /**
+     * 新增【请填写功能名称】
+     *
+     * @param postCollectionsSystem 【请填写功能名称】
+     * @return 结果
+     */
+    @Override
+    public int insertPostCollectionsSystem(PostCollectionsSystem postCollectionsSystem)
+    {
+        postCollectionsSystem.setCreateTime(DateUtils.getNowDate());
+        return postCollectionsSystemMapper.insertPostCollectionsSystem(postCollectionsSystem);
+    }
+
+    /**
+     * 修改【请填写功能名称】
+     *
+     * @param postCollectionsSystem 【请填写功能名称】
+     * @return 结果
+     */
+    @Override
+    public int updatePostCollectionsSystem(PostCollectionsSystem postCollectionsSystem)
+    {
+        postCollectionsSystem.setUpdateTime(DateUtils.getNowDate());
+        return postCollectionsSystemMapper.updatePostCollectionsSystem(postCollectionsSystem);
+    }
+
+    /**
+     * 批量删除【请填写功能名称】
+     *
+     * @param ids 需要删除的【请填写功能名称】主键
+     * @return 结果
+     */
+    @Override
+    public int deletePostCollectionsSystemByIds(Long[] ids)
+    {
+        return postCollectionsSystemMapper.deletePostCollectionsSystemByIds(ids);
+    }
+
+    /**
+     * 删除【请填写功能名称】信息
+     *
+     * @param id 【请填写功能名称】主键
+     * @return 结果
+     */
+    @Override
+    public int deletePostCollectionsSystemById(Long id)
+    {
+        return postCollectionsSystemMapper.deletePostCollectionsSystemById(id);
+    }
+}

+ 16 - 16
ruoyi-system/src/main/resources/mapper/system/CollectionMapper.xml → ruoyi-system/src/main/resources/mapper/system/PostCollectionsMapper.xml

@@ -2,9 +2,9 @@
 <!DOCTYPE mapper
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ruoyi.system.mapper.CollectionMapper">
+<mapper namespace="com.ruoyi.system.mapper.PostCollectionsMapper">
 
-    <resultMap type="Collection" id="CollectionResult">
+    <resultMap type="PostCollections" id="PostCollectionsResult">
         <result property="id"    column="id"    />
         <result property="systemId"    column="system_id"    />
         <result property="issuerId"    column="issuer_id"    />
@@ -22,12 +22,12 @@
         <result property="isDeleted"    column="is_deleted"    />
     </resultMap>
 
-    <sql id="selectCollectionVo">
-        select id, system_id, issuer_id, name, start_time, end_time, state, collections_number, collections_story, image, create_time, update_time, create_user, update_user, is_deleted from collection
+    <sql id="selectPostCollectionsVo">
+        select id, system_id, issuer_id, name, start_time, end_time, state, collections_number, collections_story, image, create_time, update_time, create_user, update_user, is_deleted from post_collections
     </sql>
 
-    <select id="selectCollectionList" parameterType="Collection" resultMap="CollectionResult">
-        <include refid="selectCollectionVo"/>
+    <select id="selectPostCollectionsList" parameterType="PostCollections" resultMap="PostCollectionsResult">
+        <include refid="selectPostCollectionsVo"/>
         <where>
             <if test="systemId != null "> and system_id = #{systemId}</if>
             <if test="issuerId != null "> and issuer_id = #{issuerId}</if>
@@ -44,13 +44,13 @@
         </where>
     </select>
 
-    <select id="selectCollectionById" parameterType="Long" resultMap="CollectionResult">
-        <include refid="selectCollectionVo"/>
+    <select id="selectPostCollectionsById" parameterType="Long" resultMap="PostCollectionsResult">
+        <include refid="selectPostCollectionsVo"/>
         where id = #{id}
     </select>
 
-    <insert id="insertCollection" parameterType="Collection" useGeneratedKeys="true" keyProperty="id">
-        insert into collection
+    <insert id="insertPostCollections" parameterType="PostCollections" useGeneratedKeys="true" keyProperty="id">
+        insert into post_collections
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="systemId != null">system_id,</if>
             <if test="issuerId != null">issuer_id,</if>
@@ -85,8 +85,8 @@
         </trim>
     </insert>
 
-    <update id="updateCollection" parameterType="Collection">
-        update collection
+    <update id="updatePostCollections" parameterType="PostCollections">
+        update post_collections
         <trim prefix="SET" suffixOverrides=",">
             <if test="systemId != null">system_id = #{systemId},</if>
             <if test="issuerId != null">issuer_id = #{issuerId},</if>
@@ -106,12 +106,12 @@
         where id = #{id}
     </update>
 
-    <delete id="deleteCollectionById" parameterType="Long">
-        delete from collection where id = #{id}
+    <delete id="deletePostCollectionsById" parameterType="Long">
+        delete from post_collections where id = #{id}
     </delete>
 
-    <delete id="deleteCollectionByIds" parameterType="String">
-        delete from collection where id in
+    <delete id="deletePostCollectionsByIds" parameterType="String">
+        delete from post_collections where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>

+ 16 - 16
ruoyi-system/src/main/resources/mapper/system/CollectionSystemMapper.xml → ruoyi-system/src/main/resources/mapper/system/PostCollectionsSystemMapper.xml

@@ -2,9 +2,9 @@
 <!DOCTYPE mapper
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ruoyi.system.mapper.CollectionSystemMapper">
+<mapper namespace="com.ruoyi.system.mapper.PostCollectionsSystemMapper">
 
-    <resultMap type="CollectionSystem" id="CollectionSystemResult">
+    <resultMap type="PostCollectionsSystem" id="PostCollectionsSystemResult">
         <result property="id"    column="id"    />
         <result property="type"    column="type"    />
         <result property="name"    column="name"    />
@@ -21,12 +21,12 @@
         <result property="isDeleted"    column="is_deleted"    />
     </resultMap>
 
-    <sql id="selectCollectionSystemVo">
-        select id, type, name, create_time, start_time, end_time, system_number, state, image, gift_exchange, update_time, create_user, update_user, is_deleted from collection_system
+    <sql id="selectPostCollectionsSystemVo">
+        select id, type, name, create_time, start_time, end_time, system_number, state, image, gift_exchange, update_time, create_user, update_user, is_deleted from post_collections_system
     </sql>
 
-    <select id="selectCollectionSystemList" parameterType="CollectionSystem" resultMap="CollectionSystemResult">
-        <include refid="selectCollectionSystemVo"/>
+    <select id="selectPostCollectionsSystemList" parameterType="PostCollectionsSystem" resultMap="PostCollectionsSystemResult">
+        <include refid="selectPostCollectionsSystemVo"/>
         <where>
             <if test="type != null "> and type = #{type}</if>
             <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
@@ -42,13 +42,13 @@
         </where>
     </select>
 
-    <select id="selectCollectionSystemById" parameterType="Long" resultMap="CollectionSystemResult">
-        <include refid="selectCollectionSystemVo"/>
+    <select id="selectPostCollectionsSystemById" parameterType="Long" resultMap="PostCollectionsSystemResult">
+        <include refid="selectPostCollectionsSystemVo"/>
         where id = #{id}
     </select>
 
-    <insert id="insertCollectionSystem" parameterType="CollectionSystem" useGeneratedKeys="true" keyProperty="id">
-        insert into collection_system
+    <insert id="insertPostCollectionsSystem" parameterType="PostCollectionsSystem" useGeneratedKeys="true" keyProperty="id">
+        insert into post_collections_system
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="type != null">type,</if>
             <if test="name != null">name,</if>
@@ -81,8 +81,8 @@
         </trim>
     </insert>
 
-    <update id="updateCollectionSystem" parameterType="CollectionSystem">
-        update collection_system
+    <update id="updatePostCollectionsSystem" parameterType="PostCollectionsSystem">
+        update post_collections_system
         <trim prefix="SET" suffixOverrides=",">
             <if test="type != null">type = #{type},</if>
             <if test="name != null">name = #{name},</if>
@@ -101,12 +101,12 @@
         where id = #{id}
     </update>
 
-    <delete id="deleteCollectionSystemById" parameterType="Long">
-        delete from collection_system where id = #{id}
+    <delete id="deletePostCollectionsSystemById" parameterType="Long">
+        delete from post_collections_system where id = #{id}
     </delete>
 
-    <delete id="deleteCollectionSystemByIds" parameterType="String">
-        delete from collection_system where id in
+    <delete id="deletePostCollectionsSystemByIds" parameterType="String">
+        delete from post_collections_system where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>