日志修改
This commit is contained in:
@@ -38,12 +38,12 @@ class ApplySmsTemp extends Command
|
||||
*/
|
||||
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||
{
|
||||
$str = '亲爱的${用户昵称}您好,${店铺名称}祝您生日快乐!感谢您一直的陪伴。为您准备了${数量}张超值优惠券,已放入账户,愿我们的礼物能为您增添一份喜悦。拒收请回复R';
|
||||
$templateContent_arr = ShopInfo::handleSmsTemplates($str);
|
||||
$a = '{"店铺名称":"火锅店","用户昵称":"嘿嘿","数量":"123"}';
|
||||
p(replace_json_keys($a, json_encode($templateContent_arr, 256), []));
|
||||
$t_str = replace_placeholder_keys($str, $templateContent_arr);
|
||||
p($templateContent_arr, $t_str);
|
||||
// $str = '亲爱的${用户昵称}您好,${店铺名称}祝您生日快乐!感谢您一直的陪伴。为您准备了${数量}张超值优惠券,已放入账户,愿我们的礼物能为您增添一份喜悦。拒收请回复R';
|
||||
// $templateContent_arr = ShopInfo::handleSmsTemplates($str);
|
||||
// $a = '{"店铺名称":"火锅店","用户昵称":"嘿嘿","数量":"123"}';
|
||||
// p(replace_json_keys($a, json_encode($templateContent_arr, 256), []));
|
||||
// $t_str = replace_placeholder_keys($str, $templateContent_arr);
|
||||
// p($templateContent_arr, $t_str);
|
||||
|
||||
|
||||
$host = RabbitMqConfig::$host;
|
||||
|
||||
@@ -37,7 +37,7 @@ class QuerySmsStatus extends Command
|
||||
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||
{
|
||||
// 生日有礼
|
||||
$bir_list = Db::table('mk_birthday_gift_record')->where(['status' => 'await_push'])->select()->toArray();
|
||||
$bir_list = Db::table('mk_birthday_gift_record')->where(['push_status' => 'await_push'])->select()->toArray();
|
||||
if($bir_list) {
|
||||
Log::info('生日有礼短信发送状态查询开始->' . json_encode($bir_list));
|
||||
foreach ($bir_list as $k => $value) {
|
||||
@@ -86,21 +86,22 @@ class QuerySmsStatus extends Command
|
||||
Log::info('营销短信发送状态查询开始->' . json_encode($bir_list));
|
||||
foreach ($bir_list as $k => $value) {
|
||||
$data = [
|
||||
'PhoneNumber' => $value['user_phone'],
|
||||
'BizId' => $value['biz_id'],
|
||||
'SendDate' => date('Ymd'),
|
||||
'PageSize' => 1,
|
||||
'CurrentPage' => 20,
|
||||
'bizId' => $value['biz_id'],
|
||||
'phoneNumber' => $value['user_phone'],
|
||||
'sendDate' => date('Ymd'),
|
||||
'pageSize' => 10,
|
||||
'currentPage' => 1,
|
||||
];
|
||||
Log::info('12312312312312' . json_encode($data));
|
||||
$res = AlibabaSms::QuerySendDetails($data);
|
||||
try {
|
||||
Db::startTrans();
|
||||
if($res['Code'] == 'OK') {
|
||||
$push_resp = $res['ErrCode'];
|
||||
$push_resp = $res['SmsSendDetailDTOs']['SmsSendDetailDTO'][0]['ErrCode'];
|
||||
if($res['SmsSendDetailDTOs']['SmsSendDetailDTO'][0]['SendStatus'] == 3) {
|
||||
$push_status = 2;
|
||||
// 扣掉余额
|
||||
ShopInfo::moeny(config('cons.sms_price'), $value['main_shop_id'], 2, );
|
||||
ShopInfo::moeny(config('cons.sms_price'), $value['main_shop_id'], 2);
|
||||
}elseif ($res['SmsSendDetailDTOs']['SmsSendDetailDTO'][0]['SendStatus'] == 2) {
|
||||
$push_status = -1;
|
||||
}elseif ($res['SmsSendDetailDTOs']['SmsSendDetailDTO'][0]['SendStatus'] == 1) {
|
||||
|
||||
Reference in New Issue
Block a user