You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
2.2 KiB
63 lines
2.2 KiB
<?php
|
|
// +----------------------------------------------------------------------
|
|
// | 天诚科技 [ 刘海东 17600099397赋能开发者,助力企业发展 ]
|
|
// +----------------------------------------------------------------------
|
|
// | Copyright (c) 2016~2020 https://www.tczxkj.com All rights reserved.
|
|
// +----------------------------------------------------------------------
|
|
// | Licensed 该系统并不是自由软件,未经许可不能去掉相关版权
|
|
// +----------------------------------------------------------------------
|
|
// | Author:甘肃天诚志信电子商务有限公司 刘海东 联系电话维系17600099397
|
|
// +----------------------------------------------------------------------
|
|
|
|
namespace app\admin\model\special;
|
|
|
|
use basic\ModelBasic;
|
|
use traits\ModelTrait;
|
|
use think\Db;
|
|
use app\admin\model\special\SpecialSource;
|
|
use app\admin\model\special\SpecialTask;
|
|
use app\admin\model\user\UserExtract;
|
|
|
|
/**支付宝提现记录表
|
|
* Class UserWithdrawal
|
|
* @package app\admin\model\special
|
|
*/
|
|
class UserWithdrawal extends ModelBasic
|
|
{
|
|
use ModelTrait;
|
|
|
|
/**条件处理
|
|
* @param $where
|
|
* @return DataDownload
|
|
*/
|
|
public static function setWhere($where)
|
|
{
|
|
$model = new self();
|
|
|
|
if (isset($where['pay_fund_order_id']) && $where['pay_fund_order_id']) {
|
|
$model = $model->where('pay_fund_order_id', 'like', "%$where[pay_fund_order_id]%");
|
|
}
|
|
return $model;
|
|
}
|
|
|
|
public static function get_user_extract_list($where)
|
|
{
|
|
$data = self::setWhere($where)->order('id DESC')->page((int)$where['page'], (int)$where['limit'])->select();
|
|
$data = count((array)$data) ? $data->toArray() : [];
|
|
foreach($data as &$item){
|
|
$Extract = UserExtract::where('id',$item['e_id'])->find()->toArray();
|
|
$item['extract_price'] = $Extract['extract_price'];
|
|
if($Extract['mer_id'] == 0){
|
|
$item['type'] = "用户提现";
|
|
}else if($Extract['mer_id'] == 0 && $Extract['agent_id']){
|
|
$item['type'] = "代理提现";
|
|
}else{
|
|
$item['type'] = "讲师/代理提现";
|
|
}
|
|
}
|
|
$count = self::setWhere($where)->count();
|
|
return compact('data', 'count');
|
|
}
|
|
|
|
|
|
}
|
|
|