diff --git a/Application/Admin/Controller/PartnerController.class.php b/Application/Admin/Controller/PartnerController.class.php index 6866af2b7..2bbcbd793 100644 --- a/Application/Admin/Controller/PartnerController.class.php +++ b/Application/Admin/Controller/PartnerController.class.php @@ -280,6 +280,8 @@ class PartnerController extends ThinkController // $count = $model // ->where($map) // ->count(); + $arraypage = $page; + //分页 $parameter['p'] = $page; $parameter['row'] = $row; @@ -288,7 +290,7 @@ class PartnerController extends ThinkController $this->assign('_page', $page); } - $arraypage = $page; +// $arraypage = $page; $size = $row;//每页显示的记录数 $parseData = array_slice($parseData, ($arraypage - 1) * $size, $size); // $page = set_pagination($count, $row, $parameter); @@ -473,7 +475,12 @@ class PartnerController extends ThinkController if ($_POST) { $save = I("post."); $this->checkData($save); - $save['relation']['collaborate_way'] = $save['part_a_type']; + if ($save['part_a_type'] == 1) { // 1己方公司的时候 合作类型是2 + $save['relation']['collaborate_way'] = 2; + } + if ($save['part_a_type'] == 2) { // 2下游推广公司的时候 合作类型是1 + $save['relation']['collaborate_way'] = 1; + } if ($save['part_a_type'] == 1) { $save['relation']['self_company_id'] = $save['part_a']; } diff --git a/Application/Admin/Controller/PlatformController.class.php b/Application/Admin/Controller/PlatformController.class.php index ce40100fc..4531cf3dd 100644 --- a/Application/Admin/Controller/PlatformController.class.php +++ b/Application/Admin/Controller/PlatformController.class.php @@ -1192,9 +1192,9 @@ class PlatformController extends ThinkController } $tdata = M('promote', 'tab_')->alias('tp1') ->field('tp1.account as promote_account,tp1.id,g.relation_game_id,g.relation_game_name, - floor(sum(IF(s.pay_time ' . $today . ',pay_amount,0))*100) as today, - floor(sum(IF(s.pay_time ' . $week . ',pay_amount,0))*100) as week, - floor(sum(IF(s.pay_time ' . $mounth . ',pay_amount,0))*100) as mounth') + floor(sum(IF(s.pay_time ' . $today . ' and is_check=1,pay_amount,0))*100) as today, + floor(sum(IF(s.pay_time ' . $week . ' and is_check=1,pay_amount,0))*100) as week, + floor(sum(IF(s.pay_time ' . $mounth . ' and is_check=1,pay_amount,0))*100) as mounth') ->join("tab_promote AS tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') OR tp2.id = tp1.id", 'left') ->join("tab_spend as s on tp2.id = s.promote_id", 'left') ->join("tab_game as g on g.id = s.game_id", 'left') @@ -1249,14 +1249,14 @@ class PlatformController extends ThinkController if ($user_auth_promote_ids == 'all' || in_array('0', explode(",", $user_auth_promote_ids))) { //官方渠道数据添加 $authorityData = M('spend', 'tab_')->alias('s') - ->field('floor(sum(pay_amount)*100) as count,IFNULL(sum(IF(is_check=2,pay_amount,0)),0) unpay_count') + ->field('floor(sum(IF(is_check=1,pay_amount,0))*100) as count,IFNULL(sum(IF(is_check=2,pay_amount,0)),0) unpay_count') ->where($map) ->find(); $tauthorityData = M('spend', 'tab_')->alias('s') ->field(' - floor(sum(IF(s.pay_time ' . $today . ',pay_amount,0))*100) as today, - floor(sum(IF(s.pay_time ' . $week . ',pay_amount,0))*100) as week, - floor(sum(IF(s.pay_time ' . $mounth . ',pay_amount,0))*100) as mounth') + floor(sum(IF(s.pay_time ' . $today . ' and is_check=1,pay_amount,0))*100) as today, + floor(sum(IF(s.pay_time ' . $week . ' and is_check=1,pay_amount,0))*100) as week, + floor(sum(IF(s.pay_time ' . $mounth . ' and is_check=1,pay_amount,0))*100) as mounth') ->where($tmap) ->find(); $authorityData['today'] = $tauthorityData['today']; @@ -1335,7 +1335,7 @@ class PlatformController extends ThinkController 'admin_username' => '当前市场专员', 'relation_game_name' => '游戏', "count"=>"累计充值", - "unpay_count"=>"累计充值", + "unpay_count"=>"累计不结算充值", "rand"=>"排行榜", "today"=>"今日充值", "week"=>"本周充值", diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index 87bb0b6ae..0ab31c840 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -732,11 +732,16 @@ class PromoteCompanyController extends ThinkController if ($_POST) { $save = I('post.');//前端已经验证 - $save['relation']['collaborate_way'] = $save['part_a_type']; - if ($save['part_a_type'] == 1) { + if ($save['part_a_type'] == 1) { // 1己方公司的时候 合作类型是2 + $save['relation']['collaborate_way'] = 2; + } + if ($save['part_a_type'] == 2) { // 2下游推广公司的时候 合作类型是1 + $save['relation']['collaborate_way'] = 1; + } + if ($save['part_a_type'] == 1) { // 1己方公司的时候 $save['relation']['self_company_id'] = $save['part_a']; } - if ($save['part_a_type'] == 2) { + if ($save['part_a_type'] == 2) { // 2下游推广公司的时候 $save['relation']['self_company_id'] = $save['part_b']; } diff --git a/Application/Admin/Controller/SocietyInfoController.class.php b/Application/Admin/Controller/SocietyInfoController.class.php index c92fb18ba..df90c804e 100644 --- a/Application/Admin/Controller/SocietyInfoController.class.php +++ b/Application/Admin/Controller/SocietyInfoController.class.php @@ -60,10 +60,14 @@ class SocietyInfoController extends ThinkController $query = $model->where($map)->order("id desc"); $count = $query->count(); if($is_export){ - $parseData = $query->field("province, city, company_name, register_capital, functionary, phone, wechat, qq, game_type, game_name, join_platform, promote_scale, turnover, address, league_info, is_potential, remark, interface_person, create_time, communication_time, create_account")->select(); + $parseData = $query->field("province, city, company_name, register_capital, functionary, phone, wechat, qq, game_type, game_name, join_platform, promote_scale, turnover, address, league_info, is_potential, remark, interface_person, create_time, communication_time, create_account") + ->where($map) + ->select(); foreach ($parseData as &$v) { if ($v['is_potential'] == 1) $v['is_potential'] = "是"; else $v['is_potential'] = "否"; + $v['communication_time'] = date('Y-m-d H:i:s', $v['communication_time']); + $v['create_time'] = date('Y-m-d H:i:s', $v['create_time']); unset($v['id']); unset($v['game_id']); unset($v['update_time']); @@ -78,6 +82,7 @@ class SocietyInfoController extends ThinkController } //分页 + $parameter = I("get."); $parameter['p'] = $page; $parameter['row'] = $row; $page = set_pagination($count, $row, $parameter); @@ -143,6 +148,9 @@ class SocietyInfoController extends ThinkController $num = $config['value']; if (IS_POST) { $num = I('num'); + if ($num < 0) { + $this->error("时间设置不能小于0"); + } M('config', 'sys_')->where([ 'name' => 'SOCIETY_INFO_COMMUNITION_GAP' ])->save([ @@ -289,6 +297,11 @@ class SocietyInfoController extends ThinkController foreach ($save['game_types'] as $v) { $save['game_type'] .= $v . "/"; } + if ($save['province'] == '请选择省份') { + $save['province'] = ''; + $save['city'] = ''; + } + $save['game_type'] = trim($save['game_type'], '/'); $save['communication_time'] = time(); $save['update_time'] = time(); @@ -377,38 +390,81 @@ class SocietyInfoController extends ThinkController $datas = $this->parseExcelIn($filename, $exts); $inserts = []; foreach ($datas as $k => $v) { - /*foreach ($v as $p) { - if (!$p) { - $this->error("数据不能为空"); + $flag = 0; + foreach ($v as $p) { + if (!empty($p)) { + $flag = 1; } - }*/ + } + if ($flag == 0) continue; if ($k == 1) continue; - $inserts[$k-2]['province'] = $v['A'] ?? ''; $inserts[$k-2]['city'] = $v['B'] ?? ''; $inserts[$k-2]['company_name'] = $v['C'] ?? ''; + if (mb_strlen($inserts[$k-2]['company_name'], "utf-8") > 100) { + $this->error("公司名太长".$k); + } if (!$inserts[$k-2]['company_name']) { - $this->error("公司不能为空"); + $this->error("公司不能为空".$k); } $inserts[$k-2]['register_capital'] = $v['D'] ?? ''; + if (strlen($inserts[$k-2]['register_capital']) > 50) { + $this->error("推荐人太长".$k); + } $inserts[$k-2]['functionary'] = $v['E'] ?? ''; + if (strlen($inserts[$k-2]['functionary']) > 50) { + $this->error("负责人太长".$k); + } $inserts[$k-2]['phone'] = $v['F'] ?? ''; + if (strlen($inserts[$k-2]['phone']) > 50) { + $this->error("手机号太长".$k); + } $inserts[$k-2]['wechat'] = $v['G'] ?? ''; + if (strlen($inserts[$k-2]['wechat']) > 50) { + $this->error("微信号太长".$k); + } $inserts[$k-2]['qq'] = $v['H'] ?? ''; + if (strlen($inserts[$k-2]['qq']) > 50) { + $this->error("qq号太长".$k); + } $inserts[$k-2]['game_type'] = $v['I'] ?? ''; $inserts[$k-2]['game_name'] = $v['J'] ?? ''; + if (strlen($inserts[$k-2]['game_name']) > 50) { + $this->error("游戏名太长".$k); + } $inserts[$k-2]['join_platform'] = $v['K'] ?? ''; + if (strlen($inserts[$k-2]['join_platform']) > 50) { + $this->error("合作平台太长".$k); + } $inserts[$k-2]['promote_scale'] = $v['L'] ?? ''; + if (strlen($inserts[$k-2]['promote_scale']) > 50) { + $this->error("推广规模太长".$k); + } $inserts[$k-2]['turnover'] = $v['M'] ?? ''; + if (strlen($inserts[$k-2]['turnover']) > 50) { + $this->error("流水太长".$k); + } $inserts[$k-2]['address'] = $v['N'] ?? ''; + if (mb_strlen($inserts[$k-2]['address'], 'utf-8') > 100) { + $this->error("地址太长".$k); + } $inserts[$k-2]['league_info'] = $v['O'] ?? ''; + if (strlen($inserts[$k-2]['league_info']) > 100) { + $this->error("联盟信息太长".$k); + } $inserts[$k-2]['is_potential'] = $v['P']=="是" ? 1 : 0; $inserts[$k-2]['remark'] = $v['Q'] ?? ''; + if (strlen($inserts[$k-2]['remark']) > 100) { + $this->error("备注太长".$k); + } $inserts[$k-2]['interface_person'] = $v['R'] ?? ''; + if (strlen($inserts[$k-2]['interface_person']) > 50) { + $this->error("对接人太长".$k); + } $inserts[$k-2]['create_time'] = time(); $inserts[$k-2]['update_time'] = time(); $inserts[$k-2]['communication_time'] = time(); - $save['create_account'] = $this->admininfo['username']; + $inserts[$k-2]['create_account'] = $this->admininfo['username']; $gameTypes = explode('/', $v['I']); foreach ($gameTypes as $gameType) { @@ -452,6 +508,7 @@ class SocietyInfoController extends ThinkController $address=$currentColumn.$currentRow; //读取到的数据,保存到数组$arr中 $data[$currentRow][$currentColumn]=$currentSheet->getCell($address)->getValue(); + if(is_object($data[$currentRow][$currentColumn])) $data[$currentRow][$currentColumn] = $data[$currentRow][$currentColumn]->__toString(); } } diff --git a/Application/Admin/View/Partner/edit.html b/Application/Admin/View/Partner/edit.html index aba96572e..cc36739df 100644 --- a/Application/Admin/View/Partner/edit.html +++ b/Application/Admin/View/Partner/edit.html @@ -152,16 +152,16 @@ *甲方公司类型: *乙方公司类型: @@ -179,7 +179,7 @@ --> - + *甲方公司: @@ -200,7 +200,7 @@ - + *甲方公司: diff --git a/Application/Admin/View/Partner/show.html b/Application/Admin/View/Partner/show.html index 5e6445583..df69e3536 100644 --- a/Application/Admin/View/Partner/show.html +++ b/Application/Admin/View/Partner/show.html @@ -149,16 +149,16 @@ *甲方公司类型: *乙方公司类型: @@ -176,7 +176,7 @@ --> - + *甲方公司: @@ -196,7 +196,7 @@ - + *甲方公司: diff --git a/Application/Admin/View/PromoteCompany/edit.html b/Application/Admin/View/PromoteCompany/edit.html index d98f280f8..b11946ec2 100644 --- a/Application/Admin/View/PromoteCompany/edit.html +++ b/Application/Admin/View/PromoteCompany/edit.html @@ -500,16 +500,16 @@ *甲方公司类型: *乙方公司类型: @@ -528,7 +528,7 @@ --> - + *甲方公司: @@ -549,7 +549,7 @@ - + *甲方公司: diff --git a/Application/Admin/View/PromoteCompany/view.html b/Application/Admin/View/PromoteCompany/view.html index 3dc1981c7..cb02e93d1 100644 --- a/Application/Admin/View/PromoteCompany/view.html +++ b/Application/Admin/View/PromoteCompany/view.html @@ -486,16 +486,16 @@ *甲方公司类型: *乙方公司类型: @@ -513,7 +513,7 @@ --> - + *甲方公司: @@ -533,7 +533,7 @@ - + *甲方公司: diff --git a/Application/Admin/View/SocietyInfo/add.html b/Application/Admin/View/SocietyInfo/add.html index ed8c389bd..4148f91cd 100644 --- a/Application/Admin/View/SocietyInfo/add.html +++ b/Application/Admin/View/SocietyInfo/add.html @@ -50,88 +50,83 @@ *公司: - + 注册资本: - + 负责人: - + 电话: - + 微信: - + QQ: - + 游戏类型: - - + + + {$vo['type_name']}: + - 所做游戏: - + 合作平台: - + 推广规模: - + 流水: - + 地址: - + 联盟信息: - + @@ -140,10 +135,10 @@ @@ -153,7 +148,7 @@ 备注信息: - + @@ -166,7 +161,7 @@ 对接人: - + @@ -176,7 +171,7 @@
- + 返回
diff --git a/Application/Admin/View/SocietyInfo/edit.html b/Application/Admin/View/SocietyInfo/edit.html index d2c8f19fe..48539f364 100644 --- a/Application/Admin/View/SocietyInfo/edit.html +++ b/Application/Admin/View/SocietyInfo/edit.html @@ -51,37 +51,37 @@ 公司: - + 注册资本: - + 负责人: - + 电话: - + 微信: - + QQ: - + @@ -105,37 +105,37 @@ 所做游戏: - + 合作平台: - + 推广规模: - + 流水: - + 地址: - + 联盟信息: - + @@ -157,7 +157,7 @@ 备注信息: - + @@ -255,10 +255,10 @@ $("#submit").on("click",function(){ var cres = $('form').serializeArray(); if ($("#province").val() == "请选择省份" || !$("#province").val()) { - layer.msg('请选择省份');return ; + // layer.msg('请选择省份');return ; } if (!$("#city").val()) { - layer.msg('请选择城市');return ; + // layer.msg('请选择城市');return ; } if (!$("#company_name").val()) { layer.msg('请输入公司名');return ; diff --git a/Application/Admin/View/SocietyInfo/lists.html b/Application/Admin/View/SocietyInfo/lists.html index 61bd2db6a..86f56fdb8 100644 --- a/Application/Admin/View/SocietyInfo/lists.html +++ b/Application/Admin/View/SocietyInfo/lists.html @@ -111,9 +111,9 @@ - -
-

文件格式参考:请严格按照此格式,文件的第一行必须是字段名,且字段名不允许修改,游戏类型目前仅支持:国战、宫斗、返利服、商战、传奇、仙侠、卡牌、策略如果游戏为多个类型,请用“/”隔开,如:策略/卡牌

+
+

文件格式参考:请严格按照此格式,文件的第一行必须是字段名,且字段名不允许修改,游戏类型目前仅支持:国战、宫斗、返利服、商战、传奇、仙侠、卡牌、策略如果游戏为多个类型,请用“/”隔开,如:策略/卡牌

+
@@ -193,7 +193,7 @@