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
9e6ad70c
Commit
9e6ad70c
authored
Feb 02, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
总监列表小组门店
parent
6cd20ffd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
Broker.php
application/index/controller/Broker.php
+6
-3
AAgents.php
application/model/AAgents.php
+7
-1
No files found.
application/index/controller/Broker.php
View file @
9e6ad70c
...
@@ -179,6 +179,9 @@ class Broker extends Basic
...
@@ -179,6 +179,9 @@ class Broker extends Basic
* @throws \think\exception\DbException
* @throws \think\exception\DbException
*/
*/
public
function
getDistrictList
()
{
public
function
getDistrictList
()
{
$data
[
'status'
]
=
200
;
$data
[
'data'
]
=
''
;
$data
[
'msg'
]
=
''
;
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
10
:
$this
->
params
[
'pageSize'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
10
:
$this
->
params
[
'pageSize'
];
$agents
=
new
AAgents
();
$agents
=
new
AAgents
();
...
@@ -194,9 +197,9 @@ class Broker extends Basic
...
@@ -194,9 +197,9 @@ class Broker extends Basic
$where
[
'phone'
]
=
[
'LIKE'
,
$this
->
params
[
'phone'
]
.
'%'
];
$where
[
'phone'
]
=
[
'LIKE'
,
$this
->
params
[
'phone'
]
.
'%'
];
}
}
$
this
->
data
[
'list'
]
=
$agents
->
getListDistrict
(
$pageNo
,
$pageSize
,
'id DESC'
,
$field
,
$where
);
$data
[
'list'
]
=
$agents
->
getListDistrict
(
$pageNo
,
$pageSize
,
'id DESC'
,
$field
,
$where
);
$
this
->
data
[
'total'
]
=
$agents
->
getListDistrictTotal
(
$where
);
$data
[
'total'
]
=
$agents
->
getListDistrictTotal
(
$where
);
return
$this
->
response
(
$
this
->
code
,
$this
->
msg
,
$this
->
data
);
return
$this
->
response
(
$
data
[
'status'
],
$data
[
'msg'
],
$
data
);
}
}
/**
/**
...
...
application/model/AAgents.php
View file @
9e6ad70c
...
@@ -139,6 +139,7 @@ public function saveList(){
...
@@ -139,6 +139,7 @@ public function saveList(){
->
limit
(
$pageSize
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
page
(
$pageNo
)
->
select
();
->
select
();
$district_where
[
'status'
]
=
0
;
$district_where
[
'status'
]
=
0
;
$store_where
[
'status'
]
=
0
;
$store_where
[
'status'
]
=
0
;
foreach
(
$data
as
$k
=>
$v
){
foreach
(
$data
as
$k
=>
$v
){
...
@@ -148,7 +149,12 @@ public function saveList(){
...
@@ -148,7 +149,12 @@ public function saveList(){
$result
[
$k
][
'district_name'
]
=
Db
::
table
(
'a_district'
)
->
where
(
$district_where
)
->
value
(
'district_name'
);
$result
[
$k
][
'district_name'
]
=
Db
::
table
(
'a_district'
)
->
where
(
$district_where
)
->
value
(
'district_name'
);
if
(
$result
[
$k
][
'district_name'
])
{
if
(
$result
[
$k
][
'district_name'
])
{
$store_where
[
'district_id'
]
=
$v
->
district_id
;
$store_where
[
'district_id'
]
=
$v
->
district_id
;
$result
[
$k
][
'store_name'
]
=
Db
::
table
(
'a_store'
)
->
where
(
$store_where
)
->
column
(
'store_name'
);
$store
=
Db
::
table
(
'a_store'
)
->
where
(
$store_where
)
->
column
(
'store_name'
);
$store_str
=
''
;
foreach
(
$store
as
$kk
=>
$vv
)
{
$store_str
.=
$vv
.
','
;
}
$result
[
$k
][
'store_name'
]
=
rtrim
(
$store_str
,
','
);
}
else
{
}
else
{
$result
[
$k
][
'store_name'
]
=
''
;
$result
[
$k
][
'store_name'
]
=
''
;
}
}
...
...
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