|
|
@ -935,13 +935,13 @@ class GameController extends ThinkController
|
|
|
|
$dataList = [];
|
|
|
|
$dataList = [];
|
|
|
|
for($i=2;$i<=$highestRow;$i++)
|
|
|
|
for($i=2;$i<=$highestRow;$i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$promote_id = $objPHPExcel->getActiveSheet()->getCell("B".$i)->getValue();
|
|
|
|
$promote_id = $objPHPExcel->getActiveSheet()->getCell("A".$i)->getValue();
|
|
|
|
$promoteInfo = M('promote','tab_')->field('account')->where(['id' => $promote_id ])->find();
|
|
|
|
$promoteInfo = M('promote','tab_')->field('account')->where(['id' => $promote_id ])->find();
|
|
|
|
|
|
|
|
|
|
|
|
if(empty($promoteInfo)) {
|
|
|
|
if(empty($promoteInfo)) {
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$game_id = $objPHPExcel->getActiveSheet()->getCell("C".$i)->getValue();
|
|
|
|
$game_id = $objPHPExcel->getActiveSheet()->getCell("B".$i)->getValue();
|
|
|
|
$gameInfo = M('game','tab_')->field('game_name,game_status')->where(['id'=>$game_id])->select();
|
|
|
|
$gameInfo = M('game','tab_')->field('game_name,game_status')->where(['id'=>$game_id])->select();
|
|
|
|
if(empty($gameInfo)) {
|
|
|
|
if(empty($gameInfo)) {
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -965,4 +965,21 @@ class GameController extends ThinkController
|
|
|
|
$this->ajaxReturn(json_encode($returnData));
|
|
|
|
$this->ajaxReturn(json_encode($returnData));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//下载模板
|
|
|
|
|
|
|
|
public function downloadDemo() {
|
|
|
|
|
|
|
|
$game_id = $_REQUEST['game_id'];
|
|
|
|
|
|
|
|
$game_name = M('game','tab_')->where(['id'=>$game_id])->getField('game_name');
|
|
|
|
|
|
|
|
$data[] = [
|
|
|
|
|
|
|
|
'promoteid' => 99,
|
|
|
|
|
|
|
|
'game_id' => $game_id,
|
|
|
|
|
|
|
|
'game_name' => $game_name
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
$field = array(
|
|
|
|
|
|
|
|
"promoteid"=>"会长ID",
|
|
|
|
|
|
|
|
"game_id"=>"游戏ID(无需修改,已默认当前游戏)",
|
|
|
|
|
|
|
|
"game_name"=>"游戏名称(无需修改,已默认当前游戏)"
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
data2csv($data,"模板",$field);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|