|
@@ -43,7 +43,7 @@ class AccountLogic extends BaseLogic
|
|
|
|
|
|
$rs = AccountModel::field('id,username')
|
|
|
->where('is_del', CommonModel::$del_normal)
|
|
|
- ->where('username', $username_prefix.$data['username'])
|
|
|
+ ->where('username', $username_prefix . $data['username'])
|
|
|
->findOrEmpty()
|
|
|
->isEmpty();
|
|
|
if (!$rs) return json_show(CommonModel::$error_param, '该账号已存在');
|
|
@@ -111,12 +111,12 @@ class AccountLogic extends BaseLogic
|
|
|
//批量添加账户
|
|
|
public static function batchAdd(array $data = []): Json
|
|
|
{
|
|
|
- $rs = AccountBatchLogModel::create(array_merge($data,[
|
|
|
- 'status'=>AccountBatchLogModel::$status_wait_handle,
|
|
|
- 'addtime'=>date('Y-m-d H:i:s'),
|
|
|
- ]))->save();
|
|
|
+ $rs = AccountBatchLogModel::create(array_merge($data, [
|
|
|
+ 'status' => AccountBatchLogModel::$status_wait_handle,
|
|
|
+ 'addtime' => date('Y-m-d H:i:s'),
|
|
|
+ ]))->save();
|
|
|
|
|
|
- return $rs?json_show(CommonModel::$success,'批量添加账户成功'):json_show(CommonModel::$error_param,'批量添加账户失败');
|
|
|
+ return $rs ? json_show(CommonModel::$success, '批量添加账户成功') : json_show(CommonModel::$error_param, '批量添加账户失败');
|
|
|
|
|
|
}
|
|
|
|
|
@@ -136,6 +136,7 @@ class AccountLogic extends BaseLogic
|
|
|
$where = [];
|
|
|
if ($data['company_title'] != '') $where[] = ['b.title', 'like', '%' . $data['company_title'] . '%'];
|
|
|
if ($data['card_title'] != '') $where[] = ['c.title', 'like', '%' . $data['card_title'] . '%'];
|
|
|
+ if ($data['status'] != '') $where[] = ['a.status', '=', $data['status']];
|
|
|
|
|
|
$count = Db::name('account_batch_log')
|
|
|
->alias('a')
|