فهرست منبع

新增游戏模块

Hixon 3 ماه پیش
والد
کامیت
e9f49c083c
39فایلهای تغییر یافته به همراه1711 افزوده شده و 99 حذف شده
  1. 1 0
      pom.xml
  2. 1 1
      ruoyi-admin/pom.xml
  3. 1 1
      ruoyi-admin/src/main/resources/application-dev.yml
  4. 2 2
      ruoyi-admin/src/main/resources/application.yml
  5. 1 1
      ruoyi-extend/ruoyi-snailjob-server/src/main/resources/application-dev.yml
  6. 4 0
      ruoyi-modules/ruoyi-minigame/pom.xml
  7. 106 0
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/controller/PlatChannelController.java
  8. 116 0
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/controller/PlatProductCategoryController.java
  9. 36 26
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/controller/PlatProductController.java
  10. 116 0
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/controller/PlatProductProxyController.java
  11. 103 0
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/domain/PlatChannel.java
  12. 7 6
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/domain/PlatProduct.java
  13. 45 0
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/domain/PlatProductCategory.java
  14. 45 0
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/domain/PlatProductProxy.java
  15. 115 0
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/domain/bo/PlatChannelBo.java
  16. 6 6
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/domain/bo/PlatProductBo.java
  17. 37 0
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/domain/bo/PlatProductCategoryBo.java
  18. 37 0
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/domain/bo/PlatProductProxyBo.java
  19. 124 0
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/domain/vo/PlatChannelVo.java
  20. 41 0
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/domain/vo/PlatProductCategoryVo.java
  21. 41 0
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/domain/vo/PlatProductProxyVo.java
  22. 6 6
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/domain/vo/PlatProductVo.java
  23. 15 0
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/mapper/PlatChannelMapper.java
  24. 15 0
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/mapper/PlatProductCategoryMapper.java
  25. 15 0
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/mapper/PlatProductMapper.java
  26. 15 0
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/mapper/PlatProductProxyMapper.java
  27. 68 0
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/service/IPlatChannelService.java
  28. 68 0
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/service/IPlatProductCategoryService.java
  29. 68 0
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/service/IPlatProductProxyService.java
  30. 10 10
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/service/IPlatProductService.java
  31. 142 0
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/service/impl/PlatChannelServiceImpl.java
  32. 129 0
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/service/impl/PlatProductCategoryServiceImpl.java
  33. 129 0
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/service/impl/PlatProductProxyServiceImpl.java
  34. 24 24
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/service/impl/PlatProductServiceImpl.java
  35. 0 15
      ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/minigame/mapper/ProductMapper.java
  36. 1 1
      ruoyi-modules/ruoyi-minigame/src/main/resources/mapper/game/PlatChannelMapper.xml
  37. 7 0
      ruoyi-modules/ruoyi-minigame/src/main/resources/mapper/game/PlatProductCategoryMapper.xml
  38. 7 0
      ruoyi-modules/ruoyi-minigame/src/main/resources/mapper/game/PlatProductMapper.xml
  39. 7 0
      ruoyi-modules/ruoyi-minigame/src/main/resources/mapper/game/PlatProductProxyMapper.xml

+ 1 - 0
pom.xml

@@ -40,6 +40,7 @@
         <lombok.version>1.18.32</lombok.version>
         <bouncycastle.version>1.76</bouncycastle.version>
         <justauth.version>1.16.6</justauth.version>
+        <fastjson.version>2.0.43</fastjson.version>
         <!-- 离线IP地址定位库 -->
         <ip2region.version>2.7.0</ip2region.version>
 

+ 1 - 1
ruoyi-admin/pom.xml

@@ -86,7 +86,7 @@
             <artifactId>ruoyi-workflow</artifactId>
         </dependency>-->
 
-        <!--  工作流模块  -->
+        <!--  小游戏模块  -->
         <dependency>
             <groupId>org.dromara</groupId>
             <artifactId>ruoyi-minigame</artifactId>

+ 1 - 1
ruoyi-admin/src/main/resources/application-dev.yml

@@ -10,7 +10,7 @@ spring.boot.admin.client:
 
 --- # snail-job 配置
 snail-job:
-  enabled: true
+  enabled: false
   # 需要在 SnailJob 后台组管理创建对应名称的组,然后创建任务的时候选择对应的组,才能正确分派任务
   group: "ruoyi_group"
   # SnailJob 接入验证令牌 详见 script/sql/snail_job.sql `sj_group_config` 表

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

@@ -155,7 +155,7 @@ mybatis-plus:
       # 主键类型
       # AUTO 自增 NONE 空 INPUT 用户输入 ASSIGN_ID 雪花 ASSIGN_UUID 唯一 UUID
       # 如需改为自增 需要将数据库表全部设置为自增
-      idType: AUTO
+      idType: ASSIGN_ID
 
 # 数据加密
 mybatis-encryptor:
@@ -262,7 +262,7 @@ management:
 --- # websocket
 websocket:
   # 如果关闭 需要和前端开关一起关闭
-  enabled: true
+  enabled: false
   # 路径
   path: /resource/websocket
   # 设置访问源地址

+ 1 - 1
ruoyi-extend/ruoyi-snailjob-server/src/main/resources/application-dev.yml

@@ -39,7 +39,7 @@ snail-job:
 --- # 监控中心配置
 spring.boot.admin.client:
   # 增加客户端开关
-  enabled: true
+  enabled: false
   url: http://localhost:9090/admin
   instance:
     service-host-type: IP

+ 4 - 0
ruoyi-modules/ruoyi-minigame/pom.xml

@@ -55,6 +55,10 @@
             <groupId>org.dromara</groupId>
             <artifactId>ruoyi-common-security</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+        </dependency>
     </dependencies>
 
 </project>

+ 106 - 0
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/controller/PlatChannelController.java

@@ -0,0 +1,106 @@
+package org.dromara.game.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.validation.constraints.NotEmpty;
+import jakarta.validation.constraints.NotNull;
+import lombok.RequiredArgsConstructor;
+import org.dromara.common.core.domain.R;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import org.dromara.common.excel.utils.ExcelUtil;
+import org.dromara.common.idempotent.annotation.RepeatSubmit;
+import org.dromara.common.log.annotation.Log;
+import org.dromara.common.log.enums.BusinessType;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.web.core.BaseController;
+import org.dromara.game.domain.bo.PlatChannelBo;
+import org.dromara.game.domain.vo.PlatChannelVo;
+import org.dromara.game.service.IPlatChannelService;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 渠道
+ *
+ * @author Hixon
+ * @date 2024-08-07
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/game/channel")
+public class PlatChannelController extends BaseController {
+
+    private final IPlatChannelService platChannelService;
+
+    /**
+     * 查询渠道列表
+     */
+    @SaCheckPermission("game:channel:list")
+    @GetMapping("/list")
+    public TableDataInfo<PlatChannelVo> list(PlatChannelBo bo, PageQuery pageQuery) {
+        return platChannelService.queryPageList(bo, pageQuery);
+    }
+
+    /**
+     * 导出渠道列表
+     */
+    @SaCheckPermission("game:channel:export")
+    @Log(title = "渠道", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(PlatChannelBo bo, HttpServletResponse response) {
+        List<PlatChannelVo> list = platChannelService.queryList(bo);
+        ExcelUtil.exportExcel(list, "渠道", PlatChannelVo.class, response);
+    }
+
+    /**
+     * 获取渠道详细信息
+     *
+     * @param id 主键
+     */
+    @SaCheckPermission("game:channel:query")
+    @GetMapping("/{id}")
+    public R<PlatChannelVo> getInfo(@NotNull(message = "主键不能为空")
+                                     @PathVariable Long id) {
+        return R.ok(platChannelService.queryById(id));
+    }
+
+    /**
+     * 新增渠道
+     */
+    @SaCheckPermission("game:channel:add")
+    @Log(title = "渠道", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping()
+    public R<Void> add(@Validated(AddGroup.class) @RequestBody PlatChannelBo bo) {
+        return toAjax(platChannelService.insertByBo(bo));
+    }
+
+    /**
+     * 修改渠道
+     */
+    @SaCheckPermission("game:channel:edit")
+    @Log(title = "渠道", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping()
+    public R<Void> edit(@Validated(EditGroup.class) @RequestBody PlatChannelBo bo) {
+        return toAjax(platChannelService.updateByBo(bo));
+    }
+
+    /**
+     * 删除渠道
+     *
+     * @param ids 主键串
+     */
+    @SaCheckPermission("game:channel:remove")
+    @Log(title = "渠道", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public R<Void> remove(@NotEmpty(message = "主键不能为空")
+                          @PathVariable Long[] ids) {
+        return toAjax(platChannelService.deleteWithValidByIds(List.of(ids), true));
+    }
+}

+ 116 - 0
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/controller/PlatProductCategoryController.java

@@ -0,0 +1,116 @@
+package org.dromara.game.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.validation.constraints.NotEmpty;
+import jakarta.validation.constraints.NotNull;
+import lombok.RequiredArgsConstructor;
+import org.dromara.common.core.domain.R;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import org.dromara.common.excel.utils.ExcelUtil;
+import org.dromara.common.idempotent.annotation.RepeatSubmit;
+import org.dromara.common.log.annotation.Log;
+import org.dromara.common.log.enums.BusinessType;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.web.core.BaseController;
+import org.dromara.game.domain.bo.PlatProductCategoryBo;
+import org.dromara.game.domain.vo.PlatProductCategoryVo;
+import org.dromara.game.service.IPlatProductCategoryService;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 产品分类
+ *
+ * @author Lion Li
+ * @date 2024-08-07
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/game/productCategory")
+public class PlatProductCategoryController extends BaseController {
+
+    private final IPlatProductCategoryService platProductCategoryService;
+
+    /**
+     * 查询产品分类列表
+     */
+    @SaCheckPermission("game:productCategory:list")
+    @GetMapping("/list")
+    public TableDataInfo<PlatProductCategoryVo> list(PlatProductCategoryBo bo, PageQuery pageQuery) {
+        return platProductCategoryService.queryPageList(bo, pageQuery);
+    }
+
+    /**
+     * 查询产品分类列表
+     */
+    @SaCheckPermission("game:productCategory:list")
+    @GetMapping("/all")
+    public List<PlatProductCategoryVo> all() {
+        PlatProductCategoryBo bo = new PlatProductCategoryBo();
+        return platProductCategoryService.queryList(bo);
+    }
+
+    /**
+     * 导出产品分类列表
+     */
+    @SaCheckPermission("game:productCategory:export")
+    @Log(title = "产品分类", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(PlatProductCategoryBo bo, HttpServletResponse response) {
+        List<PlatProductCategoryVo> list = platProductCategoryService.queryList(bo);
+        ExcelUtil.exportExcel(list, "产品分类", PlatProductCategoryVo.class, response);
+    }
+
+    /**
+     * 获取产品分类详细信息
+     *
+     * @param id 主键
+     */
+    @SaCheckPermission("game:productCategory:query")
+    @GetMapping("/{id}")
+    public R<PlatProductCategoryVo> getInfo(@NotNull(message = "主键不能为空")
+                                     @PathVariable Long id) {
+        return R.ok(platProductCategoryService.queryById(id));
+    }
+
+    /**
+     * 新增产品分类
+     */
+    @SaCheckPermission("game:productCategory:add")
+    @Log(title = "产品分类", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping()
+    public R<Void> add(@Validated(AddGroup.class) @RequestBody PlatProductCategoryBo bo) {
+        return toAjax(platProductCategoryService.insertByBo(bo));
+    }
+
+    /**
+     * 修改产品分类
+     */
+    @SaCheckPermission("game:productCategory:edit")
+    @Log(title = "产品分类", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping()
+    public R<Void> edit(@Validated(EditGroup.class) @RequestBody PlatProductCategoryBo bo) {
+        return toAjax(platProductCategoryService.updateByBo(bo));
+    }
+
+    /**
+     * 删除产品分类
+     *
+     * @param ids 主键串
+     */
+    @SaCheckPermission("game:productCategory:remove")
+    @Log(title = "产品分类", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public R<Void> remove(@NotEmpty(message = "主键不能为空")
+                          @PathVariable Long[] ids) {
+        return toAjax(platProductCategoryService.deleteWithValidByIds(List.of(ids), true));
+    }
+}

+ 36 - 26
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/minigame/controller/ProductController.java → ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/controller/PlatProductController.java

@@ -1,4 +1,4 @@
-package org.dromara.minigame.controller;
+package org.dromara.game.controller;
 
 import cn.dev33.satoken.annotation.SaCheckPermission;
 import jakarta.servlet.http.HttpServletResponse;
@@ -15,9 +15,9 @@ import org.dromara.common.log.enums.BusinessType;
 import org.dromara.common.mybatis.core.page.PageQuery;
 import org.dromara.common.mybatis.core.page.TableDataInfo;
 import org.dromara.common.web.core.BaseController;
-import org.dromara.minigame.domain.bo.ProductBo;
-import org.dromara.minigame.domain.vo.ProductVo;
-import org.dromara.minigame.service.IProductService;
+import org.dromara.game.domain.bo.PlatProductBo;
+import org.dromara.game.domain.vo.PlatProductVo;
+import org.dromara.game.service.IPlatProductService;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
@@ -27,34 +27,44 @@ import java.util.List;
  * 产品
  *
  * @author Hixon
- * @date 2024-08-05
+ * @date 2024-08-07
  */
 @Validated
 @RequiredArgsConstructor
 @RestController
-@RequestMapping("/miniGame/product")
-public class ProductController extends BaseController {
+@RequestMapping("/game/product")
+public class PlatProductController extends BaseController {
 
-    private final IProductService productService;
+    private final IPlatProductService platProductService;
 
     /**
      * 查询产品列表
      */
-    @SaCheckPermission("miniGame:product:list")
+    @SaCheckPermission("game:product:list")
     @GetMapping("/list")
-    public TableDataInfo<ProductVo> list(ProductBo bo, PageQuery pageQuery) {
-        return productService.queryPageList(bo, pageQuery);
+    public TableDataInfo<PlatProductVo> list(PlatProductBo bo, PageQuery pageQuery) {
+        return platProductService.queryPageList(bo, pageQuery);
+    }
+
+    /**
+     * 查询产品列表
+     */
+    @SaCheckPermission("game:product:list")
+    @GetMapping("/all")
+    public List<PlatProductVo> all() {
+        PlatProductBo bo = new PlatProductBo();
+        return platProductService.queryList(bo);
     }
 
     /**
      * 导出产品列表
      */
-    @SaCheckPermission("miniGame:product:export")
+    @SaCheckPermission("game:product:export")
     @Log(title = "产品", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(ProductBo bo, HttpServletResponse response) {
-        List<ProductVo> list = productService.queryList(bo);
-        ExcelUtil.exportExcel(list, "产品", ProductVo.class, response);
+    public void export(PlatProductBo bo, HttpServletResponse response) {
+        List<PlatProductVo> list = platProductService.queryList(bo);
+        ExcelUtil.exportExcel(list, "产品", PlatProductVo.class, response);
     }
 
     /**
@@ -62,33 +72,33 @@ public class ProductController extends BaseController {
      *
      * @param id 主键
      */
-    @SaCheckPermission("miniGame:product:query")
+    @SaCheckPermission("game:product:query")
     @GetMapping("/{id}")
-    public R<ProductVo> getInfo(@NotNull(message = "主键不能为空")
+    public R<PlatProductVo> getInfo(@NotNull(message = "主键不能为空")
                                      @PathVariable Long id) {
-        return R.ok(productService.queryById(id));
+        return R.ok(platProductService.queryById(id));
     }
 
     /**
      * 新增产品
      */
-    @SaCheckPermission("miniGame:product:add")
+    @SaCheckPermission("game:product:add")
     @Log(title = "产品", businessType = BusinessType.INSERT)
     @RepeatSubmit()
     @PostMapping()
-    public R<Void> add(@Validated(AddGroup.class) @RequestBody ProductBo bo) {
-        return toAjax(productService.insertByBo(bo));
+    public R<Void> add(@Validated(AddGroup.class) @RequestBody PlatProductBo bo) {
+        return toAjax(platProductService.insertByBo(bo));
     }
 
     /**
      * 修改产品
      */
-    @SaCheckPermission("miniGame:product:edit")
+    @SaCheckPermission("game:product:edit")
     @Log(title = "产品", businessType = BusinessType.UPDATE)
     @RepeatSubmit()
     @PutMapping()
-    public R<Void> edit(@Validated(EditGroup.class) @RequestBody ProductBo bo) {
-        return toAjax(productService.updateByBo(bo));
+    public R<Void> edit(@Validated(EditGroup.class) @RequestBody PlatProductBo bo) {
+        return toAjax(platProductService.updateByBo(bo));
     }
 
     /**
@@ -96,11 +106,11 @@ public class ProductController extends BaseController {
      *
      * @param ids 主键串
      */
-    @SaCheckPermission("miniGame:product:remove")
+    @SaCheckPermission("game:product:remove")
     @Log(title = "产品", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public R<Void> remove(@NotEmpty(message = "主键不能为空")
                           @PathVariable Long[] ids) {
-        return toAjax(productService.deleteWithValidByIds(List.of(ids), true));
+        return toAjax(platProductService.deleteWithValidByIds(List.of(ids), true));
     }
 }

+ 116 - 0
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/controller/PlatProductProxyController.java

@@ -0,0 +1,116 @@
+package org.dromara.game.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.validation.constraints.NotEmpty;
+import jakarta.validation.constraints.NotNull;
+import lombok.RequiredArgsConstructor;
+import org.dromara.common.core.domain.R;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import org.dromara.common.excel.utils.ExcelUtil;
+import org.dromara.common.idempotent.annotation.RepeatSubmit;
+import org.dromara.common.log.annotation.Log;
+import org.dromara.common.log.enums.BusinessType;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.web.core.BaseController;
+import org.dromara.game.domain.bo.PlatProductProxyBo;
+import org.dromara.game.domain.vo.PlatProductProxyVo;
+import org.dromara.game.service.IPlatProductProxyService;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 产品代理商
+ *
+ * @author Hixon
+ * @date 2024-08-07
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/game/productProxy")
+public class PlatProductProxyController extends BaseController {
+
+    private final IPlatProductProxyService platProductProxyService;
+
+    /**
+     * 查询产品代理商列表
+     */
+    @SaCheckPermission("game:productProxy:list")
+    @GetMapping("/list")
+    public TableDataInfo<PlatProductProxyVo> list(PlatProductProxyBo bo, PageQuery pageQuery) {
+        return platProductProxyService.queryPageList(bo, pageQuery);
+    }
+
+    /**
+     * 查询产品代理商列表
+     */
+    @SaCheckPermission("game:productProxy:list")
+    @GetMapping("/all")
+    public List<PlatProductProxyVo> all() {
+        PlatProductProxyBo bo = new PlatProductProxyBo();
+        return platProductProxyService.queryList(bo);
+    }
+
+    /**
+     * 导出产品代理商列表
+     */
+    @SaCheckPermission("game:productProxy:export")
+    @Log(title = "产品代理商", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(PlatProductProxyBo bo, HttpServletResponse response) {
+        List<PlatProductProxyVo> list = platProductProxyService.queryList(bo);
+        ExcelUtil.exportExcel(list, "产品代理商", PlatProductProxyVo.class, response);
+    }
+
+    /**
+     * 获取产品代理商详细信息
+     *
+     * @param id 主键
+     */
+    @SaCheckPermission("game:productProxy:query")
+    @GetMapping("/{id}")
+    public R<PlatProductProxyVo> getInfo(@NotNull(message = "主键不能为空")
+                                     @PathVariable Long id) {
+        return R.ok(platProductProxyService.queryById(id));
+    }
+
+    /**
+     * 新增产品代理商
+     */
+    @SaCheckPermission("game:productProxy:add")
+    @Log(title = "产品代理商", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping()
+    public R<Void> add(@Validated(AddGroup.class) @RequestBody PlatProductProxyBo bo) {
+        return toAjax(platProductProxyService.insertByBo(bo));
+    }
+
+    /**
+     * 修改产品代理商
+     */
+    @SaCheckPermission("game:productProxy:edit")
+    @Log(title = "产品代理商", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping()
+    public R<Void> edit(@Validated(EditGroup.class) @RequestBody PlatProductProxyBo bo) {
+        return toAjax(platProductProxyService.updateByBo(bo));
+    }
+
+    /**
+     * 删除产品代理商
+     *
+     * @param ids 主键串
+     */
+    @SaCheckPermission("game:productProxy:remove")
+    @Log(title = "产品代理商", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public R<Void> remove(@NotEmpty(message = "主键不能为空")
+                          @PathVariable Long[] ids) {
+        return toAjax(platProductProxyService.deleteWithValidByIds(List.of(ids), true));
+    }
+}

+ 103 - 0
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/domain/PlatChannel.java

@@ -0,0 +1,103 @@
+package org.dromara.game.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.dromara.common.mybatis.core.domain.BaseEntity;
+
+import java.io.Serial;
+
+/**
+ * 渠道对象 plat_channel
+ *
+ * @author Hixon
+ * @date 2024-08-07
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("plat_channel")
+public class PlatChannel extends BaseEntity {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 渠道ID
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 产品ID
+     */
+    private Long productId;
+
+    /**
+     * 代理商ID
+     */
+    private Long proxyId;
+
+    /**
+     * 媒体账号ID
+     */
+    private String accountId;
+
+    /**
+     * 产品名
+     */
+    private String productName;
+
+    /**
+     * 媒体类型
+     */
+    private String platType;
+
+    /**
+     * 投放人员名称
+     */
+    private String userName;
+
+    /**
+     * 渠道名称
+     */
+    private String name;
+
+    /**
+     * 公司名
+     */
+    private String company;
+
+    /**
+     * 运营方式
+     */
+    private String operatingMode;
+
+    /**
+     * 投放方式
+     */
+    private String deliveryMode;
+
+    /**
+     * 激活上报规则
+     */
+    private String activeRules;
+
+    /**
+     * 关键行为上报规则
+     */
+    private String actionRules;
+
+    /**
+     * 是否上报
+     */
+    private String isReport;
+
+    /**
+     * 状态(0正常 1停用)
+     */
+    private String status;
+
+
+}

+ 7 - 6
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/minigame/domain/Product.java → ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/domain/PlatProduct.java

@@ -1,5 +1,6 @@
-package org.dromara.minigame.domain;
+package org.dromara.game.domain;
 
+import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
@@ -10,15 +11,15 @@ import org.dromara.common.tenant.core.TenantEntity;
 import java.io.Serial;
 
 /**
- * 产品对象 product
+ * 产品对象 plat_product
  *
  * @author Hixon
- * @date 2024-08-05
+ * @date 2024-08-07
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
-@TableName("product")
-public class Product extends TenantEntity {
+@TableName("plat_product")
+public class PlatProduct extends TenantEntity {
 
     @Serial
     private static final long serialVersionUID = 1L;
@@ -26,7 +27,7 @@ public class Product extends TenantEntity {
     /**
      * 产品ID
      */
-    @TableId(value = "id")
+    @TableId(value = "id", type = IdType.AUTO)
     private Long id;
 
     /**

+ 45 - 0
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/domain/PlatProductCategory.java

@@ -0,0 +1,45 @@
+package org.dromara.game.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.dromara.common.tenant.core.TenantEntity;
+
+import java.io.Serial;
+
+/**
+ * 产品分类对象 plat_product_category
+ *
+ * @author Lion Li
+ * @date 2024-08-07
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("plat_product_category")
+public class PlatProductCategory extends TenantEntity {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 分类ID
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 分类名称
+     */
+    private String name;
+
+    /**
+     * 删除标志(0代表存在 2代表删除)
+     */
+    @TableLogic
+    private String delFlag;
+
+
+}

+ 45 - 0
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/domain/PlatProductProxy.java

@@ -0,0 +1,45 @@
+package org.dromara.game.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.dromara.common.tenant.core.TenantEntity;
+
+import java.io.Serial;
+
+/**
+ * 产品代理商对象 plat_product_proxy
+ *
+ * @author Hixon
+ * @date 2024-08-07
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("plat_product_proxy")
+public class PlatProductProxy extends TenantEntity {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 代理商ID
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 代理商名称
+     */
+    private String name;
+
+    /**
+     * 删除标志(0代表存在 2代表删除)
+     */
+    @TableLogic
+    private String delFlag;
+
+
+}

+ 115 - 0
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/domain/bo/PlatChannelBo.java

@@ -0,0 +1,115 @@
+package org.dromara.game.domain.bo;
+
+import io.github.linpeilie.annotations.AutoMapper;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import org.dromara.common.mybatis.core.domain.BaseEntity;
+import org.dromara.game.domain.PlatChannel;
+
+/**
+ * 渠道业务对象 plat_channel
+ *
+ * @author Hixon
+ * @date 2024-08-07
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = PlatChannel.class, reverseConvertGenerate = false)
+public class PlatChannelBo extends BaseEntity {
+
+    /**
+     * 渠道ID
+     */
+    @NotNull(message = "渠道ID不能为空", groups = { EditGroup.class })
+    private Long id;
+
+    /**
+     * 产品ID
+     */
+    @NotNull(message = "产品ID不能为空", groups = { AddGroup.class, EditGroup.class })
+    private Long productId;
+
+    /**
+     * 代理商ID
+     */
+    @NotNull(message = "代理商ID不能为空", groups = { AddGroup.class, EditGroup.class })
+    private Long proxyId;
+
+    /**
+     * 媒体账号ID
+     */
+    @NotBlank(message = "媒体账号ID不能为空", groups = { AddGroup.class, EditGroup.class })
+    private String accountId;
+
+    /**
+     * 产品名
+     */
+    @NotBlank(message = "产品名不能为空", groups = { AddGroup.class, EditGroup.class })
+    private String productName;
+
+    /**
+     * 媒体类型
+     */
+    @NotBlank(message = "媒体类型不能为空", groups = { AddGroup.class, EditGroup.class })
+    private String platType;
+
+    /**
+     * 投放人员名称
+     */
+    @NotBlank(message = "投放人员名称不能为空", groups = { AddGroup.class, EditGroup.class })
+    private String userName;
+
+    /**
+     * 渠道名称
+     */
+    @NotBlank(message = "渠道名称不能为空", groups = { AddGroup.class, EditGroup.class })
+    private String name;
+
+    /**
+     * 公司名
+     */
+    @NotBlank(message = "公司名不能为空", groups = { AddGroup.class, EditGroup.class })
+    private String company;
+
+    /**
+     * 运营方式
+     */
+    @NotBlank(message = "运营方式不能为空", groups = { AddGroup.class, EditGroup.class })
+    private String operatingMode;
+
+    /**
+     * 投放方式
+     */
+    @NotBlank(message = "投放方式不能为空", groups = { AddGroup.class, EditGroup.class })
+    private String deliveryMode;
+
+    /**
+     * 激活上报规则
+     */
+    @NotBlank(message = "激活上报规则不能为空", groups = { AddGroup.class, EditGroup.class })
+    private String activeRules;
+
+    /**
+     * 关键行为上报规则
+     */
+    @NotBlank(message = "关键行为上报规则不能为空", groups = { AddGroup.class, EditGroup.class })
+    private String actionRules;
+
+    /**
+     * 是否上报
+     */
+    @NotBlank(message = "是否上报不能为空", groups = { AddGroup.class, EditGroup.class })
+    private String isReport;
+
+    /**
+     * 状态(0正常 1停用)
+     */
+    @NotBlank(message = "状态(0正常 1停用)不能为空", groups = { AddGroup.class, EditGroup.class })
+    private String status;
+
+
+}

+ 6 - 6
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/minigame/domain/bo/ProductBo.java → ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/domain/bo/PlatProductBo.java

@@ -1,4 +1,4 @@
-package org.dromara.minigame.domain.bo;
+package org.dromara.game.domain.bo;
 
 import io.github.linpeilie.annotations.AutoMapper;
 import jakarta.validation.constraints.NotBlank;
@@ -8,18 +8,18 @@ import lombok.EqualsAndHashCode;
 import org.dromara.common.core.validate.AddGroup;
 import org.dromara.common.core.validate.EditGroup;
 import org.dromara.common.mybatis.core.domain.BaseEntity;
-import org.dromara.minigame.domain.Product;
+import org.dromara.game.domain.PlatProduct;
 
 /**
- * 产品业务对象 product
+ * 产品业务对象 plat_product
  *
  * @author Hixon
- * @date 2024-08-05
+ * @date 2024-08-07
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
-@AutoMapper(target = Product.class, reverseConvertGenerate = false)
-public class ProductBo extends BaseEntity {
+@AutoMapper(target = PlatProduct.class, reverseConvertGenerate = false)
+public class PlatProductBo extends BaseEntity {
 
     /**
      * 产品ID

+ 37 - 0
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/domain/bo/PlatProductCategoryBo.java

@@ -0,0 +1,37 @@
+package org.dromara.game.domain.bo;
+
+import io.github.linpeilie.annotations.AutoMapper;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import org.dromara.common.mybatis.core.domain.BaseEntity;
+import org.dromara.game.domain.PlatProductCategory;
+
+/**
+ * 产品分类业务对象 plat_product_category
+ *
+ * @author Lion Li
+ * @date 2024-08-07
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = PlatProductCategory.class, reverseConvertGenerate = false)
+public class PlatProductCategoryBo extends BaseEntity {
+
+    /**
+     * 分类ID
+     */
+    @NotNull(message = "分类ID不能为空", groups = { EditGroup.class })
+    private Long id;
+
+    /**
+     * 分类名称
+     */
+    @NotBlank(message = "分类名称不能为空", groups = { AddGroup.class, EditGroup.class })
+    private String name;
+
+
+}

+ 37 - 0
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/domain/bo/PlatProductProxyBo.java

@@ -0,0 +1,37 @@
+package org.dromara.game.domain.bo;
+
+import io.github.linpeilie.annotations.AutoMapper;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import org.dromara.common.mybatis.core.domain.BaseEntity;
+import org.dromara.game.domain.PlatProductProxy;
+
+/**
+ * 产品代理商业务对象 plat_product_proxy
+ *
+ * @author Hixon
+ * @date 2024-08-07
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = PlatProductProxy.class, reverseConvertGenerate = false)
+public class PlatProductProxyBo extends BaseEntity {
+
+    /**
+     * 代理商ID
+     */
+    @NotNull(message = "代理商ID不能为空", groups = { EditGroup.class })
+    private Long id;
+
+    /**
+     * 代理商名称
+     */
+    @NotBlank(message = "代理商名称不能为空", groups = { AddGroup.class, EditGroup.class })
+    private String name;
+
+
+}

+ 124 - 0
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/domain/vo/PlatChannelVo.java

@@ -0,0 +1,124 @@
+package org.dromara.game.domain.vo;
+
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import org.dromara.common.excel.annotation.ExcelDictFormat;
+import org.dromara.common.excel.convert.ExcelDictConvert;
+import org.dromara.game.domain.PlatChannel;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+
+
+/**
+ * 渠道视图对象 plat_channel
+ *
+ * @author Hixon
+ * @date 2024-08-07
+ */
+@Data
+@ExcelIgnoreUnannotated
+@AutoMapper(target = PlatChannel.class)
+public class PlatChannelVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 渠道ID
+     */
+    @ExcelProperty(value = "渠道ID")
+    private Long id;
+
+    /**
+     * 产品ID
+     */
+    @ExcelProperty(value = "产品ID", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(dictType = "sys_normal_disable")
+    private Long productId;
+
+    /**
+     * 代理商ID
+     */
+    @ExcelProperty(value = "代理商ID", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(dictType = "sys_normal_disable")
+    private Long proxyId;
+
+    /**
+     * 媒体账号ID
+     */
+    @ExcelProperty(value = "媒体账号ID")
+    private String accountId;
+
+    /**
+     * 产品名
+     */
+    @ExcelProperty(value = "产品名")
+    private String productName;
+
+    /**
+     * 媒体类型
+     */
+    @ExcelProperty(value = "媒体类型")
+    private String platType;
+
+    /**
+     * 投放人员名称
+     */
+    @ExcelProperty(value = "投放人员名称")
+    private String userName;
+
+    /**
+     * 渠道名称
+     */
+    @ExcelProperty(value = "渠道名称")
+    private String name;
+
+    /**
+     * 公司名
+     */
+    @ExcelProperty(value = "公司名")
+    private String company;
+
+    /**
+     * 运营方式
+     */
+    @ExcelProperty(value = "运营方式")
+    private String operatingMode;
+
+    /**
+     * 投放方式
+     */
+    @ExcelProperty(value = "投放方式")
+    private String deliveryMode;
+
+    /**
+     * 激活上报规则
+     */
+    @ExcelProperty(value = "激活上报规则")
+    private String activeRules;
+
+    /**
+     * 关键行为上报规则
+     */
+    @ExcelProperty(value = "关键行为上报规则")
+    private String actionRules;
+
+    /**
+     * 是否上报
+     */
+    @ExcelProperty(value = "是否上报")
+    private String isReport;
+
+    /**
+     * 状态(0正常 1停用)
+     */
+    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(readConverterExp = "0=正常,1=停用")
+    private String status;
+
+
+}

+ 41 - 0
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/domain/vo/PlatProductCategoryVo.java

@@ -0,0 +1,41 @@
+package org.dromara.game.domain.vo;
+
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import org.dromara.game.domain.PlatProductCategory;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+
+
+/**
+ * 产品分类视图对象 plat_product_category
+ *
+ * @author Lion Li
+ * @date 2024-08-07
+ */
+@Data
+@ExcelIgnoreUnannotated
+@AutoMapper(target = PlatProductCategory.class)
+public class PlatProductCategoryVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 分类ID
+     */
+    @ExcelProperty(value = "分类ID")
+    private Long id;
+
+    /**
+     * 分类名称
+     */
+    @ExcelProperty(value = "分类名称")
+    private String name;
+
+
+}

+ 41 - 0
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/domain/vo/PlatProductProxyVo.java

@@ -0,0 +1,41 @@
+package org.dromara.game.domain.vo;
+
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import org.dromara.game.domain.PlatProductProxy;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+
+
+/**
+ * 产品代理商视图对象 plat_product_proxy
+ *
+ * @author Hixon
+ * @date 2024-08-07
+ */
+@Data
+@ExcelIgnoreUnannotated
+@AutoMapper(target = PlatProductProxy.class)
+public class PlatProductProxyVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 代理商ID
+     */
+    @ExcelProperty(value = "代理商ID")
+    private Long id;
+
+    /**
+     * 代理商名称
+     */
+    @ExcelProperty(value = "代理商名称")
+    private String name;
+
+
+}

+ 6 - 6
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/minigame/domain/vo/ProductVo.java → ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/domain/vo/PlatProductVo.java

@@ -1,4 +1,4 @@
-package org.dromara.minigame.domain.vo;
+package org.dromara.game.domain.vo;
 
 import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 import com.alibaba.excel.annotation.ExcelProperty;
@@ -6,7 +6,7 @@ import io.github.linpeilie.annotations.AutoMapper;
 import lombok.Data;
 import org.dromara.common.excel.annotation.ExcelDictFormat;
 import org.dromara.common.excel.convert.ExcelDictConvert;
-import org.dromara.minigame.domain.Product;
+import org.dromara.game.domain.PlatProduct;
 
 import java.io.Serial;
 import java.io.Serializable;
@@ -14,15 +14,15 @@ import java.io.Serializable;
 
 
 /**
- * 产品视图对象 product
+ * 产品视图对象 plat_product
  *
  * @author Hixon
- * @date 2024-08-05
+ * @date 2024-08-07
  */
 @Data
 @ExcelIgnoreUnannotated
-@AutoMapper(target = Product.class)
-public class ProductVo implements Serializable {
+@AutoMapper(target = PlatProduct.class)
+public class PlatProductVo implements Serializable {
 
     @Serial
     private static final long serialVersionUID = 1L;

+ 15 - 0
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/mapper/PlatChannelMapper.java

@@ -0,0 +1,15 @@
+package org.dromara.game.mapper;
+
+import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
+import org.dromara.game.domain.PlatChannel;
+import org.dromara.game.domain.vo.PlatChannelVo;
+
+/**
+ * 渠道Mapper接口
+ *
+ * @author Hixon
+ * @date 2024-08-07
+ */
+public interface PlatChannelMapper extends BaseMapperPlus<PlatChannel, PlatChannelVo> {
+
+}

+ 15 - 0
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/mapper/PlatProductCategoryMapper.java

@@ -0,0 +1,15 @@
+package org.dromara.game.mapper;
+
+import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
+import org.dromara.game.domain.PlatProductCategory;
+import org.dromara.game.domain.vo.PlatProductCategoryVo;
+
+/**
+ * 产品分类Mapper接口
+ *
+ * @author Lion Li
+ * @date 2024-08-07
+ */
+public interface PlatProductCategoryMapper extends BaseMapperPlus<PlatProductCategory, PlatProductCategoryVo> {
+
+}

+ 15 - 0
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/mapper/PlatProductMapper.java

@@ -0,0 +1,15 @@
+package org.dromara.game.mapper;
+
+import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
+import org.dromara.game.domain.PlatProduct;
+import org.dromara.game.domain.vo.PlatProductVo;
+
+/**
+ * 产品Mapper接口
+ *
+ * @author Hixon
+ * @date 2024-08-07
+ */
+public interface PlatProductMapper extends BaseMapperPlus<PlatProduct, PlatProductVo> {
+
+}

+ 15 - 0
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/mapper/PlatProductProxyMapper.java

@@ -0,0 +1,15 @@
+package org.dromara.game.mapper;
+
+import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
+import org.dromara.game.domain.PlatProductProxy;
+import org.dromara.game.domain.vo.PlatProductProxyVo;
+
+/**
+ * 产品代理商Mapper接口
+ *
+ * @author Hixon
+ * @date 2024-08-07
+ */
+public interface PlatProductProxyMapper extends BaseMapperPlus<PlatProductProxy, PlatProductProxyVo> {
+
+}

+ 68 - 0
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/service/IPlatChannelService.java

@@ -0,0 +1,68 @@
+package org.dromara.game.service;
+
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.game.domain.bo.PlatChannelBo;
+import org.dromara.game.domain.vo.PlatChannelVo;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 渠道Service接口
+ *
+ * @author Hixon
+ * @date 2024-08-07
+ */
+public interface IPlatChannelService {
+
+    /**
+     * 查询渠道
+     *
+     * @param id 主键
+     * @return 渠道
+     */
+    PlatChannelVo queryById(Long id);
+
+    /**
+     * 分页查询渠道列表
+     *
+     * @param bo        查询条件
+     * @param pageQuery 分页参数
+     * @return 渠道分页列表
+     */
+    TableDataInfo<PlatChannelVo> queryPageList(PlatChannelBo bo, PageQuery pageQuery);
+
+    /**
+     * 查询符合条件的渠道列表
+     *
+     * @param bo 查询条件
+     * @return 渠道列表
+     */
+    List<PlatChannelVo> queryList(PlatChannelBo bo);
+
+    /**
+     * 新增渠道
+     *
+     * @param bo 渠道
+     * @return 是否新增成功
+     */
+    Boolean insertByBo(PlatChannelBo bo);
+
+    /**
+     * 修改渠道
+     *
+     * @param bo 渠道
+     * @return 是否修改成功
+     */
+    Boolean updateByBo(PlatChannelBo bo);
+
+    /**
+     * 校验并批量删除渠道信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+}

+ 68 - 0
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/service/IPlatProductCategoryService.java

@@ -0,0 +1,68 @@
+package org.dromara.game.service;
+
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.game.domain.bo.PlatProductCategoryBo;
+import org.dromara.game.domain.vo.PlatProductCategoryVo;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 产品分类Service接口
+ *
+ * @author Lion Li
+ * @date 2024-08-07
+ */
+public interface IPlatProductCategoryService {
+
+    /**
+     * 查询产品分类
+     *
+     * @param id 主键
+     * @return 产品分类
+     */
+    PlatProductCategoryVo queryById(Long id);
+
+    /**
+     * 分页查询产品分类列表
+     *
+     * @param bo        查询条件
+     * @param pageQuery 分页参数
+     * @return 产品分类分页列表
+     */
+    TableDataInfo<PlatProductCategoryVo> queryPageList(PlatProductCategoryBo bo, PageQuery pageQuery);
+
+    /**
+     * 查询符合条件的产品分类列表
+     *
+     * @param bo 查询条件
+     * @return 产品分类列表
+     */
+    List<PlatProductCategoryVo> queryList(PlatProductCategoryBo bo);
+
+    /**
+     * 新增产品分类
+     *
+     * @param bo 产品分类
+     * @return 是否新增成功
+     */
+    Boolean insertByBo(PlatProductCategoryBo bo);
+
+    /**
+     * 修改产品分类
+     *
+     * @param bo 产品分类
+     * @return 是否修改成功
+     */
+    Boolean updateByBo(PlatProductCategoryBo bo);
+
+    /**
+     * 校验并批量删除产品分类信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+}

+ 68 - 0
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/service/IPlatProductProxyService.java

@@ -0,0 +1,68 @@
+package org.dromara.game.service;
+
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.game.domain.bo.PlatProductProxyBo;
+import org.dromara.game.domain.vo.PlatProductProxyVo;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 产品代理商Service接口
+ *
+ * @author Hixon
+ * @date 2024-08-07
+ */
+public interface IPlatProductProxyService {
+
+    /**
+     * 查询产品代理商
+     *
+     * @param id 主键
+     * @return 产品代理商
+     */
+    PlatProductProxyVo queryById(Long id);
+
+    /**
+     * 分页查询产品代理商列表
+     *
+     * @param bo        查询条件
+     * @param pageQuery 分页参数
+     * @return 产品代理商分页列表
+     */
+    TableDataInfo<PlatProductProxyVo> queryPageList(PlatProductProxyBo bo, PageQuery pageQuery);
+
+    /**
+     * 查询符合条件的产品代理商列表
+     *
+     * @param bo 查询条件
+     * @return 产品代理商列表
+     */
+    List<PlatProductProxyVo> queryList(PlatProductProxyBo bo);
+
+    /**
+     * 新增产品代理商
+     *
+     * @param bo 产品代理商
+     * @return 是否新增成功
+     */
+    Boolean insertByBo(PlatProductProxyBo bo);
+
+    /**
+     * 修改产品代理商
+     *
+     * @param bo 产品代理商
+     * @return 是否修改成功
+     */
+    Boolean updateByBo(PlatProductProxyBo bo);
+
+    /**
+     * 校验并批量删除产品代理商信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+}

+ 10 - 10
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/minigame/service/IProductService.java → ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/service/IPlatProductService.java

@@ -1,9 +1,9 @@
-package org.dromara.minigame.service;
+package org.dromara.game.service;
 
 import org.dromara.common.mybatis.core.page.PageQuery;
 import org.dromara.common.mybatis.core.page.TableDataInfo;
-import org.dromara.minigame.domain.bo.ProductBo;
-import org.dromara.minigame.domain.vo.ProductVo;
+import org.dromara.game.domain.bo.PlatProductBo;
+import org.dromara.game.domain.vo.PlatProductVo;
 
 import java.util.Collection;
 import java.util.List;
@@ -12,9 +12,9 @@ import java.util.List;
  * 产品Service接口
  *
  * @author Hixon
- * @date 2024-08-05
+ * @date 2024-08-07
  */
-public interface IProductService {
+public interface IPlatProductService {
 
     /**
      * 查询产品
@@ -22,7 +22,7 @@ public interface IProductService {
      * @param id 主键
      * @return 产品
      */
-    ProductVo queryById(Long id);
+    PlatProductVo queryById(Long id);
 
     /**
      * 分页查询产品列表
@@ -31,7 +31,7 @@ public interface IProductService {
      * @param pageQuery 分页参数
      * @return 产品分页列表
      */
-    TableDataInfo<ProductVo> queryPageList(ProductBo bo, PageQuery pageQuery);
+    TableDataInfo<PlatProductVo> queryPageList(PlatProductBo bo, PageQuery pageQuery);
 
     /**
      * 查询符合条件的产品列表
@@ -39,7 +39,7 @@ public interface IProductService {
      * @param bo 查询条件
      * @return 产品列表
      */
-    List<ProductVo> queryList(ProductBo bo);
+    List<PlatProductVo> queryList(PlatProductBo bo);
 
     /**
      * 新增产品
@@ -47,7 +47,7 @@ public interface IProductService {
      * @param bo 产品
      * @return 是否新增成功
      */
-    Boolean insertByBo(ProductBo bo);
+    Boolean insertByBo(PlatProductBo bo);
 
     /**
      * 修改产品
@@ -55,7 +55,7 @@ public interface IProductService {
      * @param bo 产品
      * @return 是否修改成功
      */
-    Boolean updateByBo(ProductBo bo);
+    Boolean updateByBo(PlatProductBo bo);
 
     /**
      * 校验并批量删除产品信息

+ 142 - 0
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/service/impl/PlatChannelServiceImpl.java

@@ -0,0 +1,142 @@
+package org.dromara.game.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.RequiredArgsConstructor;
+import org.dromara.common.core.utils.MapstructUtils;
+import org.dromara.common.core.utils.StringUtils;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.game.domain.PlatChannel;
+import org.dromara.game.domain.bo.PlatChannelBo;
+import org.dromara.game.domain.vo.PlatChannelVo;
+import org.dromara.game.mapper.PlatChannelMapper;
+import org.dromara.game.service.IPlatChannelService;
+import org.springframework.stereotype.Service;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 渠道Service业务层处理
+ *
+ * @author Hixon
+ * @date 2024-08-07
+ */
+@RequiredArgsConstructor
+@Service
+public class PlatChannelServiceImpl implements IPlatChannelService {
+
+    private final PlatChannelMapper baseMapper;
+
+    /**
+     * 查询渠道
+     *
+     * @param id 主键
+     * @return 渠道
+     */
+    @Override
+    public PlatChannelVo queryById(Long id){
+        return baseMapper.selectVoById(id);
+    }
+
+    /**
+     * 分页查询渠道列表
+     *
+     * @param bo        查询条件
+     * @param pageQuery 分页参数
+     * @return 渠道分页列表
+     */
+    @Override
+    public TableDataInfo<PlatChannelVo> queryPageList(PlatChannelBo bo, PageQuery pageQuery) {
+        LambdaQueryWrapper<PlatChannel> lqw = buildQueryWrapper(bo);
+        Page<PlatChannelVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
+        return TableDataInfo.build(result);
+    }
+
+    /**
+     * 查询符合条件的渠道列表
+     *
+     * @param bo 查询条件
+     * @return 渠道列表
+     */
+    @Override
+    public List<PlatChannelVo> queryList(PlatChannelBo bo) {
+        LambdaQueryWrapper<PlatChannel> lqw = buildQueryWrapper(bo);
+        return baseMapper.selectVoList(lqw);
+    }
+
+    private LambdaQueryWrapper<PlatChannel> buildQueryWrapper(PlatChannelBo bo) {
+        Map<String, Object> params = bo.getParams();
+        LambdaQueryWrapper<PlatChannel> lqw = Wrappers.lambdaQuery();
+        lqw.eq(bo.getProductId() != null, PlatChannel::getProductId, bo.getProductId());
+        lqw.eq(bo.getProxyId() != null, PlatChannel::getProxyId, bo.getProxyId());
+        lqw.eq(StringUtils.isNotBlank(bo.getAccountId()), PlatChannel::getAccountId, bo.getAccountId());
+        lqw.like(StringUtils.isNotBlank(bo.getProductName()), PlatChannel::getProductName, bo.getProductName());
+        lqw.eq(StringUtils.isNotBlank(bo.getPlatType()), PlatChannel::getPlatType, bo.getPlatType());
+        lqw.like(StringUtils.isNotBlank(bo.getUserName()), PlatChannel::getUserName, bo.getUserName());
+        lqw.like(StringUtils.isNotBlank(bo.getName()), PlatChannel::getName, bo.getName());
+        lqw.eq(StringUtils.isNotBlank(bo.getCompany()), PlatChannel::getCompany, bo.getCompany());
+        lqw.eq(StringUtils.isNotBlank(bo.getOperatingMode()), PlatChannel::getOperatingMode, bo.getOperatingMode());
+        lqw.eq(StringUtils.isNotBlank(bo.getDeliveryMode()), PlatChannel::getDeliveryMode, bo.getDeliveryMode());
+        lqw.eq(StringUtils.isNotBlank(bo.getActiveRules()), PlatChannel::getActiveRules, bo.getActiveRules());
+        lqw.eq(StringUtils.isNotBlank(bo.getActionRules()), PlatChannel::getActionRules, bo.getActionRules());
+        lqw.eq(StringUtils.isNotBlank(bo.getIsReport()), PlatChannel::getIsReport, bo.getIsReport());
+        lqw.eq(StringUtils.isNotBlank(bo.getStatus()), PlatChannel::getStatus, bo.getStatus());
+        return lqw;
+    }
+
+    /**
+     * 新增渠道
+     *
+     * @param bo 渠道
+     * @return 是否新增成功
+     */
+    @Override
+    public Boolean insertByBo(PlatChannelBo bo) {
+        PlatChannel add = MapstructUtils.convert(bo, PlatChannel.class);
+        validEntityBeforeSave(add);
+        boolean flag = baseMapper.insert(add) > 0;
+        if (flag) {
+            bo.setId(add.getId());
+        }
+        return flag;
+    }
+
+    /**
+     * 修改渠道
+     *
+     * @param bo 渠道
+     * @return 是否修改成功
+     */
+    @Override
+    public Boolean updateByBo(PlatChannelBo bo) {
+        PlatChannel update = MapstructUtils.convert(bo, PlatChannel.class);
+        validEntityBeforeSave(update);
+        return baseMapper.updateById(update) > 0;
+    }
+
+    /**
+     * 保存前的数据校验
+     */
+    private void validEntityBeforeSave(PlatChannel entity){
+        //TODO 做一些数据校验,如唯一约束
+    }
+
+    /**
+     * 校验并批量删除渠道信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    @Override
+    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
+        if(isValid){
+            //TODO 做一些业务上的校验,判断是否需要校验
+        }
+        return baseMapper.deleteByIds(ids) > 0;
+    }
+}

+ 129 - 0
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/service/impl/PlatProductCategoryServiceImpl.java

@@ -0,0 +1,129 @@
+package org.dromara.game.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.RequiredArgsConstructor;
+import org.dromara.common.core.utils.MapstructUtils;
+import org.dromara.common.core.utils.StringUtils;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.game.domain.PlatProductCategory;
+import org.dromara.game.domain.bo.PlatProductCategoryBo;
+import org.dromara.game.domain.vo.PlatProductCategoryVo;
+import org.dromara.game.mapper.PlatProductCategoryMapper;
+import org.dromara.game.service.IPlatProductCategoryService;
+import org.springframework.stereotype.Service;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 产品分类Service业务层处理
+ *
+ * @author Lion Li
+ * @date 2024-08-07
+ */
+@RequiredArgsConstructor
+@Service
+public class PlatProductCategoryServiceImpl implements IPlatProductCategoryService {
+
+    private final PlatProductCategoryMapper baseMapper;
+
+    /**
+     * 查询产品分类
+     *
+     * @param id 主键
+     * @return 产品分类
+     */
+    @Override
+    public PlatProductCategoryVo queryById(Long id){
+        return baseMapper.selectVoById(id);
+    }
+
+    /**
+     * 分页查询产品分类列表
+     *
+     * @param bo        查询条件
+     * @param pageQuery 分页参数
+     * @return 产品分类分页列表
+     */
+    @Override
+    public TableDataInfo<PlatProductCategoryVo> queryPageList(PlatProductCategoryBo bo, PageQuery pageQuery) {
+        LambdaQueryWrapper<PlatProductCategory> lqw = buildQueryWrapper(bo);
+        Page<PlatProductCategoryVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
+        return TableDataInfo.build(result);
+    }
+
+    /**
+     * 查询符合条件的产品分类列表
+     *
+     * @param bo 查询条件
+     * @return 产品分类列表
+     */
+    @Override
+    public List<PlatProductCategoryVo> queryList(PlatProductCategoryBo bo) {
+        LambdaQueryWrapper<PlatProductCategory> lqw = buildQueryWrapper(bo);
+        return baseMapper.selectVoList(lqw);
+    }
+
+    private LambdaQueryWrapper<PlatProductCategory> buildQueryWrapper(PlatProductCategoryBo bo) {
+        Map<String, Object> params = bo.getParams();
+        LambdaQueryWrapper<PlatProductCategory> lqw = Wrappers.lambdaQuery();
+        lqw.like(StringUtils.isNotBlank(bo.getName()), PlatProductCategory::getName, bo.getName());
+        return lqw;
+    }
+
+    /**
+     * 新增产品分类
+     *
+     * @param bo 产品分类
+     * @return 是否新增成功
+     */
+    @Override
+    public Boolean insertByBo(PlatProductCategoryBo bo) {
+        PlatProductCategory add = MapstructUtils.convert(bo, PlatProductCategory.class);
+        validEntityBeforeSave(add);
+        boolean flag = baseMapper.insert(add) > 0;
+        if (flag) {
+            bo.setId(add.getId());
+        }
+        return flag;
+    }
+
+    /**
+     * 修改产品分类
+     *
+     * @param bo 产品分类
+     * @return 是否修改成功
+     */
+    @Override
+    public Boolean updateByBo(PlatProductCategoryBo bo) {
+        PlatProductCategory update = MapstructUtils.convert(bo, PlatProductCategory.class);
+        validEntityBeforeSave(update);
+        return baseMapper.updateById(update) > 0;
+    }
+
+    /**
+     * 保存前的数据校验
+     */
+    private void validEntityBeforeSave(PlatProductCategory entity){
+        //TODO 做一些数据校验,如唯一约束
+    }
+
+    /**
+     * 校验并批量删除产品分类信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    @Override
+    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
+        if(isValid){
+            //TODO 做一些业务上的校验,判断是否需要校验
+        }
+        return baseMapper.deleteByIds(ids) > 0;
+    }
+}

+ 129 - 0
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/service/impl/PlatProductProxyServiceImpl.java

@@ -0,0 +1,129 @@
+package org.dromara.game.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.RequiredArgsConstructor;
+import org.dromara.common.core.utils.MapstructUtils;
+import org.dromara.common.core.utils.StringUtils;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.game.domain.PlatProductProxy;
+import org.dromara.game.domain.bo.PlatProductProxyBo;
+import org.dromara.game.domain.vo.PlatProductProxyVo;
+import org.dromara.game.mapper.PlatProductProxyMapper;
+import org.dromara.game.service.IPlatProductProxyService;
+import org.springframework.stereotype.Service;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 产品代理商Service业务层处理
+ *
+ * @author Hixon
+ * @date 2024-08-07
+ */
+@RequiredArgsConstructor
+@Service
+public class PlatProductProxyServiceImpl implements IPlatProductProxyService {
+
+    private final PlatProductProxyMapper baseMapper;
+
+    /**
+     * 查询产品代理商
+     *
+     * @param id 主键
+     * @return 产品代理商
+     */
+    @Override
+    public PlatProductProxyVo queryById(Long id){
+        return baseMapper.selectVoById(id);
+    }
+
+    /**
+     * 分页查询产品代理商列表
+     *
+     * @param bo        查询条件
+     * @param pageQuery 分页参数
+     * @return 产品代理商分页列表
+     */
+    @Override
+    public TableDataInfo<PlatProductProxyVo> queryPageList(PlatProductProxyBo bo, PageQuery pageQuery) {
+        LambdaQueryWrapper<PlatProductProxy> lqw = buildQueryWrapper(bo);
+        Page<PlatProductProxyVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
+        return TableDataInfo.build(result);
+    }
+
+    /**
+     * 查询符合条件的产品代理商列表
+     *
+     * @param bo 查询条件
+     * @return 产品代理商列表
+     */
+    @Override
+    public List<PlatProductProxyVo> queryList(PlatProductProxyBo bo) {
+        LambdaQueryWrapper<PlatProductProxy> lqw = buildQueryWrapper(bo);
+        return baseMapper.selectVoList(lqw);
+    }
+
+    private LambdaQueryWrapper<PlatProductProxy> buildQueryWrapper(PlatProductProxyBo bo) {
+        Map<String, Object> params = bo.getParams();
+        LambdaQueryWrapper<PlatProductProxy> lqw = Wrappers.lambdaQuery();
+        lqw.like(StringUtils.isNotBlank(bo.getName()), PlatProductProxy::getName, bo.getName());
+        return lqw;
+    }
+
+    /**
+     * 新增产品代理商
+     *
+     * @param bo 产品代理商
+     * @return 是否新增成功
+     */
+    @Override
+    public Boolean insertByBo(PlatProductProxyBo bo) {
+        PlatProductProxy add = MapstructUtils.convert(bo, PlatProductProxy.class);
+        validEntityBeforeSave(add);
+        boolean flag = baseMapper.insert(add) > 0;
+        if (flag) {
+            bo.setId(add.getId());
+        }
+        return flag;
+    }
+
+    /**
+     * 修改产品代理商
+     *
+     * @param bo 产品代理商
+     * @return 是否修改成功
+     */
+    @Override
+    public Boolean updateByBo(PlatProductProxyBo bo) {
+        PlatProductProxy update = MapstructUtils.convert(bo, PlatProductProxy.class);
+        validEntityBeforeSave(update);
+        return baseMapper.updateById(update) > 0;
+    }
+
+    /**
+     * 保存前的数据校验
+     */
+    private void validEntityBeforeSave(PlatProductProxy entity){
+        //TODO 做一些数据校验,如唯一约束
+    }
+
+    /**
+     * 校验并批量删除产品代理商信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    @Override
+    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
+        if(isValid){
+            //TODO 做一些业务上的校验,判断是否需要校验
+        }
+        return baseMapper.deleteByIds(ids) > 0;
+    }
+}

+ 24 - 24
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/minigame/service/impl/ProductServiceImpl.java → ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/game/service/impl/PlatProductServiceImpl.java

@@ -1,4 +1,4 @@
-package org.dromara.minigame.service.impl;
+package org.dromara.game.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -8,11 +8,11 @@ import org.dromara.common.core.utils.MapstructUtils;
 import org.dromara.common.core.utils.StringUtils;
 import org.dromara.common.mybatis.core.page.PageQuery;
 import org.dromara.common.mybatis.core.page.TableDataInfo;
-import org.dromara.minigame.domain.Product;
-import org.dromara.minigame.domain.bo.ProductBo;
-import org.dromara.minigame.domain.vo.ProductVo;
-import org.dromara.minigame.mapper.ProductMapper;
-import org.dromara.minigame.service.IProductService;
+import org.dromara.game.domain.PlatProduct;
+import org.dromara.game.domain.bo.PlatProductBo;
+import org.dromara.game.domain.vo.PlatProductVo;
+import org.dromara.game.mapper.PlatProductMapper;
+import org.dromara.game.service.IPlatProductService;
 import org.springframework.stereotype.Service;
 
 import java.util.Collection;
@@ -23,13 +23,13 @@ import java.util.Map;
  * 产品Service业务层处理
  *
  * @author Hixon
- * @date 2024-08-05
+ * @date 2024-08-07
  */
 @RequiredArgsConstructor
 @Service
-public class ProductServiceImpl implements IProductService {
+public class PlatProductServiceImpl implements IPlatProductService {
 
-    private final ProductMapper baseMapper;
+    private final PlatProductMapper baseMapper;
 
     /**
      * 查询产品
@@ -38,7 +38,7 @@ public class ProductServiceImpl implements IProductService {
      * @return 产品
      */
     @Override
-    public ProductVo queryById(Long id){
+    public PlatProductVo queryById(Long id){
         return baseMapper.selectVoById(id);
     }
 
@@ -50,9 +50,9 @@ public class ProductServiceImpl implements IProductService {
      * @return 产品分页列表
      */
     @Override
-    public TableDataInfo<ProductVo> queryPageList(ProductBo bo, PageQuery pageQuery) {
-        LambdaQueryWrapper<Product> lqw = buildQueryWrapper(bo);
-        Page<ProductVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
+    public TableDataInfo<PlatProductVo> queryPageList(PlatProductBo bo, PageQuery pageQuery) {
+        LambdaQueryWrapper<PlatProduct> lqw = buildQueryWrapper(bo);
+        Page<PlatProductVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
         return TableDataInfo.build(result);
     }
 
@@ -63,16 +63,16 @@ public class ProductServiceImpl implements IProductService {
      * @return 产品列表
      */
     @Override
-    public List<ProductVo> queryList(ProductBo bo) {
-        LambdaQueryWrapper<Product> lqw = buildQueryWrapper(bo);
+    public List<PlatProductVo> queryList(PlatProductBo bo) {
+        LambdaQueryWrapper<PlatProduct> lqw = buildQueryWrapper(bo);
         return baseMapper.selectVoList(lqw);
     }
 
-    private LambdaQueryWrapper<Product> buildQueryWrapper(ProductBo bo) {
+    private LambdaQueryWrapper<PlatProduct> buildQueryWrapper(PlatProductBo bo) {
         Map<String, Object> params = bo.getParams();
-        LambdaQueryWrapper<Product> lqw = Wrappers.lambdaQuery();
-        lqw.eq(bo.getCategoryId() != null, Product::getCategoryId, bo.getCategoryId());
-        lqw.like(StringUtils.isNotBlank(bo.getName()), Product::getName, bo.getName());
+        LambdaQueryWrapper<PlatProduct> lqw = Wrappers.lambdaQuery();
+        lqw.eq(bo.getCategoryId() != null, PlatProduct::getCategoryId, bo.getCategoryId());
+        lqw.like(StringUtils.isNotBlank(bo.getName()), PlatProduct::getName, bo.getName());
         return lqw;
     }
 
@@ -83,8 +83,8 @@ public class ProductServiceImpl implements IProductService {
      * @return 是否新增成功
      */
     @Override
-    public Boolean insertByBo(ProductBo bo) {
-        Product add = MapstructUtils.convert(bo, Product.class);
+    public Boolean insertByBo(PlatProductBo bo) {
+        PlatProduct add = MapstructUtils.convert(bo, PlatProduct.class);
         validEntityBeforeSave(add);
         boolean flag = baseMapper.insert(add) > 0;
         if (flag) {
@@ -100,8 +100,8 @@ public class ProductServiceImpl implements IProductService {
      * @return 是否修改成功
      */
     @Override
-    public Boolean updateByBo(ProductBo bo) {
-        Product update = MapstructUtils.convert(bo, Product.class);
+    public Boolean updateByBo(PlatProductBo bo) {
+        PlatProduct update = MapstructUtils.convert(bo, PlatProduct.class);
         validEntityBeforeSave(update);
         return baseMapper.updateById(update) > 0;
     }
@@ -109,7 +109,7 @@ public class ProductServiceImpl implements IProductService {
     /**
      * 保存前的数据校验
      */
-    private void validEntityBeforeSave(Product entity){
+    private void validEntityBeforeSave(PlatProduct entity){
         //TODO 做一些数据校验,如唯一约束
     }
 

+ 0 - 15
ruoyi-modules/ruoyi-minigame/src/main/java/org/dromara/minigame/mapper/ProductMapper.java

@@ -1,15 +0,0 @@
-package org.dromara.minigame.mapper;
-
-import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
-import org.dromara.minigame.domain.Product;
-import org.dromara.minigame.domain.vo.ProductVo;
-
-/**
- * 产品Mapper接口
- *
- * @author Hixon
- * @date 2024-08-05
- */
-public interface ProductMapper extends BaseMapperPlus<Product, ProductVo> {
-
-}

+ 1 - 1
ruoyi-modules/ruoyi-minigame/src/main/resources/mapper/miniGame/ProductMapper.xml → ruoyi-modules/ruoyi-minigame/src/main/resources/mapper/game/PlatChannelMapper.xml

@@ -2,6 +2,6 @@
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.dromara.minigame.mapper.ProductMapper">
+<mapper namespace="org.dromara.game.mapper.PlatChannelMapper">
 
 </mapper>

+ 7 - 0
ruoyi-modules/ruoyi-minigame/src/main/resources/mapper/game/PlatProductCategoryMapper.xml

@@ -0,0 +1,7 @@
+<?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="org.dromara.game.mapper.PlatProductCategoryMapper">
+
+</mapper>

+ 7 - 0
ruoyi-modules/ruoyi-minigame/src/main/resources/mapper/game/PlatProductMapper.xml

@@ -0,0 +1,7 @@
+<?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="org.dromara.game.mapper.PlatProductMapper">
+
+</mapper>

+ 7 - 0
ruoyi-modules/ruoyi-minigame/src/main/resources/mapper/game/PlatProductProxyMapper.xml

@@ -0,0 +1,7 @@
+<?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="org.dromara.game.mapper.PlatProductProxyMapper">
+
+</mapper>