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
f3994309
Commit
f3994309
authored
Apr 24, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
549fd63d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
+19
-5
FindShop.php
application/index/controller/FindShop.php
+9
-5
UFindShop.php
application/model/UFindShop.php
+10
-0
No files found.
application/index/controller/FindShop.php
View file @
f3994309
...
@@ -36,8 +36,8 @@ class FindShop extends Basic
...
@@ -36,8 +36,8 @@ class FindShop extends Basic
"page_no" => 1,
"page_no" => 1,
"page_size" => 15,
"page_size" => 15,
);*/
);*/
$pageNo
=
empty
(
$params
[
'page
No'
])
?
1
:
$params
[
'pageN
o'
];
$pageNo
=
empty
(
$params
[
'page
_no'
])
?
1
:
$params
[
'page_n
o'
];
$pageSize
=
empty
(
$params
[
'page
Size'
])
?
15
:
$params
[
'pageS
ize'
];
$pageSize
=
empty
(
$params
[
'page
_size'
])
?
15
:
$params
[
'page_s
ize'
];
$conditions
=
[];
$conditions
=
[];
if
(
$params
[
'is_my'
]
!=
0
&&
$params
[
'is_my'
]
!=
1
)
{
if
(
$params
[
'is_my'
]
!=
0
&&
$params
[
'is_my'
]
!=
1
)
{
...
@@ -72,10 +72,14 @@ class FindShop extends Basic
...
@@ -72,10 +72,14 @@ class FindShop extends Basic
$
resul
t
=
$findShopModel
->
getFindShopAndUserList
(
$field
,
$conditions
,
$pageNo
,
$pageSize
);
$
lis
t
=
$findShopModel
->
getFindShopAndUserList
(
$field
,
$conditions
,
$pageNo
,
$pageSize
);
foreach
(
$
resul
t
as
$key
=>
$item
){
foreach
(
$
lis
t
as
$key
=>
$item
){
$
resul
t
[
$key
][
"user_phone"
]
=
substr_replace
(
$item
[
"user_phone"
],
'****'
,
3
,
4
);
$
lis
t
[
$key
][
"user_phone"
]
=
substr_replace
(
$item
[
"user_phone"
],
'****'
,
3
,
4
);
}
}
$total
=
$findShopModel
->
getFindShopAndUserCount
(
$field
,
$conditions
);
$result
[
"list"
]
=
$list
;
$result
[
"total"
]
=
$total
;
return
$this
->
response
(
"200"
,
"success"
,
$result
);
return
$this
->
response
(
"200"
,
"success"
,
$result
);
...
...
application/model/UFindShop.php
View file @
f3994309
...
@@ -60,6 +60,16 @@ class UFindShop extends Model{
...
@@ -60,6 +60,16 @@ class UFindShop extends Model{
->
limit
(
$page_size
)
->
limit
(
$page_size
)
->
select
();
->
select
();
}
}
public
function
getFindShopAndUserCount
(
$field
,
$params
)
{
$params
[
"a.status"
]
=
0
;
return
$this
->
db_
->
alias
(
"a"
)
->
join
(
"u_users b"
,
"a.user_id = b.id"
,
"left"
)
->
field
(
$field
)
->
where
(
$params
)
->
count
();
}
/**
/**
* @param $params
* @param $params
...
...
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