公会-土耳其-公会水晶结算-后台-赠送

This commit is contained in:
2025-08-21 11:51:26 +08:00
parent 457f6a750f
commit 13cab0f9d6
13 changed files with 104 additions and 409 deletions

View File

@@ -14,6 +14,9 @@ public class UserPurseVo {
private Double golds;
private Double guildUsd;
private Double guildCrystal;
private Boolean firstCharge;
private Date updateTime;

View File

@@ -13,4 +13,5 @@ public class UsersVo extends Users {
private double diamondsNum;
private double guildUsdNum;
private double guildCrystalNum;
}

View File

@@ -1,31 +0,0 @@
package com.accompany.admin.mapper;
import com.accompany.admin.model.TestPurse;
import com.accompany.admin.model.TestPurseExample;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface TestPurseMapper {
int countByExample(TestPurseExample example);
int deleteByExample(TestPurseExample example);
int deleteByPrimaryKey(Integer id);
int insert(TestPurse record);
int insertSelective(TestPurse record);
List<TestPurse> selectByExample(TestPurseExample example);
TestPurse selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") TestPurse record, @Param("example") TestPurseExample example);
int updateByExample(@Param("record") TestPurse record, @Param("example") TestPurseExample example);
int updateByPrimaryKeySelective(TestPurse record);
int updateByPrimaryKey(TestPurse record);
}

View File

@@ -286,6 +286,8 @@ public class UserCheckAdminService {
throw new AdminServiceException("用户钻石余额不为0不能改变分区");
} else if (userPurse.getGuildUsd() > 0d){
throw new AdminServiceException("用户金币公会薪资不为0不能改变分区");
} else if (userPurse.getGuildCrystal() > 0d) {
throw new AdminServiceException("用户金币公会紫晶不为0不能改变分区");
}
FamilyClanDecorateVo clanVo = familyClanService.getFamilyClanDecorateVo(users.getUid(), users.getUid());

View File

@@ -156,6 +156,12 @@ public class OfficialGoldRecordService extends BaseService {
case OFFICAL_PLUS_GUILD_USD:
adjustUsd(ernos, type.getValue(), num, adminId, remark, busType, Boolean.TRUE);
break;
case OFFICAL_PLUS_GUILD_CRYSTAL:
adjustGuildCrystal(ernos, type.getValue(), num, adminId, remark, busType, Boolean.TRUE);
break;
case OFFICAL_MINUS_GUILD_CRYSTAL:
adjustGuildCrystal(ernos, type.getValue(), num, adminId, remark, busType, Boolean.FALSE);
break;
default:
throw new AdminServiceException(BusiStatus.REQUEST_PARAM_ERROR);
}
@@ -380,7 +386,7 @@ public class OfficialGoldRecordService extends BaseService {
GuildMember guildMember = guildMemberMap.get(uid);
// 增加官方赠送活动记录
addGoldRecord(recordId, users, type, Constant.WalletCurrencyType.usd, num, optId, remark, busType, null);
addGoldRecord(recordId, users, type, Constant.WalletCurrencyType.guildUsd, num, optId, remark, busType, null);
if (isPlus) {
// 增加账户usd数量
@@ -404,15 +410,79 @@ public class OfficialGoldRecordService extends BaseService {
}
}
/**
* 官方调整薪资(增加或减少)
* @param ernos 用户耳伴号列表,多个用换行分隔
* @param type 操作类型
* @param num 调整数量
* @param optId 操作人ID
* @param remark 备注
* @param busType 业务类型
* @param isPlus 是否为增加操作 true:增加 false:减少
* @throws Exception
*/
@Transactional(rollbackFor = Exception.class)
public void adjustGuildCrystal(String ernos, byte type, BigDecimal num, int optId, String remark, Integer busType, boolean isPlus) {
String lockval = null;
try {
lockval = this.jedisLockService.lock(RedisKey.lock_official_gold_send.getKey(), 3000);
if (StringUtils.isEmpty(lockval)) {
throw new AdminServiceException(BusiStatus.SERVERBUSY);
}
List<String> erbanNos = Arrays.asList(ernos.trim().split("\n"));
Map<Long, Users> usersMap = new HashMap<>();
for (String erbanNoStr : erbanNos) {
Long erbanNo = Long.parseLong(erbanNoStr.trim());
if (usersMap.containsKey(erbanNo)) {
continue;
}
Users u = usersService.getUserByErbanNo(erbanNo);
if (u == null) {
throw new AdminServiceException(BusiStatus.USERNOTEXISTS);
}
Long uid = u.getUid();
usersMap.put(uid, u);
}
// 分隔耳伴号,多个耳伴号用换行分隔
for (Users users : usersMap.values()) {
Long recordId = DefaultIdentifierGenerator.getInstance().nextId(null);
Long uid = users.getUid();
// 增加官方赠送活动记录
addGoldRecord(recordId, users, type, Constant.WalletCurrencyType.guildCrystal, num, optId, remark, busType, null);
if (isPlus) {
// 增加账户usd数量
userPurseService.addGuildCrystal(uid, num.doubleValue(), BillObjTypeEnum.OFFICIAL_PLUS_GUILD_CRYSTAL);
logger.info("plusUsd success, erpan_no: {}, type: {}, num: {}, recordId: {}", users.getErbanNo(), type, num, recordId);
} else {
// 减少账户usd数量
userPurseService.subGuildCrystal(uid, num.doubleValue(), BillObjTypeEnum.OFFICIAL_MIUNS_GUILD_CRYSTAL);
logger.info("minusUsd success, erpan_no: {}, type: {}, num: {}, recordId: {}", users.getErbanNo(), type, num, recordId);
}
}
} finally {
this.jedisLockService.unlock(RedisKey.lock_official_gold_send.getKey(), lockval);
}
}
public long addGoldRecord(Long recordId, Users user, byte type, byte currencyType, BigDecimal num, int optId, String remark, Integer busType, BigDecimal actualAmount) {
Long uid = user.getUid();
BigDecimal diamondNum = null;
BigDecimal goldNum = null;
BigDecimal currentGoldNum = null;
if (Constant.OfficialType.interSendGold.byteValue() == type
|| Constant.OfficialType.clearUserGold.byteValue() == type
if (Constant.OfficialType.interSendGold == type
|| Constant.OfficialType.clearUserGold == type
|| Constant.OfficialType.plusGuildUsd == type
|| Constant.OfficialType.miunsGuildUsd == type) {
|| Constant.OfficialType.miunsGuildUsd == type
|| Constant.OfficialType.plusGuildCrystal == type
|| Constant.OfficialType.miunsGuildCrystal == type) {
diamondNum = num;
} else {
goldNum = num;
@@ -424,8 +494,10 @@ public class OfficialGoldRecordService extends BaseService {
currentGoldNum = BigDecimal.valueOf(userPurse.getCrystals()).add(num);
} else if (currencyType == Constant.WalletCurrencyType.diamonds){
currentGoldNum = BigDecimal.valueOf(userPurse.getDiamonds()).add(num);
} else if (currencyType == Constant.WalletCurrencyType.usd){
} else if (currencyType == Constant.WalletCurrencyType.guildUsd){
currentGoldNum = BigDecimal.valueOf(userPurse.getGuildUsd()).add(num);
} else if (currencyType == Constant.WalletCurrencyType.guildCrystal){
currentGoldNum = BigDecimal.valueOf(userPurse.getGuildCrystal()).add(num);
}
}
return addOfficialGoldRecord(recordId, uid, diamondNum, goldNum, currentGoldNum, type, currencyType, busType, optId, remark, actualAmount);
@@ -733,7 +805,7 @@ public class OfficialGoldRecordService extends BaseService {
}
} else if (Constant.WalletCurrencyType.diamonds.equals(officalSendTypeEnum.getCurrencyType())) {
vo.setOperationNum(BigDecimal.valueOf(record.getGoldNum()));
} else if (Constant.WalletCurrencyType.usd.equals(officalSendTypeEnum.getCurrencyType())) {
} else if (Constant.WalletCurrencyType.guildUsd.equals(officalSendTypeEnum.getCurrencyType())) {
vo.setOperationNum(BigDecimal.valueOf(record.getDiamondNum()));
} else {
vo.setOperationNum(BigDecimal.valueOf(record.getGoldNum()));

View File

@@ -1,11 +1,8 @@
package com.accompany.admin.service.user;
import com.accompany.admin.mapper.TestPurseMapper;
import com.accompany.admin.mapper.UserPurseAdminMapperExpand;
import com.accompany.admin.service.base.BaseService;
import com.accompany.admin.vo.UserPurseVo;
import com.accompany.business.mybatismapper.UserPurseMapper;
import com.accompany.core.service.common.JedisService;
import com.google.common.collect.Lists;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -18,15 +15,8 @@ import java.util.List;
@Service
public class UserPurseAdminService extends BaseService {
@Autowired
private TestPurseMapper testPurseMapper;
@Autowired
private UserPurseMapper userPurseMapper;
@Autowired
UserPurseAdminMapperExpand userPurseAdminMapperExpand;
@Autowired
JedisService jedisService;
public List<UserPurseVo> getUserPurseList(String erbanNoList){
List<String> oldList = Arrays.asList(erbanNoList.split(","));

View File

@@ -1,354 +0,0 @@
<?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.admin.mapper.TestPurseMapper" >
<resultMap id="BaseResultMap" type="com.accompany.admin.model.TestPurse" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="uid" property="uid" jdbcType="BIGINT" />
<result column="erban_no" property="erbanNo" jdbcType="BIGINT" />
<result column="nick" property="nick" jdbcType="VARCHAR" />
<result column="mysql_gold" property="mysqlGold" jdbcType="BIGINT" />
<result column="cache_gold" property="cacheGold" jdbcType="BIGINT" />
<result column="mysql_charge_gold" property="mysqlChargeGold" jdbcType="BIGINT" />
<result column="cache_charge_gold" property="cacheChargeGold" jdbcType="BIGINT" />
<result column="mysql_noble_gold" property="mysqlNobleGold" jdbcType="BIGINT" />
<result column="cache_noble_gold" property="cacheNobleGold" jdbcType="BIGINT" />
<result column="mysql_diamond" property="mysqlDiamond" jdbcType="DOUBLE" />
<result column="cache_diamond" property="cacheDiamond" jdbcType="DOUBLE" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="version" property="version" jdbcType="BIGINT" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
id, uid, erban_no, nick, mysql_gold, cache_gold, mysql_charge_gold, cache_charge_gold,
mysql_noble_gold, cache_noble_gold, mysql_diamond, cache_diamond, create_time, version
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.accompany.admin.model.TestPurseExample" >
select
<if test="distinct" >
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from test_purse
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from test_purse
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from test_purse
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.accompany.admin.model.TestPurseExample" >
delete from test_purse
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.accompany.admin.model.TestPurse" >
insert into test_purse (id, uid, erban_no,
nick, mysql_gold, cache_gold,
mysql_charge_gold, cache_charge_gold, mysql_noble_gold,
cache_noble_gold, mysql_diamond, cache_diamond,
create_time, version)
values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=BIGINT}, #{erbanNo,jdbcType=BIGINT},
#{nick,jdbcType=VARCHAR}, #{mysqlGold,jdbcType=BIGINT}, #{cacheGold,jdbcType=BIGINT},
#{mysqlChargeGold,jdbcType=BIGINT}, #{cacheChargeGold,jdbcType=BIGINT}, #{mysqlNobleGold,jdbcType=BIGINT},
#{cacheNobleGold,jdbcType=BIGINT}, #{mysqlDiamond,jdbcType=DOUBLE}, #{cacheDiamond,jdbcType=DOUBLE},
#{createTime,jdbcType=TIMESTAMP}, #{version,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.accompany.admin.model.TestPurse" >
insert into test_purse
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="uid != null" >
uid,
</if>
<if test="erbanNo != null" >
erban_no,
</if>
<if test="nick != null" >
nick,
</if>
<if test="mysqlGold != null" >
mysql_gold,
</if>
<if test="cacheGold != null" >
cache_gold,
</if>
<if test="mysqlChargeGold != null" >
mysql_charge_gold,
</if>
<if test="cacheChargeGold != null" >
cache_charge_gold,
</if>
<if test="mysqlNobleGold != null" >
mysql_noble_gold,
</if>
<if test="cacheNobleGold != null" >
cache_noble_gold,
</if>
<if test="mysqlDiamond != null" >
mysql_diamond,
</if>
<if test="cacheDiamond != null" >
cache_diamond,
</if>
<if test="createTime != null" >
create_time,
</if>
<if test="version != null" >
version,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="uid != null" >
#{uid,jdbcType=BIGINT},
</if>
<if test="erbanNo != null" >
#{erbanNo,jdbcType=BIGINT},
</if>
<if test="nick != null" >
#{nick,jdbcType=VARCHAR},
</if>
<if test="mysqlGold != null" >
#{mysqlGold,jdbcType=BIGINT},
</if>
<if test="cacheGold != null" >
#{cacheGold,jdbcType=BIGINT},
</if>
<if test="mysqlChargeGold != null" >
#{mysqlChargeGold,jdbcType=BIGINT},
</if>
<if test="cacheChargeGold != null" >
#{cacheChargeGold,jdbcType=BIGINT},
</if>
<if test="mysqlNobleGold != null" >
#{mysqlNobleGold,jdbcType=BIGINT},
</if>
<if test="cacheNobleGold != null" >
#{cacheNobleGold,jdbcType=BIGINT},
</if>
<if test="mysqlDiamond != null" >
#{mysqlDiamond,jdbcType=DOUBLE},
</if>
<if test="cacheDiamond != null" >
#{cacheDiamond,jdbcType=DOUBLE},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="version != null" >
#{version,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.accompany.admin.model.TestPurseExample" resultType="java.lang.Integer" >
select count(*) from test_purse
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
update test_purse
<set >
<if test="record.id != null" >
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.uid != null" >
uid = #{record.uid,jdbcType=BIGINT},
</if>
<if test="record.erbanNo != null" >
erban_no = #{record.erbanNo,jdbcType=BIGINT},
</if>
<if test="record.nick != null" >
nick = #{record.nick,jdbcType=VARCHAR},
</if>
<if test="record.mysqlGold != null" >
mysql_gold = #{record.mysqlGold,jdbcType=BIGINT},
</if>
<if test="record.cacheGold != null" >
cache_gold = #{record.cacheGold,jdbcType=BIGINT},
</if>
<if test="record.mysqlChargeGold != null" >
mysql_charge_gold = #{record.mysqlChargeGold,jdbcType=BIGINT},
</if>
<if test="record.cacheChargeGold != null" >
cache_charge_gold = #{record.cacheChargeGold,jdbcType=BIGINT},
</if>
<if test="record.mysqlNobleGold != null" >
mysql_noble_gold = #{record.mysqlNobleGold,jdbcType=BIGINT},
</if>
<if test="record.cacheNobleGold != null" >
cache_noble_gold = #{record.cacheNobleGold,jdbcType=BIGINT},
</if>
<if test="record.mysqlDiamond != null" >
mysql_diamond = #{record.mysqlDiamond,jdbcType=DOUBLE},
</if>
<if test="record.cacheDiamond != null" >
cache_diamond = #{record.cacheDiamond,jdbcType=DOUBLE},
</if>
<if test="record.createTime != null" >
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.version != null" >
version = #{record.version,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
update test_purse
set id = #{record.id,jdbcType=INTEGER},
uid = #{record.uid,jdbcType=BIGINT},
erban_no = #{record.erbanNo,jdbcType=BIGINT},
nick = #{record.nick,jdbcType=VARCHAR},
mysql_gold = #{record.mysqlGold,jdbcType=BIGINT},
cache_gold = #{record.cacheGold,jdbcType=BIGINT},
mysql_charge_gold = #{record.mysqlChargeGold,jdbcType=BIGINT},
cache_charge_gold = #{record.cacheChargeGold,jdbcType=BIGINT},
mysql_noble_gold = #{record.mysqlNobleGold,jdbcType=BIGINT},
cache_noble_gold = #{record.cacheNobleGold,jdbcType=BIGINT},
mysql_diamond = #{record.mysqlDiamond,jdbcType=DOUBLE},
cache_diamond = #{record.cacheDiamond,jdbcType=DOUBLE},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
version = #{record.version,jdbcType=BIGINT}
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.accompany.admin.model.TestPurse" >
update test_purse
<set >
<if test="uid != null" >
uid = #{uid,jdbcType=BIGINT},
</if>
<if test="erbanNo != null" >
erban_no = #{erbanNo,jdbcType=BIGINT},
</if>
<if test="nick != null" >
nick = #{nick,jdbcType=VARCHAR},
</if>
<if test="mysqlGold != null" >
mysql_gold = #{mysqlGold,jdbcType=BIGINT},
</if>
<if test="cacheGold != null" >
cache_gold = #{cacheGold,jdbcType=BIGINT},
</if>
<if test="mysqlChargeGold != null" >
mysql_charge_gold = #{mysqlChargeGold,jdbcType=BIGINT},
</if>
<if test="cacheChargeGold != null" >
cache_charge_gold = #{cacheChargeGold,jdbcType=BIGINT},
</if>
<if test="mysqlNobleGold != null" >
mysql_noble_gold = #{mysqlNobleGold,jdbcType=BIGINT},
</if>
<if test="cacheNobleGold != null" >
cache_noble_gold = #{cacheNobleGold,jdbcType=BIGINT},
</if>
<if test="mysqlDiamond != null" >
mysql_diamond = #{mysqlDiamond,jdbcType=DOUBLE},
</if>
<if test="cacheDiamond != null" >
cache_diamond = #{cacheDiamond,jdbcType=DOUBLE},
</if>
<if test="createTime != null" >
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="version != null" >
version = #{version,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.accompany.admin.model.TestPurse" >
update test_purse
set uid = #{uid,jdbcType=BIGINT},
erban_no = #{erbanNo,jdbcType=BIGINT},
nick = #{nick,jdbcType=VARCHAR},
mysql_gold = #{mysqlGold,jdbcType=BIGINT},
cache_gold = #{cacheGold,jdbcType=BIGINT},
mysql_charge_gold = #{mysqlChargeGold,jdbcType=BIGINT},
cache_charge_gold = #{cacheChargeGold,jdbcType=BIGINT},
mysql_noble_gold = #{mysqlNobleGold,jdbcType=BIGINT},
cache_noble_gold = #{cacheNobleGold,jdbcType=BIGINT},
mysql_diamond = #{mysqlDiamond,jdbcType=DOUBLE},
cache_diamond = #{cacheDiamond,jdbcType=DOUBLE},
create_time = #{createTime,jdbcType=TIMESTAMP},
version = #{version,jdbcType=BIGINT}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -6,7 +6,9 @@
<result column="nick" property="nick" jdbcType="VARCHAR" />
</resultMap>
<select id="selectUserPurseVoList" resultMap="BaseResultMap">
select * , (select nick from users t2 where t1.uid=t2.uid) as nick, (select erban_no from users t2 where t1.uid=t2.uid) as erban_no from user_purse t1 where uid in (select uid from users where erban_no in
select * , (select nick from users t2 where t1.uid=t2.uid) as nick, (select erban_no from users t2 where t1.uid=t2.uid) as erban_no
from user_purse t1
where uid in (select uid from users where erban_no in
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
#{item}
</foreach>)

View File

@@ -42,11 +42,12 @@
<result column="radish_num" property="radishNum" jdbcType="BIGINT"/>
<result column="diamonds_num" property="diamondsNum" jdbcType="DOUBLE"/>
<result column="guild_usd" property="guildUsdNum" jdbcType="DOUBLE"/>
<result column="guild_crystal" property="guildCrystalNum" jdbcType="DOUBLE"/>
</resultMap>
<select id="selectUserWithGold" parameterType="java.util.Map" resultMap="BaseResultMap">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select b.erban_no,b.nick,b.avatar,golds as gold_num, diamonds as diamonds_num, crystals as radish_num, guild_usd from
select b.erban_no,b.nick,b.avatar,golds as gold_num, diamonds as diamonds_num, crystals as radish_num, guild_usd, guild_crystal from
user_purse as a
join users as b on a.uid=b.uid
where b.erban_no in

View File

@@ -46,6 +46,8 @@ public class Constant {
public static Byte interSendGold = 62; // 官方直接送钻石
public static Byte miunsGuildUsd = 63; // 官方直接消除薪资
public static Byte plusGuildUsd = 64; // 官方直接赠送薪资
public static Byte miunsGuildCrystal = 65; // 官方直接消除薪资
public static Byte plusGuildCrystal = 66; // 官方直接赠送薪资
}
public static class AppVersion {
@@ -2533,7 +2535,8 @@ public class Constant {
public static final Byte gold = 0; // 金币 现为钻石
public static final Byte radish = 1; // 水晶
public static final Byte diamonds = 2; //钻石 现为金币
public static final Byte usd = 4;
public static final Byte guildUsd = 4;
public static final Byte guildCrystal = 6;
}
public static class PrizePoolType {

View File

@@ -244,9 +244,10 @@ public enum BillObjTypeEnum {
USER_EVENT_REFUND_BANNER(163, "用户活动审核失败退款", BillTypeEnum.OUT, CurrencyEnum.DIAMOND, BillDomainTypeEnum.USER_EVENT),
FIRST_CHARGE_REWARD_BILL(164, "首充奖励", BillTypeEnum.IN, CurrencyEnum.DIAMOND, BillDomainTypeEnum.FIRST_CHARGE),
PLUS_GUILD_USD( 165, "官方增加公会薪资", BillTypeEnum.IN, CurrencyEnum.GUILD_USD, BillDomainTypeEnum.GUILD_USD),
PLUS_GUILD_USD( 165, "官方增加公会薪资", BillTypeEnum.IN, CurrencyEnum.GUILD_USD, BillDomainTypeEnum.GUILD_USD),
MIUNS_GUILD_USD( 166, "官方扣除公会薪资", BillTypeEnum.OUT, CurrencyEnum.GUILD_USD, BillDomainTypeEnum.GUILD_USD),
MINI_GAME_LUDO_TICKET_OUT( 167, "LUDO门票消耗", BillTypeEnum.OUT, CurrencyEnum.GOLD, BillDomainTypeEnum.LUDO_MINI_GAME),
MINI_GAME_LUDO_TICKET_IN( 168, "LUDO门票退回", BillTypeEnum.IN, CurrencyEnum.GOLD, BillDomainTypeEnum.LUDO_MINI_GAME),
@@ -277,6 +278,9 @@ public enum BillObjTypeEnum {
EXCHANGE_GUILD_CRYSTAL_TO_DIAMOND_PAY( 184, "公会紫晶兑换金币支出", BillTypeEnum.OUT, CurrencyEnum.GUILD_CRYSTAL, BillDomainTypeEnum.EXCHANGE),
EXCHANGE_GUILD_CRYSTAL_TO_DIAMOND_INCOME( 185, "公会紫晶兑换金币收入", BillTypeEnum.IN, CurrencyEnum.DIAMOND, BillDomainTypeEnum.EXCHANGE),
OFFICIAL_PLUS_GUILD_CRYSTAL( 186, "官方增加公会紫晶", BillTypeEnum.IN, CurrencyEnum.GUILD_CRYSTAL, BillDomainTypeEnum.GUILD_POLICY2),
OFFICIAL_MIUNS_GUILD_CRYSTAL( 187, "官方扣除公会紫晶", BillTypeEnum.OUT, CurrencyEnum.GUILD_CRYSTAL, BillDomainTypeEnum.GUILD_POLICY2),
;
BillObjTypeEnum(int value, String desc, BillTypeEnum type, CurrencyEnum currency, BillDomainTypeEnum domain) {

View File

@@ -22,9 +22,11 @@ public enum OfficalSendTypeEnum {
OFFICAL_REDUCE_DIAMONDS(Constant.OfficialType.officalDiamondReduce,"官方金币消除", (byte)2),
OFFICAL_MINUS_GUILD_USD(Constant.OfficialType.miunsGuildUsd, "消除薪资", Constant.WalletCurrencyType.usd),
OFFICAL_MINUS_GUILD_USD(Constant.OfficialType.miunsGuildUsd, "消除薪资", Constant.WalletCurrencyType.guildUsd),
OFFICAL_PLUS_GUILD_USD(Constant.OfficialType.plusGuildUsd,"赠送薪资", Constant.WalletCurrencyType.guildUsd),
OFFICAL_PLUS_GUILD_USD(Constant.OfficialType.plusGuildUsd,"赠送薪资", Constant.WalletCurrencyType.usd),
OFFICAL_MINUS_GUILD_CRYSTAL(Constant.OfficialType.miunsGuildCrystal, "消除公会紫晶", Constant.WalletCurrencyType.guildCrystal),
OFFICAL_PLUS_GUILD_CRYSTAL(Constant.OfficialType.plusGuildCrystal,"赠送公会紫晶", Constant.WalletCurrencyType.guildCrystal),
;
private byte value;

View File

@@ -748,8 +748,8 @@ public class UserPurseService extends ServiceImpl<UserPurseMapper,UserPurse> {
return userPurse;
});
billRecordService.insertGeneralBillRecord(uid, BillObjTypeEnum.EXCHANGE_CRYSTAL_TO_DIAMOND_PAY, guildCrystalNumD, after);
billRecordService.insertGeneralBillRecord(uid, BillObjTypeEnum.EXCHANGE_CRYSTAL_TO_DIAMOND_INCOME, diamondD, after);
billRecordService.insertGeneralBillRecord(uid, BillObjTypeEnum.EXCHANGE_GUILD_CRYSTAL_TO_DIAMOND_PAY, guildCrystalNumD, after);
billRecordService.insertGeneralBillRecord(uid, BillObjTypeEnum.EXCHANGE_GUILD_CRYSTAL_TO_DIAMOND_INCOME, diamondD, after);
return after;
}