|
|
@@ -1,70 +0,0 @@
|
|
|
-<?php
|
|
|
-// +----------------------------------------------------------------------
|
|
|
-// | saiadmin [ saiadmin快速开发框架 ]
|
|
|
-// +----------------------------------------------------------------------
|
|
|
-// | Author: your name
|
|
|
-// +----------------------------------------------------------------------
|
|
|
-namespace app\v1\model\gameLog;
|
|
|
-
|
|
|
-use plugin\saiadmin\basic\BaseNormalModel;
|
|
|
-
|
|
|
-/**
|
|
|
- * 充值排行模型
|
|
|
- */
|
|
|
-class SdkOrderRank extends BaseNormalModel
|
|
|
-{
|
|
|
- /**
|
|
|
- * 数据表主键
|
|
|
- * @var string
|
|
|
- */
|
|
|
- protected $pk = 'orderid';
|
|
|
-
|
|
|
- /**
|
|
|
- * 数据库表名称
|
|
|
- * @var string
|
|
|
- */
|
|
|
- protected $table = 'sdk_order_success';
|
|
|
-
|
|
|
- /**
|
|
|
- * 数据库连接
|
|
|
- * @var string
|
|
|
- */
|
|
|
- protected $connection = 'db_game_log';
|
|
|
-
|
|
|
- /**
|
|
|
- * 游戏名 保存数组转换
|
|
|
- */
|
|
|
- public function setGameIdAttr($value)
|
|
|
- {
|
|
|
- return json_encode($value, JSON_UNESCAPED_UNICODE);
|
|
|
- }
|
|
|
-
|
|
|
- // /**
|
|
|
- // * 游戏名 读取数组转换
|
|
|
- // */
|
|
|
- // public function getGameIdAttr($value)
|
|
|
- // {
|
|
|
- // return json_decode($value ?? '', true);
|
|
|
- // }
|
|
|
-
|
|
|
- /**
|
|
|
- * 注册日期 搜索
|
|
|
- */
|
|
|
- public function searchRegDateAttr($query, $value)
|
|
|
- {
|
|
|
- // $query->whereTime('reg_date', 'between', $value);
|
|
|
- $sTime = strtotime($value[0] . " 00:00:00");
|
|
|
- $eTime = strtotime($value[1] . " 23:59:59");
|
|
|
- $query->whereTime('reg_date', 'between', [$sTime, $eTime]);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 充值日期 搜索
|
|
|
- */
|
|
|
- public function searchPayDateAttr($query, $value)
|
|
|
- {
|
|
|
- $sTime = strtotime($value[0] . " 00:00:00");
|
|
|
- $eTime = strtotime($value[1] . " 23:59:59");
|
|
|
- $query->whereTime('pay_date', 'between', [$sTime, $eTime]);
|
|
|
- }
|
|
|
-}
|