|
@@ -67,11 +67,14 @@ class AudioJob implements ShouldQueue
|
|
|
|
|
|
DB::beginTransaction();
|
|
|
|
|
|
- $Alltools = new Alltools;
|
|
|
- $result = $Alltools->shouyi($data->to_user_id,$data->money,'user_match_audio_log',$this->msgid);
|
|
|
- if($result !== true){
|
|
|
- DB::rollBack();
|
|
|
- return false;
|
|
|
+ $gold = bcsub($data->money,$data->free_money,1);
|
|
|
+ if($gold > 0){
|
|
|
+ $Alltools = new Alltools;
|
|
|
+ $result = $Alltools->shouyi($data->to_user_id,$gold,'user_match_audio_log',$this->msgid);
|
|
|
+ if($result !== true){
|
|
|
+ DB::rollBack();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//
|