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
fb8a933e
Commit
fb8a933e
authored
Apr 12, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改报备推送
parent
daae17f7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
12 deletions
+51
-12
PushMessageService.php
application/api_broker/service/PushMessageService.php
+42
-0
ReportService.php
application/api_broker/service/ReportService.php
+3
-10
edit.html
application/index/view/houses/edit.html
+4
-1
GHousesToAgents.php
application/model/GHousesToAgents.php
+2
-1
No files found.
application/api_broker/service/PushMessageService.php
0 → 100644
View file @
fb8a933e
<?php
/**
* Created by PhpStorm.
* User: fuju
* Date: 2018/4/12
* Time: 15:19
*/
namespace
app\api_broker\service
;
use
app\api\untils\GeTuiUntils
;
use
app\model\GHousesToAgents
;
class
PushMessageService
{
private
$push
;
public
function
__construct
()
{
$this
->
push
=
new
GeTuiUntils
();
}
/**
* @param $house_id
* @param int $type
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
pushReportMessage
(
$house_id
,
$type
=
1
)
{
$house
=
new
GHousesToAgents
();
$ge_tui
=
new
GeTuiUntils
();
$data
=
$house
->
getAgentList
(
$house_id
,
$type
);
foreach
(
$data
as
$k
=>
$v
)
{
$content
=
"【
{
$v
[
'store_name'
]
}
】店【
{
$v
[
'name'
]
}
】约带看【
{
$v
[
'internal_title'
]
}
】商铺"
;
$ge_tui
->
public_push_message_for_one
(
$v
[
'id'
],
$v
[
'device_id'
],
'报备'
,
$content
);
}
return
;
}
}
\ No newline at end of file
application/api_broker/service/ReportService.php
View file @
fb8a933e
...
...
@@ -78,24 +78,17 @@ class ReportService
if
(
$id
>
0
)
{
$house_arr
=
explode
(
","
,
$house_ids
);
$order_arr
=
[];
$agent
=
new
GHousesToAgents
();
$
ge_tui
=
new
GeTuiUntils
();
$
push
=
new
PushMessageService
();
foreach
(
$house_arr
as
$k
=>
$v
)
{
//todo 批量插入到数据库
$order_no
=
$this
->
createOrderNumber
();
array_push
(
$order_arr
,
$this
->
orderBin
(
$order_no
,
$id
,
$v
));
$device_id
=
$agent
->
getAgentList
(
$v
);
foreach
(
$device_id
as
$k
=>
$v
)
{
$content
=
"【
{
$v
[
'store_name'
]
}
】店【
{
$agent_name
}
】约带看【
{
$order_arr
[
'house_title'
]
}
】商铺"
;
$ge_tui
->
public_push_message_for_one
(
$v
[
'id'
],
$v
[
'device_id'
],
'报备'
,
$content
);
}
$push
->
pushReportMessage
(
$v
);
//推送报备信息
}
//todo 保存order表
return
$this
->
orderModel
->
insertOrderByAll
(
$order_arr
);
}
}
/**
...
...
application/index/view/houses/edit.html
View file @
fb8a933e
...
...
@@ -382,7 +382,10 @@
<li
class=
"list-group-item"
>
<label
for=
""
>
商铺标签(可多选)
</label>
<label
class=
"checkbox-inline"
>
<input
type=
"checkbox"
class=
"roomTag"
id=
""
value=
"临近地铁"
name=
"shangpu_tags[]"
>
临近地铁
<input
type=
"checkbox"
class=
"roomTag"
id=
""
value=
"购物广场"
name=
"shangpu_tags[]"
>
购物广场
</label>
<label
class=
"checkbox-inline"
>
<input
type=
"checkbox"
class=
"roomTag"
id=
""
value=
"临近地铁"
name=
"shangpu_tags[]"
>
临近地铁
</label>
<label
class=
"checkbox-inline"
>
<input
type=
"checkbox"
class=
"roomTag"
id=
""
value=
"临街旺铺"
name=
"shangpu_tags[]"
>
临街旺铺
...
...
application/model/GHousesToAgents.php
View file @
fb8a933e
...
...
@@ -196,10 +196,11 @@ class GHousesToAgents extends BaseModel
* @throws \think\exception\DbException
*/
public
function
getAgentList
(
$house_id
,
$type
=
1
)
{
return
$this
->
field
(
'b.id,device_id,store_name'
)
return
$this
->
field
(
'b.id,device_id,store_name
,d.internal_title,b.name
'
)
->
alias
(
'a'
)
->
join
(
'a_agents b'
,
'a.agents_id = b.id'
,
'left'
)
->
join
(
'a_store c'
,
'b.store_id = c.id'
,
'left'
)
->
join
(
'g_houses d'
,
'd.id = a.houses_id'
,
'left'
)
->
where
(
'houses_id'
,
$house_id
)
->
where
(
'type'
,
$type
)
->
select
();
...
...
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