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

修改老师订单

... ... @@ -364,8 +364,8 @@ class Order extends Api
"content"://问题描述
"expirationtime"://到期时间
"teacher_id"://老师ID
"name"://老师名称
"thumbnail"://头像
"nickname"://学生名称
"avatar"://学生头像
"finish_status"://完成状态(1进行中2已完成3售后
"is_summarize"://是否总结过(1是2否
"is_complaint"://是否被投诉(1是2否3已处理
... ... @@ -394,64 +394,62 @@ class Order extends Api
//进行中
$data = Db::name('order')
->alias('a')
->join('teacher b','a.teacher_id = b.id')
->join('user b','a.user_id = b.id')
->where('a.teacher_id',$teacher_id['id'])
->where('a.finish_status',1)
->field('a.*,b.name,b.thumbnail')
->field('a.*,b.nickname,b.avatar')
->page($page,$pageNum)
->select();
}elseif ($type == 2){
//待总结
$data = Db::name('order')
->alias('a')
->join('teacher b','a.teacher_id = b.id')
->join('user b','a.user_id = b.id')
->where('a.finish_status',2)
->where('a.is_summarize',2)
->where('a.teacher_id',$teacher_id['id'])
->field('a.*,b.name,b.thumbnail')
->field('a.*,b.nickname,b.avatar')
->page($page,$pageNum)
->select();
}elseif ($type == 3){
//结算中
$data = Db::name('order')
->alias('a')
->join('teacher b','a.teacher_id = b.id')
->join('user b','a.user_id = b.id')
->where('a.finish_status',2)
->where('a.is_summarize',1)
->where('a.teacher_id',$teacher_id['id'])
->where('a.order_status',2)
->field('a.*,b.name,b.thumbnail')
->field('a.*,b.nickname,b.avatar')
->page($page,$pageNum)
->select();
}elseif ($type == 4){
//已完成
$data = Db::name('order')
->alias('a')
->join('teacher b','a.teacher_id = b.id')
->join('user b','a.user_id = b.id')
->where('a.finish_status',2)
->where('a.is_summarize',1)
->where('a.order_status',1)
->where('a.teacher_id',$teacher_id['id'])
->field('a.*,b.name,b.thumbnail')
->field('a.*,b.nickname,b.avatar')
->page($page,$pageNum)
->select();
}elseif ($type == 5 ){
//退款/投诉
$data = Db::name('order')
->alias('a')
->join('teacher b','a.teacher_id = b.id')
->join('user b','a.user_id = b.id')
->where('a.finish_status',3)
->where('a.is_complaint',['=',1],['=',3],'or')
->where('a.teacher_id',$teacher_id['id'])
->field('a.*,b.name,b.thumbnail')
->field('a.*,b.nickname,b.avatar')
->page($page,$pageNum)
->select();
}else{
$this->error('类型有误');
}
foreach ($data as &$v){
$http = get_addon_config('qiniu')['cdnurl'];
$v['thumbnail'] = $http.$v['thumbnail'];
$is_have = Db::name('comment')
->where('order_id',$v['id'])
->find();
... ...
... ... @@ -4366,8 +4366,8 @@
"content"://问题描述
"expirationtime"://到期时间
"teacher_id"://老师ID
"name"://老师名称
"thumbnail"://头像
"nickname"://学生名称
"avatar"://学生头像
"finish_status"://完成状态(1进行中2已完成3售后
"is_summarize"://是否总结过(1是2否
"is_complaint"://是否被投诉(1是2否3已处理
... ... @@ -8450,7 +8450,7 @@
<div class="row mt0 footer">
<div class="col-md-6" align="left">
Generated on 2020-03-12 10:09:27 </div>
Generated on 2020-03-12 10:52:07 </div>
<div class="col-md-6" align="right">
<a href="https://www.fastadmin.net" target="_blank">FastAdmin</a>
</div>
... ...