淘宝优化
This commit is contained in:
@@ -5,15 +5,7 @@
|
||||
* @Author: kangkang
|
||||
* @Date: 2020-10-13 19:52:37
|
||||
* @LastEditors: kangkang
|
||||
* @LastEditTime: 2020-10-16 11:15:13
|
||||
*/
|
||||
/*
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: kangkang
|
||||
* @Date: 2020-10-13 19:52:37
|
||||
* @LastEditors: kangkang
|
||||
* @LastEditTime: 2020-10-14 20:04:16
|
||||
* @LastEditTime: 2020-10-22 09:48:36
|
||||
*/
|
||||
|
||||
namespace app\order\controller;
|
||||
@@ -30,10 +22,25 @@ class TbRefund extends Controller
|
||||
{
|
||||
$refund = new RefundMOdel;
|
||||
$userModel = new UserModel;
|
||||
$list = $refund->getListPage();
|
||||
foreach ($list as &$v) {
|
||||
$get_list = $refund->getListPage();
|
||||
$user_phone = [];
|
||||
$lists = [];
|
||||
$list = [];
|
||||
foreach ($get_list as $v) {
|
||||
$v['status'] = RefundEnum::$refundStatus[$v['status']];
|
||||
$v['account'] = $userModel->getOne(['LoginCode' => $v['Phone']])['RestAmount'];
|
||||
if (!in_array($v['Phone'], $user_phone)) {
|
||||
$user_phone[] = $v['Phone'];
|
||||
}
|
||||
$lists[] = $v;
|
||||
}
|
||||
$user_test = $userModel->getListPage('LoginCode in('. implode(',', $user_phone) .')','RestAmount,LoginCode');
|
||||
foreach ($user_test as $k=>$v){
|
||||
foreach ($lists as $key=>$val){
|
||||
if($val['Phone'] == $v['LoginCode']){
|
||||
$val['account'] = $v['RestAmount'];
|
||||
$list[] = $val;
|
||||
}
|
||||
}
|
||||
}
|
||||
$count = $refund->getCount();
|
||||
$data = [
|
||||
@@ -49,13 +56,27 @@ class TbRefund extends Controller
|
||||
if (!$_GET) {
|
||||
die;
|
||||
}
|
||||
$page = ($_GET['page'] - 1) * 50;
|
||||
$refund = new RefundMOdel;
|
||||
$userModel = new UserModel;
|
||||
$list = $refund->getListPage([], '*', 'id desc', "$page,50");
|
||||
foreach ($list as &$v) {
|
||||
$get_list = $refund->getListPage();
|
||||
$user_phone = [];
|
||||
$lists = [];
|
||||
$list = [];
|
||||
foreach ($get_list as $v) {
|
||||
$v['status'] = RefundEnum::$refundStatus[$v['status']];
|
||||
$v['account'] = $userModel->getOne(['LoginCode' => $v['Phone']])['RestAmount'];
|
||||
if (!in_array($v['Phone'], $user_phone)) {
|
||||
$user_phone[] = $v['Phone'];
|
||||
}
|
||||
$lists[] = $v;
|
||||
}
|
||||
$user_test = $userModel->getListPage('LoginCode in('. implode(',', $user_phone) .')','RestAmount,LoginCode');
|
||||
foreach ($user_test as $k=>$v){
|
||||
foreach ($lists as $key=>$val){
|
||||
if($val['Phone'] == $v['LoginCode']){
|
||||
$val['account'] = $v['RestAmount'];
|
||||
$list[] = $val;
|
||||
}
|
||||
}
|
||||
}
|
||||
$data = [
|
||||
'Code' => 10000,
|
||||
|
||||
Reference in New Issue
Block a user