소스 검색

直播收益第一级改为直播系统那边赠送

dos 1 개월 전
부모
커밋
e09e0b53dc
1개의 변경된 파일14개의 추가작업 그리고 11개의 파일을 삭제
  1. 14 11
      game-business/src/main/java/com/game/business/task/AppUserLiveDividedTask.java

+ 14 - 11
game-business/src/main/java/com/game/business/task/AppUserLiveDividedTask.java

@@ -151,16 +151,6 @@ public class AppUserLiveDividedTask {
 
             //redisCache.deleteObject("U:UserInfo:" + appUser.getUserid());
 
-            // 插入分佣记录
-            AppUserLiveDividedRecord appUserLiveDividedRecord = new AppUserLiveDividedRecord();
-            appUserLiveDividedRecord.setRate(userLiveRate);
-            appUserLiveDividedRecord.setUserId(appUser.getUserid());
-            appUserLiveDividedRecord.setUserLiveDividedId(item.getId());
-            appUserLiveDividedRecord.setMoney(userCommission);
-            appUserLiveDividedRecord.setCurrencyType(item.getCurrencyType());
-            appUserLiveDividedRecord.setCreateTime(new Date());
-            appUserLiveDividedRecordService.insertAppUserLiveDividedRecord(appUserLiveDividedRecord);
-
             FinTranRecord finTranRecord = new FinTranRecord();
 
             //finTranRecord.setAfterDiamondCoin(appUser.getDiamondCoin());
@@ -234,7 +224,20 @@ public class AppUserLiveDividedTask {
 
             finTranRecord.setOrderId(item.getId());
             //finTranRecordService.insertFinTranRecord(finTranRecord);
-            appUserService.updateUserAmount(finTranRecord);
+            //本人已在直播系统分成过 停止流水生成以及金额更新
+            if(!item.getUserId().equals(appUser.getUserid())){
+                appUserService.updateUserAmount(finTranRecord);
+                // 插入分佣记录
+                AppUserLiveDividedRecord appUserLiveDividedRecord = new AppUserLiveDividedRecord();
+                appUserLiveDividedRecord.setRate(userLiveRate);
+                appUserLiveDividedRecord.setUserId(appUser.getUserid());
+                appUserLiveDividedRecord.setUserLiveDividedId(item.getId());
+                appUserLiveDividedRecord.setMoney(userCommission);
+                appUserLiveDividedRecord.setCurrencyType(item.getCurrencyType());
+                appUserLiveDividedRecord.setCreateTime(new Date());
+                appUserLiveDividedRecordService.insertAppUserLiveDividedRecord(appUserLiveDividedRecord);
+            }
+
         }
 
         AppUserLiveDivided appUserLiveDivided = new AppUserLiveDivided();