新增订单评价
parent
deb2b30e87
commit
e0513c8d73
@ -0,0 +1,52 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\API;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Yo;
|
||||||
|
class LabelController extends Controller
|
||||||
|
{
|
||||||
|
public function GetLabelList(){
|
||||||
|
$query1=DB::table('label')->select('id','type','value','order','img')->whereIn('type',['face','comment'])->where(['status'=>1,'type'=>'face'])->get();
|
||||||
|
$query2=DB::table('label')->select('id','type','value','order','img')->whereIn('type',['face','comment'])->where(['status'=>1,'type'=>'comment'])->get();
|
||||||
|
return Yo::echo([
|
||||||
|
'status' => true,
|
||||||
|
'label1'=>$query1,
|
||||||
|
'label2'=>$query2,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
public function GetOrderEvaluate(){ //获取订单是评价详情
|
||||||
|
$orderid=request('orderid');
|
||||||
|
$orderInfo=DB::select("select a.*,b.name as hname from user_orders as a left join hospitals as b on a.hospital=b.id where a.id=?",[$orderid]);
|
||||||
|
$query=DB::table('order_evaluate')->where(['order_id'=>$orderid])->get();
|
||||||
|
if(count($query)>0){
|
||||||
|
return Yo::echo([
|
||||||
|
'status' => true,
|
||||||
|
'info'=>$query,
|
||||||
|
'orderInfo'=>$orderInfo
|
||||||
|
]);
|
||||||
|
}else{
|
||||||
|
return Yo::echo([
|
||||||
|
'status' => false,
|
||||||
|
'orderInfo'=>$orderInfo
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public function AddOrderEvaluate(){ //新增订单评价
|
||||||
|
$orderid=request('orderid');
|
||||||
|
$faceId=request('faceId');
|
||||||
|
$pingjiaList=request('pingjiaList');
|
||||||
|
$pingjiaList=implode(',',$pingjiaList);
|
||||||
|
$i=DB::table('order_evaluate')->insert(['order_id'=>$orderid,'face_id'=>$faceId,'comment_ids'=>$pingjiaList]);
|
||||||
|
if($i){
|
||||||
|
$status=true;
|
||||||
|
}else{
|
||||||
|
$status=false;
|
||||||
|
}
|
||||||
|
return Yo::echo([
|
||||||
|
'status' => $status,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\API;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Yo;
|
||||||
|
|
||||||
|
class UserController extends Controller
|
||||||
|
{
|
||||||
|
//检查用户是否有支付体检订单,且已经体检
|
||||||
|
public function IsChecked(){
|
||||||
|
$subinfo=request('userid');
|
||||||
|
$query=DB::table("user_orders")->where(['user'=>$subinfo,'check_status'=>2])->limit(1)->orderBy('id', 'desc') ->get();
|
||||||
|
if(count($query)>0){
|
||||||
|
return Yo::echo([
|
||||||
|
'status' => true,
|
||||||
|
'info'=>$query
|
||||||
|
]);
|
||||||
|
}else{
|
||||||
|
return Yo::echo([
|
||||||
|
'status' => false
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 8.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
Loading…
Reference in New Issue