新增门店收款和门店收款金额
This commit is contained in:
parent
b0bda50449
commit
c3e6bdf5d0
@ -55,6 +55,7 @@ class StoreController extends BaseApiController
|
|||||||
'staff_id'=>0,
|
'staff_id'=>0,
|
||||||
'order_id'=>getNewOrderId('CZ'),
|
'order_id'=>getNewOrderId('CZ'),
|
||||||
'price'=>0.01,
|
'price'=>0.01,
|
||||||
|
'recharge_type'=>'wechat_mini'
|
||||||
];
|
];
|
||||||
$order = UserRecharge::create($data);
|
$order = UserRecharge::create($data);
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ use app\common\model\store_order\StoreOrder;
|
|||||||
use app\common\model\store_order_cart_info\StoreOrderCartInfo;
|
use app\common\model\store_order_cart_info\StoreOrderCartInfo;
|
||||||
use app\common\model\store_visit\StoreVisit;
|
use app\common\model\store_visit\StoreVisit;
|
||||||
use app\common\model\system_store\SystemStore;
|
use app\common\model\system_store\SystemStore;
|
||||||
|
use app\common\model\user_recharge\UserRecharge;
|
||||||
use app\common\service\ConfigService;
|
use app\common\service\ConfigService;
|
||||||
use app\common\service\FileService;
|
use app\common\service\FileService;
|
||||||
|
|
||||||
@ -60,6 +61,11 @@ class WorkbenchLogic extends BaseLogic
|
|||||||
$data['verify_amount'] = $orderLogic->storeOrderSumByDate($params['store_id'], $startTime, $endTime, ['shipping_type' => 2]);
|
$data['verify_amount'] = $orderLogic->storeOrderSumByDate($params['store_id'], $startTime, $endTime, ['shipping_type' => 2]);
|
||||||
//门店收益金额
|
//门店收益金额
|
||||||
$data['income_amount'] = $orderLogic->storeOrderSumByDate($params['store_id'], $startTime, $endTime, [], 'profit');
|
$data['income_amount'] = $orderLogic->storeOrderSumByDate($params['store_id'], $startTime, $endTime, [], 'profit');
|
||||||
|
//门店收款金额
|
||||||
|
$data['receipt_amount'] = UserRecharge::where([
|
||||||
|
'store_id'=>$params['store_id'],
|
||||||
|
'paid'=>YesNoEnum::YES
|
||||||
|
])->sum('price');
|
||||||
//门店成交用户数
|
//门店成交用户数
|
||||||
$data['user_number'] = StoreOrder::where('store_id', $params['store_id'])
|
$data['user_number'] = StoreOrder::where('store_id', $params['store_id'])
|
||||||
->where('paid', 1)
|
->where('paid', 1)
|
||||||
@ -82,7 +88,8 @@ class WorkbenchLogic extends BaseLogic
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
$field = 'from_unixtime(pay_time,"%m-%d") as pay_time,sum(pay_price) as pay_price';
|
$field = 'from_unixtime(pay_time,"%m-%d") as pay_time,sum(pay_price) as pay_price';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$group = 'MONTH(pay_time)';
|
$group = 'MONTH(pay_time)';
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$month = 0;
|
$month = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user