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
5a07c181
Commit
5a07c181
authored
Feb 27, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对客户发送短信通知
parent
8ca730ce
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
7 deletions
+66
-7
MessageUntils.php
application/api/untils/MessageUntils.php
+20
-0
OrderLog.php
application/api_broker/controller/OrderLog.php
+27
-0
ImageDepot.php
application/index/controller/ImageDepot.php
+18
-7
Basic.php
application/index/extend/Basic.php
+1
-0
No files found.
application/api/untils/MessageUntils.php
View file @
5a07c181
...
...
@@ -196,4 +196,24 @@ class MessageUntils
return
false
;
}
}
/**
* 对客户发送短信
* @param $phone
* @param string $templd = '226972'
* @return bool
*/
public
function
sendSMSForUser
(
$phone
,
$data
,
$templd
){
if
((
!
$phone
)
or
(
!
$data
)
or
(
!
$templd
)){
return
false
;
}
$message
=
new
MessageUntils
();
$result
=
$message
->
sendCCPSMS
(
$phone
,
$data
,
$templd
);
if
(
$result
[
'statusCode'
]
==
"000000"
)
{
return
true
;
}
else
{
return
false
;
}
}
}
application/api_broker/controller/OrderLog.php
View file @
5a07c181
...
...
@@ -3,6 +3,7 @@
namespace
app\api_broker\controller
;
use
app\api\service\PushClientService
;
use
app\api\untils\MessageUntils
;
use
app\api_broker\extend\Basic
;
use
app\api_broker\service\HouseNumUpdateService
;
use
app\api_broker\service\OrderLogService
;
...
...
@@ -16,6 +17,7 @@ use app\model\OImg;
use
app\model\OMarchInModel
;
use
app\model\OrderModel
;
use
app\model\ORefundModel
;
use
app\model\OReportModel
;
use
think\Exception
;
use
Think\Log
;
...
...
@@ -132,6 +134,9 @@ class OrderLog extends Basic
//评价经纪人
$push_client
=
new
PushClientService
();
$push_client
->
record
((
int
)
$params
[
"report_id"
],
(
int
)
$params
[
"order_id"
],
0
,
''
,
(
int
)
$this
->
agentId
);
//对客户发送短信通知 7151
$this
->
sendSMSForUser
(
$params
[
"reception_name"
],
$params
[
"report_id"
]);
return
$this
->
response
(
"200"
,
"request success"
,
[]);
}
else
{
return
$this
->
response
(
"101"
,
"request faild"
);
...
...
@@ -140,6 +145,28 @@ class OrderLog extends Basic
}
/**
* 对客户发送短信通知
* @param $agent_name
* @param $report_id
* @return bool
*/
public
function
sendSMSForUser
(
$agent_name
,
$report_id
){
$report
=
new
OReportModel
();
$messageUntil
=
new
MessageUntils
();
$user_phone
=
$report
->
getFieldValue
(
'user_phone'
,
[
'id'
=>
$report_id
]);
$data
=
[
$agent_name
];
$result
=
$messageUntil
->
sendSMSForUser
(
$user_phone
,
$data
,
'226972'
);
if
(
$result
==
'true'
)
{
return
true
;
}
else
{
return
false
;
}
}
/**
* 收款
* @return \think\Response
...
...
application/index/controller/ImageDepot.php
View file @
5a07c181
...
...
@@ -2,6 +2,7 @@
namespace
app\index\controller
;
use
app\api\untils\MessageUntils
;
use
app\api_broker\service\VipService
;
use
app\index\extend\Basic
;
use
app\index\service\ImageDepotService
;
...
...
@@ -9,6 +10,7 @@ use app\index\service\UserService;
use
app\model\AAgents
;
use
app\model\GBusinessDistrict
;
use
app\model\GImageDepot
;
use
app\model\OReportModel
;
use
think\Cache
;
use
think\Log
;
...
...
@@ -178,13 +180,22 @@ class ImageDepot extends Basic
public
function
ceshi
()
{
$arr
=
array
(
'1'
,
'2'
,
'3'
);
$result
=
array_shift
(
$arr
);
dump
(
$result
);
dump
(
$arr
);
dump
(
count
(
$arr
));
dump
(
array_sum
(
$arr
));
$agent_id
=
0
;
$report_id
=
0
;
$agent_name
=
0
;
$report
=
new
OReportModel
();
$messageUntil
=
new
MessageUntils
();
$user_phone
=
$report
->
getFieldValue
(
'user_phone'
,
[
'id'
=>
$report_id
]);
$data
=
[
$agent_name
];
$result
=
$messageUntil
->
sendSMSForUser
(
$user_phone
,
$data
,
'226972'
);
if
(
$result
==
'true'
)
{
return
$this
->
response
(
"200"
,
"短信发送成功"
,
$result
);
}
else
{
return
$this
->
response
(
"101"
,
$result
);
}
}
...
...
application/index/extend/Basic.php
View file @
5a07c181
...
...
@@ -79,6 +79,7 @@ class Basic extends Controller
'index/userModalList'
,
'index/mainIndex'
,
'index/uploadImg'
,
'index/ceshi'
,
'index/uploadEditor'
);
...
...
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