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
4986dfc9
Commit
4986dfc9
authored
Sep 05, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
41ec11f2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
Shop.php
application/api/controller/Shop.php
+5
-5
GImageDepot.php
application/model/GImageDepot.php
+2
-1
No files found.
application/api/controller/Shop.php
View file @
4986dfc9
...
...
@@ -191,10 +191,10 @@ class Shop extends Basic
$param
[
"id"
]
=
array
(
"in"
,
$val
[
"external_image_id"
]
);
$param
[
"img_status"
]
=
0
;
$field
=
'id,
img_type,label,img_name,create_time
'
;
$field
=
'id,
0 as house_id,img_type,label,img_name,img_status
'
;
$res
=
$this
->
imageDepotModel
->
getImageDepotById
(
$field
,
$param
);
$result
[
$key
][
"images"
]
=
count
(
$res
)
>
0
?
$res
[
0
]
:
""
;
$res
=
$this
->
imageDepotModel
->
getImageDepotById
(
$field
,
$param
,
1
);
$result
[
$key
][
"images"
]
=
count
(
$res
)
>
0
?
$res
:
""
;
}
}
...
...
@@ -278,9 +278,9 @@ class Shop extends Basic
if
(
$result
[
"external_image_id"
])
{
$param
[
"id"
]
=
array
(
"in"
,
$result
[
"external_image_id"
]
);
$param
[
"img_status"
]
=
0
;
$field
=
'id,
img_type,label,img_name,create_time
'
;
$field
=
'id,
0 as house_id,img_type,label,img_name,img_status
'
;
$res
=
$this
->
imageDepotModel
->
getImageDepotById
(
$field
,
$param
);
$result
[
"images"
]
=
count
(
$res
)
>
0
?
$res
[
0
]
:
[];
$result
[
"images"
]
=
count
(
$res
)
>
0
?
$res
:
[];
}
...
...
application/model/GImageDepot.php
View file @
4986dfc9
...
...
@@ -85,11 +85,12 @@ class GImageDepot extends Model
/**
* 根据ID获取记录
*/
public
function
getImageDepotById
(
$field
,
$params
)
public
function
getImageDepotById
(
$field
,
$params
,
$limit
=
"10"
)
{
$result
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
where
(
$params
)
->
limit
(
$limit
)
->
select
();
//dump($this->getLastSql());
return
$result
;
...
...
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