Commit 359493a8 by mushishixian

账号创建时间问题

parent 21b7a70d
......@@ -49,7 +49,7 @@ class SupplierAccountApiController extends Controller
$supplierId = $supplierModel->where('supplier_code', $data['supplier_code'])->value('supplier_id');
$data['supplier_id'] = $supplierId;
$data['a_type'] = empty($data['a_type']) ? 0 : 1;
$data['create_time'] = date('Y-m-d H:i:s');
$data['create_time'] = time();
$data['create_uid'] = $request->user->userId;
$data['password'] = Hash::make($data['password_raw']);
$model = new SupplierAccountModel();
......@@ -82,7 +82,7 @@ class SupplierAccountApiController extends Controller
$supplierId = $supplierModel->where('supplier_code', $data['supplier_code'])->value('supplier_id');
$data['supplier_id'] = $supplierId;
$data['a_type'] = empty($data['a_type']) ? 0 : 1;
$data['update_time'] = date('Y-m-d H:i:s');
$data['update_time'] = time();
$data['create_uid'] = $request->user->userId;
$data['password'] = Hash::make($data['password_raw']);
$model = new SupplierAccountModel();
......
......@@ -17,20 +17,21 @@ class SupplierAccountFilter
if (!empty($map['supplier_name'])) {
//先去供应商主表找出id
$supplierChannelModel = new SupplierChannelModel();
$supplierIds = $supplierChannelModel->whereLike('supplier_name',"%${map['supplier_name']}%")->pluck('supplier_id');
$supplierIds = $supplierChannelModel->where('supplier_name', 'like',
"%${map['supplier_name']}%")->pluck('supplier_id');
$query->whereIn('supplier_id', $supplierIds);
}
if (!empty($map['supplier_code'])) {
$query->whereLike('supplier_code',"%${map['supplier_code']}%");
$query->whereLike('supplier_code', "%${map['supplier_code']}%");
}
if ((isset($map['status'])&&$map['status']==='0')|| !empty($map['status'])) {
$query->where('status',$map['status']);
if ((isset($map['status']) && $map['status'] === '0') || !empty($map['status'])) {
$query->where('status', $map['status']);
}
if (!empty($map['mobile'])) {
$query->whereLike('mobile',"%${map['mobile']}%");
$query->whereLike('mobile', "%${map['mobile']}%");
}
if (!empty($map['create_time'])) {
......
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 sign in to comment