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
872994e4
Commit
872994e4
authored
Aug 27, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
91594a82
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
11 deletions
+13
-11
LookShop.php
application/api_broker/controller/LookShop.php
+2
-2
AAgents.php
application/model/AAgents.php
+11
-9
No files found.
application/api_broker/controller/LookShop.php
View file @
872994e4
...
...
@@ -118,7 +118,7 @@ class LookShop extends Basic
$params_
[
"id"
]
=
$this
->
agentId
;
$result
=
$model
->
searchAgentsByKeyword
(
"id,store_id,district_id,level"
,
$params_
);
$field
=
"
id,store_id,level,name,phone,img
"
;
$field
=
"
a.id,a.store_id,a.level,a.name,a.phone,a.img,b.store_name
"
;
//店长
if
(
$result
[
0
][
"level"
]
==
20
){
...
...
@@ -128,7 +128,7 @@ class LookShop extends Basic
$where_
[
"district_id"
]
=
$result
[
0
][
"district_id"
];
}
$where_
[
"status"
]
=
0
;
$where_
[
"
a.
status"
]
=
0
;
$agentList
=
$this
->
agentsModel
->
getAgentByIdV2
(
$field
,
$where_
,
$page_no
,
$page_size
);
...
...
application/model/AAgents.php
View file @
872994e4
...
...
@@ -291,34 +291,36 @@ class AAgents extends BaseModel
return
$result
;
}
public
function
getAgentByIdV2
(
$field
=
"id"
,
$params
,
$page_no
,
$page_size
)
public
function
getAgentByIdV2
(
$field
=
"
a.
id"
,
$params
,
$page_no
,
$page_size
)
{
$where_
=
[];
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"id"
]
=
$params
[
"agent_id"
];
$where_
[
"
a.
id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"name"
]))
{
$where_
[
"name"
]
=
$params
[
"name"
];
$where_
[
"
a.
name"
]
=
$params
[
"name"
];
}
if
(
isset
(
$params
[
"phone"
]))
{
$where_
[
"phone"
]
=
$params
[
"phone"
];
$where_
[
"
a.
phone"
]
=
$params
[
"phone"
];
}
if
(
isset
(
$params
[
"store_id"
]))
{
$where_
[
"store_id"
]
=
$params
[
"store_id"
];
$where_
[
"
a.
store_id"
]
=
$params
[
"store_id"
];
}
if
(
isset
(
$params
[
"district_id"
]))
{
$where_
[
"district_id"
]
=
$params
[
"district_id"
];
$where_
[
"
a.
district_id"
]
=
$params
[
"district_id"
];
}
if
(
isset
(
$params
[
"status"
]))
{
$where_
[
"status"
]
=
$params
[
"status"
];
$where_
[
"
a.
status"
]
=
$params
[
"status"
];
}
if
(
isset
(
$params
[
"level"
]))
{
$where_
[
"level"
]
=
$params
[
"level"
];
$where_
[
"
a.
level"
]
=
$params
[
"level"
];
}
if
(
isset
(
$params
[
'in_id'
]))
{
$where_
[
'id'
]
=
[
'in'
,
$params
[
'in_id'
]
];
$where_
[
'
a.
id'
]
=
[
'in'
,
$params
[
'in_id'
]
];
}
$result
=
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'a_store b'
,
'a.store_id = b.id'
,
'left'
)
->
where
(
$where_
)
->
limit
(
$page_size
)
->
page
(
$page_no
)
...
...
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