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
c46f7703
Commit
c46f7703
authored
May 21, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接收参数判断
parent
976383f2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
Shop.php
application/api_broker/controller/Shop.php
+1
-1
GHouses.php
application/model/GHouses.php
+3
-3
Regions.php
application/model/Regions.php
+1
-0
No files found.
application/api_broker/controller/Shop.php
View file @
c46f7703
...
...
@@ -315,7 +315,7 @@ class Shop extends Basic
$house_id
=
$this
->
gHousesModel
->
app_add
(
$this
->
params
,
$this
->
agentId
);
//添加或编辑商铺
if
(
$house_id
)
{
$result
[
'data'
][
'house_id'
]
=
$house_id
[
'house_id'
];
$result
[
'data'
][
'internal_title'
]
=
$this
->
params
[
'internal_title'
];
$result
[
'data'
][
'internal_title'
]
=
empty
(
$this
->
params
[
'internal_title'
])
?
""
:
$this
->
params
[
'internal_title'
];
}
else
{
$data
[
'code'
]
=
101
;
$data
[
'msg'
]
=
'Add houses failure'
;
...
...
application/model/GHouses.php
View file @
c46f7703
...
...
@@ -809,10 +809,10 @@ class GHouses extends BaseModel
$params
[
'case_id'
]
=
$case_id
;
}
if
(
isset
(
$params
[
'province'
])
||
isset
(
$params
[
'city'
])
||
isset
(
$params
[
'disc'
]))
{
if
(
!
empty
(
$params
[
'province'
])
||
!
empty
(
$params
[
'city'
])
||
!
empty
(
$params
[
'disc'
]))
{
$regions
=
new
Regions
();
$code_arr
=
$regions
->
getRegionsCodeByName
(
$params
[
'province'
],
$params
[
'city'
],
$params
[
'disc'
]);
$params
[
'code'
]
=
i
mplode
(
'##'
,
$code_arr
)
;
$params
[
'code'
]
=
i
s_array
(
$code_arr
)
?
implode
(
'##'
,
$code_arr
)
:
''
;
}
if
(
!
empty
(
$params
[
'rent_price'
]))
{
...
...
@@ -836,7 +836,7 @@ class GHouses extends BaseModel
}
else
{
$internal_title
=
$this
->
where
(
'id'
,
$params
[
'id'
])
->
where
(
'status'
,
'<>'
,
3
)
->
value
(
'internal_title'
);
if
(
!
empty
(
$internal_title
))
{
$params
[
'operation_id'
]
=
$params
[
'userI
d'
];
$params
[
'operation_id'
]
=
empty
(
$params
[
'user_id'
])
?
0
:
$params
[
'user_i
d'
];
$params
[
'status'
]
=
1
;
$this
->
allowField
(
true
)
->
isUpdate
(
true
)
->
save
(
$params
,
[
'id'
=>
$params
[
'id'
]
]);
$house_id
=
$this
->
id
;
...
...
application/model/Regions.php
View file @
c46f7703
...
...
@@ -46,6 +46,7 @@ class Regions extends Model
* @return mixed
*/
public
function
getRegionsCodeByName
(
$province
,
$city
=
''
,
$disc
=
''
)
{
$result
=
[];
if
(
$province
)
{
$result
[
'province_code'
]
=
$this
->
where
(
'parentCode'
,
100000
)
->
where
(
'fullName'
,
'LIKE'
,
$province
.
'%'
)
->
value
(
'code'
);
...
...
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