|
|
@@ -28,8 +28,17 @@ class FinanceRepository extends BaseRepository
|
|
28
|
28
|
*/
|
|
29
|
29
|
public function order_overview($mer_id = 0)
|
|
30
|
30
|
{
|
|
|
31
|
+ // 需要过滤掉的用户
|
|
|
32
|
+ /** @var UserRepository $userRepository */
|
|
|
33
|
+ $userRepository = app()->make(UserRepository::class);
|
|
|
34
|
+ $invalidUidList = $userRepository->getInvalidUidList();
|
|
|
35
|
+
|
|
31
|
36
|
if ($mer_id) {
|
|
32
|
37
|
$where = "mer_id = " . $mer_id . " and paid = 1";
|
|
|
38
|
+ if (!empty($invalidUidList)) {
|
|
|
39
|
+ $invalidSqlStr = ' AND uid NOT IN (' . implode(',', $invalidUidList) . ')';
|
|
|
40
|
+ $where .= $invalidSqlStr;
|
|
|
41
|
+ }
|
|
33
|
42
|
$type = input('type', 1);
|
|
34
|
43
|
$day = input('day', '');
|
|
35
|
44
|
|
|
|
@@ -138,8 +147,14 @@ class FinanceRepository extends BaseRepository
|
|
138
|
147
|
$weekWhere .= " and DATE(create_time) >= '" . $oneWeekAgoFormatted . "' and DATE(create_time) <= '" . $todayFormatted . "'";
|
|
139
|
148
|
//今日时间条件
|
|
140
|
149
|
$dayWhere .= " and DATE(create_time) = '" . $todayFormatted . "'";
|
|
141
|
|
-
|
|
142
|
|
-
|
|
|
150
|
+
|
|
|
151
|
+ if (!empty($invalidUidList)) {
|
|
|
152
|
+ $invalidSqlStr = ' AND uid NOT IN (' . implode(',', $invalidUidList) . ')';
|
|
|
153
|
+ $where .= $invalidSqlStr;
|
|
|
154
|
+ $weekWhere .= $invalidSqlStr;
|
|
|
155
|
+ $dayWhere .= $invalidSqlStr;
|
|
|
156
|
+ }
|
|
|
157
|
+
|
|
143
|
158
|
// 会员专区订单总数
|
|
144
|
159
|
//总数
|
|
145
|
160
|
$chengjiaomoney = Db::name('store_order')->where($where)->where('mer_id', 496)->count();
|