Browse Source

feat: UN-71: 会员-奖金列表调整

kevin 1 year ago
parent
commit
96329b49d1
2 changed files with 3 additions and 2 deletions
  1. 2 1
      common/helpers/Tool.php
  2. 1 1
      common/models/UserPerformance.php

+ 2 - 1
common/helpers/Tool.php

@@ -567,7 +567,8 @@ class Tool {
      */
     public static function generateUserPerformanceNo(string $iso = ''): string
     {
-        return $iso . Date::today('YmdHis');
+        $rid = self::generateId();
+        return $iso . Date::today('Ymd') . substr($rid, 0, 6);
     }
 
     /**

+ 1 - 1
common/models/UserPerformance.php

@@ -211,7 +211,7 @@ class UserPerformance extends \common\components\ActiveRecord
         $transaction = $db->beginTransaction();
         try {
             // 奖金发放
-            $id = 'PRP' . Tool::generateUserPerformanceNo($countryCode);
+            $id = 'EP' . Tool::generateUserPerformanceNo($countryCode);
             self::insertOne([
                 'ID' => $id,
                 'USER_ID' => $userId,