refactor(game): 重构游戏相关接口和数据结构
- 新增 GameResponse 类用于游戏列表响应- 更新 Game 和 GamePlatform 类,移除不必要的字段 - 修改 GameMapper 和 GamePlatformMapper 接口,增加新的查询方法 - 更新 XML 文件,调整 SQL 查询和结果映射 - 优化 GameServiceImpl 和 IGameService 接口,支持新的游戏列表查询main-p
parent
9beed7e56e
commit
0a2b408c2b
|
@ -7,6 +7,7 @@ import com.dtflys.forest.annotation.Post;
|
|||
import com.ff.annotation.CheckHeader;
|
||||
import com.ff.api.request.*;
|
||||
import com.ff.api.response.GameExchangeBalanceResponse;
|
||||
import com.ff.api.response.GameResponse;
|
||||
import com.ff.api.response.MemberInfoAllResponse;
|
||||
import com.ff.base.constant.Constants;
|
||||
import com.ff.base.core.controller.BaseController;
|
||||
|
@ -50,6 +51,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* api控制器
|
||||
|
@ -103,6 +105,26 @@ public class ApiGameController extends BaseController {
|
|||
@Qualifier("threadPoolTaskExecutor")
|
||||
private ThreadPoolTaskExecutor threadPoolTaskExecutor;
|
||||
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @return {@link AjaxResult }
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
public AjaxResult list() {
|
||||
List<GameResponse> gameResponses = gameService.selectGameResponseList();
|
||||
for (GameResponse gameRespons : gameResponses) {
|
||||
List<GameSecretKey> gameSecretKeys = gameSecretKeyService.selectGameSecretKeyList(GameSecretKey.builder()
|
||||
.platform(gameRespons.getPlatformCode())
|
||||
.build());
|
||||
List<String> currencyCode = gameSecretKeys.stream().map(GameSecretKey::getSystemCode).collect(Collectors.toList());
|
||||
gameRespons.setCurrencyCode(currencyCode);
|
||||
}
|
||||
return AjaxResult.success(gameResponses);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 登录
|
||||
*
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
package com.ff.api.response;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 会员金额转移记录对象 ff_game_exchange_money
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025-02-12
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class GameResponse implements Serializable {
|
||||
private static final long serialVersionUID = 7932597077733961820L;
|
||||
|
||||
|
||||
/**
|
||||
* 游戏id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 游戏名称
|
||||
*/
|
||||
private String gameName;
|
||||
/**
|
||||
* 是否支持免费
|
||||
*/
|
||||
private Boolean freeSpin;
|
||||
/**
|
||||
* 是否支持试玩
|
||||
*/
|
||||
private Boolean demoStatus;
|
||||
/**
|
||||
* 平台代码
|
||||
*/
|
||||
private String platformCode;
|
||||
/**
|
||||
* 平台类型
|
||||
*/
|
||||
private Integer platformType;
|
||||
|
||||
/**
|
||||
* 支持货币代码
|
||||
*/
|
||||
private List<String> currencyCode;
|
||||
|
||||
}
|
|
@ -52,13 +52,11 @@ public class Game extends BaseEntity
|
|||
@Excel(name = "是否支持试玩 0关闭 1开启")
|
||||
private Boolean demoStatus;
|
||||
|
||||
/** 维护开关 维护状态 0关闭 1开启 */
|
||||
@Excel(name = "维护开关 维护状态 0关闭 1开启")
|
||||
/** 维护开关 维护状态 */
|
||||
@Excel(name = "维护开关 ")
|
||||
private Boolean stopStatus;
|
||||
|
||||
/** 游戏开关 平台开关状态 0关闭 1开启 */
|
||||
@Excel(name = "游戏开关 平台开关状态 0关闭 1开启")
|
||||
private Boolean gameStatus;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ public class GameBettingDetails extends BaseEntity
|
|||
|
||||
/** 游戏类型 ff_game_type 字典 */
|
||||
@Excel(name = "游戏类型 ff_game_type 字典")
|
||||
private Long gameType;
|
||||
private Integer gameType;
|
||||
|
||||
/** 游戏平台 */
|
||||
@Excel(name = "游戏平台 ")
|
||||
|
|
|
@ -34,19 +34,19 @@ public class GamePlatform extends BaseEntity
|
|||
|
||||
/** 平台类型 ff_game_type 字典 */
|
||||
@Excel(name = "平台类型 ff_game_platform_type 字典")
|
||||
private Long platformType;
|
||||
private Integer platformType;
|
||||
|
||||
/** 平台名称 */
|
||||
@Excel(name = "平台名称")
|
||||
private String platformName;
|
||||
|
||||
/** 维护开关 维护状态 1 开启 2关闭 */
|
||||
@Excel(name = "维护开关 维护状态 1 开启 2关闭")
|
||||
private Integer stopStatus;
|
||||
/** 维护开关 维护状态 */
|
||||
@Excel(name = "维护开关 维护状态 ")
|
||||
private Boolean stopStatus;
|
||||
|
||||
/** 平台开关 平台开关状态 1 开启 2关闭 */
|
||||
@Excel(name = "平台开关 平台开关状态 1 开启 2关闭")
|
||||
private Integer platformStatus;
|
||||
/** 平台开关 平台开关状态 */
|
||||
@Excel(name = "平台开关 平台开关状态 ")
|
||||
private Boolean platformStatus;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.ff.game.mapper;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.ff.api.response.GameResponse;
|
||||
import com.ff.game.api.request.GameUniqueDTO;
|
||||
import com.ff.game.domain.Game;
|
||||
|
||||
|
@ -79,4 +80,11 @@ public interface GameMapper
|
|||
*/
|
||||
List<Game> selectGameUniqueList(GameUniqueDTO gameUniqueDTO);
|
||||
|
||||
/**
|
||||
* 选择游戏响应列表
|
||||
*
|
||||
* @return {@link List }<{@link GameResponse }>
|
||||
*/
|
||||
List<GameResponse> selectGameResponseList();
|
||||
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.ff.game.service;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.ff.api.response.GameResponse;
|
||||
import com.ff.game.api.request.GameUniqueDTO;
|
||||
import com.ff.game.domain.Game;
|
||||
|
||||
|
@ -77,5 +78,12 @@ public interface IGameService
|
|||
*/
|
||||
List<Game> selectGameUniqueList(GameUniqueDTO gameUniqueDTO);
|
||||
|
||||
/**
|
||||
* 选择游戏响应列表
|
||||
*
|
||||
* @return {@link List }<{@link GameResponse }>
|
||||
*/
|
||||
List<GameResponse> selectGameResponseList();
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package com.ff.game.service.impl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import com.ff.api.response.GameResponse;
|
||||
import com.ff.base.constant.ConfigConstants;
|
||||
import com.ff.base.utils.DateUtils;
|
||||
import com.ff.game.api.request.GameUniqueDTO;
|
||||
|
@ -128,5 +130,15 @@ public class GameServiceImpl implements IGameService
|
|||
return gameMapper.selectGameUniqueList(gameUniqueDTO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择游戏响应列表
|
||||
*
|
||||
* @return {@link List }<{@link GameResponse }>
|
||||
*/
|
||||
@Override
|
||||
public List<GameResponse> selectGameResponseList() {
|
||||
return gameMapper.selectGameResponseList();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="freespin" column="freespin" />
|
||||
<result property="demoStatus" column="demo_status" />
|
||||
<result property="stopStatus" column="stop_status" />
|
||||
<result property="gameStatus" column="game_status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
|
@ -22,7 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectGameVo">
|
||||
select id, sort_no, platform_id, game_code, game_source_type, game_name, freespin, demo_status, stop_status, game_status, create_by, create_time, update_by, update_time from ff_game
|
||||
select id, sort_no, platform_id, game_code, game_source_type, game_name, freespin, demo_status, stop_status, create_by, create_time, update_by, update_time from ff_game
|
||||
</sql>
|
||||
|
||||
<select id="selectGameList" parameterType="Game" resultMap="GameResult">
|
||||
|
@ -36,7 +35,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="freespin != null "> and freespin = #{freespin}</if>
|
||||
<if test="demoStatus != null "> and demo_status = #{demoStatus}</if>
|
||||
<if test="stopStatus != null "> and stop_status = #{stopStatus}</if>
|
||||
<if test="gameStatus != null "> and game_status = #{gameStatus}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
@ -56,7 +54,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="freespin != null">freespin,</if>
|
||||
<if test="demoStatus != null">demo_status,</if>
|
||||
<if test="stopStatus != null">stop_status,</if>
|
||||
<if test="gameStatus != null">game_status,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
|
@ -71,7 +68,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="freespin != null">#{freespin},</if>
|
||||
<if test="demoStatus != null">#{demoStatus},</if>
|
||||
<if test="stopStatus != null">#{stopStatus},</if>
|
||||
<if test="gameStatus != null">#{gameStatus},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
|
@ -90,7 +86,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="freespin != null">freespin = #{freespin},</if>
|
||||
<if test="demoStatus != null">demo_status = #{demoStatus},</if>
|
||||
<if test="stopStatus != null">stop_status = #{stopStatus},</if>
|
||||
<if test="gameStatus != null">game_status = #{gameStatus},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
|
@ -117,6 +112,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where platform_id = #{platformId}
|
||||
</select>
|
||||
|
||||
<resultMap id="GameResponseResultMap" type="com.ff.api.response.GameResponse">
|
||||
<result property="id" column="id"/>
|
||||
<result property="gameName" column="game_name"/>
|
||||
<result property="freeSpin" column="freespin"/>
|
||||
<result property="demoStatus" column="demo_status"/>
|
||||
<result property="platformCode" column="platform_code"/>
|
||||
<result property="platformType" column="platform_type"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectGameResponseList" resultMap="GameResponseResultMap">
|
||||
select
|
||||
g.id,
|
||||
g.game_name,
|
||||
g.freespin,
|
||||
g.demo_status,
|
||||
gp.platform_code,
|
||||
gp.platform_type
|
||||
from ff_game g
|
||||
inner join ff_game_platform gp on g.platform_id=gp.id
|
||||
where gp.stop_status=1 and g.stop_status=1
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="selectGameUniqueList" parameterType="com.ff.game.api.request.GameUniqueDTO" resultMap="GameResult">
|
||||
|
@ -130,7 +148,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="freespin != null "> and freespin = #{freespin}</if>
|
||||
<if test="demoStatus != null "> and demo_status = #{demoStatus}</if>
|
||||
<if test="stopStatus != null "> and stop_status = #{stopStatus}</if>
|
||||
<if test="gameStatus != null "> and game_status = #{gameStatus}</if>
|
||||
<if test="gameIds != null and gameIds.size() >0 ">
|
||||
and id in
|
||||
<foreach item="gameId" collection="gameIds" open="(" separator="," close=")">
|
||||
|
|
|
@ -11,7 +11,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="platformType" column="platform_type" />
|
||||
<result property="platformName" column="platform_name" />
|
||||
<result property="stopStatus" column="stop_status" />
|
||||
<result property="platformStatus" column="platform_status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
|
@ -19,7 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectGamePlatformVo">
|
||||
select id, sort_no, platform_code, platform_type, platform_name, stop_status, platform_status, create_by, create_time, update_by, update_time from ff_game_platform
|
||||
select id, sort_no, platform_code, platform_type, platform_name, stop_status, create_by, create_time, update_by, update_time from ff_game_platform
|
||||
</sql>
|
||||
|
||||
<select id="selectGamePlatformList" parameterType="GamePlatform" resultMap="GamePlatformResult">
|
||||
|
@ -30,7 +29,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="platformType != null "> and platform_type = #{platformType}</if>
|
||||
<if test="platformName != null and platformName != ''"> and platform_name like concat('%', #{platformName}, '%')</if>
|
||||
<if test="stopStatus != null "> and stop_status = #{stopStatus}</if>
|
||||
<if test="platformStatus != null "> and platform_status = #{platformStatus}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
@ -47,7 +45,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="platformType != null">platform_type,</if>
|
||||
<if test="platformName != null">platform_name,</if>
|
||||
<if test="stopStatus != null">stop_status,</if>
|
||||
<if test="platformStatus != null">platform_status,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
|
@ -59,7 +56,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="platformType != null">#{platformType},</if>
|
||||
<if test="platformName != null">#{platformName},</if>
|
||||
<if test="stopStatus != null">#{stopStatus},</if>
|
||||
<if test="platformStatus != null">#{platformStatus},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
|
@ -75,7 +71,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="platformType != null">platform_type = #{platformType},</if>
|
||||
<if test="platformName != null">platform_name = #{platformName},</if>
|
||||
<if test="stopStatus != null">stop_status = #{stopStatus},</if>
|
||||
<if test="platformStatus != null">platform_status = #{platformStatus},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
|
|
|
@ -14,7 +14,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="freespin" column="freespin" />
|
||||
<result property="demoStatus" column="demo_status" />
|
||||
<result property="stopStatus" column="stop_status" />
|
||||
<result property="gameStatus" column="game_status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
|
@ -22,7 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectGameVo">
|
||||
select id, sort_no, platform_id, game_code, game_source_type, game_name, freespin, demo_status, stop_status, game_status, create_by, create_time, update_by, update_time from ff_game
|
||||
select id, sort_no, platform_id, game_code, game_source_type, game_name, freespin, demo_status, stop_status, create_by, create_time, update_by, update_time from ff_game
|
||||
</sql>
|
||||
|
||||
<select id="selectGameList" parameterType="Game" resultMap="GameResult">
|
||||
|
@ -36,7 +35,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="freespin != null "> and freespin = #{freespin}</if>
|
||||
<if test="demoStatus != null "> and demo_status = #{demoStatus}</if>
|
||||
<if test="stopStatus != null "> and stop_status = #{stopStatus}</if>
|
||||
<if test="gameStatus != null "> and game_status = #{gameStatus}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
@ -56,7 +54,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="freespin != null">freespin,</if>
|
||||
<if test="demoStatus != null">demo_status,</if>
|
||||
<if test="stopStatus != null">stop_status,</if>
|
||||
<if test="gameStatus != null">game_status,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
|
@ -71,7 +68,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="freespin != null">#{freespin},</if>
|
||||
<if test="demoStatus != null">#{demoStatus},</if>
|
||||
<if test="stopStatus != null">#{stopStatus},</if>
|
||||
<if test="gameStatus != null">#{gameStatus},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
|
@ -90,7 +86,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="freespin != null">freespin = #{freespin},</if>
|
||||
<if test="demoStatus != null">demo_status = #{demoStatus},</if>
|
||||
<if test="stopStatus != null">stop_status = #{stopStatus},</if>
|
||||
<if test="gameStatus != null">game_status = #{gameStatus},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
|
@ -117,6 +112,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where platform_id = #{platformId}
|
||||
</select>
|
||||
|
||||
<resultMap id="GameResponseResultMap" type="com.ff.api.response.GameResponse">
|
||||
<result property="id" column="id"/>
|
||||
<result property="gameName" column="game_name"/>
|
||||
<result property="freeSpin" column="freespin"/>
|
||||
<result property="demoStatus" column="demo_status"/>
|
||||
<result property="platformCode" column="platform_code"/>
|
||||
<result property="platformType" column="platform_type"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectGameResponseList" resultMap="GameResponseResultMap">
|
||||
select
|
||||
g.id,
|
||||
g.game_name,
|
||||
g.freespin,
|
||||
g.demo_status,
|
||||
gp.platform_code,
|
||||
gp.platform_type
|
||||
from ff_game g
|
||||
inner join ff_game_platform gp on g.platform_id=gp.id
|
||||
where gp.stop_status=1 and g.stop_status=1
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="selectGameUniqueList" parameterType="com.ff.game.api.request.GameUniqueDTO" resultMap="GameResult">
|
||||
|
@ -130,7 +148,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="freespin != null "> and freespin = #{freespin}</if>
|
||||
<if test="demoStatus != null "> and demo_status = #{demoStatus}</if>
|
||||
<if test="stopStatus != null "> and stop_status = #{stopStatus}</if>
|
||||
<if test="gameStatus != null "> and game_status = #{gameStatus}</if>
|
||||
<if test="gameIds != null and gameIds.size() >0 ">
|
||||
and id in
|
||||
<foreach item="gameId" collection="gameIds" open="(" separator="," close=")">
|
||||
|
|
|
@ -11,7 +11,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="platformType" column="platform_type" />
|
||||
<result property="platformName" column="platform_name" />
|
||||
<result property="stopStatus" column="stop_status" />
|
||||
<result property="platformStatus" column="platform_status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
|
@ -19,7 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectGamePlatformVo">
|
||||
select id, sort_no, platform_code, platform_type, platform_name, stop_status, platform_status, create_by, create_time, update_by, update_time from ff_game_platform
|
||||
select id, sort_no, platform_code, platform_type, platform_name, stop_status, create_by, create_time, update_by, update_time from ff_game_platform
|
||||
</sql>
|
||||
|
||||
<select id="selectGamePlatformList" parameterType="GamePlatform" resultMap="GamePlatformResult">
|
||||
|
@ -30,7 +29,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="platformType != null "> and platform_type = #{platformType}</if>
|
||||
<if test="platformName != null and platformName != ''"> and platform_name like concat('%', #{platformName}, '%')</if>
|
||||
<if test="stopStatus != null "> and stop_status = #{stopStatus}</if>
|
||||
<if test="platformStatus != null "> and platform_status = #{platformStatus}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
@ -47,7 +45,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="platformType != null">platform_type,</if>
|
||||
<if test="platformName != null">platform_name,</if>
|
||||
<if test="stopStatus != null">stop_status,</if>
|
||||
<if test="platformStatus != null">platform_status,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
|
@ -59,7 +56,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="platformType != null">#{platformType},</if>
|
||||
<if test="platformName != null">#{platformName},</if>
|
||||
<if test="stopStatus != null">#{stopStatus},</if>
|
||||
<if test="platformStatus != null">#{platformStatus},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
|
@ -75,7 +71,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="platformType != null">platform_type = #{platformType},</if>
|
||||
<if test="platformName != null">platform_name = #{platformName},</if>
|
||||
<if test="stopStatus != null">stop_status = #{stopStatus},</if>
|
||||
<if test="platformStatus != null">platform_status = #{platformStatus},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
|
|
|
@ -12,18 +12,18 @@ import java.util.stream.Stream;
|
|||
*/
|
||||
public enum JILIGameType {
|
||||
|
||||
ELECTRON(1, 1L,"电子"),
|
||||
CHESS(2, 2L,"棋牌"),
|
||||
GAME_HALL(3, 3L,"游戏大厅"),
|
||||
CATCH_FISH(5, 4L,"捕鱼"),
|
||||
MACHINE(8, 5L,"押分机 (含宾果)")
|
||||
ELECTRON(1, 1,"电子"),
|
||||
CHESS(2, 2,"棋牌"),
|
||||
GAME_HALL(3, 3,"游戏大厅"),
|
||||
CATCH_FISH(5, 4,"捕鱼"),
|
||||
MACHINE(8, 5,"押分机 (含宾果)")
|
||||
|
||||
;
|
||||
|
||||
private final Integer code;
|
||||
private final Long systemCode;
|
||||
private final Integer systemCode;
|
||||
private final String info;
|
||||
JILIGameType(Integer code,Long systemCode, String info)
|
||||
JILIGameType(Integer code,Integer systemCode, String info)
|
||||
{
|
||||
this.code = code;
|
||||
this.systemCode = systemCode;
|
||||
|
@ -35,7 +35,7 @@ public enum JILIGameType {
|
|||
return code;
|
||||
}
|
||||
|
||||
public Long getSystemCode()
|
||||
public Integer getSystemCode()
|
||||
{
|
||||
return systemCode;
|
||||
}
|
||||
|
@ -49,8 +49,8 @@ public enum JILIGameType {
|
|||
* @param code 代码
|
||||
* @return {@link String }
|
||||
*/
|
||||
public static Long findSystemByCode(Integer code) {
|
||||
Optional<Long> system = Stream.of(JILIGameType.values())
|
||||
public static Integer findSystemByCode(Integer code) {
|
||||
Optional<Integer> system = Stream.of(JILIGameType.values())
|
||||
.filter(gameType -> gameType.getCode().equals(code))
|
||||
.map(JILIGameType::getSystemCode)
|
||||
.findFirst();
|
||||
|
|
|
@ -13,18 +13,18 @@ import java.util.stream.Stream;
|
|||
*/
|
||||
public enum XKGameType {
|
||||
|
||||
ELECTRON(1, 1L,"电子"),
|
||||
CHESS(2, 2L,"棋牌"),
|
||||
GAME_HALL(3, 3L,"游戏大厅"),
|
||||
CATCH_FISH(5, 4L,"捕鱼"),
|
||||
MACHINE(8, 5L,"押分机 (含宾果)")
|
||||
ELECTRON(1, 1,"电子"),
|
||||
CHESS(2, 2,"棋牌"),
|
||||
GAME_HALL(3, 3,"游戏大厅"),
|
||||
CATCH_FISH(5, 4,"捕鱼"),
|
||||
MACHINE(8, 5,"押分机 (含宾果)")
|
||||
|
||||
;
|
||||
|
||||
private final Integer code;
|
||||
private final Long systemCode;
|
||||
private final Integer systemCode;
|
||||
private final String info;
|
||||
XKGameType(Integer code, Long systemCode, String info)
|
||||
XKGameType(Integer code, Integer systemCode, String info)
|
||||
{
|
||||
this.code = code;
|
||||
this.systemCode = systemCode;
|
||||
|
@ -36,7 +36,7 @@ public enum XKGameType {
|
|||
return code;
|
||||
}
|
||||
|
||||
public Long getSystemCode()
|
||||
public Integer getSystemCode()
|
||||
{
|
||||
return systemCode;
|
||||
}
|
||||
|
@ -50,8 +50,8 @@ public enum XKGameType {
|
|||
* @param code 代码
|
||||
* @return {@link String }
|
||||
*/
|
||||
public static Long findSystemByCode(Integer code) {
|
||||
Optional<Long> system = Stream.of(XKGameType.values())
|
||||
public static Integer findSystemByCode(Integer code) {
|
||||
Optional<Integer> system = Stream.of(XKGameType.values())
|
||||
.filter(gameType -> gameType.getCode().equals(code))
|
||||
.map(XKGameType::getSystemCode)
|
||||
.findFirst();
|
||||
|
|
Loading…
Reference in New Issue