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
22afcfb8
Commit
22afcfb8
authored
Aug 16, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
审核消息文案
parent
b9679902
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
12 deletions
+47
-12
PayLogOpenService.php
application/api_broker/service/PayLogOpenService.php
+9
-6
PushMessageService.php
application/api_broker/service/PushMessageService.php
+22
-2
Finance.php
application/index/controller/Finance.php
+6
-2
OfficePayLog.php
application/index/controller/OfficePayLog.php
+6
-2
MPushCheckMessage.php
application/model/MPushCheckMessage.php
+4
-0
No files found.
application/api_broker/service/PayLogOpenService.php
View file @
22afcfb8
...
...
@@ -86,8 +86,9 @@ class PayLogOpenService
$leaderId
=
$verifyService
->
getLeaderIdByAgentId
(
$agent_id
);
if
(
$leaderId
>
0
)
{
$push_service
=
new
PushMessageService
();
$message
=
"有人提交了[
{
$house_address
}
]开业申请,快去审核吧!"
;
$push_service
->
record
(
13
,
0
,
[
$leaderId
],
$operation_id
,
[
'message'
=>
$message
]);
$message_data
[
'message'
]
=
"有人提交了[
{
$house_address
}
]开业申请,快去审核吧!"
;
$message_data
[
'title'
]
=
'开业审核通知'
;
$push_service
->
recordCheck
(
7
,
[
$leaderId
],
$operation_id
,
$message_data
);
}
}
return
$return_id
;
...
...
@@ -126,7 +127,7 @@ class PayLogOpenService
}
}
//todo 推送
$this
->
pushCheck
(
$open_id
,
$status
);
$this
->
pushCheck
(
$open_id
,
$status
,
$operation_id
);
}
}
else
{
$num
=
0
;
...
...
@@ -137,12 +138,13 @@ class PayLogOpenService
/**
* @param $open_id
* @param $status
* @param $operation_id
* @return bool
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
private
function
pushCheck
(
$open_id
,
$status
)
private
function
pushCheck
(
$open_id
,
$status
,
$operation_id
)
{
$push_agent
=
$this
->
payLogOpenModel
->
getFind
(
'house_address,agent_id'
,
$open_id
);
if
(
!
$push_agent
)
{
...
...
@@ -161,10 +163,11 @@ class PayLogOpenService
break
;
default
:
return
false
;
}
$push_service
=
new
PushMessageService
();
$push_service
->
record
(
13
,
0
,
[
$push_agent
[
'agent_id'
]],
0
,
[
'message'
=>
$message
]);
$message_data
[
'message'
]
=
$message
;
$message_data
[
'title'
]
=
'开业审核通知'
;
$push_service
->
recordCheck
(
7
,
[
$push_agent
[
'agent_id'
]],
$operation_id
,
$message_data
);
return
true
;
}
...
...
application/api_broker/service/PushMessageService.php
View file @
22afcfb8
...
...
@@ -16,6 +16,7 @@ use app\model\ABindingDevice;
use
app\model\AStore
;
use
app\model\GHouses
;
use
app\model\GHousesToAgents
;
use
app\model\MPushCheckMessage
;
use
app\model\MPushMessage
;
use
app\model\OrderModel
;
use
app\model\OReportModel
;
...
...
@@ -336,6 +337,23 @@ class PushMessageService
return
$result
;
}
/**
* 记录需要推送的消息
*
* @param $type
* @param $house_id
* @param $agent_id
* @param $operation_id
* @param $data
* @return bool
*/
public
function
recordCheck
(
$type
,
array
$agent_id
,
$operation_id
,
$data
=
[])
{
$m_push
=
new
MPushCheckMessage
();
$result
=
$m_push
->
addAgentIdArray
(
$agent_id
,
$operation_id
,
$type
,
$data
);
return
$result
;
}
/**
* 消息推送
*/
...
...
@@ -573,8 +591,9 @@ class PushMessageService
return
false
;
}
$record_data
[
'title'
]
=
'费用报销审核通知'
;
$record_data
[
'message'
]
=
'['
.
$agent_data
[
'name'
]
.
']提交了费用报销,快去审核吧!'
;
$this
->
record
(
19
,
0
,
[
$district_id_agent
],
$operation_id
,
$record_data
);
$this
->
record
Check
(
5
,
[
$district_id_agent
],
$operation_id
,
$record_data
);
return
true
;
}
...
...
@@ -588,7 +607,7 @@ class PushMessageService
public
function
recordApplyForFeCheck
(
$agent_id
,
$operation_id
)
{
$record_data
[
'message'
]
=
'你有费用报销通过审核通过!'
;
$this
->
record
(
19
,
0
,
[
$agent_id
],
$operation_id
,
$record_data
);
$this
->
record
(
6
,
0
,
[
$agent_id
],
$operation_id
,
$record_data
);
return
true
;
}
}
\ No newline at end of file
application/index/controller/Finance.php
View file @
22afcfb8
...
...
@@ -4909,7 +4909,9 @@ class Finance extends Basic
$house_title
=
$m_order
->
getOrderById
(
'house_id,house_title'
,
$refund_data
[
0
][
'order_id'
]);
$record_data
[
'message'
]
=
'['
.
$house_title
[
'house_title'
]
.
']退款成功'
;
$record_data
[
'order_id'
]
=
$refund_data
[
0
][
'order_id'
];
$push
->
record
(
16
,
$house_title
[
'house_id'
],
[
$refund_data
[
0
][
'agent_id'
]],
$this
->
userId
,
$record_data
);
$record_data
[
'house_id'
]
=
$house_title
[
'house_id'
];
$record_data
[
'title'
]
=
'退款成功-商铺'
;
$push
->
recordCheck
(
3
,
[
$refund_data
[
0
][
'agent_id'
]],
$this
->
userId
,
$record_data
);
}
if
(
$id
>
0
&&
is_array
(
$this
->
params
[
'img_arr'
]))
{
$m_img
=
new
OImg
();
...
...
@@ -4926,7 +4928,9 @@ class Finance extends Basic
$house_title
=
$m_order
->
getOrderById
(
'house_id,house_title'
,
$refund_data
[
0
][
'order_id'
]);
$record_data
[
'message'
]
=
'['
.
$house_title
[
'house_title'
]
.
']退款被驳回,驳回原因:'
.
$save_data
[
'remark'
];
$record_data
[
'order_id'
]
=
$refund_data
[
0
][
'order_id'
];
$push
->
record
(
14
,
$house_title
[
'house_id'
],
[
$refund_data
[
0
][
'agent_id'
]],
$this
->
userId
,
$record_data
);
$record_data
[
'house_id'
]
=
$house_title
[
'house_id'
];
$record_data
[
'title'
]
=
'退款驳回-商铺'
;
$push
->
recordCheck
(
1
,
[
$refund_data
[
0
][
'agent_id'
]],
$this
->
userId
,
$record_data
);
}
if
(
$num
)
{
...
...
application/index/controller/OfficePayLog.php
View file @
22afcfb8
...
...
@@ -2254,7 +2254,9 @@ class OfficePayLog extends Basic
$house_title
=
$m_order
->
getOrderById
(
'house_id,house_title'
,
$refund_data
[
0
][
'order_id'
]);
$record_data
[
'message'
]
=
'['
.
$house_title
[
'house_title'
]
.
']退款成功'
;
$record_data
[
'order_id'
]
=
$refund_data
[
0
][
'order_id'
];
$push
->
record
(
18
,
$house_title
[
'house_id'
],
[
$refund_data
[
0
][
'agent_id'
]],
$this
->
userId
,
$record_data
);
$record_data
[
'house_id'
]
=
$house_title
[
'house_id'
];
$record_data
[
'title'
]
=
'退款成功-办公楼'
;
$push
->
recordCheck
(
4
,
[
$refund_data
[
0
][
'agent_id'
]],
$this
->
userId
,
$record_data
);
}
break
;
case
4
:
...
...
@@ -2267,7 +2269,9 @@ class OfficePayLog extends Basic
$house_title
=
$m_order
->
getOrderById
(
'house_id,house_title'
,
$refund_data
[
0
][
'order_id'
]);
$record_data
[
'message'
]
=
'['
.
$house_title
[
'house_title'
]
.
']退款被驳回,驳回原因:'
.
$save_data
[
'remark'
];
$record_data
[
'order_id'
]
=
$refund_data
[
0
][
'order_id'
];
$push
->
record
(
17
,
$house_title
[
'house_id'
],
[
$refund_data
[
0
][
'agent_id'
]],
$this
->
userId
,
$record_data
);
$record_data
[
'house_id'
]
=
$house_title
[
'house_id'
];
$record_data
[
'title'
]
=
'退款驳回-办公楼'
;
$push
->
recordCheck
(
2
,
[
$refund_data
[
0
][
'agent_id'
]],
$this
->
userId
,
$record_data
);
}
if
(
$num
)
{
...
...
application/model/MPushCheckMessage.php
View file @
22afcfb8
...
...
@@ -133,6 +133,10 @@ class MPushCheckMessage extends BaseModel
$insert_data
[
$k
][
'message'
]
=
$data
[
'message'
];
}
if
(
isset
(
$data
[
'title'
]))
{
$insert_data
[
$k
][
'title'
]
=
$data
[
'title'
];
}
if
(
isset
(
$data
[
'user_id'
]))
{
$insert_data
[
$k
][
'user_id'
]
=
$data
[
'user_id'
];
}
...
...
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