作者 郭盛
1 个管道 的构建 通过 耗费 1 秒

修改订单接口

... ... @@ -101,6 +101,9 @@ class Teacher extends Backend
$params = $this->request->post("row/a");
if ($params) {
$params = $this->preExcludeFields($params);
if($params['help_num'] == 0){
$this->error('请配置初始帮助人数');
}
if($params['status'] == 1){
$teacher = Db::name('teacher')
... ...
... ... @@ -111,7 +111,7 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
{:build_radios('row[status]', ['1'=>__('审核通过'), '2'=>__('审核未通过')], $row['status'])}
{:build_radios('row[status]', ['0'=>__('待审核'),'1'=>__('审核通过'), '2'=>__('审核未通过')], $row['status'])}
</div>
</div>
<div class="form-group">
... ...
... ... @@ -65,6 +65,7 @@ class Pay extends Api
$update['paytime'] = time();
$update['expirationtime'] = $update['paytime'] + 86400*7;
$update['finish_status'] = 1;
Db::name('teacher')->where('id',$order['teacher_id'])->setInc('help_num');
} else { // 用户支付失败
$update['status']=1;
}
... ... @@ -91,6 +92,7 @@ class Pay extends Api
$coupon['createtime'] = time();
$coupon['expirationtime'] = $coupon['createtime']+7*86400;
Db::name('coupon')->insertGetId($coupon);
Db::name('teacher')->where('id',$order['teacher_id'])->setInc('help_num');
} else { // 用户支付失败
$update['status']=1;
}
... ... @@ -105,6 +107,7 @@ class Pay extends Api
$update['paytime'] = time();
$update['expirationtime'] = $update['paytime'] + 86400*7;
$update['finish_status'] = 1;
Db::name('teacher')->where('id',$order['teacher_id'])->setInc('help_num');
} else { // 用户支付失败
$update['status']=1;
}
... ...
... ... @@ -7692,7 +7692,7 @@
<div class="row mt0 footer">
<div class="col-md-6" align="left">
Generated on 2020-01-18 18:06:37 </div>
Generated on 2020-01-18 18:32:46 </div>
<div class="col-md-6" align="right">
<a href="https://www.fastadmin.net" target="_blank">FastAdmin</a>
</div>
... ...