|
@@ -27,8 +27,7 @@ class companylogic extends baselogic
|
|
|
'getlistbywhere' => [
|
|
|
['name' => 'ispass', 'title' => 'ispass', 'type' => 'numeric', 'regex' => '/[0|1|2]{1}/'],
|
|
|
['name' => 'companyname', 'title' => 'companyname', 'type' => 'string'],
|
|
|
- ['name' => 'starttime', 'title' => 'starttime', 'type' => 'datetime'],
|
|
|
- ['name' => 'endtime', 'title' => 'starttime', 'type' => 'datetime'],
|
|
|
+ ['name' => 'createdate', 'title' => 'createdate', 'type' => 'array'],
|
|
|
['name' => 'page', 'title' => 'page', 'type' => 'numeric'],
|
|
|
['name' => 'size', 'title' => 'size', 'type' => 'numeric'],
|
|
|
],
|
|
@@ -52,6 +51,7 @@ class companylogic extends baselogic
|
|
|
}
|
|
|
$ispass = $arr['ispass'];
|
|
|
$m_c = new companymodel();
|
|
|
+ $successIds = [];
|
|
|
foreach ($ids as $key => $value) {
|
|
|
$where = ['id' => $value];
|
|
|
$info = $m_c->getInfo($where);
|
|
@@ -60,11 +60,15 @@ class companylogic extends baselogic
|
|
|
continue;
|
|
|
}
|
|
|
if ($ispass != $info['ispass']) {
|
|
|
+ $successIds[] = $value;
|
|
|
$update = ['ispass' => $ispass];
|
|
|
$m_c->updateinfo($where, $update);
|
|
|
}
|
|
|
}
|
|
|
- return backarr(1, "操作成功");
|
|
|
+ $data = [
|
|
|
+ 'successIds' => $successIds,
|
|
|
+ ];
|
|
|
+ return backarr(1, "操作成功", $data);
|
|
|
}
|
|
|
/**
|
|
|
* 获取公司列表
|
|
@@ -84,9 +88,10 @@ class companylogic extends baselogic
|
|
|
if (isset($arr['companyname'])) {
|
|
|
$where[] = ['companyname', 'like', '%' . $arr['companyname'] . '%'];
|
|
|
}
|
|
|
- if (isset($arr['starttime']) && isset($arr['endtime'])) {
|
|
|
- $where[] = ['create_time', '>=', $arr['starttime']];
|
|
|
- $where[] = ['create_time', '<=', $arr['endtime']];
|
|
|
+ if (isset($arr['createdate'])) {
|
|
|
+ $createdate = $arr['createdate'];
|
|
|
+ $where[] = ['create_time', '>=', $createdate[0]];
|
|
|
+ $where[] = ['create_time', '<=', $createdate[1]];
|
|
|
}
|
|
|
$m_c = new companymodel();
|
|
|
$count = $m_c->getList($where, 'count');
|