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
de8f7732
Commit
de8f7732
authored
Apr 19, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
dbf9c30a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
FindShop.php
application/api/controller/FindShop.php
+6
-4
FindShopValidate.php
application/api/validate/FindShopValidate.php
+3
-1
No files found.
application/api/controller/FindShop.php
View file @
de8f7732
...
@@ -41,6 +41,7 @@ class FindShop extends Basic
...
@@ -41,6 +41,7 @@ class FindShop extends Basic
"disc" => "徐汇区",
"disc" => "徐汇区",
"business_district_id" => 111,
"business_district_id" => 111,
"business_district_name" => "121",
"business_district_name" => "121",
"industry_type" => "121",
"status" => 0,//状态 0已提交 1取消 2已完成
"status" => 0,//状态 0已提交 1取消 2已完成
"area_start" => 30,
"area_start" => 30,
"area_end" => 50,
"area_end" => 50,
...
@@ -61,6 +62,7 @@ class FindShop extends Basic
...
@@ -61,6 +62,7 @@ class FindShop extends Basic
"disc"
=>
$params
[
"disc"
],
"disc"
=>
$params
[
"disc"
],
"business_district_id"
=>
$params
[
"business_district_id"
],
"business_district_id"
=>
$params
[
"business_district_id"
],
"business_district_name"
=>
$params
[
"business_district_name"
],
"business_district_name"
=>
$params
[
"business_district_name"
],
"industry_type"
=>
$params
[
"industry_type"
],
"area_start"
=>
$params
[
"area_start"
],
"area_start"
=>
$params
[
"area_start"
],
"area_end"
=>
$params
[
"area_end"
],
"area_end"
=>
$params
[
"area_end"
],
"price_type"
=>
$params
[
"price_type"
],
"price_type"
=>
$params
[
"price_type"
],
...
@@ -101,7 +103,7 @@ class FindShop extends Basic
...
@@ -101,7 +103,7 @@ class FindShop extends Basic
return
$this
->
response
(
"101"
,
"请求参数错误"
);
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
}
$findShopModel
=
new
UFindShop
();
$findShopModel
=
new
UFindShop
();
$field
=
"id,user_id,user_name,site_id,city,disc,business_district_id,business_district_name,area_start,area_end,
$field
=
"id,user_id,user_name,site_id,city,disc,business_district_id,business_district_name,
industry_type,
area_start,area_end,
price_type,price_start,price_end,update_time,create_time"
;
price_type,price_start,price_end,update_time,create_time"
;
$result
=
$findShopModel
->
getFindShopList
(
$field
,
$params
,
1
,
1
);
$result
=
$findShopModel
->
getFindShopList
(
$field
,
$params
,
1
,
1
);
return
$this
->
response
(
"200"
,
"success"
,
$result
);
return
$this
->
response
(
"200"
,
"success"
,
$result
);
...
@@ -186,9 +188,9 @@ class FindShop extends Basic
...
@@ -186,9 +188,9 @@ class FindShop extends Basic
if
(
empty
(
$val
[
'is_show_image'
]))
{
if
(
empty
(
$val
[
'is_show_image'
]))
{
if
(
$val
[
"external_image_id"
])
{
if
(
$val
[
"external_image_id"
])
{
$param
[
"id"
]
=
array
(
"in"
,
$val
[
"external_image_id"
]);
$param
[
"id"
]
=
array
(
"in"
,
$val
[
"external_image_id"
]);
$param
[
"img_status"
]
=
0
;
$param
[
"img_status"
]
=
0
;
$field
=
'id,0 as house_id,img_type,label,img_name,img_status'
;
$field
=
'id,0 as house_id,img_type,label,img_name,img_status'
;
$res
=
$imageDepotModel
->
getImageDepotById
(
$field
,
$param
,
1
);
$res
=
$imageDepotModel
->
getImageDepotById
(
$field
,
$param
,
1
);
$result
[
$key
][
"images"
]
=
count
(
$res
)
>
0
?
$res
:
[];
$result
[
$key
][
"images"
]
=
count
(
$res
)
>
0
?
$res
:
[];
}
}
...
...
application/api/validate/FindShopValidate.php
View file @
de8f7732
...
@@ -20,6 +20,7 @@ class FindShopValidate extends Validate
...
@@ -20,6 +20,7 @@ class FindShopValidate extends Validate
'disc'
=>
'require'
,
'disc'
=>
'require'
,
'business_district_id'
=>
'require|number'
,
'business_district_id'
=>
'require|number'
,
'business_district_name'
=>
'require'
,
'business_district_name'
=>
'require'
,
'industry_type'
=>
'require'
,
'area_start'
=>
'require|number'
,
'area_start'
=>
'require|number'
,
'area_end'
=>
'require|number'
,
'area_end'
=>
'require|number'
,
'price_type'
=>
'require|in:0,1'
,
'price_type'
=>
'require|in:0,1'
,
...
@@ -39,6 +40,7 @@ class FindShopValidate extends Validate
...
@@ -39,6 +40,7 @@ class FindShopValidate extends Validate
'business_district_id.require'
=>
"商圈必传"
,
'business_district_id.require'
=>
"商圈必传"
,
'business_district_id.number'
=>
"商圈id只能是数字"
,
'business_district_id.number'
=>
"商圈id只能是数字"
,
'business_district_name.require'
=>
"商圈必传"
,
'business_district_name.require'
=>
"商圈必传"
,
'industry_type.require'
=>
"计划经营必传"
,
'area_start.require'
=>
"面积需求必传"
,
'area_start.require'
=>
"面积需求必传"
,
'area_start.number'
=>
"面积需求必传"
,
'area_start.number'
=>
"面积需求必传"
,
'area_end.require'
=>
"面积需求必传"
,
'area_end.require'
=>
"面积需求必传"
,
...
@@ -53,7 +55,7 @@ class FindShopValidate extends Validate
...
@@ -53,7 +55,7 @@ class FindShopValidate extends Validate
protected
$scene
=
[
protected
$scene
=
[
'add'
=>
[
'add'
=>
[
'user_id'
,
'
user_name'
,
'site_id'
,
'city'
,
'disc'
,
'business_district_id'
,
'business_district_nam
e'
,
'user_id'
,
'
site_id'
,
'city'
,
'disc'
,
'business_district_id'
,
'business_district_name'
,
'industry_typ
e'
,
'area_start'
,
'area_end'
,
'price_type'
,
'price_start'
,
'price_end'
'area_start'
,
'area_end'
,
'price_type'
,
'price_start'
,
'price_end'
],
],
];
];
...
...
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