|
|
@@ -1284,9 +1284,11 @@ class StoreOrderRepository extends BaseRepository
|
|
|
$count = GiftReward::where('uid',$spread_uid)->where('price',$price)->find();
|
|
|
if (!empty($count)){
|
|
|
$spread_count = bcadd($count['count'], 1, 0);
|
|
|
- GiftReward::where('uid',$spread_uid)->where('price',$price)->update(['count' => $spread_count,'update_time'=>time()]);
|
|
|
- }else{
|
|
|
- GiftReward::create(['uid' => $spread_uid, 'price' => $price, 'count' => 1,'update_time'=>time()]);
|
|
|
+ $res =GiftReward::where('uid',$spread_uid)->where('price',$price)->update(['count' => $spread_count,'update_time'=>time()]);
|
|
|
+ @file_put_contents('quanju.txt', json_encode($res) . "-礼包数量\r\n", 8);
|
|
|
+ }else{
|
|
|
+ $res = GiftReward::create(['uid' => $spread_uid, 'price' => $price, 'count' => 1,'update_time'=>time()]);
|
|
|
+ @file_put_contents('quanju.txt', json_encode($res) . "-礼包刷领\r\n", 8);
|
|
|
}
|
|
|
|
|
|
|