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
342da585
Commit
342da585
authored
Mar 05, 2018
by
zfc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户编辑日志
parent
5461002c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
Client.php
application/api_broker/controller/Client.php
+11
-2
Users.php
application/model/Users.php
+2
-0
No files found.
application/api_broker/controller/Client.php
View file @
342da585
...
...
@@ -42,13 +42,18 @@ class Client extends Basic
*/
public
function
editClient
()
{
header
(
'Access-Control-Allow-Origin:*'
);
$table
=
New
Agents
();
$data
=
array
();
if
(
$this
->
params
[
'user_nick'
]
||
$this
->
params
[
'user_nick'
]
||
$this
->
params
[
'id'
])
{
if
(
$this
->
request
->
isPost
())
{
if
(
$this
->
params
[
'id'
])
{
//编辑
$data
[
'start'
]
=
$this
->
user
->
edit
(
$this
->
params
,
$this
->
params
[
'id'
]);
$this
->
operating_records
(
$this
->
params
[
'ccr_id'
],
$type
=
3
,
$remark
=
'用户编辑'
,
0
,
$this
->
params
[
'id'
]);
$name
=
$table
->
where
(
'id'
,
$this
->
params
[
'agents_id'
])
->
value
(
'realname'
);
//var_dump($name);
$remark
=
'客方修改为 '
.
$name
;
$this
->
operating_records
(
$this
->
params
[
'ccr_id'
],
$type
=
3
,
$remark
,
0
,
$this
->
params
[
'id'
]);
}
else
{
//添加
$data
[
'start'
]
=
$this
->
user
->
edit
(
$this
->
params
);
...
...
@@ -57,7 +62,11 @@ class Client extends Basic
$this
->
msg
=
'该客户手机号已存在于系统内'
;
}
else
{
$data
[
'id'
]
=
$this
->
user
->
id
;
$this
->
operating_records
(
$this
->
params
[
'ccr_id'
],
$type
=
3
,
$remark
=
'用户添加'
,
0
,
$data
[
'id'
]);
//获取客方数据
$name
=
$table
->
where
(
'id'
,
$this
->
params
[
'agents_id'
])
->
value
(
'realname'
);
//var_dump($name);
$remark
=
'客方添加为 '
.
$name
;
$this
->
operating_records
(
$this
->
params
[
'ccr_id'
],
$type
=
3
,
$remark
,
0
,
$data
[
'id'
]);
}
...
...
application/model/Users.php
View file @
342da585
...
...
@@ -188,11 +188,13 @@ class Users extends Model
$insert_data
[
'sex'
]
=
$data
[
'sex'
];
if
(
$id
)
{
//修改
$insert_data
[
'agent_id'
]
=
$data
[
'agents_id'
];
$insert_data
[
'update_time'
]
=
date
(
'Y-m-d H:i:s'
);
$this
->
save
(
$insert_data
,[
'id'
=>
$id
]);
$return_id
=
$id
;
}
else
{
//新增
$is_exist
=
$this
->
where
(
'user_phone'
,
$data
[
'user_phone'
])
->
count
();
if
(
empty
(
$is_exist
))
{
$insert_data
[
'referrer_id'
]
=
$data
[
'agents_id'
];
...
...
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