dos 9 months ago
parent
commit
217b7f3b2a

+ 16 - 0
game-admin/pom.xml

@@ -72,6 +72,22 @@
             <artifactId>game-generator</artifactId>
         </dependency>
 
+        <dependency>
+            <groupId>com.github.xiaoymin</groupId>
+            <artifactId>knife4j-spring-boot-starter</artifactId>
+            <version>3.0.3</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>com.google.guava</groupId>
+                    <artifactId>guava</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.yaml</groupId>
+                    <artifactId>snakeyaml</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
     </dependencies>
 
     <build>

+ 30 - 31
game-business/src/main/java/com/game/business/controller/AppGameClassifyController.java

@@ -2,9 +2,6 @@ package com.game.business.controller;
 
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
-
-import com.game.business.domain.AppGameClassify;
-import com.game.business.service.IAppGameClassifyService;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -23,68 +20,70 @@ import com.game.common.annotation.DataSource;
 import com.game.common.enums.DataSourceType;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import com.game.business.domain.AppGameClassify;
+import com.game.business.service.IAppGameClassifyService;
 import com.game.common.utils.poi.ExcelUtil;
 import com.game.common.core.page.TableDataInfo;
 
 /**
- * 【请填写功能名称】Controller
+ * 游戏分类Controller
  * 
- * @author game
+ * @author dos
  * @date 2024-06-14
  */
 @RestController
-@RequestMapping("/system/classify")
+@RequestMapping("/business/classify")
 @DataSource(DataSourceType.SLAVE)
-@Api(value = "AppGameClassifyController", description = "【请填写功能名称】接口", tags = {"【请填写功能名称】"})
+@Api(value = "AppGameClassifyController", description = "游戏分类接口", tags = {"游戏分类"})
 public class AppGameClassifyController extends BaseController
 {
     @Autowired
     private IAppGameClassifyService appGameClassifyService;
 
     /**
-     * 查询【请填写功能名称】列表
+     * 查询游戏分类列表
      */
-    @PreAuthorize("@ss.hasPermi('system:classify:list')")
+    @PreAuthorize("@ss.hasPermi('business:classify:list')")
     @GetMapping("/list")
-    @ApiOperation(value = "查询【请填写功能名称】列表", notes = "获取【请填写功能名称】列表")
+    @ApiOperation(value = "查询游戏分类列表", notes = "获取游戏分类列表")
     public TableDataInfo list(AppGameClassify appGameClassify)
     {
         startPage();
-        List<AppGameClassify> list = appGameClassifyService.selectAppGameClassifyList(appGameClassify);
+        List<AppGameClassify> list = appGameClassifyService.list();
         return getDataTable(list);
     }
 
     /**
-     * 导出【请填写功能名称】列表
+     * 导出游戏分类列表
      */
-    @PreAuthorize("@ss.hasPermi('system:classify:export')")
-    @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
+    @PreAuthorize("@ss.hasPermi('business:classify:export')")
+    @Log(title = "游戏分类", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    @ApiOperation(value = "导出【请填写功能名称】列表", notes = "导出【请填写功能名称】列表")
+    @ApiOperation(value = "导出游戏分类列表", notes = "导出游戏分类列表")
     public void export(HttpServletResponse response, AppGameClassify appGameClassify)
     {
         List<AppGameClassify> list = appGameClassifyService.selectAppGameClassifyList(appGameClassify);
         ExcelUtil<AppGameClassify> util = new ExcelUtil<AppGameClassify>(AppGameClassify.class);
-        util.exportExcel(response, list, "【请填写功能名称】数据");
+        util.exportExcel(response, list, "游戏分类数据");
     }
 
     /**
-     * 获取【请填写功能名称】详细信息
+     * 获取游戏分类详细信息
      */
-    @PreAuthorize("@ss.hasPermi('system:classify:query')")
+    @PreAuthorize("@ss.hasPermi('business:classify:query')")
     @GetMapping(value = "/{id}")
-    @ApiOperation(value = "获取【请填写功能名称】详细信息", notes = "获取【请填写功能名称】详细信息")
+    @ApiOperation(value = "获取游戏分类详细信息", notes = "获取游戏分类详细信息")
     public AjaxResult getInfo(@PathVariable("id") Long id)
     {
         return success(appGameClassifyService.selectAppGameClassifyById(id));
     }
 
     /**
-     * 新增【请填写功能名称】
+     * 新增游戏分类
      */
-    @PreAuthorize("@ss.hasPermi('system:classify:add')")
-    @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
-    @ApiOperation(value = "新增【请填写功能名称】", notes = "新增【请填写功能名称】")
+    @PreAuthorize("@ss.hasPermi('business:classify:add')")
+    @Log(title = "游戏分类", businessType = BusinessType.INSERT)
+    @ApiOperation(value = "新增游戏分类", notes = "新增游戏分类")
     @PostMapping
     public AjaxResult add(@RequestBody AppGameClassify appGameClassify)
     {
@@ -92,11 +91,11 @@ public class AppGameClassifyController extends BaseController
     }
 
     /**
-     * 修改【请填写功能名称】
+     * 修改游戏分类
      */
-    @PreAuthorize("@ss.hasPermi('system:classify:edit')")
-    @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
-    @ApiOperation(value = "修改【请填写功能名称】", notes = "修改【请填写功能名称】")
+    @PreAuthorize("@ss.hasPermi('business:classify:edit')")
+    @Log(title = "游戏分类", businessType = BusinessType.UPDATE)
+    @ApiOperation(value = "修改游戏分类", notes = "修改游戏分类")
     @PutMapping
     public AjaxResult edit(@RequestBody AppGameClassify appGameClassify)
     {
@@ -104,11 +103,11 @@ public class AppGameClassifyController extends BaseController
     }
 
     /**
-     * 删除【请填写功能名称】
+     * 删除游戏分类
      */
-    @PreAuthorize("@ss.hasPermi('system:classify:remove')")
-    @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
-    @ApiOperation(value = "删除【请填写功能名称】", notes = "删除【请填写功能名称】")
+    @PreAuthorize("@ss.hasPermi('business:classify:remove')")
+    @Log(title = "游戏分类", businessType = BusinessType.DELETE)
+    @ApiOperation(value = "删除游戏分类", notes = "删除游戏分类")
 	@DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids)
     {

+ 34 - 37
game-business/src/main/java/com/game/business/domain/AppGame.java

@@ -1,6 +1,7 @@
 package com.game.business.domain;
 
 import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import org.apache.commons.lang3.builder.ToStringBuilder;
@@ -11,93 +12,89 @@ import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiModel;
 import lombok.Data;
 
+import java.util.Date;
+
 /**
  * 游戏配置对象 app_game
  *
  * @author game
  * @date 2024-06-14
  */
-@TableName(resultMap = "com.game.business.mapper.AppGameMapper.AppGameResult")
+@ApiModel(value = "app_game", description = "游戏配置")
+@TableName(value= "app_game")
 @Data
-public class AppGame extends BaseEntity {
-    private static final long serialVersionUID = 1L;
+public class AppGame {
+private static final long serialVersionUID=1L;
 
-    /**
-     * $column.columnComment
-     */
+    /** $column.columnComment */
     @ApiModelProperty(value = "$column.columnComment")
     @TableId(value = "id" , type = IdType.AUTO)
     private Long id;
 
-    /**
-     * 名称
-     */
+    /** 名称 */
     @ApiModelProperty(value = "名称")
     @Excel(name = "名称")
+    @TableField(value = "name")
     private String name;
 
-    /**
-     * 所属分类id
-     */
+    /** 所属分类id */
     @ApiModelProperty(value = "所属分类id")
     @Excel(name = "所属分类id")
+    @TableField(value = "classify_id")
     private Long classifyId;
 
-    /**
-     * logo
-     */
+    /** logo */
     @ApiModelProperty(value = "logo")
     @Excel(name = "logo")
+    @TableField(value = "logo_url")
     private String logoUrl;
 
-    /**
-     * 游戏路径
-     */
+    /** 游戏路径 */
     @ApiModelProperty(value = "游戏路径")
     @Excel(name = "游戏路径")
+    @TableField(value = "game_path")
     private String gamePath;
 
-    /**
-     * 是否启用 0:未启用  1:已启用
-     */
+    /** 是否启用 0:未启用  1:已启用 */
     @ApiModelProperty(value = "是否启用 0:未启用  1:已启用")
     @Excel(name = "是否启用 0:未启用  1:已启用")
+    @TableField(value = "status")
     private Long status;
 
-    /**
-     * 排序
-     */
+    /** 排序 */
     @ApiModelProperty(value = "排序")
     @Excel(name = "排序")
+    @TableField(value = "orderno")
     private Long orderno;
 
-    /**
-     * 备用字段1
-     */
+    /** 备用字段1 */
     @ApiModelProperty(value = "备用字段1")
     @Excel(name = "备用字段1")
+    @TableField(value = "game_expand1")
     private String gameExpand1;
 
-    /**
-     * 备用字段2
-     */
+    /** 备用字段2 */
     @ApiModelProperty(value = "备用字段2")
     @Excel(name = "备用字段2")
+    @TableField(value = "game_expand2")
     private String gameExpand2;
 
-    /**
-     * 备用字段3
-     */
+    /** 备用字段3 */
     @ApiModelProperty(value = "备用字段3")
     @Excel(name = "备用字段3")
+    @TableField(value = "game_expand3")
     private String gameExpand3;
 
-    /**
-     * 备用字段4
-     */
+    /** 备用字段4 */
     @ApiModelProperty(value = "备用字段4")
     @Excel(name = "备用字段4")
+    @TableField(value = "game_expand4")
     private String gameExpand4;
 
-}
+    /** 备用字段4 */
+    @ApiModelProperty(value = "创建时间")
+    @Excel(name = "创建时间")
+    @TableField(value = "create_time")
+    private Date createTime;
 
+}

+ 18 - 21
game-business/src/main/java/com/game/business/domain/AppGameClassify.java

@@ -1,6 +1,7 @@
 package com.game.business.domain;
 
 import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import org.apache.commons.lang3.builder.ToStringBuilder;
@@ -12,49 +13,45 @@ import io.swagger.annotations.ApiModel;
 import lombok.Data;
 
 /**
- * 【请填写功能名称】对象 app_game_classify
+ * 游戏分类对象 app_game_classify
  *
- * @author game
+ * @author dos
  * @date 2024-06-14
  */
-@TableName(resultMap = "com.game.business.mapper.AppGameClassifyMapper.AppGameClassifyResult")
+@ApiModel(value = "app_game_classify", description = "游戏分类")
+@TableName(value= "app_game_classify")
 @Data
-public class AppGameClassify extends BaseEntity {
-    private static final long serialVersionUID = 1L;
+public class AppGameClassify
+        {
+private static final long serialVersionUID=1L;
 
-    /**
-     * $column.columnComment
-     */
+    /** $column.columnComment */
     @ApiModelProperty(value = "$column.columnComment")
     @TableId(value = "id" , type = IdType.AUTO)
     private Long id;
 
-    /**
-     * 名称
-     */
+    /** 名称 */
     @ApiModelProperty(value = "名称")
     @Excel(name = "名称")
+    @TableField(value = "name")
     private String name;
 
-    /**
-     * logo
-     */
+    /** logo */
     @ApiModelProperty(value = "logo")
     @Excel(name = "logo")
+    @TableField(value = "logo_url")
     private String logoUrl;
 
-    /**
-     * 是否启用 0:未启用  1:启用
-     */
+    /** 是否启用 0:未启用  1:启用 */
     @ApiModelProperty(value = "是否启用 0:未启用  1:启用")
     @Excel(name = "是否启用 0:未启用  1:启用")
+    @TableField(value = "status")
     private Long status;
 
-    /**
-     * 排序
-     */
+    /** 排序 */
     @ApiModelProperty(value = "排序")
     @Excel(name = "排序")
+    @TableField(value = "orderno")
     private Long orderno;
 
-}
+}

+ 15 - 15
game-business/src/main/java/com/game/business/mapper/AppGameClassifyMapper.java

@@ -5,54 +5,54 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.game.business.domain.AppGameClassify;
 
 /**
- * 【请填写功能名称】Mapper接口
+ * 游戏分类Mapper接口
  *
- * @author game
+ * @author dos
  * @date 2024-06-14
  */
 public interface AppGameClassifyMapper extends BaseMapper<AppGameClassify> {
     /**
-     * 查询【请填写功能名称】
+     * 查询游戏分类
      *
-     * @param id 【请填写功能名称】主键
-     * @return 【请填写功能名称】
+     * @param id 游戏分类主键
+     * @return 游戏分类
      */
     public AppGameClassify selectAppGameClassifyById(Long id);
 
     /**
-     * 查询【请填写功能名称】列表
+     * 查询游戏分类列表
      *
-     * @param appGameClassify 【请填写功能名称】
-     * @return 【请填写功能名称】集合
+     * @param appGameClassify 游戏分类
+     * @return 游戏分类集合
      */
     public List<AppGameClassify> selectAppGameClassifyList(AppGameClassify appGameClassify);
 
     /**
-     * 新增【请填写功能名称】
+     * 新增游戏分类
      *
-     * @param appGameClassify 【请填写功能名称】
+     * @param appGameClassify 游戏分类
      * @return 结果
      */
     public int insertAppGameClassify(AppGameClassify appGameClassify);
 
     /**
-     * 修改【请填写功能名称】
+     * 修改游戏分类
      *
-     * @param appGameClassify 【请填写功能名称】
+     * @param appGameClassify 游戏分类
      * @return 结果
      */
     public int updateAppGameClassify(AppGameClassify appGameClassify);
 
     /**
-     * 删除【请填写功能名称】
+     * 删除游戏分类
      *
-     * @param id 【请填写功能名称】主键
+     * @param id 游戏分类主键
      * @return 结果
      */
     public int deleteAppGameClassifyById(Long id);
 
     /**
-     * 批量删除【请填写功能名称】
+     * 批量删除游戏分类
      *
      * @param ids 需要删除的数据主键集合
      * @return 结果

+ 16 - 17
game-business/src/main/java/com/game/business/service/IAppGameClassifyService.java

@@ -1,61 +1,60 @@
 package com.game.business.service;
 
 import java.util.List;
-
 import com.game.business.domain.AppGameClassify;
 import com.baomidou.mybatisplus.extension.service.IService;
 
 /**
- * 【请填写功能名称】Service接口
+ * 游戏分类Service接口
  *
- * @author game
+ * @author dos
  * @date 2024-06-14
  */
 public interface IAppGameClassifyService extends IService<AppGameClassify> {
     /**
-     * 查询【请填写功能名称】
+     * 查询游戏分类
      *
-     * @param id 【请填写功能名称】主键
-     * @return 【请填写功能名称】
+     * @param id 游戏分类主键
+     * @return 游戏分类
      */
     public AppGameClassify selectAppGameClassifyById(Long id);
 
     /**
-     * 查询【请填写功能名称】列表
+     * 查询游戏分类列表
      *
-     * @param appGameClassify 【请填写功能名称】
-     * @return 【请填写功能名称】集合
+     * @param appGameClassify 游戏分类
+     * @return 游戏分类集合
      */
     public List<AppGameClassify> selectAppGameClassifyList(AppGameClassify appGameClassify);
 
     /**
-     * 新增【请填写功能名称】
+     * 新增游戏分类
      *
-     * @param appGameClassify 【请填写功能名称】
+     * @param appGameClassify 游戏分类
      * @return 结果
      */
     public int insertAppGameClassify(AppGameClassify appGameClassify);
 
     /**
-     * 修改【请填写功能名称】
+     * 修改游戏分类
      *
-     * @param appGameClassify 【请填写功能名称】
+     * @param appGameClassify 游戏分类
      * @return 结果
      */
     public int updateAppGameClassify(AppGameClassify appGameClassify);
 
     /**
-     * 批量删除【请填写功能名称】
+     * 批量删除游戏分类
      *
-     * @param ids 需要删除的【请填写功能名称】主键集合
+     * @param ids 需要删除的游戏分类主键集合
      * @return 结果
      */
     public int deleteAppGameClassifyByIds(Long[] ids);
 
     /**
-     * 删除【请填写功能名称】信息
+     * 删除游戏分类信息
      *
-     * @param id 【请填写功能名称】主键
+     * @param id 游戏分类主键
      * @return 结果
      */
     public int deleteAppGameClassifyById(Long id);

+ 19 - 20
game-business/src/main/java/com/game/business/service/impl/AppGameClassifyServiceImpl.java

@@ -2,17 +2,16 @@ package com.game.business.service.impl;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import java.util.List;
-
-import com.game.business.domain.AppGameClassify;
-import com.game.business.mapper.AppGameClassifyMapper;
-import com.game.business.service.IAppGameClassifyService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import com.game.business.mapper.AppGameClassifyMapper;
+import com.game.business.domain.AppGameClassify;
+import com.game.business.service.IAppGameClassifyService;
 
 /**
- * 【请填写功能名称】Service业务层处理
+ * 游戏分类Service业务层处理
  *
- * @author game
+ * @author dos
  * @date 2024-06-14
  */
 @Service
@@ -21,10 +20,10 @@ public class AppGameClassifyServiceImpl extends ServiceImpl<AppGameClassifyMappe
     private AppGameClassifyMapper appGameClassifyMapper;
 
     /**
-     * 查询【请填写功能名称】
+     * 查询游戏分类
      *
-     * @param id 【请填写功能名称】主键
-     * @return 【请填写功能名称】
+     * @param id 游戏分类主键
+     * @return 游戏分类
      */
     @Override
     public AppGameClassify selectAppGameClassifyById(Long id) {
@@ -32,10 +31,10 @@ public class AppGameClassifyServiceImpl extends ServiceImpl<AppGameClassifyMappe
     }
 
     /**
-     * 查询【请填写功能名称】列表
+     * 查询游戏分类列表
      *
-     * @param appGameClassify 【请填写功能名称】
-     * @return 【请填写功能名称】
+     * @param appGameClassify 游戏分类
+     * @return 游戏分类
      */
     @Override
     public List<AppGameClassify> selectAppGameClassifyList(AppGameClassify appGameClassify) {
@@ -43,9 +42,9 @@ public class AppGameClassifyServiceImpl extends ServiceImpl<AppGameClassifyMappe
     }
 
     /**
-     * 新增【请填写功能名称】
+     * 新增游戏分类
      *
-     * @param appGameClassify 【请填写功能名称】
+     * @param appGameClassify 游戏分类
      * @return 结果
      */
     @Override
@@ -54,9 +53,9 @@ public class AppGameClassifyServiceImpl extends ServiceImpl<AppGameClassifyMappe
     }
 
     /**
-     * 修改【请填写功能名称】
+     * 修改游戏分类
      *
-     * @param appGameClassify 【请填写功能名称】
+     * @param appGameClassify 游戏分类
      * @return 结果
      */
     @Override
@@ -65,9 +64,9 @@ public class AppGameClassifyServiceImpl extends ServiceImpl<AppGameClassifyMappe
     }
 
     /**
-     * 批量删除【请填写功能名称】
+     * 批量删除游戏分类
      *
-     * @param ids 需要删除的【请填写功能名称】主键
+     * @param ids 需要删除的游戏分类主键
      * @return 结果
      */
     @Override
@@ -76,9 +75,9 @@ public class AppGameClassifyServiceImpl extends ServiceImpl<AppGameClassifyMappe
     }
 
     /**
-     * 删除【请填写功能名称】信息
+     * 删除游戏分类信息
      *
-     * @param id 【请填写功能名称】主键
+     * @param id 游戏分类主键
      * @return 结果
      */
     @Override

+ 0 - 0
game-business/src/main/resources/mapper/system/AppGameClassifyMapper.xml → game-business/src/main/resources/mapper/business/AppGameClassifyMapper.xml


+ 1 - 0
game-common/src/main/java/com/game/common/core/domain/BaseEntity.java

@@ -21,6 +21,7 @@ public class BaseEntity implements Serializable
 
     /** 搜索值 */
     @JsonIgnore
+    @TableField(exist = false)
     private String searchValue;
 
     /** 创建者 */

+ 10 - 7
game-generator/src/main/resources/vm/java/domain.java.vm

@@ -4,6 +4,7 @@ package ${packageName}.domain;
 import ${import};
 #end
 import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import org.apache.commons.lang3.builder.ToStringBuilder;
@@ -30,9 +31,9 @@ import com.fenghuang.common.core.domain.TreeEntity;
     #set($Entity="TreeEntity")
 #end
 @ApiModel(value = "${tableName}", description = "${functionName}")
-@TableName(resultMap = "${packageName}.mapper.${ClassName}Mapper.${ClassName}Result")
+@TableName(value= "${tableName}")
 @Data
-public class ${ClassName} extends ${Entity}
+public class ${ClassName}
         {
 private static final long serialVersionUID=1L;
 
@@ -48,16 +49,18 @@ private static final long serialVersionUID=1L;
                 #set($comment=$column.columnComment)
             #end
             #if($parentheseIndex != -1)
-            @Excel(name = "${comment}" , readConverterExp = "$column.readConverterExp()")
+    @Excel(name = "${comment}" , readConverterExp = "$column.readConverterExp()")
             #elseif($column.javaType == 'Date')
-            @JsonFormat(pattern = "yyyy-MM-dd")
-            @Excel(name = "${comment}" , width = 30, dateFormat = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "${comment}" , width = 30, dateFormat = "yyyy-MM-dd")
             #else
-            @Excel(name = "${comment}")
+    @Excel(name = "${comment}")
             #end
         #end
         #if($column.isPk == 1)
-        @TableId(value = "$column.columnName" , type = IdType.AUTO)
+    @TableId(value = "$column.columnName" , type = IdType.AUTO)
+        #else
+    @TableField(value = "$column.columnName")
         #end
     private $column.javaType $column.javaField;