|
|
|
@ -3,8 +3,10 @@ namespace app\controller; |
|
|
|
|
|
|
|
use app\BaseController; |
|
|
|
use app\middleware\CheckUser; |
|
|
|
use app\model\ConsumptionRecords; |
|
|
|
use app\model\CustomerService as CustomerServiceModel; |
|
|
|
use app\model\User as UserModel; |
|
|
|
use app\model\ZoneGoods; |
|
|
|
use app\validate\User as UserValidate; |
|
|
|
use think\exception\ValidateException; |
|
|
|
use think\facade\Cache; |
|
|
|
@ -60,13 +62,15 @@ class User extends BaseController |
|
|
|
|
|
|
|
$list = Db::name('withdrawal_records') |
|
|
|
->where(['user_id' => $userData['id'], 'status' => 1]) |
|
|
|
->field('withdrawal_amount,withdrawal_balance,apply_time') |
|
|
|
->field('withdrawal_amount,withdrawal_balance,apply_time,trade_type') |
|
|
|
->order('id' ,'desc') |
|
|
|
->paginate($limit); |
|
|
|
|
|
|
|
$listArr = $list->items(); |
|
|
|
|
|
|
|
$trade_type = [1 => '代理下分', 2 => '管理员下分', 3 => '支付宝']; |
|
|
|
foreach ($listArr as &$item) { |
|
|
|
$item['trade_type'] = $trade_type[$item['trade_type']]; |
|
|
|
give_symbol($item['withdrawal_amount'],'-'); |
|
|
|
$item['apply_time'] = date("m月d日 H:i",strtotime($item['apply_time'])); |
|
|
|
} |
|
|
|
@ -159,13 +163,16 @@ class User extends BaseController |
|
|
|
|
|
|
|
$list = Db::name('awards_records') |
|
|
|
->where('user_id',$userData['id']) |
|
|
|
->field('awards_amount,withdrawal_balance,create_time') |
|
|
|
->field('cr_id,awards_amount,withdrawal_balance,create_time') |
|
|
|
->order('id' ,'desc') |
|
|
|
->paginate($limit); |
|
|
|
|
|
|
|
$listArr = $list->items(); |
|
|
|
|
|
|
|
foreach ($listArr as &$item) { |
|
|
|
$ConsumptionRecords = ConsumptionRecords::find($item['cr_id']); |
|
|
|
$ZoneGoods = ZoneGoods::find($ConsumptionRecords->zone_goods_id); |
|
|
|
$item['zone_title'] = $ZoneGoods->title; |
|
|
|
give_symbol($item['awards_amount']); |
|
|
|
$item['create_time'] = date("m月d日 H:i",strtotime($item['create_time'])); |
|
|
|
} |
|
|
|
|