...
|
...
|
@@ -482,18 +482,22 @@ class CenterController extends HomeBaseController |
|
|
$data['comment_time'] = time();
|
|
|
$data['activity_id'] = Db::name('order_info')->where(['id' => $oid])->value('activity_id');
|
|
|
Db::startTrans();
|
|
|
if (Db::name('activity_comment')->insert($data)) {
|
|
|
//改变订单状态
|
|
|
if (Db::name('order_info')->update(['id' => $oid, 'status' => 6])) {
|
|
|
Db::commit();
|
|
|
$this->success('评论成功', url('user/Center/orderDetail', ['oid' => $request->param('oid')]), true);
|
|
|
if(Db::name('order_info')->where(['id'=>$oid])->value('status') == 5) {
|
|
|
if (Db::name('activity_comment')->insert($data)) {
|
|
|
//改变订单状态
|
|
|
if (Db::name('order_info')->update(['id' => $oid, 'status' => 6])) {
|
|
|
Db::commit();
|
|
|
$this->success('评论成功', url('user/Center/orderDetail', ['oid' => $request->param('oid')]), true);
|
|
|
} else {
|
|
|
Db::rollback();
|
|
|
$this->success('评论失败', '', false);
|
|
|
}
|
|
|
} else {
|
|
|
Db::rollback();
|
|
|
$this->success('评论失败', '', false);
|
|
|
}
|
|
|
} else {
|
|
|
Db::rollback();
|
|
|
$this->success('评论失败', '', false);
|
|
|
}else {
|
|
|
$this->success('禁止重复评论', '', false);
|
|
|
}
|
|
|
} else {
|
|
|
return $this->fetch(':comment', [
|
...
|
...
|
|