Prechádzať zdrojové kódy

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

dos 1 mesiac pred
rodič
commit
e09e0b53dc

+ 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();