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
bf222dae
Commit
bf222dae
authored
Oct 30, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
推送
parent
a8da17ee
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
10 deletions
+15
-10
Report.php
application/api_broker/controller/Report.php
+2
-1
PushMessageService.php
application/api_broker/service/PushMessageService.php
+9
-7
OReportModel.php
application/model/OReportModel.php
+4
-2
No files found.
application/api_broker/controller/Report.php
View file @
bf222dae
...
...
@@ -83,7 +83,8 @@ class Report extends Basic
/*记录推送*/
$push
=
new
PushMessageService
();
$house_ids_arr
=
explode
(
','
,
$house_ids
);
if
(
is_array
(
$house_ids
))
{
if
(
is_array
(
$house_ids_arr
))
{
foreach
(
$house_ids_arr
as
$k
=>
$v
)
{
$push
->
pushReportMessage
(
$v
,
$agent_id
,
1
,
$this
->
agentId
);
//推送报备信息
}
...
...
application/api_broker/service/PushMessageService.php
View file @
bf222dae
...
...
@@ -51,18 +51,20 @@ class PushMessageService
$data
=
$house_agent
->
getHousesAgents
(
$house_id
,
'b.id'
,
[
'type'
=>
$type
]);
$agent_name
=
$agent
->
getAgentsStoreById
([
'a.id'
=>
$agent_id
],
'name,store_name'
);
$house_data
=
$house
->
getHouseDetail
(
'internal_title'
,
[
'id'
=>
$house_id
]);
$order_id
=
$m_report
->
getReportOrder
(
'b.order_id'
,[
'a.report_agent_id'
=>
$agent_id
]);
$order_id
=
$m_report
->
getReportOrder
(
'b.id'
,[
'a.report_agent_id'
=>
$agent_id
]);
foreach
(
$data
as
$k
=>
$v
)
{
$content
=
"【
{
$agent_name
[
'store_name'
]
}
】店【
{
$agent_name
[
'name'
]
}
】约带看【
{
$house_data
[
'internal_title'
]
}
】商铺"
;
// $this->pushAgentAllDeviceId($v['id'], '报备', $content);
$
data
[
'content
'
]
=
$content
;
$
data
[
'order_id'
]
=
$order_id
;
$
data
[
'house_id'
]
=
$house_id
;
$this
->
record
(
6
,
0
,
$agent_id
,
$operation_id
,
$data
);
$
save
[
'message
'
]
=
$content
;
$
save
[
'order_id'
]
=
$order_id
[
'id'
]
;
$
save
[
'house_id'
]
=
$house_id
;
$this
->
record
(
6
,
0
,
[
$agent_id
],
$operation_id
,
$save
);
}
$result
=
true
;
}
catch
(
\Exception
$e
)
{
$result
=
false
;
var_dump
(
$e
->
getMessage
());
die
;
}
return
$result
;
...
...
@@ -361,13 +363,13 @@ class PushMessageService
$title
=
'收款'
;
$type
=
'timer_shaft'
;
break
;
case
6
:
case
7
:
$title
=
'报备'
;
$type
=
'timer_shaft'
;
break
;
}
$this
->
pushAgentAllDeviceId
(
$v
[
'addressee_id'
],
$title
,
$v
[
'message'
],
$type
,
$id
,
$is_forbidden
);
$this
->
pushAgentAllDeviceId
(
$v
[
'addressee_id'
],
$title
,
$v
[
'message'
],
$type
,
$id
,
$is_forbidden
,
$v
[
'house_id'
],
$v
[
'order_id'
]
);
$update_data
[
'status'
]
=
1
;
$update_data
[
'send_time'
]
=
date
(
'Y-m-d H:i:s'
);
...
...
application/model/OReportModel.php
View file @
bf222dae
...
...
@@ -724,17 +724,19 @@ class OReportModel extends Model
*
* @param $field
* @param $where
* @param string $order
* @return array|false|\PDOStatement|string|Model
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getReportOrder
(
$field
,
$where
)
public
function
getReportOrder
(
$field
,
$where
,
$order
=
'id desc'
)
{
return
$this
->
field
(
$field
)
return
$this
->
db
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'o_order b'
,
'b.f_id=a.id'
,
'left'
)
->
where
(
$where
)
->
order
(
$order
)
->
find
();
}
...
...
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