feat(financial_record): 更新财务流水模型及支付通知逻辑
This commit is contained in:
parent
8d36627826
commit
e543fc4f52
@ -8,7 +8,6 @@ use app\common\enum\OrderEnum;
|
|||||||
use app\common\enum\PayEnum;
|
use app\common\enum\PayEnum;
|
||||||
use app\common\model\store_finance_flow\StoreFinanceFlow;
|
use app\common\model\store_finance_flow\StoreFinanceFlow;
|
||||||
use app\common\lists\ListsSearchInterface;
|
use app\common\lists\ListsSearchInterface;
|
||||||
use app\common\model\financial_record\FinancialRecord;
|
|
||||||
use app\common\model\system_store\SystemStoreStaff;
|
use app\common\model\system_store\SystemStoreStaff;
|
||||||
use app\common\model\user\User;
|
use app\common\model\user\User;
|
||||||
|
|
||||||
@ -46,7 +45,7 @@ class StoreFinanceFlowLists extends BaseAdminDataLists implements ListsSearchInt
|
|||||||
*/
|
*/
|
||||||
public function lists(): array
|
public function lists(): array
|
||||||
{
|
{
|
||||||
return FinancialRecord::where($this->searchWhere)
|
return StoreFinanceFlow::where($this->searchWhere)
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()->each(function ($item) {
|
->select()->each(function ($item) {
|
||||||
|
@ -4,17 +4,9 @@ namespace app\common\logic;
|
|||||||
|
|
||||||
use app\common\enum\OrderEnum;
|
use app\common\enum\OrderEnum;
|
||||||
use app\common\enum\PayEnum;
|
use app\common\enum\PayEnum;
|
||||||
use app\common\enum\user\AccountLogEnum;
|
|
||||||
use app\common\model\operation\Opurchaseclass;
|
|
||||||
use app\common\model\order\Cart;
|
|
||||||
use app\common\model\financial_record\FinancialRecord;
|
|
||||||
use app\common\model\recharge\RechargeOrder;
|
|
||||||
use app\common\model\retail\Cashierclass;
|
|
||||||
use app\common\model\store_finance_flow\StoreFinanceFlow;
|
use app\common\model\store_finance_flow\StoreFinanceFlow;
|
||||||
use app\common\model\store_order\StoreOrder;
|
use app\common\model\store_order\StoreOrder;
|
||||||
use app\common\model\user\User;
|
|
||||||
use app\common\service\PushService;
|
use app\common\service\PushService;
|
||||||
use app\common\service\wechat\WeChatMnpService;
|
|
||||||
use support\Log;
|
use support\Log;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
use Webman\RedisQueue\Redis;
|
use Webman\RedisQueue\Redis;
|
||||||
@ -107,7 +99,7 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
'store_id' => $order['store_id'],
|
'store_id' => $order['store_id'],
|
||||||
'staff_id' => $order['staff_id'],
|
'staff_id' => $order['staff_id'],
|
||||||
];
|
];
|
||||||
(new FinancialRecord())->saveAll($record);
|
(new StoreFinanceFlow())->saveAll($record);
|
||||||
|
|
||||||
|
|
||||||
if ($order->pay_type == 9) {
|
if ($order->pay_type == 9) {
|
||||||
@ -151,7 +143,7 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
'store_id' => $order['store_id'],
|
'store_id' => $order['store_id'],
|
||||||
'staff_id' => $order['staff_id'],
|
'staff_id' => $order['staff_id'],
|
||||||
];
|
];
|
||||||
(new FinancialRecord())->saveAll($record);
|
(new StoreFinanceFlow())->saveAll($record);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -211,7 +203,7 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
'type' => OrderEnum::MERCHANT,
|
'type' => OrderEnum::MERCHANT,
|
||||||
'mer_id' => $order['merchant'],
|
'mer_id' => $order['merchant'],
|
||||||
];
|
];
|
||||||
(new FinancialRecord())->saveAll($record);
|
(new StoreFinanceFlow())->saveAll($record);
|
||||||
|
|
||||||
|
|
||||||
if ($order->pay_type == 9) {
|
if ($order->pay_type == 9) {
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace app\common\model\financial_record;
|
|
||||||
|
|
||||||
|
|
||||||
use app\common\model\BaseModel;
|
|
||||||
use think\model\concern\SoftDelete;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 财务流水模型
|
|
||||||
* Class FinancialRecord
|
|
||||||
* @package app\common\model\financial_record
|
|
||||||
*/
|
|
||||||
class FinancialRecord extends BaseModel
|
|
||||||
{
|
|
||||||
use SoftDelete;
|
|
||||||
protected $name = 'financial_record';
|
|
||||||
protected $deleteTime = 'delete_time';
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user