Просмотр исходного кода

feat: NG-71: 会员奖金计算调整

kevin 1 год назад
Родитель
Сommit
dcc95b7a40
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      common/models/UserPerformance.php

+ 3 - 2
common/models/UserPerformance.php

@@ -4,6 +4,7 @@ namespace common\models;
 
 use common\helpers\Date;
 use common\helpers\LoggerTool;
+use common\helpers\Tool;
 use common\libs\lock\RedisLock;
 use Yii;
 use common\libs\logging\operate\valueType\Config as ValueTypeConfig;
@@ -207,7 +208,7 @@ class UserPerformance extends \common\components\ActiveRecord
         $transaction = $db->beginTransaction();
         try {
             // 奖金发放
-            $id = self::primaryKey();
+            $id = Tool::generateId();
 
             LoggerTool::info(['sentUserPerformance', $periodNum, DealType::getDealTypeIdByTag('User Performance grant'), $userId, $amount, $bountyPeriodNum, $id]);
 
@@ -226,7 +227,7 @@ class UserPerformance extends \common\components\ActiveRecord
             ]);
 
             // 写日志
-//            UserPerformanceLogs::changeAmountLogs($id, $amount, $periodNum);
+            UserPerformanceLogs::changeAmountLogs($id, $amount, $periodNum);
 
             $transaction->commit();
         } catch (\Exception $e) {