优化代码结构,修正语法错误,更新数据逻辑,添加订单记录。
This commit is contained in:
parent
28db13348b
commit
0d2318d86f
@ -29,7 +29,7 @@ class OpurchaseclassofferAllLists extends BaseAdminDataLists implements ListsSea
|
|||||||
public function setSearch(): array
|
public function setSearch(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'=' => ['is_adopt', 'is_storage', 'is_retrieval'],
|
'=' => ['is_adopt', 'is_storage', 'is_stream'],
|
||||||
'between_time' => 'create_time'
|
'between_time' => 'create_time'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -286,7 +286,6 @@ class OpurchaseclassLogic extends BaseLogic
|
|||||||
Db::rollback();
|
Db::rollback();
|
||||||
self::setError('设置成功。但极光推送失败:' . $jg);
|
self::setError('设置成功。但极光推送失败:' . $jg);
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($res) {
|
if ($res) {
|
||||||
|
@ -92,7 +92,11 @@ class SupplierLogic extends BaseLogic
|
|||||||
*/
|
*/
|
||||||
public static function status(array $params): bool
|
public static function status(array $params): bool
|
||||||
{
|
{
|
||||||
$apply_info = Db::name('user_auth_shop')->where('id', $params['apply_id'])->findOrEmpty();
|
$apply_info = Db::name('user_auth_shop')->where('id', $params['apply_id'])->find();
|
||||||
|
if(!$apply_info){
|
||||||
|
self::setError('商户中间数据不存在');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
if ($params['status'] == 1) {
|
if ($params['status'] == 1) {
|
||||||
@ -150,7 +154,7 @@ class SupplierLogic extends BaseLogic
|
|||||||
Supplier::where('id', $params['id'])->update([
|
Supplier::where('id', $params['id'])->update([
|
||||||
'status' => 0,
|
'status' => 0,
|
||||||
]);
|
]);
|
||||||
Db::name('user_auth_shop')->where('id', $params['apply_id'])->update($data);
|
Db::name('user_auth_shop')->where('id', $apply_info['id'])->update($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($apply_info['jg_register_id'])) {
|
if (!empty($apply_info['jg_register_id'])) {
|
||||||
|
@ -121,6 +121,7 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
} else {
|
} else {
|
||||||
PushService::push('store_merchant_' . $order['merchant'], $order['merchant'], ['type' => 'store_merchant', 'msg' => '您有一笔新的订单']);
|
PushService::push('store_merchant_' . $order['merchant'], $order['merchant'], ['type' => 'store_merchant', 'msg' => '您有一笔新的订单']);
|
||||||
Redis::send('push-platform-print', ['order_id' => $order['id']], 60);
|
Redis::send('push-platform-print', ['order_id' => $order['id']], 60);
|
||||||
|
Db::name('order_middle')->insert(['c_order_id' =>$order['id']]);
|
||||||
}
|
}
|
||||||
if (!empty($extra['payer']['openid']) && $order->pay_type != 9) {
|
if (!empty($extra['payer']['openid']) && $order->pay_type != 9) {
|
||||||
Redis::send('push-delivery', ['order_id' => $orderSn, 'openid' => $extra['payer']['openid']], 5);
|
Redis::send('push-delivery', ['order_id' => $orderSn, 'openid' => $extra['payer']['openid']], 5);
|
||||||
@ -135,6 +136,7 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
$order = Opurchaseclass::where('number', $orderSn)->findOrEmpty();
|
$order = Opurchaseclass::where('number', $orderSn)->findOrEmpty();
|
||||||
$order_arr = explode(',', $order['order_arr']);
|
$order_arr = explode(',', $order['order_arr']);
|
||||||
(new FinancialRecord())->where('order_id', 'in', $order_arr)->update(['status' => 1]);
|
(new FinancialRecord())->where('order_id', 'in', $order_arr)->update(['status' => 1]);
|
||||||
|
Db::name('order_middle')->where('c_order_id', 'in', $order_arr)->update(['b_order_id' => $order['id']]);
|
||||||
$time = time();
|
$time = time();
|
||||||
//商户支出流水
|
//商户支出流水
|
||||||
$record[] = [
|
$record[] = [
|
||||||
@ -173,6 +175,7 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
$order = Opurchaseclass::where('number', $orderSn)->findOrEmpty();
|
$order = Opurchaseclass::where('number', $orderSn)->findOrEmpty();
|
||||||
$order_arr = explode(',', $order['order_arr']);
|
$order_arr = explode(',', $order['order_arr']);
|
||||||
(new FinancialRecord())->where('order_id', 'in', $order_arr)->update(['status' => 1]);
|
(new FinancialRecord())->where('order_id', 'in', $order_arr)->update(['status' => 1]);
|
||||||
|
Db::name('order_middle')->where('b_order_id', 'in', $order_arr)->update(['p_order_id' => $order['id']]);
|
||||||
$time = time();
|
$time = time();
|
||||||
//平台支出流水
|
//平台支出流水
|
||||||
$record[] = [
|
$record[] = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user