joygame
game
This commit is contained in:
@@ -1345,6 +1345,8 @@ public class Constant {
|
||||
public static final String MINI_GAME_FOR_LEADERCC = "mini_game_for_leadercc";
|
||||
public static final String PUBLIC_CHAT_TIME = "public_chat_time";
|
||||
|
||||
public static final String MINI_GAME_FOR_JOY = "mini_game_for_joy";
|
||||
|
||||
/**
|
||||
* 家族模块下送礼收益分成配置
|
||||
*/
|
||||
|
@@ -1453,6 +1453,13 @@ public enum RedisKey {
|
||||
lucky_25_status, // 礼物消息的状态
|
||||
lock_lucky_25_message, // 消费送礼物消息锁
|
||||
lucky_25_high_recharge_pool,
|
||||
|
||||
//小游戏重复订单
|
||||
joy_repeat_order,
|
||||
|
||||
//小游戏token
|
||||
joy_token,
|
||||
|
||||
;
|
||||
|
||||
public String getKey() {
|
||||
|
@@ -0,0 +1,43 @@
|
||||
package com.accompany.sharding.model;
|
||||
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* joy play游戏记录实体类
|
||||
*
|
||||
* @author
|
||||
* @since 2025-05-06
|
||||
*/
|
||||
@Data
|
||||
public class JoyGameRecord implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "order_id", type = IdType.NONE)
|
||||
private String orderId;
|
||||
private Integer gameId;
|
||||
private Long uid;
|
||||
private Long roomUid;
|
||||
private Integer coin;
|
||||
/**
|
||||
* 1减金币,2加金币
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 透传参数
|
||||
*/
|
||||
private String ext;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
private Date createTime;
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
package com.accompany.sharding.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class JoyResponseVo<T> {
|
||||
|
||||
@ApiModelProperty("响应状态码")
|
||||
private int code;
|
||||
|
||||
@ApiModelProperty("响应消息")
|
||||
private String message;
|
||||
|
||||
@ApiModelProperty("响应数据")
|
||||
private T data;
|
||||
|
||||
public JoyResponseVo(int code, String message, T data) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public static <T> JoyResponseVo<T> success(T data) {
|
||||
return new JoyResponseVo<>(200, null, data);
|
||||
}
|
||||
|
||||
public static <T> JoyResponseVo<T> fail(int code, String message) {
|
||||
return new JoyResponseVo<>(code, message, null);
|
||||
}
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
package com.accompany.sharding.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class JoySubmitBodyVo {
|
||||
private String transactionId;
|
||||
private Integer coins;
|
||||
private Integer type;
|
||||
private Long tm;
|
||||
private String ext;
|
||||
private String remark;
|
||||
private String roomId;
|
||||
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
package com.accompany.sharding.vo;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
@Builder
|
||||
@Data
|
||||
public class JoySubmitResult {
|
||||
private Long availableCoin;
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
package com.accompany.sharding.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@Data
|
||||
public class JoyUserInfoModel {
|
||||
private Long userId;
|
||||
private Integer gameId;
|
||||
private String pkgName;
|
||||
private String nickname;
|
||||
private String avatarUrl;
|
||||
private Long availableCoins;
|
||||
private Integer level;
|
||||
private String code;
|
||||
private String os;
|
||||
}
|
@@ -145,6 +145,7 @@ public class ShardingSphereConfig {
|
||||
tableConfigs.add(getShardingTableRuleConfiguration("lucky_24_record",
|
||||
"ds.lucky_24_record_$->{20240914..20251231}",
|
||||
"create_time", "lucky24RecordStrategy"));
|
||||
|
||||
tableConfigs.add(getShardingTableRuleConfiguration("bravo_record",
|
||||
"ds.bravo_record_$->{20250320..20251231}",
|
||||
"create_time", "bravoRecordStrategy"));
|
||||
@@ -152,6 +153,10 @@ public class ShardingSphereConfig {
|
||||
"ds.lucky_25_record_$->{20250504..20251231}",
|
||||
"create_time", "lucky25RecordStrategy"));
|
||||
|
||||
tableConfigs.add(getShardingTableRuleConfiguration("joy_game_record",
|
||||
"ds.joy_game_record_${2025..2026}${['01','02','03', '04','05','06', '07','08','09', '10','11','12']}",
|
||||
"create_time", "joyGameStrategy"));
|
||||
|
||||
|
||||
Map<String, AlgorithmConfiguration> algorithmsConfigs = new HashMap<>();
|
||||
// 账单按天分表
|
||||
@@ -190,6 +195,9 @@ public class ShardingSphereConfig {
|
||||
//
|
||||
AlgorithmConfiguration lucky25RecordShardingAlgorithm = getLucky25RecordShardingAlgorithmConfiguration();
|
||||
algorithmsConfigs.put("lucky25RecordStrategy", lucky25RecordShardingAlgorithm);
|
||||
//游戏日志
|
||||
AlgorithmConfiguration joyGameShardingAlgorithm = getGameGoldLogShardingAlgorithmConfiguration();
|
||||
algorithmsConfigs.put("joyGameStrategy", joyGameShardingAlgorithm);
|
||||
|
||||
ShardingRuleConfiguration config = new ShardingRuleConfiguration();
|
||||
config.setTables(tableConfigs);
|
||||
@@ -228,7 +236,10 @@ public class ShardingSphereConfig {
|
||||
private AlgorithmConfiguration getGameGoldLogShardingAlgorithmConfiguration() {
|
||||
AlgorithmConfiguration algorithmConfiguration = getMonthShardingAlgorithmConfiguration();
|
||||
return algorithmConfiguration;
|
||||
}
|
||||
|
||||
private AlgorithmConfiguration getjoyGameShardingAlgorithmConfiguration() {
|
||||
return getMonthShardingAlgorithmConfiguration();
|
||||
}
|
||||
|
||||
private AlgorithmConfiguration getBaiShunGameRecordShardingAlgorithmConfiguration() {
|
||||
|
@@ -0,0 +1,14 @@
|
||||
package com.accompany.sharding.mapper;
|
||||
|
||||
import com.accompany.sharding.model.JoyGameRecord;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* joy play游戏记录 Mapper 接口
|
||||
*
|
||||
* @author
|
||||
* @since 2025-05-06
|
||||
*/
|
||||
public interface JoyGameRecordMapper extends BaseMapper<JoyGameRecord> {
|
||||
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.accompany.sharding.mapper.JoyGameRecordMapper">
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user