diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index e66e369ce..bbbf2e37e 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -5977,6 +5977,9 @@ class ExportController extends Controller if (I('status')) { $map['tab_promote.status'] = I('status'); } + if (strlen(I('company_belong'))) { + $map['company_belong'] = I("company_belong"); + } //为数据权限添加 setPowerPromoteIds($map, 'tab_promote.id'); diff --git a/Application/Admin/Controller/PromoteController.class.php b/Application/Admin/Controller/PromoteController.class.php index 77f612312..3d690fac7 100644 --- a/Application/Admin/Controller/PromoteController.class.php +++ b/Application/Admin/Controller/PromoteController.class.php @@ -96,6 +96,9 @@ class PromoteController extends ThinkController if (I("promote_level")) { $map['level'] = I("promote_level"); } + if (strlen(I('company_belong'))) { + $map['company_belong'] = I("company_belong"); + } $this->m_title = '推广员列表'; $this->assign('commonset', M('Kuaijieicon')->where(['url'=>'Promote/lists/type/1','status'=>1])->find()); if (isset($_REQUEST['row'])) { @@ -221,6 +224,10 @@ class PromoteController extends ThinkController if ($this->accountExist($account)) { $this->error('该账号已存在'); } + $res = M('promote', 'tab_')->where(['mobile_phone' => $mobile_phone])->field('id')->find(); + if ($res) { + $this->error('该手机号已存在'); + } $company_belong = $_REQUEST['company_belong'] ?? 0; $company_relation = $_REQUEST['company_relation'] ?? 0; $data = array( diff --git a/Application/Admin/Controller/StatementMangementController.class.php b/Application/Admin/Controller/StatementMangementController.class.php index 2f21630e9..504d22e38 100644 --- a/Application/Admin/Controller/StatementMangementController.class.php +++ b/Application/Admin/Controller/StatementMangementController.class.php @@ -48,7 +48,6 @@ class StatementMangementController extends ThinkController // var_dump($data);die(); foreach ($data as $key => $value) { $data[$key]['order'] = json_decode($value['second_party_info'],true)['order_type']; - var_dump($data[$key]['order']); } $sumData = M("statement","tab_") diff --git a/Application/Admin/View/Promote/lists.html b/Application/Admin/View/Promote/lists.html index af4885d9d..831cd5a17 100644 --- a/Application/Admin/View/Promote/lists.html +++ b/Application/Admin/View/Promote/lists.html @@ -135,6 +135,14 @@ + +
+ +
+ diff --git a/Application/Home/Controller/SafeController.class.php b/Application/Home/Controller/SafeController.class.php index d36647ec8..9604dddae 100644 --- a/Application/Home/Controller/SafeController.class.php +++ b/Application/Home/Controller/SafeController.class.php @@ -206,6 +206,11 @@ class SafeController extends BaseController{ $this->error("手机号码格式不合法"); return false; } + $telInfo = M('promote','tab_')->field('id')->where(['mobile_phone'=>$tel])->find(); + if(!empty($telInfo)) { + $this->error("手机号码已存在"); + return false; + } if(empty($id_card)) { $this->error("身份证号码不能为空"); return false; @@ -343,12 +348,6 @@ class SafeController extends BaseController{ $id = get_pid(); $rs = M("promote","tab_")->field('anothpic,ver_status,real_name,bank_card,mobile_phone,email,address,idcard')->where(['id'=>$id])->find(); $anothpic = $rs['anothpic']; - /* if(!empty($anothpic)) { - $idcarpicArr = explode(',', $anothpic); - foreach ($idcarpicArr as $key => $value) { - $promoteInfo['valuedata'][$key] = $value; - } - } */ $promoteInfo = ""; $address = json_decode($rs['address'],false)[1]; $realname = mb_strlen($rs['real_name'],'utf-8') == 2 ? mb_substr($rs['real_name'],0,1,'utf-8').'*':mb_substr($rs['real_name'],0,1,'utf-8').'**'; @@ -379,6 +378,11 @@ class SafeController extends BaseController{ $this->error("手机号码格式不合法"); return false; } + $telInfo = M('promote','tab_')->field('id')->where(['mobile_phone'=>$tel])->find(); + if(!empty($telInfo)) { + $this->error("手机号码已存在"); + return false; + } if(empty($address1)) { $this->error("地址不能为空"); diff --git a/Data/update.sql b/Data/update.sql index 7239044cc..f19b14761 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -1110,4 +1110,8 @@ UPDATE tab_spend SET selle_ratio = 0.00 where selle_ratio is null ALTER TABLE `tab_promote_game_ratio` ADD COLUMN `relation_game_id` int(11) NOT NULL DEFAULT 0 COMMENT '关联游戏id' AFTER `game_id`; ALTER TABLE `tab_promote_game_ratio_log` -ADD COLUMN `relation_game_id` int(11) NOT NULL DEFAULT 0 COMMENT '关联游戏id' AFTER `game_id`; \ No newline at end of file +ADD COLUMN `relation_game_id` int(11) NOT NULL DEFAULT 0 COMMENT '关联游戏id' AFTER `game_id`; + +ALTER TABLE `tab_spend` +MODIFY COLUMN `selle_status` int(11) NOT NULL DEFAULT 0 COMMENT '渠道结算 0未结算1 结算', +MODIFY COLUMN `selle_ratio` double(5, 2) DEFAULT 0.00 COMMENT '渠道分成比例'; \ No newline at end of file