Parcourir la source

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

kevin il y a 1 an
Parent
commit
9760327fcf

+ 0 - 1
common/models/DealType.php

@@ -126,7 +126,6 @@ class DealType extends \common\components\ActiveRecord
     public static function getDealTypeTagById($dealTypeId)
     {
         $records = self::getFromCache();
-
         foreach ($records as $id => $record) {
             if ($dealTypeId == $id) {
                 return $record['TYPE_NAME'];

+ 1 - 1
common/models/UserPerformance.php

@@ -224,7 +224,7 @@ class UserPerformance extends \common\components\ActiveRecord
             ]);
 
             // 写日志
-            UserPerformanceLogs::changeAmountLogs($id, $amount, $periodNum);
+            UserPerformanceLogs::changeAmountLogs($id, $amount, $periodNum, '', DealType::getDealTypeTagById(DealType::USER_PERFORMANCE_SEND));
 
             $transaction->commit();
         } catch (\Exception $e) {

+ 2 - 1
common/models/UserPerformanceLogs.php

@@ -56,7 +56,7 @@ class UserPerformanceLogs extends \common\components\ActiveRecord
     /**
      * @throws Exception
      */
-    public static function changeAmountLogs($prpId, $amount, $periodNum, $orderId = '')
+    public static function changeAmountLogs($prpId, $amount, $periodNum, $orderId = '', $remark = '')
     {
         $id = Date::today('Ymd') . self::_random(10, 1);
 
@@ -66,6 +66,7 @@ class UserPerformanceLogs extends \common\components\ActiveRecord
             'ORDER_ID' => $orderId,
             'AMOUNTS' => $amount,
             'PERIOD_NUM' => $periodNum,
+            'REMARK' => $remark,
             'CREATED_AT' => date('Y-m-d  H:i:s', time()),
             'UPDATED_AT' => date('Y-m-d  H:i:s', time()),
         ]);