Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
83d65abd
Commit
83d65abd
authored
Apr 19, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户注册并发处理
parent
921e3cee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
Users.php
application/model/Users.php
+26
-0
No files found.
application/model/Users.php
View file @
83d65abd
...
@@ -480,4 +480,30 @@ class Users extends Model
...
@@ -480,4 +480,30 @@ class Users extends Model
public
function
updateUserAll
(
$data
)
{
public
function
updateUserAll
(
$data
)
{
return
$this
->
saveAll
(
$data
);
return
$this
->
saveAll
(
$data
);
}
}
/**
* 跟进用户手机号查询信息
*
* @param string $field
* @param $phone
* @param bool $lock
* @return $this|array|false|\PDOStatement|string|Model
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
findUserByPhone
(
$field
=
'*'
,
$phone
,
$lock
=
false
)
{
if
(
$lock
)
{
$data
=
$this
->
field
(
$field
)
->
where
(
'user_phone'
,
$phone
)
->
lock
(
true
)
->
find
();
}
else
{
$data
=
$this
->
field
(
$field
)
->
where
(
'user_phone'
,
$phone
)
->
find
();
}
return
$data
;
}
}
}
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