Kirin il y a 3 ans
Parent
commit
b90b462a4b
1 fichiers modifiés avec 6 ajouts et 2 suppressions
  1. 6 2
      app/api/controller/PublicController.php

+ 6 - 2
app/api/controller/PublicController.php

@@ -45,8 +45,12 @@ class PublicController
 
     public function test(Request $request)
     {
-        DayAward::dayAward();
-        DayAward::dayAwardOut();
+        $uid = 84;
+        $spread = User::get($uid);
+        $balance_brokerage = User::where('uid', $spread['uid'])->value('brokerage_price');
+        $res = UserBill::income('礼包推荐奖', $spread['uid'], 'now_money', 'brokerage', 2000, 20, bcadd($balance_brokerage, 2000, 2), '推荐用户购礼包商品' . 2000);
+        $res = $res && User::where('uid', $spread['uid'])->inc('brokerage_price', 2000)->update();
+        $res = $res && User::where('uid', $spread['uid'])->update(['last_recommend_award' => ($spread['last_recommend_award'] ? 0 : 1)]);
     }
 
     public static function spreadIntegral($uid)