dos 1 ヶ月 前
コミット
323b0eebd4

+ 4 - 0
game-business/src/main/java/com/game/business/dto/AppUserTeamTranserRecordDto.java

@@ -31,4 +31,8 @@ public class AppUserTeamTranserRecordDto implements Serializable {
     @NotNull(message = "类型不能为空")
     private int type;
 
+
+    @ApiModelProperty(value = "类型:0:金币  1:余额")
+    private int coinType = 1;
+
 }

+ 10 - 4
game-business/src/main/java/com/game/business/service/impl/FinTranRecordServiceImpl.java

@@ -276,7 +276,7 @@ public class FinTranRecordServiceImpl extends ServiceImpl<FinTranRecordMapper, F
         FinTranRecord tran = FinTranRecord.initFinTranRecordSomeParams(addedInfo, FinTranType3.TRANSFER_TO_Coin, FinTranType1.U_Outcome_Coin, appUser);
         tran.setCoinChange(transfer.getMoney() * -1);
         tran.setCurrencyType(TranCurrencyType.Coin.getType());
-        tran.setRemarks("金币转账");
+        tran.setRemarks("金币转账:转给" + toAppUser.getUserid());
         appUserService.updateUserAmount(tran);
 
 
@@ -285,7 +285,7 @@ public class FinTranRecordServiceImpl extends ServiceImpl<FinTranRecordMapper, F
         toTran.setCoinChange(transfer.getMoney());
         toTran.setCurrencyType(TranCurrencyType.Coin.getType());
         toTran.setFromUid(appUser.getUserid());
-        toTran.setRemarks("金币转账");
+        toTran.setRemarks("金币转账: 收到来自" + appUser.getUserid() + "的转账");
         appUserService.updateUserAmount(toTran);
         //清除用户缓存
         redisCache.deleteObject("U:UserInfo:".concat(String.valueOf(appUser.getUserid())));
@@ -301,8 +301,14 @@ public class FinTranRecordServiceImpl extends ServiceImpl<FinTranRecordMapper, F
         Long userId = SecurityUtils.getUserId();
         LambdaQueryWrapper<FinTranRecord> queryWrapper = new LambdaQueryWrapper<>();
         queryWrapper.between(FinTranRecord::getCreateTime,transerRecordDto.getBeginTime().concat(" 00:00:00"),transerRecordDto.getEndTime().concat(" 23:59:59"));
-        queryWrapper.eq(FinTranRecord::getTranType3,FinTranType3.TRANSFER_TO_TEAM_DiamondCoin.getType());
-        queryWrapper.eq(FinTranRecord::getTranType1,FinTranType1.U_Income_Coin_Balance.getType());
+        if(0 == transerRecordDto.getCoinType()){
+            queryWrapper.eq(FinTranRecord::getTranType3, FinTranType3.TRANSFER_TO_Coin.getType());
+            queryWrapper.eq(FinTranRecord::getCurrencyType, 2);
+        }else {
+            queryWrapper.eq(FinTranRecord::getTranType3, FinTranType3.TRANSFER_TO_TEAM_DiamondCoin.getType());
+            queryWrapper.eq(FinTranRecord::getCurrencyType, 4);
+        }
+
         if(transerRecordDto.getType() == 0){
             //转出
             queryWrapper.eq(FinTranRecord::getFromUid,userId);