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
7a5286e5
Commit
7a5286e5
authored
Feb 12, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
阿里大于回调接口
parent
da49e5ec
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
51 additions
and
3 deletions
+51
-3
config.php
application/api_broker/config.php
+2
-1
MsgDemo.php
application/api_broker/untils/MsgDemo.php
+0
-1
SecretReport.php
application/model/SecretReport.php
+12
-0
route.php
application/route.php
+2
-1
config.php
application/task/config.php
+1
-0
PrivacyNumber.php
application/task/controller/PrivacyNumber.php
+34
-0
No files found.
application/api_broker/config.php
View file @
7a5286e5
<?php
<?php
//配置文件
//配置文件
error_reporting
(
E_ERROR
|
E_PARSE
);
error_reporting
(
E_ERROR
|
E_PARSE
);
define
(
'_MESSAGE_TYPE'
,
'SecretReport'
);
define
(
'_QUEUE_NAME'
,
'Alicom-Queue-1186048444498461-SecretReport'
);
return
[
return
[
'jwt_key'
=>
'tonglian+123'
,
'jwt_key'
=>
'tonglian+123'
,
// 应用模式状态
// 应用模式状态
...
...
application/api_broker/untils/MsgDemo.php
View file @
7a5286e5
...
@@ -83,7 +83,6 @@ class MsgDemo
...
@@ -83,7 +83,6 @@ class MsgDemo
{
{
// 当回调返回真值时,删除已接收的信息
// 当回调返回真值时,删除已接收的信息
$receiptHandle
=
$res
->
getReceiptHandle
();
$receiptHandle
=
$res
->
getReceiptHandle
();
dump
(
$receiptHandle
);
die
;
$queue
->
deleteMessage
(
$receiptHandle
);
$queue
->
deleteMessage
(
$receiptHandle
);
}
}
}
}
...
...
application/model/SecretReport.php
0 → 100644
View file @
7a5286e5
<?php
namespace
app\model
;
use
think\Model
;
class
SecretReport
extends
Model
{
// 设置当前模型对应的完整数据表名称
protected
$table
=
'aliyun_secret_report'
;
}
application/route.php
View file @
7a5286e5
...
@@ -207,7 +207,8 @@ Route::group('api', [
...
@@ -207,7 +207,8 @@ Route::group('api', [
]);
]);
Route
::
group
(
'task'
,[
Route
::
group
(
'task'
,[
'exclusiveExpirationTime'
=>
[
'task/exclusive/exclusiveExpirationTime'
,
[
'method'
=>
'get'
]]
//独家过期时间
'exclusiveExpirationTime'
=>
[
'task/exclusive/exclusiveExpirationTime'
,
[
'method'
=>
'get'
]],
//独家过期时间
'addReport'
=>
[
'task/PrivacyNumber/addReport'
,
[
'method'
=>
'get|post'
]]
//阿里大于隐私号码回调
]);
]);
Route
::
group
(
'broker'
,
[
Route
::
group
(
'broker'
,
[
...
...
application/task/config.php
View file @
7a5286e5
<?php
<?php
error_reporting
(
E_ERROR
|
E_PARSE
);
//配置文件
//配置文件
return
[
return
[
...
...
application/task/controller/PrivacyNumber.php
0 → 100644
View file @
7a5286e5
<?php
/**
* Created by PhpStorm.
* User: fuju
* Date: 2018/2/12
* Time: 10:24
*/
namespace
app\task\controller
;
use
app\model\AliyunSecretReport
;
use
app\model\SecretReport
;
use
think\Db
;
use
think\Log
;
use
think\Request
;
class
PrivacyNumber
{
/**
* 阿里大于隐私号码回调处理
*
* @return string
*/
public
function
addReport
()
{
$post_data
=
Request
::
instance
()
->
param
();
$report
=
new
SecretReport
();
$post_data
[
0
][
'report_id'
]
=
$post_data
[
0
][
'id'
];
unset
(
$post_data
[
0
][
'id'
]);
$report
->
allowField
(
true
)
->
save
(
$post_data
[
0
]);
Log
::
write
(
serialize
(
$post_data
[
0
]),
'AliyunSecretReport'
);
//记录日志
return
json_encode
([
'code'
=>
0
,
'msg'
=>
'接收成功'
]);
}
}
\ No newline at end of file
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