合并代码
This commit is contained in:
commit
4e2bb8eb89
|
|
@ -1577,8 +1577,8 @@ class User extends Base
|
||||||
IFNULL(sum(price),0) money_1,
|
IFNULL(sum(price),0) money_1,
|
||||||
IFNULL(sum(use_money),0) money_2,
|
IFNULL(sum(use_money),0) money_2,
|
||||||
IFNULL(sum(price)+SUM(use_money),0) use_money,
|
IFNULL(sum(price)+SUM(use_money),0) use_money,
|
||||||
(select IFNULL(sum(goodslist_money),0) sc_money from order_list where user_id=o.user_id and status=2 {$whereUser2}) fh_money,
|
(select IFNULL(sum(goodslist_money),0) sc_money from order_list where user_id=o.user_id and status=2 and goodslist_type<3 {$whereUser2}) fh_money,
|
||||||
(select IFNULL(sum(goodslist_money),0) sc_money from order_list where user_id=o.user_id and status=0 {$whereUser3}) bb_money,
|
(select IFNULL(sum(goodslist_money),0) sc_money from order_list where user_id=o.user_id and status=0 and goodslist_type<3 {$whereUser3}) bb_money,
|
||||||
(TRUNCATE(u.money2/100, 2)) money2,
|
(TRUNCATE(u.money2/100, 2)) money2,
|
||||||
(TRUNCATE(IFNULL((SELECT money FROM profit_money2 where user_id=o.user_id {$whereUser1} order by id desc LIMIT 1),0)/100, 2)) sy_money
|
(TRUNCATE(IFNULL((SELECT money FROM profit_money2 where user_id=o.user_id {$whereUser1} order by id desc LIMIT 1),0)/100, 2)) sy_money
|
||||||
FROM `order` o LEFT join `user` u ON o.user_id=u.id where {$whereUser} group by o.user_id ) t where use_money>0
|
FROM `order` o LEFT join `user` u ON o.user_id=u.id where {$whereUser} group by o.user_id ) t where use_money>0
|
||||||
|
|
@ -1654,7 +1654,7 @@ class User extends Base
|
||||||
$whereUser .= " and o.addtime > {$start_time} and o.addtime < {$end_time}";
|
$whereUser .= " and o.addtime > {$start_time} and o.addtime < {$end_time}";
|
||||||
$whereUser1 = " and addtime > {$start_time} and addtime < {$end_time}";
|
$whereUser1 = " and addtime > {$start_time} and addtime < {$end_time}";
|
||||||
$whereUser2 = " and choice_time > {$start_time} and choice_time < {$end_time}";
|
$whereUser2 = " and choice_time > {$start_time} and choice_time < {$end_time}";
|
||||||
$whereUser3 = " and addtime < {$start_time} ";
|
$whereUser3 = " and addtime < {$end_time} ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1691,24 +1691,28 @@ class User extends Base
|
||||||
IFNULL(sum(price),0) money_1,
|
IFNULL(sum(price),0) money_1,
|
||||||
IFNULL(sum(use_money),0) money_2,
|
IFNULL(sum(use_money),0) money_2,
|
||||||
IFNULL(sum(price)+SUM(use_money),0) use_money,
|
IFNULL(sum(price)+SUM(use_money),0) use_money,
|
||||||
(select IFNULL(sum(goodslist_money),0) sc_money from order_list where user_id=o.user_id and status=2 {$whereUser2}) fh_money,
|
(select IFNULL(sum(goodslist_money),0) sc_money from order_list where user_id=o.user_id and status=2 and goodslist_type<3 {$whereUser2}) fh_money,
|
||||||
(select IFNULL(sum(goodslist_money),0) sc_money from order_list where user_id=o.user_id and status=0 {$whereUser3}) bb_money,
|
(select IFNULL(sum(goodslist_money),0) sc_money from order_list where user_id=o.user_id and status=0 and goodslist_type<3 {$whereUser3}) bb_money,
|
||||||
(TRUNCATE(u.money2/100, 2)) money2,
|
(TRUNCATE(u.money2/100, 2)) money2,
|
||||||
(TRUNCATE(IFNULL((SELECT money FROM profit_money2 where user_id=o.user_id {$whereUser1} order by id desc LIMIT 1),0)/100, 2)) sy_money
|
(TRUNCATE(IFNULL((SELECT money FROM profit_money2 where user_id=o.user_id {$whereUser1} order by id desc LIMIT 1),0)/100, 2)) sy_money
|
||||||
FROM `order` o LEFT join `user` u ON o.user_id=u.id where {$whereUser} group by o.user_id ) t where use_money>0
|
FROM `order` o LEFT join `user` u ON o.user_id=u.id where {$whereUser} group by o.user_id ) t where use_money>0
|
||||||
) c order by yue_money desc";
|
) c order by yue_money desc";
|
||||||
|
|
||||||
//添加日志记录
|
//添加日志记录
|
||||||
\think\facade\Log::info($sql);
|
\think\facade\Log::info($sql);
|
||||||
|
|
||||||
// 执行查询
|
// 执行查询
|
||||||
$list = \think\facade\Db::query($sql);
|
$list = \think\facade\Db::query($sql);
|
||||||
|
|
||||||
// 处理结果数据
|
// 处理结果数据
|
||||||
foreach ($list as &$item) {
|
foreach ($list as &$item) {
|
||||||
|
// 处理图片URL
|
||||||
|
$item['headimg'] = empty($item['headimg']) ? '' : imageUrl($item['headimg']);
|
||||||
|
|
||||||
// 格式化数值
|
// 格式化数值
|
||||||
$item['money'] = floatval($item['money']);
|
$item['money'] = floatval($item['money']);
|
||||||
$item['integral'] = floatval($item['integral']);
|
$item['integral'] = floatval($item['integral']);
|
||||||
$item['money2'] = floatval($item['money2']*100);
|
$item['money2'] = floatval($item['money2']);
|
||||||
$item['sy_money'] = floatval($item['sy_money']*100);
|
|
||||||
$item['order_zhe_total'] = floatval($item['order_zhe_total']);
|
$item['order_zhe_total'] = floatval($item['order_zhe_total']);
|
||||||
$item['money_1'] = floatval($item['money_1']);
|
$item['money_1'] = floatval($item['money_1']);
|
||||||
$item['money_2'] = floatval($item['money_2']);
|
$item['money_2'] = floatval($item['money_2']);
|
||||||
|
|
@ -1760,7 +1764,7 @@ class User extends Base
|
||||||
'P' => '剩余达达券',
|
'P' => '剩余达达券',
|
||||||
'Q' => '亏损/盈利状态',
|
'Q' => '亏损/盈利状态',
|
||||||
'R' => '亏损/盈利金额',
|
'R' => '亏损/盈利金额',
|
||||||
'S' => '利润值'
|
// 'S' => '利润值'
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($headers as $key => $val) {
|
foreach ($headers as $key => $val) {
|
||||||
|
|
@ -1788,7 +1792,7 @@ class User extends Base
|
||||||
$sheet->setCellValue('M' . $row, $item['use_money']);
|
$sheet->setCellValue('M' . $row, $item['use_money']);
|
||||||
$sheet->setCellValue('N' . $row, $item['fh_money']);
|
$sheet->setCellValue('N' . $row, $item['fh_money']);
|
||||||
$sheet->setCellValue('O' . $row, $item['bb_money']);
|
$sheet->setCellValue('O' . $row, $item['bb_money']);
|
||||||
$sheet->setCellValue('P' . $row, "用户剩余:".$item['sy_money']);
|
$sheet->setCellValue('P' . $row, $item['sy_money']);
|
||||||
$sheet->setCellValue('Q' . $row, $item['profit_status']);
|
$sheet->setCellValue('Q' . $row, $item['profit_status']);
|
||||||
$sheet->setCellValue('R' . $row, $item['profit_value']);
|
$sheet->setCellValue('R' . $row, $item['profit_value']);
|
||||||
$sheet->setCellValue('S' . $row, $item['yue_money']);
|
$sheet->setCellValue('S' . $row, $item['yue_money']);
|
||||||
|
|
@ -1798,12 +1802,12 @@ class User extends Base
|
||||||
// 亏损标红
|
// 亏损标红
|
||||||
$sheet->getStyle('Q' . $row)->getFont()->getColor()->setARGB('FFFF0000');
|
$sheet->getStyle('Q' . $row)->getFont()->getColor()->setARGB('FFFF0000');
|
||||||
$sheet->getStyle('R' . $row)->getFont()->getColor()->setARGB('FFFF0000');
|
$sheet->getStyle('R' . $row)->getFont()->getColor()->setARGB('FFFF0000');
|
||||||
$sheet->getStyle('S' . $row)->getFont()->getColor()->setARGB('FFFF0000');
|
// $sheet->getStyle('S' . $row)->getFont()->getColor()->setARGB('FFFF0000');
|
||||||
} else {
|
} else {
|
||||||
// 盈利标绿
|
// 盈利标绿
|
||||||
$sheet->getStyle('Q' . $row)->getFont()->getColor()->setARGB('FF008000');
|
$sheet->getStyle('Q' . $row)->getFont()->getColor()->setARGB('FF008000');
|
||||||
$sheet->getStyle('R' . $row)->getFont()->getColor()->setARGB('FF008000');
|
$sheet->getStyle('R' . $row)->getFont()->getColor()->setARGB('FF008000');
|
||||||
$sheet->getStyle('S' . $row)->getFont()->getColor()->setARGB('FF008000');
|
// $sheet->getStyle('S' . $row)->getFont()->getColor()->setARGB('FF008000');
|
||||||
}
|
}
|
||||||
|
|
||||||
$row++;
|
$row++;
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ class Config extends Base
|
||||||
return $this->renderSuccess('获取成功', [
|
return $this->renderSuccess('获取成功', [
|
||||||
'good_type' => $goodsTypeList,
|
'good_type' => $goodsTypeList,
|
||||||
'app_setting' => $app_setting,
|
'app_setting' => $app_setting,
|
||||||
'version' => '110'
|
'version' => '111'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,13 +65,7 @@ class MiniProgramPlatform extends BasePlatform
|
||||||
$currentMinute = (int) date('i');
|
$currentMinute = (int) date('i');
|
||||||
$currentTime = $currentHour * 100 + $currentMinute;
|
$currentTime = $currentHour * 100 + $currentMinute;
|
||||||
|
|
||||||
// if ($currentTime < 800 || $currentTime >= 2200) {
|
|
||||||
// return [
|
|
||||||
// 'status' => 0,
|
|
||||||
// 'data' => [],
|
|
||||||
// 'msg' => '支付未开放,请在08:00-22:00范围内购买'
|
|
||||||
// ];
|
|
||||||
// }
|
|
||||||
|
|
||||||
$data += ['user' => null, 'price' => 0, 'title' => '', 'attach' => 'order_wxs', 'pre' => 'MH_'];
|
$data += ['user' => null, 'price' => 0, 'title' => '', 'attach' => 'order_wxs', 'pre' => 'MH_'];
|
||||||
[
|
[
|
||||||
|
|
@ -97,11 +91,19 @@ class MiniProgramPlatform extends BasePlatform
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'status' => 0,
|
'status' => 0,
|
||||||
'data' => [],
|
'data' => [],
|
||||||
'msg' => '小程序支付通道维护中,请联系客服下载app。'
|
'msg' => '小程序支付通道维护中,请联系客服下载app。'
|
||||||
];
|
];
|
||||||
|
if ($currentTime < 800 || $currentTime >= 2200) {
|
||||||
|
return [
|
||||||
|
'status' => 0,
|
||||||
|
'data' => [],
|
||||||
|
'msg' => '支付未开放,请在08:00-22:00范围内购买'
|
||||||
|
];
|
||||||
|
}
|
||||||
$title = mb_substr($title, 0, 30);
|
$title = mb_substr($title, 0, 30);
|
||||||
|
|
||||||
$prefix = $this->GetPrefix();
|
$prefix = $this->GetPrefix();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user