短信异常修复
This commit is contained in:
parent
e7e757dbfc
commit
9fe2effc94
|
@ -10,7 +10,7 @@ use support\Log;
|
|||
use support\Redis;
|
||||
|
||||
class Orders {
|
||||
public static function isDaishiyong(OrdersModel $order): bool
|
||||
public static function isDaishiyong(OrdersModel $order): bool
|
||||
{
|
||||
// 根据 OrdersModel::AllOssStatusSql[1] 进行判断
|
||||
// ((os=1 and order_status=3) or (os=2 and order_status=4) or (os=3 and order_status=1))
|
||||
|
@ -23,7 +23,7 @@ class Orders {
|
|||
* @params []OrdersModel $order
|
||||
* @return array
|
||||
*/
|
||||
public static function reminderOrders(OrdersModel ...$orders)
|
||||
public static function reminderOrders(OrdersModel ...$orders)
|
||||
{
|
||||
$admin_ids = [];
|
||||
$sns = [];
|
||||
|
@ -42,6 +42,7 @@ class Orders {
|
|||
$ttl = 86400;
|
||||
$result = [];
|
||||
|
||||
$admins = array_column($admins, null, 'id');
|
||||
foreach($orders as $order) {
|
||||
$admin_mobile = $admins[$order->admin_id] ?? '';
|
||||
|
||||
|
@ -49,6 +50,7 @@ class Orders {
|
|||
$result[$order->sn] = Error::undefined('client mobile or admin mobile invalid');
|
||||
continue;
|
||||
}
|
||||
$admin_mobile = $admin_mobile['mobile'] ?? '';
|
||||
|
||||
if (Blacks::CExists($order->mobile)) {
|
||||
$result[$order->sn] = Error::ERR_SMS_BLACKS;
|
||||
|
@ -75,14 +77,14 @@ class Orders {
|
|||
|
||||
$result[$order->sn] = [];
|
||||
}
|
||||
|
||||
|
||||
return count($orders) > 1 ? $result : reset($result);
|
||||
}
|
||||
|
||||
public static function syncFromThird(OrdersModel $order)
|
||||
{
|
||||
$got = null;
|
||||
|
||||
|
||||
switch ($order->os) {
|
||||
case 1:
|
||||
$mt = new Meituan();
|
||||
|
@ -128,7 +130,7 @@ class Orders {
|
|||
public static function finance($type = 1, $order_id = 0, $price = 0)
|
||||
{
|
||||
//总的关于这个订单的金额
|
||||
$total = FinancesModel::where('order_id', $order_id)->sum('total');
|
||||
$total = FinancesModel::where('order_id', $order_id)->sum('total');
|
||||
//如果总金额大于提交上来的核销金额,那就是退费的
|
||||
//如果提交上来的金额小于总金额,那就是核销的
|
||||
|
||||
|
|
Loading…
Reference in New Issue