mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 22:10:49 +00:00
Merge branch 'v4.7.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v4.7.0dev
This commit is contained in:
commit
3092bccee8
@ -106,7 +106,7 @@ class StoreBargainUserDao extends BaseDao
|
||||
{
|
||||
return $this->search($where)->with(['getBargain', 'getUser'])
|
||||
->when(isset($where['real_name']) && $where['real_name'] != '', function ($query) use ($where) {
|
||||
$query->where('uid|nickname', 'like', '%' . $where['keyword'] . '%');
|
||||
$query->where('uid', $where['real_name']);
|
||||
})->when($page != 0, function ($query) use ($page, $limit) {
|
||||
$query->page($page, $limit);
|
||||
})->order('add_time desc')->select()->toArray();
|
||||
|
||||
@ -932,7 +932,7 @@ class StoreOrderDao extends BaseDao
|
||||
return $this->search($where)->where('seckill_id', $id)
|
||||
->when($page && $limit, function ($query) use ($page, $limit) {
|
||||
$query->page($page, $limit);
|
||||
})->field(['order_id', 'real_name', 'status', 'pay_price', 'total_num', 'add_time', 'pay_time', 'paid'])->select()->toArray();
|
||||
})->field(['order_id', 'real_name', 'status', 'pay_price', 'total_num', 'add_time', 'pay_time', 'paid'])->order('add_time desc')->select()->toArray();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -951,7 +951,7 @@ class StoreOrderDao extends BaseDao
|
||||
return $this->search($where)->where('bargain_id', $id)
|
||||
->when($page && $limit, function ($query) use ($page, $limit) {
|
||||
$query->page($page, $limit);
|
||||
})->field(['uid', 'order_id', 'real_name', 'status', 'pay_price', 'total_num', 'add_time', 'pay_time', 'paid'])->select()->toArray();
|
||||
})->field(['uid', 'order_id', 'real_name', 'status', 'pay_price', 'total_num', 'add_time', 'pay_time', 'paid'])->order('add_time desc')->select()->toArray();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -996,8 +996,8 @@ class StoreBargainServices extends BaseServices
|
||||
$spread_count = $bargainUserHelp->count(['bargain_id' => $id, 'type' => 0]);
|
||||
$start_count = $bargainUser->count(['bargain_id' => $id]);
|
||||
$success_count = $bargainUser->count(['bargain_id' => $id, 'status' => 3]);
|
||||
$pay_price = $orderServices->sum(['bargain_id' => $id, 'paid' => 1], 'pay_price', true);
|
||||
$pay_count = $orderServices->count(['bargain_id' => $id, 'paid' => 1]);
|
||||
$pay_price = $orderServices->sum([['bargain_id', '=', $id], ['paid', '=', 1], ['refund_type', 'in', [0, 3]], ['is_del', '=', 0]], 'pay_price', false);
|
||||
$pay_count = $orderServices->getDistinctCount([['bargain_id', '=', $id], ['paid', '=', 1], ['refund_type', 'in', [0, 3]], ['is_del', '=', 0]], 'uid', false);
|
||||
$pay_rate = $start_count > 0 ? bcmul(bcdiv((string)$pay_count, (string)$start_count, 2), '100', 2) : 0;
|
||||
return compact('people_count', 'spread_count', 'start_count', 'success_count', 'pay_price', 'pay_count', 'pay_rate');
|
||||
}
|
||||
|
||||
@ -242,6 +242,7 @@ class LiveRoomServices extends BaseServices
|
||||
/**
|
||||
* 同步直播间状态
|
||||
* @return bool
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function syncRoomStatus()
|
||||
{
|
||||
@ -249,7 +250,6 @@ class LiveRoomServices extends BaseServices
|
||||
$limit = 50;
|
||||
$data = $dataAll = [];
|
||||
$rooms = $this->dao->getColumn([], 'id,room_id,live_status', 'room_id');
|
||||
// if (!$rooms) return true;
|
||||
do {
|
||||
$wxRooms = MiniProgramService::getLiveInfo($start, $limit);
|
||||
foreach ($wxRooms as $room) {
|
||||
|
||||
@ -2566,12 +2566,12 @@ HTML;
|
||||
public function autoComment()
|
||||
{
|
||||
//自动评价天数
|
||||
$systemCommentTime = (int)sys_config('system_comment_time', 0);
|
||||
$systemCommentTime = sys_config('system_comment_time', 0);
|
||||
//0为取消自动默认好评功能
|
||||
if ($systemCommentTime == 0) {
|
||||
return true;
|
||||
}
|
||||
$sevenDay = strtotime(date('Y-m-d H:i:s', strtotime('-' . $systemCommentTime . ' day')));
|
||||
$sevenDay = bcsub((string)time(), bcmul((string)$systemCommentTime, '86400'));
|
||||
/** @var StoreOrderStoreOrderStatusServices $service */
|
||||
$service = app()->make(StoreOrderStoreOrderStatusServices::class);
|
||||
$orderList = $service->getTakeOrderIds([
|
||||
@ -2579,7 +2579,7 @@ HTML;
|
||||
'is_del' => 0,
|
||||
'paid' => 1,
|
||||
'status' => 2,
|
||||
'change_type' => ['take_delivery']
|
||||
'change_type' => ['take_delivery','user_take_delivery']
|
||||
], 30);
|
||||
foreach ($orderList as $item) {
|
||||
AutoCommentJob::dispatch([$item['id'], $item['cart_id']]);
|
||||
|
||||
@ -522,12 +522,12 @@ class StoreOrderTakeServices extends BaseServices
|
||||
public function autoTakeOrder()
|
||||
{
|
||||
//7天前时间戳
|
||||
$systemDeliveryTime = (int)sys_config('system_delivery_time', 0);
|
||||
$systemDeliveryTime = sys_config('system_delivery_time', 0);
|
||||
//0为取消自动收货功能
|
||||
if ($systemDeliveryTime == 0) {
|
||||
return true;
|
||||
}
|
||||
$sevenDay = strtotime(date('Y-m-d H:i:s', strtotime('-' . $systemDeliveryTime . ' day')));
|
||||
$sevenDay = bcsub((string)time(), bcmul((string)$systemDeliveryTime, '86400'));
|
||||
/** @var StoreOrderStoreOrderStatusServices $service */
|
||||
$service = app()->make(StoreOrderStoreOrderStatusServices::class);
|
||||
$orderList = $service->getTakeOrderIds([
|
||||
|
||||
@ -26,8 +26,7 @@
|
||||
<Row type="flex" :gutter="24">
|
||||
<Col span="6" v-if="type == 1">
|
||||
<FormItem label="订单状态:" label-for="status">
|
||||
<Select v-model="pagination.status" placeholder="请选择订单状态">
|
||||
<Option value="">全部</Option>
|
||||
<Select v-model="pagination.status" placeholder="请选择订单状态" clearable @on-change="searchList">
|
||||
<Option value="0">未支付</Option>
|
||||
<Option value="1">待发货</Option>
|
||||
<Option value="2">待收货</Option>
|
||||
|
||||
@ -26,8 +26,7 @@
|
||||
<Row type="flex" :gutter="24">
|
||||
<Col span="6" v-if="type == 1">
|
||||
<FormItem label="订单状态:" label-for="status">
|
||||
<Select v-model="pagination.status" placeholder="请选择订单状态">
|
||||
<Option value="">全部</Option>
|
||||
<Select v-model="pagination.status" placeholder="请选择订单状态" clearable @on-change="searchList">
|
||||
<Option value="0">未支付</Option>
|
||||
<Option value="1">待发货</Option>
|
||||
<Option value="2">待收货</Option>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user