|
@@ -1954,10 +1954,16 @@ class Party extends Api
|
|
|
if($is_back == 1) {
|
|
|
$giftback_ids = array_column($giftbackList,'id');
|
|
|
|
|
|
- $res1 = Db::name('gift_back')->where('id','IN',$giftback_ids)->delete();
|
|
|
- if(!$res1){
|
|
|
- Db::rollback();
|
|
|
- $this->error('背包送礼物失败');
|
|
|
+ if($user_id_key == 0){
|
|
|
+ //第一个人就全给扣掉
|
|
|
+ $res1 = Db::name('gift_back')->where('id','IN',$giftback_ids)->delete();
|
|
|
+ if(!$res1){
|
|
|
+ Db::rollback();
|
|
|
+ $this->error('背包送礼物失败');
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ //其他人的时候就不用扣了
|
|
|
+ $res1 = true;
|
|
|
}
|
|
|
|
|
|
} else {
|