mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
修改模型
This commit is contained in:
parent
55f93479ad
commit
dfcb91ca6d
@ -68,8 +68,7 @@ class Address extends Auth
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
$model = DataUserAddress::mk();
|
||||
$query = $this->_query($model)->withoutField('deleted');
|
||||
$query = DataUserAddress::mQuery()->withoutField('deleted');
|
||||
$query->equal('code')->where(['uuid' => $this->uuid, 'deleted' => 0]);
|
||||
$result = $query->order('type desc,id desc')->page(false, false, false, 15);
|
||||
$this->success('获取地址数据!', $result);
|
||||
|
@ -20,7 +20,7 @@ class Balance extends Auth
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
$query = $this->_query(DataUserBalance::class);
|
||||
$query = DataUserBalance::mQuery();
|
||||
$query->withoutField('deleted,create_by')->where(['uuid' => $this->uuid, 'deleted' => 0]);
|
||||
$result = $query->like('create_at#date')->order('id desc')->page(true, false, false, 10);
|
||||
$this->success('获取数据成功', $result);
|
||||
|
@ -91,9 +91,9 @@ class Transfer extends Controller
|
||||
$this->title = '用户提现管理';
|
||||
$this->transfer = UserTransferService::instance()->amount(0);
|
||||
// 创建查询对象
|
||||
$query = $this->_query(DataUserTransfer::mk())->order('id desc');
|
||||
$query = DataUserTransfer::mq()->order('id desc');
|
||||
// 用户条件搜索
|
||||
$db = $this->_query(DataUser::class)->like('phone,username|nickname#nickname')->db();
|
||||
$db = DataUser::mq()->like('phone,username|nickname#nickname')->db();
|
||||
if ($db->getOptions('where')) $query->whereRaw("uuid in {$db->field('id')->buildSql()}");
|
||||
// 数据列表处理
|
||||
$query->equal('type,status')->dateBetween('create_at')->page();
|
||||
|
Loading…
x
Reference in New Issue
Block a user