|
@@ -41,11 +41,27 @@ class Money extends Api
|
|
$this->error('参数错误');
|
|
$this->error('参数错误');
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //检查其他申请
|
|
$check = Db::name('user_withdraw')->where('user_id',$this->auth->id)->where('status',0)->find();
|
|
$check = Db::name('user_withdraw')->where('user_id',$this->auth->id)->where('status',0)->find();
|
|
if($check){
|
|
if($check){
|
|
$this->error('目前还有兑换在审核中,请稍后在兑换');
|
|
$this->error('目前还有兑换在审核中,请稍后在兑换');
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //检查是否未确认收货
|
|
|
|
+ $map2 = [
|
|
|
|
+ 'user_id' => $this->auth->id,
|
|
|
|
+ 'status' => 1,
|
|
|
|
+ 'have_paid' => ['gt',0],
|
|
|
|
+ 'have_received' => 0,
|
|
|
|
+ ];
|
|
|
|
+ $check2 = Db::name('unishop_order')->where($map2)->find();
|
|
|
|
+ if($check2){
|
|
|
|
+ if($check2['have_delivered'] == 0){
|
|
|
|
+ $this->error('您有订单尚未发货,请等待订单完成');
|
|
|
|
+ }
|
|
|
|
+ $this->error('您有订单尚未确认收货,请先完成收货');
|
|
|
|
+ }
|
|
|
|
+
|
|
//开启事务
|
|
//开启事务
|
|
Db::startTrans();
|
|
Db::startTrans();
|
|
|
|
|