| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- namespace app\common\model;
- use app\api\services\UserServices;
- use app\common\model\TimeModel;
- //use app\model\RedPoolModel;
- //use app\model\RedStorePoolModel;
- use app\common\model\UserDataModel;
- use services\CacheServices;
- use think\Exception;
- use think\facade\Db;
- use think\Model;
- class UserUnmoneyModel extends Model
- {
- protected $name = "user_unmoney";
- public function getIncomeMoneyLog ($param)
- {
- // $type_conf = config('type.money');
- $list = self::where('uid', $param->uid)
- // ->withAttr('type', function ($value, $data) use ($type_conf) {
- // return isset($type_conf[$value]) ? $type_conf[$value] : '未知类型';
- // })
- ->order('id', 'desc')
- ->paginate($param->data['limit'])
- ->toArray();
- // $history = self::where([
- // ['uid', '=', $param->uid],
- // ['state', '=', 1]
- // ])->sum('money');
- return $list['data'];
- return compact('list', 'history');
- }
- }
|