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
21afaf68
Commit
21afaf68
authored
Jan 29, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商铺列表返回值
parent
cb1eb08f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
GHouses.php
application/model/GHouses.php
+38
-0
No files found.
application/model/GHouses.php
View file @
21afaf68
...
@@ -91,6 +91,8 @@ class GHouses extends BaseModel
...
@@ -91,6 +91,8 @@ class GHouses extends BaseModel
if
(
$v2
[
'type'
]
==
2
)
{
if
(
$v2
[
'type'
]
==
2
)
{
$dish_name
.=
$v2
[
'name'
]
.
','
;
$dish_name
.=
$v2
[
'name'
]
.
','
;
$result
[
$k
][
'dish_name'
]
=
rtrim
(
$dish_name
,
','
);
$result
[
$k
][
'dish_name'
]
=
rtrim
(
$dish_name
,
','
);
}
else
{
$result
[
$k
][
'dish_name'
]
=
''
;
}
}
}
}
}
}
...
@@ -248,4 +250,40 @@ class GHouses extends BaseModel
...
@@ -248,4 +250,40 @@ class GHouses extends BaseModel
$agents
->
addAgents
(
$params
[
'exclusive_ids'
],
$house_id
,
3
);
$agents
->
addAgents
(
$params
[
'exclusive_ids'
],
$house_id
,
3
);
return
$house_id
;
return
$house_id
;
}
}
/**
* 商铺列表独家编辑
*
* @param $data
* @param $house_id
* @return bool
* @throws \Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
exclusive
(
$data
,
$house_id
)
{
$this
->
startTrans
();
$result
=
$this
->
save
([
'is_exclusive_type'
=>
$data
[
'is_exclusive_type'
]],[
'id'
=>
$house_id
]);
if
(
$result
)
{
$ext
=
new
GHousesExt
();
$update_data
[
'agent_start_time'
]
=
$data
[
'agent_start_time'
];
$update_data
[
'agent_end_time'
]
=
$data
[
'agent_end_time'
];
$ext_result
=
$ext
->
save
(
$update_data
,[
'house_id'
=>
$data
[
'houses_id'
]]);
}
if
(
$result
==
1
||
$ext_result
==
1
)
{
$agents
=
new
GHousesToAgents
();
$agents
->
addAgents
(
$data
[
'exclusive_id'
],
$house_id
,
3
);
$this
->
commit
();
$return
=
true
;
}
else
{
$this
->
rollback
();
$return
=
false
;
}
return
$return
;
}
}
}
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