@@ -218,7 +218,7 @@ class Order extends Api
$user = $userModel->getByAddress($params['address']);
if(empty($user)) throw new Exception(__("赠送用户不存在"));
- if($user['id'] == $this->auth->id) throw new Exception(__("赠送用户不能是自己"));
+ if($user['id'] == $order_info['user_id']) throw new Exception(__("赠送用户不能是自己"));
$chabao = $ledgerWalletModel::getWalletChaBao($this->auth->id);
$fees = bcmul($order_info['price'], getConfig('giveaway'), 2);
@@ -94,7 +94,7 @@ class User extends Api
->join("product_transfer z", "a.id = z.order_id AND a.status=2", "left") //转让
->join("product_area d", "d.id = a.area_id", "left") //地区
->field('a.id as order_id,a.product_id,'.'b.'.$this->lan.'_name as name,b.thum as img_url,a.price,a.status,a.type_id,c.'.$this->lan.'_title as title,z.price as transfer_price,d.address')
- //->where('a.user_id', $this->auth->id)
+ ->where('a.user_id', $this->auth->id)
->where($where)
->order('a.id DESC')
->paginate($this->pageSize);