|
|
<?php
|
|
|
// +----------------------------------------------------------------------
|
|
|
// | OneThink [ WE CAN DO IT JUST THINK IT ]
|
|
|
// +----------------------------------------------------------------------
|
|
|
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
|
|
|
// +----------------------------------------------------------------------
|
|
|
// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://www.zjzit.cn>
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
|
|
namespace Admin\Model;
|
|
|
use Think\Model;
|
|
|
|
|
|
/**
|
|
|
* 用户模型
|
|
|
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
|
|
*/
|
|
|
|
|
|
class ProvideUserModel extends Model {
|
|
|
|
|
|
protected $_validate = array(
|
|
|
|
|
|
);
|
|
|
|
|
|
/* 自动完成规则 */
|
|
|
protected $_auto = array(
|
|
|
);
|
|
|
|
|
|
/**
|
|
|
* 构造函数
|
|
|
* @param string $name 模型名称
|
|
|
* @param string $tablePrefix 表前缀
|
|
|
* @param mixed $connection 数据库连接信息
|
|
|
*/
|
|
|
public function __construct($name = '', $tablePrefix = '', $connection = '') {
|
|
|
/* 设置默认的表前缀 */
|
|
|
$this->tablePrefix ='tab_';
|
|
|
/* 执行构造方法 */
|
|
|
parent::__construct($name, $tablePrefix, $connection);
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
* 未发放平台币列表
|
|
|
* @return array 检测结果数据集
|
|
|
* @author 鹿文学
|
|
|
*/
|
|
|
public function checkProvideUserIsGet() {
|
|
|
|
|
|
$list = $this->field('id,user_account,op_id,op_account,amount')
|
|
|
|
|
|
->where(array('status'=>0))->select();
|
|
|
$type=405;
|
|
|
if ($list[0]) {
|
|
|
|
|
|
$list = D('check')->dealWithCheckList($type,$list);
|
|
|
|
|
|
if (empty($list[0])) {return '';}
|
|
|
|
|
|
foreach ($list as $k => $v) {
|
|
|
$data[$k]['info'] = '管理员:'.$v['op_account'].'给玩家('.$v['user_account'].')发放平台币,发放:'.$v['amount'].',实际到帐:0';
|
|
|
$data[$k]['type'] = $type;
|
|
|
$data[$k]['url'] = U('Deposit/lists_sen',array('type'=>2,'user_account'=>$v['user_account'],'op_id'=>$v['op_id'],'status'=>0));
|
|
|
$data[$k]['create_time'] = time();
|
|
|
$data[$k]['status']=0;
|
|
|
$data[$k]['position'] = $v['id'];
|
|
|
}
|
|
|
return $data;
|
|
|
}else {
|
|
|
D('check')->dealWithCheckListOnNull($type);
|
|
|
return '';
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|