|
@@ -373,7 +373,7 @@ class StoreOrderController
|
|
|
{
|
|
|
list($uid) = UtilService::postMore([['uid', 0]], $request);
|
|
|
if (!$uid) return app('json')->fail('请选择要赠送的用户');
|
|
|
- if (!\app\admin\model\order\StoreOrder::where('unique', $uni)
|
|
|
+ if (!\app\admin\model\order\StoreOrder::where('order_id', $uni)
|
|
|
->where('uid', $uid)
|
|
|
->where('refund_status', 0)
|
|
|
->where('paid', 1)
|
|
@@ -385,7 +385,7 @@ class StoreOrderController
|
|
|
->where('gift_uid', 0)
|
|
|
->find()
|
|
|
) return app('json')->fail('订单错误');
|
|
|
- $res = StoreOrder::where('unique', $uni)->update(['gift_uid' => $uid]);
|
|
|
+ $res = StoreOrder::where('order_id', $uni)->update(['gift_uid' => $uid]);
|
|
|
if ($res) return app('json')->fail('赠送成功');
|
|
|
else return app('json')->fail('赠送失败');
|
|
|
}
|