Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
359493a8
authored
May 21, 2021
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
账号创建时间问题
parent
21b7a70d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
app/Http/Controllers/Api/SupplierAccountApiController.php
app/Http/Controllers/Filter/SupplierAccountFilter.php
app/Http/Controllers/Api/SupplierAccountApiController.php
View file @
359493a8
...
@@ -49,7 +49,7 @@ class SupplierAccountApiController extends Controller
...
@@ -49,7 +49,7 @@ class SupplierAccountApiController extends Controller
$supplierId
=
$supplierModel
->
where
(
'supplier_code'
,
$data
[
'supplier_code'
])
->
value
(
'supplier_id'
);
$supplierId
=
$supplierModel
->
where
(
'supplier_code'
,
$data
[
'supplier_code'
])
->
value
(
'supplier_id'
);
$data
[
'supplier_id'
]
=
$supplierId
;
$data
[
'supplier_id'
]
=
$supplierId
;
$data
[
'a_type'
]
=
empty
(
$data
[
'a_type'
])
?
0
:
1
;
$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
[
'create_uid'
]
=
$request
->
user
->
userId
;
$data
[
'password'
]
=
Hash
::
make
(
$data
[
'password_raw'
]);
$data
[
'password'
]
=
Hash
::
make
(
$data
[
'password_raw'
]);
$model
=
new
SupplierAccountModel
();
$model
=
new
SupplierAccountModel
();
...
@@ -82,7 +82,7 @@ class SupplierAccountApiController extends Controller
...
@@ -82,7 +82,7 @@ class SupplierAccountApiController extends Controller
$supplierId
=
$supplierModel
->
where
(
'supplier_code'
,
$data
[
'supplier_code'
])
->
value
(
'supplier_id'
);
$supplierId
=
$supplierModel
->
where
(
'supplier_code'
,
$data
[
'supplier_code'
])
->
value
(
'supplier_id'
);
$data
[
'supplier_id'
]
=
$supplierId
;
$data
[
'supplier_id'
]
=
$supplierId
;
$data
[
'a_type'
]
=
empty
(
$data
[
'a_type'
])
?
0
:
1
;
$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
[
'create_uid'
]
=
$request
->
user
->
userId
;
$data
[
'password'
]
=
Hash
::
make
(
$data
[
'password_raw'
]);
$data
[
'password'
]
=
Hash
::
make
(
$data
[
'password_raw'
]);
$model
=
new
SupplierAccountModel
();
$model
=
new
SupplierAccountModel
();
...
...
app/Http/Controllers/Filter/SupplierAccountFilter.php
View file @
359493a8
...
@@ -17,20 +17,21 @@ class SupplierAccountFilter
...
@@ -17,20 +17,21 @@ class SupplierAccountFilter
if
(
!
empty
(
$map
[
'supplier_name'
]))
{
if
(
!
empty
(
$map
[
'supplier_name'
]))
{
//先去供应商主表找出id
//先去供应商主表找出id
$supplierChannelModel
=
new
SupplierChannelModel
();
$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
);
$query
->
whereIn
(
'supplier_id'
,
$supplierIds
);
}
}
if
(
!
empty
(
$map
[
'supplier_code'
]))
{
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'
]))
{
if
((
isset
(
$map
[
'status'
])
&&
$map
[
'status'
]
===
'0'
)
||
!
empty
(
$map
[
'status'
]))
{
$query
->
where
(
'status'
,
$map
[
'status'
]);
$query
->
where
(
'status'
,
$map
[
'status'
]);
}
}
if
(
!
empty
(
$map
[
'mobile'
]))
{
if
(
!
empty
(
$map
[
'mobile'
]))
{
$query
->
whereLike
(
'mobile'
,
"%${map['mobile']}%"
);
$query
->
whereLike
(
'mobile'
,
"%${map['mobile']}%"
);
}
}
if
(
!
empty
(
$map
[
'create_time'
]))
{
if
(
!
empty
(
$map
[
'create_time'
]))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment