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
18db38d9
Commit
18db38d9
authored
Apr 09, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改新增或编辑客户
parent
4bacfde5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
13 deletions
+10
-13
Client.php
application/api_broker/controller/Client.php
+9
-13
Users.php
application/model/Users.php
+1
-0
No files found.
application/api_broker/controller/Client.php
View file @
18db38d9
...
...
@@ -43,37 +43,33 @@ class Client extends Basic
*/
public
function
editClient
()
{
header
(
'Access-Control-Allow-Origin:*'
);
$table
=
New
Agents
();
$data
=
array
();
if
(
!
empty
(
$this
->
params
[
'user_nick'
])
||
!
empty
(
$this
->
params
[
'id'
]))
{
$data
=
[];
if
(
$this
->
request
->
isPost
())
{
if
(
!
empty
(
$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'
]);
}
else
{
$table
=
new
AAgents
();
//添加
$data
[
'start'
]
=
$this
->
user
->
edit
(
$this
->
params
);
if
(
$data
[
'start'
]
!=
1
)
{
$this
->
code
=
101
;
$this
->
msg
=
'该用户已存在'
;
}
if
(
$data
[
'start'
]
==
1
){
}
elseif
(
$data
[
'start'
]
==
1
){
$data
[
'id'
]
=
$this
->
user
->
id
;
$this
->
operating_records
(
$this
->
params
[
'ccr_id'
],
$type
=
3
,
$remark
=
'用户添加'
,
0
,
$data
[
'id'
]);
}
else
{
}
else
{
$data
[
'id'
]
=
$this
->
user
->
id
;
//获取客方数据
$name
=
$table
->
where
(
'id'
,
$this
->
params
[
'agents_id'
])
->
value
(
'realname'
);
//var_dump($name);
$remark
=
'客方添加为 '
.
$name
;
$name
=
$table
->
where
(
'id'
,
$this
->
params
[
'agents_id'
])
->
value
(
'name'
);
$remark
=
'客方添加为 '
.
$name
;
$this
->
operating_records
(
$this
->
params
[
'ccr_id'
],
$type
=
3
,
$remark
,
0
,
$data
[
'id'
]);
}
}
}
else
{
$data
[
'start'
]
=
$this
->
user
->
getClient
(
$this
->
params
[
'id'
]);
...
...
application/model/Users.php
View file @
18db38d9
...
...
@@ -203,6 +203,7 @@ class Users extends Model
$insert_data
[
'status'
]
=
-
1
;
$insert_data
[
'create_time'
]
=
date
(
'Y-m-d H:i:s'
);
$return_id
=
$this
->
save
(
$insert_data
);
$return_id
=
1
;
}
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