...
|
...
|
@@ -482,13 +482,13 @@ 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('order_info')->where(['id'=>$oid])->value('status') == 5) {
|
|
|
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();
|
|
|
//如果全部5星好评赠送优惠券
|
|
|
if($data['rank_synthetical'] == 5 && $data['rank_service'] == 5 && $data['rank_journey'] == 5) {
|
|
|
if ($data['rank_synthetical'] == 5 && $data['rank_service'] == 5 && $data['rank_journey'] == 5) {
|
|
|
give_as_a_present(session('user.id'), '五星好评赠送');
|
|
|
}
|
|
|
$this->success('评论成功', url('user/Center/orderDetail', ['oid' => $request->param('oid')]), true);
|
...
|
...
|
@@ -500,7 +500,7 @@ class CenterController extends HomeBaseController |
|
|
Db::rollback();
|
|
|
$this->success('评论失败', '', false);
|
|
|
}
|
|
|
}else {
|
|
|
} else {
|
|
|
$this->success('禁止重复评论', '', false);
|
|
|
}
|
|
|
} else {
|
...
|
...
|
|