|
@@ -172,12 +172,11 @@ class Chuyutimedtask extends Api
|
|
|
// $ids[] = $row['id'];
|
|
|
// }
|
|
|
|
|
|
-
|
|
|
+ //SMS_262525727、亲爱的“餐厨宝”会员,您的${name}账单已发送至您的微信小程序支付界面,请您尽快前往确认并支付,感谢您的支持!
|
|
|
$TemplateCode = "SMS_262525727";
|
|
|
foreach ($recovery_bill as $k => $row) {
|
|
|
$phoneNumber = $row['mobile'];
|
|
|
- $code = "786324";
|
|
|
- $TemplateParam = json_encode(['code' => $code]);
|
|
|
+ $TemplateParam = json_encode(['name' => $row['order_no']]);
|
|
|
$is_success = $this->SmsTemplate($TemplateCode, $phoneNumber, $TemplateParam);
|
|
|
|
|
|
if ($is_success) {
|
|
@@ -221,11 +220,10 @@ class Chuyutimedtask extends Api
|
|
|
// $template = 1;
|
|
|
// $ret = Smslib::notice($mobiles, $msg, $template);
|
|
|
|
|
|
- $TemplateCode = "SMS_250740130";
|
|
|
+ $TemplateCode = "SMS_262525727";
|
|
|
foreach ($tableware_bill as $k => $row) {
|
|
|
$phoneNumber = $row['mobile'];
|
|
|
- $code = "786324";
|
|
|
- $TemplateParam = json_encode(['code' => $code]);
|
|
|
+ $TemplateParam = json_encode(['name' => $row['order_no']]);
|
|
|
$is_success = $this->SmsTemplate($TemplateCode, $phoneNumber, $TemplateParam);
|
|
|
|
|
|
if ($is_success) {
|
|
@@ -244,7 +242,6 @@ class Chuyutimedtask extends Api
|
|
|
echo(__('发送成功'));
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
@@ -308,4 +305,40 @@ class Chuyutimedtask extends Api
|
|
|
|
|
|
$this->success('ok');
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 积分过期提醒
|
|
|
+ */
|
|
|
+ public function ScoreOverdue()
|
|
|
+ {
|
|
|
+ $score_overdue_date = config('site.score_overdue_date');
|
|
|
+ if (empty($score_overdue_date)) {
|
|
|
+ $this->success('score_overdue_date is null!');
|
|
|
+ }
|
|
|
+ $score_overdue_int = strtotime($score_overdue_date); // 函数将日期转换为时间戳;
|
|
|
+ $overdue_date = date('m-d', $score_overdue_int);
|
|
|
+ // today
|
|
|
+ $now_date = date('m-d', time());
|
|
|
+
|
|
|
+ if ($overdue_date != $now_date) {
|
|
|
+ $this->success('not overdue date!');
|
|
|
+ }
|
|
|
+
|
|
|
+ $user_model = new User();
|
|
|
+ $users = $user_model->field('id,score,mobile')->where('score', '>', 0)->select();
|
|
|
+
|
|
|
+ if (count($users) == 0) {
|
|
|
+ $this->success('无操作数据');
|
|
|
+ }
|
|
|
+
|
|
|
+ // SMS_262585705、亲爱的会员,您的账户剩余${number}积分快到期了,您可以进入“餐厨宝”商城使用您的积分,感谢您的支持!
|
|
|
+ $TemplateCode = "SMS_262585705";
|
|
|
+ foreach ($users as $v) {
|
|
|
+ $phoneNumber = $v['mobile'];
|
|
|
+ $TemplateParam = json_encode(['number' => $v['score']]);
|
|
|
+ $this->SmsTemplate($TemplateCode, $phoneNumber, $TemplateParam);
|
|
|
+ }
|
|
|
+
|
|
|
+ $this->success('ok');
|
|
|
+ }
|
|
|
}
|