mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 14:01:07 +00:00
Merge branch 'v4.7.0dev' into v5.0.0dev
This commit is contained in:
commit
0129d6222d
@ -182,7 +182,11 @@ class StoreCombination extends AuthController
|
||||
|
||||
/**
|
||||
* 拼团人列表
|
||||
* @param $id
|
||||
* @return mixed
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function order_pink($id)
|
||||
{
|
||||
@ -207,12 +211,20 @@ class StoreCombination extends AuthController
|
||||
* 活动参与人
|
||||
* @param $id
|
||||
* @return mixed
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function combinationStatisticsList($id)
|
||||
{
|
||||
$where = $this->request->getMore([
|
||||
['real_name', '', '', 'keyword'],
|
||||
['status', '']
|
||||
]);
|
||||
$where['cid'] = $id;
|
||||
/** @var StorePinkServices $storePinkServices */
|
||||
$storePinkServices = app()->make(StorePinkServices::class);
|
||||
$list = $storePinkServices->systemPage(['cid' => $id]);
|
||||
$list = $storePinkServices->systemPage($where);
|
||||
return app('json')->success($list);
|
||||
}
|
||||
|
||||
|
||||
@ -56,6 +56,8 @@ class StorePinkDao extends BaseDao
|
||||
{
|
||||
return $this->search($where, false)->when($where['k_id'] != 0, function ($query) use ($where) {
|
||||
$query->whereOr('id', $where['k_id']);
|
||||
})->when(isset($where['keyword']) && $where['keyword'] != '', function ($query) use ($where) {
|
||||
$query->where('uid|nickname', 'like', '%' . $where['keyword'] . '%');
|
||||
})->with('getProduct')->when($page != 0, function ($query) use ($page, $limit) {
|
||||
$query->page($page, $limit);
|
||||
})->order('add_time desc')->select()->toArray();
|
||||
|
||||
@ -968,9 +968,9 @@ class StoreOrderDao extends BaseDao
|
||||
*/
|
||||
public function combinationStatisticsOrder($id, $where, $page = 0, $limit = 0)
|
||||
{
|
||||
return $this->search($where)->where('combination_id', $id)
|
||||
return $this->search($where)->where('combination_id', $id)->where('paid', 1)->whereIn('refund_type', [0, 3])->where('is_del', 0)
|
||||
->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(['uid', 'order_id', 'real_name', 'status', 'pay_price', 'total_num', 'add_time', 'pay_time', 'paid'])->order('add_time desc')->select()->toArray();
|
||||
}
|
||||
}
|
||||
|
||||
@ -644,8 +644,8 @@ class StoreCombinationServices extends BaseServices
|
||||
$spread_count = $pinkServices->getDistinctCount([['cid', '=', $id], ['k_id', '>', 0]], 'uid', false);
|
||||
$start_count = $pinkServices->count(['cid' => $id, 'k_id' => 0]);
|
||||
$success_count = $pinkServices->count(['cid' => $id, 'k_id' => 0, 'status' => 2]);
|
||||
$pay_price = $orderServices->sum(['combination_id' => $id, 'paid' => 1], 'pay_price', true);
|
||||
$pay_count = $orderServices->getDistinctCount([['combination_id', '=', $id], ['paid', '=', 1]], 'uid', false);
|
||||
$pay_price = $orderServices->sum([['combination_id', '=', $id], ['paid', '=', 1], ['refund_type', 'in', [0, 3]], ['is_del', '=', 0]], 'pay_price', false);
|
||||
$pay_count = $orderServices->getDistinctCount([['combination_id', '=', $id], ['paid', '=', 1], ['refund_type', 'in', [0, 3]], ['is_del', '=', 0]], 'uid', false);
|
||||
return compact('people_count', 'spread_count', 'start_count', 'success_count', 'pay_price', 'pay_count');
|
||||
}
|
||||
|
||||
|
||||
@ -56,6 +56,9 @@ class StorePinkServices extends BaseServices
|
||||
/**
|
||||
* @param array $where
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function systemPage(array $where)
|
||||
{
|
||||
|
||||
@ -117,7 +117,7 @@
|
||||
/>
|
||||
</FormItem>
|
||||
</Col>
|
||||
<Col span="24">
|
||||
<!-- <Col span="24">
|
||||
<FormItem label="显示样式:">
|
||||
<RadioGroup v-model="formValidate.screen_type">
|
||||
<Radio :label="item.label" v-for="(item, index) in screen_type" :key="index">
|
||||
@ -125,7 +125,7 @@
|
||||
</Radio>
|
||||
</RadioGroup>
|
||||
</FormItem>
|
||||
</Col>
|
||||
</Col> -->
|
||||
<Col span="24">
|
||||
<FormItem label="直播间类型:">
|
||||
<RadioGroup v-model="formValidate.type">
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
search
|
||||
enter-button
|
||||
v-model="pagination.real_name"
|
||||
placeholder="请输入用户姓名|手机号|UID"
|
||||
:placeholder="type == 1 ? '请输入用户|订单号|UID' : '请输入用户姓名|UID'"
|
||||
@on-search="searchList"
|
||||
/>
|
||||
</FormItem>
|
||||
@ -292,7 +292,7 @@ export default {
|
||||
},
|
||||
{
|
||||
title: '金额',
|
||||
key: 'price',
|
||||
key: 'total_price',
|
||||
},
|
||||
{
|
||||
title: '订单状态',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user