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
12b19af2
Commit
12b19af2
authored
Sep 02, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消息
parent
efd4b380
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
4 deletions
+48
-4
PushMessageService.php
application/api_broker/service/PushMessageService.php
+38
-0
AmercementService.php
application/index/service/AmercementService.php
+9
-3
OAmercementModel.php
application/model/OAmercementModel.php
+1
-1
No files found.
application/api_broker/service/PushMessageService.php
View file @
12b19af2
...
...
@@ -634,4 +634,41 @@ class PushMessageService
$m_push
->
updateData
(
$update_data
,
[
'id'
=>
[
'in'
,
$id_array
]]);
}
}
/**
* 新增处罚 推送
*
* @param $agent_id
* @param $id
* @param $operation_id
* @return bool
*/
public
function
pushAmercementMessage
(
$agent_id
,
$id
,
$operation_id
)
{
if
(
empty
(
$agent_id
))
{
return
false
;
}
$agent_id_arr
[]
=
$agent_id
;
$record_data
[
'message'
]
=
'您有一笔罚款需要支付,罚款编号:'
.
$id
;
$record_data
[
'title'
]
=
'新增处罚'
;
$s_redis
=
new
RedisCacheService
();
$agent_data
=
$s_redis
->
getRedisCache
(
2
,
$agent_id
);
if
(
!
empty
(
$agent_data
))
{
$m_agent
=
new
AAgents
();
$where
[
'store_id'
]
=
$agent_data
[
'store_id'
];
$where
[
'level'
]
=
[
'in'
,
'20,40'
];
$where
[
'status'
]
=
0
;
$store_agent_id
=
$m_agent
->
getFieldOneValue
(
'id'
,
$where
);
if
(
$store_agent_id
)
{
$agent_id_arr
[]
=
$store_agent_id
;
}
}
$this
->
recordCheck
(
6
,
$agent_id_arr
,
$operation_id
,
$record_data
);
return
true
;
}
}
\ No newline at end of file
application/index/service/AmercementService.php
View file @
12b19af2
...
...
@@ -10,6 +10,7 @@
namespace
app\index\service
;
use
app\api_broker\service\PushMessageService
;
use
app\model\OAmercementImgModel
;
use
app\model\OAmercementModel
;
...
...
@@ -26,8 +27,10 @@ class AmercementService
/**
* 新增
*
* @param $params
* @return bool
* @param $submit_agent_id
* @return int|string
*/
public
function
addAmercement
(
$params
,
$submit_agent_id
)
{
...
...
@@ -37,8 +40,11 @@ class AmercementService
$params_
[
'submit_agent_id'
]
=
$submit_agent_id
;
//提交人
$params_
[
'agent_id'
]
=
$params
[
'agent_id'
];
//被罚款人
$params_
[
'remarks'
]
=
$params
[
'remarks'
];
//备注
$res
=
$this
->
m_amercement
->
saveAmercement
(
$params_
);
return
$res
;
$id
=
$this
->
m_amercement
->
saveAmercement
(
$params_
);
$push
=
new
PushMessageService
();
$push
->
pushAmercementMessage
(
$params
[
'agent_id'
],
$id
,
$submit_agent_id
);
//推送
return
$id
;
}
/**
...
...
application/model/OAmercementModel.php
View file @
12b19af2
...
...
@@ -22,7 +22,7 @@ class OAmercementModel extends Model
$data
[
'create_time'
]
=
$time
;
$data
[
'update_time'
]
=
$time
;
$data
[
'is_del'
]
=
0
;
return
$this
->
db_
->
insertGetId
(
$data
);
return
$this
->
db_
->
insertGetId
(
$data
);
}
}
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