master
cody 5 months ago
parent 559aa47916
commit 80b972789d

@ -82,12 +82,12 @@ class CourseContentController extends BaseController
} }
// null搜索 // null搜索
if ($op == 'null') { if ($op == 'null') {
$query->whereNull($key)->orWhere('json_length(' . $key . ') =', 0); $query->whereNull($key)->orWhereRaw('json_length(' . $key . ') =', 0);
} }
// notnull搜索 // notnull搜索
if ($op == 'notnull') { if ($op == 'notnull') {
// 不是null并且不是空json这个是一个json字段 // 不是null并且不是空json这个是一个json字段
$query->whereNotNull($key)->where('json_length(' . $key . ') >', 0); $query->whereNotNull($key)->whereRaw('json_length(' . $key . ') >', 0);
} }
// 范围搜索 // 范围搜索
if ($op == 'range') { if ($op == 'range') {

Loading…
Cancel
Save