Commit ee030bdf authored by wangzhengwen's avatar wangzhengwen

cs

parent 57be441a
...@@ -42,7 +42,7 @@ class CertOrder extends BaseController ...@@ -42,7 +42,7 @@ class CertOrder extends BaseController
} }
$where = ['is_del'=>0,'user_id'=>$data['user_id'],'cert_id'=>$data['cert_id']]; $where = ['is_del'=>0,'user_id'=>$data['user_id'],'cert_id'=>$data['cert_id']];
$count = OrderModel::where($where)->count(); $count = OrderModel::where($where)->where('status','in',[1,3])->count();
if ($count > 0) { if ($count > 0) {
return $this->returnMsg('请勿重复提交'); return $this->returnMsg('请勿重复提交');
} }
......
...@@ -31,8 +31,10 @@ class Cert extends BaseController ...@@ -31,8 +31,10 @@ class Cert extends BaseController
$query = CertOrder::where($where) $query = CertOrder::where($where)
// ->append(['otherFileList']) // ->append(['otherFileList'])
->with(['certfiledata'=>['certfile']]) ->with(['certfiledata'=>['certfile']])
->where('co.status','!=',0)
->alias('co') ->alias('co')
->join('cert c', 'c.id = co.cert_id') ->join('cert c', 'c.id = co.cert_id')
->order('co.id','desc')
->field([ ->field([
'co.*', 'co.*',
'c.title', 'c.title',
......
...@@ -106,14 +106,16 @@ class CourseUserWork extends Model ...@@ -106,14 +106,16 @@ class CourseUserWork extends Model
{ {
return $this->hasOne(CourseWork::class, 'id', 'work_id') return $this->hasOne(CourseWork::class, 'id', 'work_id')
// ->append(['filelist']) // ->append(['filelist'])
->where('is_del', 0) // ->where('is_del', 0)
->field('id,title,file_id_str,content'); ->field('id,title,file_id_str,content');
} }
//关联课程 //关联课程
public function course() public function course()
{ {
return $this->hasOne(Course::class, 'id', 'course_id')->where('is_del', 0)->field('id,title,cate_id'); return $this->hasOne(Course::class, 'id', 'course_id')
// ->where('is_del', 0)
->field('id,title,cate_id');
} }
//关联用户学校 //关联用户学校
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment