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
382b39fe
Commit
382b39fe
authored
Jul 18, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
隐私号码判断
parent
6b56bb2f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
8 deletions
+20
-8
Member.php
application/index/controller/Member.php
+12
-8
Users.php
application/model/Users.php
+8
-0
No files found.
application/index/controller/Member.php
View file @
382b39fe
...
...
@@ -332,12 +332,6 @@ class Member extends Basic{
$agent_data
=
$agent
->
getAgentInfo
(
'name,phone'
,
$this
->
params
[
'agents_id'
]);
$remark
=
'新增为'
.
$agent_data
[
'name'
]
.
'-'
.
$agent_data
[
'phone'
];
$result
=
$this
->
user
->
edit
(
$this
->
params
,
$this
->
params
[
'id'
]);
//新增或编辑
if
(
$result
==
-
1
)
{
return
$this
->
response
(
101
,
'该用户已经存在!'
);
}
$this
->
params
[
'id'
]
=
$result
;
}
else
{
$user_data
=
$this
->
user
->
getUserById
(
'id,agent_id'
,
$this
->
params
[
'id'
]);
if
(
empty
(
$user_data
))
{
...
...
@@ -351,10 +345,20 @@ class Member extends Basic{
}
else
{
$remark
=
'用户编辑'
;
}
$
data
[
'start'
]
=
$this
->
user
->
edit
(
$this
->
params
,
$this
->
params
[
'id'
]);
//新增或编辑
$
result
=
$this
->
user
->
edit
(
$this
->
params
,
$this
->
params
[
'id'
]);
//新增或编辑
}
}
if
(
$result
==
-
1
)
{
$this
->
code
=
101
;
$this
->
msg
=
'该用户已存在'
;
}
if
(
$result
==
-
2
)
{
$this
->
code
=
101
;
$this
->
msg
=
'此号码为虚拟号码'
;
}
$this
->
operating_records
(
$this
->
userId
,
$type
=
3
,
$remark
,
$this
->
params
[
'id'
]);
}
else
{
...
...
@@ -364,7 +368,7 @@ class Member extends Basic{
}
$data
[
'list'
]
=
$this
->
user
->
getClient
(
$this
->
params
[
'id'
]);
}
return
$this
->
response
(
$this
->
code
,
$this
->
msg
,
$data
);
return
$this
->
response
(
$this
->
code
,
$this
->
msg
,
$data
);
}
...
...
application/model/Users.php
View file @
382b39fe
...
...
@@ -279,11 +279,19 @@ class Users extends Model
//新增
$is_exist
=
$this
->
where
(
'user_phone'
,
$data
[
'user_phone'
])
->
count
();
if
(
empty
(
$is_exist
))
{
$m_phone
=
new
AliYunPhone
();
$num
=
$m_phone
->
where
(
'phone_x'
,
$data
[
'user_phone'
])
->
count
();
//查询隐私号码
if
(
$num
==
0
)
{
$insert_data
[
'source'
]
=
20
;
$insert_data
[
'status'
]
=
-
1
;
$insert_data
[
'create_time'
]
=
date
(
'Y-m-d H:i:s'
);
$this
->
save
(
$insert_data
);
$return_id
=
$this
->
id
;
}
else
{
$return_id
=
-
2
;
}
}
else
{
$return_id
=
-
1
;
}
...
...
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