From ce9faf7271097d0df8d7a26046e96a193690087e Mon Sep 17 00:00:00 2001 From: sk <599123572@qq.com> Date: Mon, 3 Feb 2020 12:24:15 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=85=AC=E5=8F=B8=E5=BD=95=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PromoteCompanyController.class.php | 86 ++++++++++++++++++- .../Admin/View/PromoteCompany/add.html | 48 +++++++++++ .../Admin/View/PromoteCompany/edit.html | 48 +++++++++++ 3 files changed, 180 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index 986a2c076..1fe22c5d8 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -85,10 +85,45 @@ class PromoteCompanyController extends ThinkController if (empty($company_name)) { $this->error('请输入推广公司名称'); } + if (empty(I('post.settlement_contact'))) { + $this->error('请输入结算联系人'); + } + if (empty(I('post.contact_phone'))) { + $this->error('请输入联系人电话'); + } + $pattern = "/^1[3|5|7|8]\\d{9}$/i"; + if(!preg_match($pattern, I('post.contact_phone'))) { + $this->error("手机号码格式不合法"); + return false; + } + if (empty(I('post.address'))) { + $this->error('请输入所在地址'); + } + if (empty(I('post.bank_card'))) { + $this->error('请输入银行卡号'); + } + $bank_card_pattern = "/^\d{10,19}$/u"; + if (!preg_match($bank_card_pattern, I('post.bank_card'))) { + $this->error('卡号格式错误'); + return false; + } + if (empty(I('post.bank_cardname'))) { + $this->error('请输入银行卡名'); + } + if (empty(I('post.bank_name'))) { + $this->error('请输入收款银行'); + } + if (empty(I('post.bank_address'))) { + $this->error('请输入开户网点'); + } if (!in_array($status, [0, 1])) { $this->error('参数异常'); } + if (!empty(I('post.content'))) { + $save['content'] = I('post.content'); + } + $model = M($this->modelName, 'tab_'); $map['company_name'] = $company_name; $res = $model->where($map)->getField('id'); @@ -102,6 +137,13 @@ class PromoteCompanyController extends ThinkController $save['uid'] = UID; $save['create_time'] = $time; $save['last_up_time'] = $time; + $save['settlement_contact'] = I('post.settlement_contact'); + $save['contact_phone'] = I('post.contact_phone'); + $save['address'] = I('post.address'); + $save['bank_card'] = I('post.bank_card'); + $save['bank_cardname'] = I('post.bank_cardname'); + $save['bank_name'] = I('post.bank_name'); + $save['bank_address'] = I('post.bank_address'); $res = $model->add($save); if ($res) { @@ -130,10 +172,43 @@ class PromoteCompanyController extends ThinkController if (empty($company_name)) { $this->error('请输入推广公司名称'); } + if (empty(I('post.settlement_contact'))) { + $this->error('请输入结算联系人'); + } + if (empty(I('post.contact_phone'))) { + $this->error('请输入联系人电话'); + } + $pattern = "/^1[3|5|7|8]\\d{9}$/i"; + if(!preg_match($pattern, I('post.contact_phone'))) { + $this->error("手机号码格式不合法"); + return false; + } + if (empty(I('post.address'))) { + $this->error('请输入所在地址'); + } + if (empty(I('post.bank_card'))) { + $this->error('请输入银行卡号'); + } + $bank_card_pattern = "/^\d{10,19}$/u"; + if (!preg_match($bank_card_pattern, I('post.bank_card'))) { + $this->error('卡号格式错误'); + return false; + } + if (empty(I('post.bank_cardname'))) { + $this->error('请输入银行卡名'); + } + if (empty(I('post.bank_name'))) { + $this->error('请输入收款银行'); + } + if (empty(I('post.bank_address'))) { + $this->error('请输入开户网点'); + } if (!in_array($status, [0, 1]) || $id == 0) { $this->error('参数异常'); } - + if (!empty(I('post.content'))) { + $save['content'] = I('post.content'); + } $data = $model->field('id,company_name')->find($id); if (empty($data)) { $this->error('数据异常'); @@ -150,6 +225,13 @@ class PromoteCompanyController extends ThinkController $save['company_name'] = $company_name; $save['status'] = $status; $save['last_up_time'] = $time; + $save['settlement_contact'] = I('post.settlement_contact'); + $save['contact_phone'] = I('post.contact_phone'); + $save['address'] = I('post.address'); + $save['bank_card'] = I('post.bank_card'); + $save['bank_cardname'] = I('post.bank_cardname'); + $save['bank_name'] = I('post.bank_name'); + $save['bank_address'] = I('post.bank_address'); $res = $model->save($save); if ($res === false) { @@ -161,7 +243,7 @@ class PromoteCompanyController extends ThinkController } else { $id = intval(I('get.id', 0)); $map['id'] = $id; - $data = $model->field('id,company_name,status')->find($id); + $data = $model->field('id,company_name,status,settlement_contact,contact_phone,address,bank_card,bank_cardname,bank_name,bank_address,content')->find($id); if (empty($data)) { $this->error('数据异常', U('lists')); } diff --git a/Application/Admin/View/PromoteCompany/add.html b/Application/Admin/View/PromoteCompany/add.html index 6f730da18..0d2b420ed 100644 --- a/Application/Admin/View/PromoteCompany/add.html +++ b/Application/Admin/View/PromoteCompany/add.html @@ -35,6 +35,54 @@ + + *联系结算人: + + + + + + *联系电话: + + + + + + *所在地址: + + + + + + *银行卡号: + + + + + + *银行卡名: + + + + + + *收款银行: + + + + + + *开户网点: + + + + + + 备注: + + + + *显示状态: diff --git a/Application/Admin/View/PromoteCompany/edit.html b/Application/Admin/View/PromoteCompany/edit.html index c66eb4666..b064668ed 100644 --- a/Application/Admin/View/PromoteCompany/edit.html +++ b/Application/Admin/View/PromoteCompany/edit.html @@ -35,6 +35,54 @@ + + *联系结算人: + + + + + + *联系电话: + + + + + + *所在地址: + + + + + + *银行卡号: + + + + + + *银行卡名: + + + + + + *收款银行: + + + + + + *开户网点: + + + + + + 备注: + + + + *显示状态: From 4ce64d43aa7923106eb37cf034057e9df2f6e64c Mon Sep 17 00:00:00 2001 From: sk <599123572@qq.com> Date: Mon, 3 Feb 2020 15:19:06 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=85=AC=E5=8F=B8=E5=BD=95=E5=85=A5sql?= =?UTF-8?q?=E8=AF=AD=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Data/update.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Data/update.sql b/Data/update.sql index cf7f2f909..e30e6d88a 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -1101,3 +1101,15 @@ ADD COLUMN `can_view_recharge` tinyint(1) NOT NULL default 0 COMMENT '是否显 ALTER TABLE `tab_promote_belong` ADD COLUMN `can_view_recharge` tinyint(1) NOT NULL default 0 COMMENT '是否显示充值数据 0否 1是'; + + +-- 公司录入信息 +ALTER TABLE `tab_promote_company` +ADD COLUMN `settlement_contact` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 0 COMMENT '结算联系人' AFTER `last_up_time`, +ADD COLUMN `contact_phone` bigint(12) NOT NULL DEFAULT 0 COMMENT '联系电话' AFTER `settlement_contact`, +ADD COLUMN `address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 0 COMMENT '所在地址' AFTER `contact_phone`, +ADD COLUMN `bank_card` varchar(60) NOT NULL DEFAULT 0 COMMENT '银行卡号' AFTER `address`, +ADD COLUMN `bank_cardname` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 0 COMMENT '银行卡名' AFTER `bank_card`, +ADD COLUMN `bank_name` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 0 COMMENT '收款银行' AFTER `bank_cardname`, +ADD COLUMN `bank_address` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 0 COMMENT '开户网点' AFTER `bank_name`, +ADD COLUMN `content` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 0 COMMENT '备注' AFTER `bank_address`; From d98bfa04b9cf0f959d8df824410dfc49546dcd72 Mon Sep 17 00:00:00 2001 From: sk <599123572@qq.com> Date: Wed, 5 Feb 2020 18:24:08 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E8=B5=84=E8=B4=A8=E8=AE=A4=E8=AF=81?= =?UTF-8?q?=E7=94=B5=E5=AD=90=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/SafeController.class.php | 21 ++++++++++++++++++- .../View/default/Safe/modifyBaseInfo.html | 2 +- .../Home/View/default/Safe/safeDocument.html | 10 ++++----- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/Application/Home/Controller/SafeController.class.php b/Application/Home/Controller/SafeController.class.php index 55daaae66..4a4c42744 100644 --- a/Application/Home/Controller/SafeController.class.php +++ b/Application/Home/Controller/SafeController.class.php @@ -459,14 +459,33 @@ class SafeController extends BaseController{ } public function safeDocument() { + $realname = $_REQUEST['realname']; + $phone = $_REQUEST['phone']; + $email = $_REQUEST['email']; + $address = $_REQUEST['address']; + if (empty($realname)) { + $realname = '您未填写真实姓名'; + } + if (empty($email)) { + $email = '您未填写联系邮箱'; + } + if (empty($address)) { + $address = '您未填写注册地址'; + } + if (empty($phone)) { + $phone = '您未填写联系号码'; + } $time = time(); $loginPromote = $this->getLoginPromote(); $sn = date('Ymd') . '-' . strtoupper(substr(md5($loginPromote['id']), 8, 16)); - $endTime = date('Y-m-d',strtotime('+1 year')); $this->assign('time',date('Y-m-d',$time)); $this->assign('endTime',$endTime); $this->assign('sn',$sn); + $this->assign('realname',$realname); + $this->assign('email',$email); + $this->assign('address',$address); + $this->assign('phone',$phone); $this->display(); } } \ No newline at end of file diff --git a/Application/Home/View/default/Safe/modifyBaseInfo.html b/Application/Home/View/default/Safe/modifyBaseInfo.html index e645fd7a8..a40135f17 100644 --- a/Application/Home/View/default/Safe/modifyBaseInfo.html +++ b/Application/Home/View/default/Safe/modifyBaseInfo.html @@ -304,7 +304,7 @@ - 我已仔细阅读,并同意《游戏推广服务框架协议》 + 我已仔细阅读,并同意《游戏推广服务框架协议》 diff --git a/Application/Home/View/default/Safe/safeDocument.html b/Application/Home/View/default/Safe/safeDocument.html index 3395e8ae0..f94cab217 100644 --- a/Application/Home/View/default/Safe/safeDocument.html +++ b/Application/Home/View/default/Safe/safeDocument.html @@ -57,11 +57,11 @@ and open the template in the editor.

联系电话:13067391751

联系人:雷丽华

邮箱号:383166987@qq.com

-

乙方:

-

注册地址:

-

联系电话:

-

联系人:

-

邮箱号:

+

乙方:{$realname}

+

注册地址:{$address}

+

联系电话:{$phone}

+

联系人:{$realname}

+

邮箱号:{$email}

      经甲乙双方协商一致,在平等互利的基础上,就乙方推广甲方拥有知识产权 或合法授权的游戏(以下简称“产品”)达成如下协议:

1 合作内容及合作期限

From 889a79a6b56c53867298e0f06b9b5012486939ac Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Tue, 11 Feb 2020 13:53:48 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E7=94=B5=E5=AD=90=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/default/Safe/modifyBaseInfo.html | 19 ++++++++++++++++++- .../Home/View/default/Safe/safeDocument.html | 2 +- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Application/Home/View/default/Safe/modifyBaseInfo.html b/Application/Home/View/default/Safe/modifyBaseInfo.html index a40135f17..f239511d8 100644 --- a/Application/Home/View/default/Safe/modifyBaseInfo.html +++ b/Application/Home/View/default/Safe/modifyBaseInfo.html @@ -304,7 +304,8 @@ - 我已仔细阅读,并同意《游戏推广服务框架协议》 + + 我已仔细阅读,并同意《游戏推广服务框架协议》 @@ -329,6 +330,22 @@ + + + diff --git a/Application/Home/View/default/Safe/safeDocument.html b/Application/Home/View/default/Safe/safeDocument.html index f94cab217..0694eff24 100644 --- a/Application/Home/View/default/Safe/safeDocument.html +++ b/Application/Home/View/default/Safe/safeDocument.html @@ -47,7 +47,7 @@ and open the template in the editor. -
+

游戏推广服务框架协议

本协议由以下双方于{$time}签订:

From cec446b5ab79c196df62cdf843bb8b9e02a44efa Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Tue, 11 Feb 2020 15:23:25 +0800 Subject: [PATCH 5/5] sql --- Data/update.sql | 98 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 88 insertions(+), 10 deletions(-) diff --git a/Data/update.sql b/Data/update.sql index e30e6d88a..f78d43196 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -1074,6 +1074,22 @@ CREATE TABLE `sys_document_pop_rules` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; +--会长设置推广配置-- + +CREATE TABLE `tab_sociaty_games` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `promote_id` int(11) NOT NULL COMMENT '会长ID', + `game_id` int(11) NOT NULL COMMENT '游戏ID', + `status` tinyint(1) NOT null DEFAULT '0' COMMENT '状态 0 禁用 1 启用', + `create_time` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间', + `update_time` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT '工会授权游戏'; + +--游戏会长申请权限-- +ALTER TABLE `tab_game` + ADD COLUMN `apply_auth` INT(11) NULL DEFAULT '1' COMMENT '申请权限(1为全部可申请2为部分会长可申请)' AFTER `game_detail_cover`; + -- 2020-01-14 -- cxj ALTER TABLE `tab_promote_game_ratio` @@ -1102,14 +1118,76 @@ ADD COLUMN `can_view_recharge` tinyint(1) NOT NULL default 0 COMMENT '是否显 ALTER TABLE `tab_promote_belong` ADD COLUMN `can_view_recharge` tinyint(1) NOT NULL default 0 COMMENT '是否显示充值数据 0否 1是'; +--CP分成比例添加运算符字段 2020-02-04 郑昌隆 +ALTER TABLE `tab_cp_game_ratio` +ADD COLUMN `instanceof` tinyint(2) NOT NULL DEFAULT 1 COMMENT '运算符(1:>= ; 2:>)' AFTER `game_id`; + +-- 2020-02-04 +ALTER TABLE `tab_promote` +ADD COLUMN `auto_review_withdraw_status` tinyint(3) NOT NULL DEFAULT 0 COMMENT '提现自动审核状态:0-关闭 1-开启'; +ALTER TABLE `tab_promote` +ADD COLUMN `auto_review_withdraw_updated_time` int(10) NOT NULL DEFAULT 0 COMMENT '提现自动审核状态更新时间'; +ALTER TABLE `tab_promote` +ADD INDEX `auto_review_withdraw_status`(`auto_review_withdraw_status`) USING BTREE; + +-- 2020-02-10 yulingwei 奖罚记录 +CREATE TABLE `tab_reward_record` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `reward_type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '奖罚类型 1奖励 2惩罚', + `company_type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '公司类型 1上游公司 2下游公司', + `company_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '公司ID 当公司类型为上游CP公司时,展示合作方管理下的公司,反之展示推广公司管理下的公司', + `accounts` json NOT NULL, + `relation_game_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '游戏id', + `content` varchar(1000) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '事件内容', + `money` double(11,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '金额', + `reward_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '奖惩时间', + `remark` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '备注', + `create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间', + `creater_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建者ID', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; --- 公司录入信息 -ALTER TABLE `tab_promote_company` -ADD COLUMN `settlement_contact` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 0 COMMENT '结算联系人' AFTER `last_up_time`, -ADD COLUMN `contact_phone` bigint(12) NOT NULL DEFAULT 0 COMMENT '联系电话' AFTER `settlement_contact`, -ADD COLUMN `address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 0 COMMENT '所在地址' AFTER `contact_phone`, -ADD COLUMN `bank_card` varchar(60) NOT NULL DEFAULT 0 COMMENT '银行卡号' AFTER `address`, -ADD COLUMN `bank_cardname` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 0 COMMENT '银行卡名' AFTER `bank_card`, -ADD COLUMN `bank_name` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 0 COMMENT '收款银行' AFTER `bank_cardname`, -ADD COLUMN `bank_address` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 0 COMMENT '开户网点' AFTER `bank_name`, -ADD COLUMN `content` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 0 COMMENT '备注' AFTER `bank_address`; +CREATE TABLE `tab_company_info` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', + `partner` varchar(60) NOT NULL COMMENT '合作方名称', + `uid` int(11) NOT NULL DEFAULT '0' COMMENT '添加人ID', + `status` tinyint(3) NOT NULL DEFAULT '1' COMMENT '状态 0-禁用 1-启用', + `link_man` varchar(64) DEFAULT '' COMMENT '联系人', + `link_phone` varchar(24) DEFAULT NULL COMMENT '联系电话', + `address` varchar(255) DEFAULT NULL COMMENT '邮寄地址', + `company_tax_no` varchar(64) DEFAULT NULL COMMENT '公司税号', + `payee_name` varchar(24) DEFAULT NULL COMMENT '收款方名称', + `bank_account` varchar(32) DEFAULT NULL COMMENT '银行账号', + `opening_bank` varchar(128) DEFAULT NULL COMMENT '开户行', + `create_time` int(10) NOT NULL DEFAULT '0' COMMENT '添加时间', + `last_up_time` int(10) NOT NULL DEFAULT '0' COMMENT '最后更新时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COMMENT='内部公司信息'; + + +-- 2020-02-10 liaojinling 会长押金 +CREATE TABLE `tab_president_deposit` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', + `promote_id` varchar(60) NOT NULL COMMENT '会长ID', + `payer` varchar(50) NOT NULL DEFAULT '' COMMENT '付款人', + `amount` decimal(12,2) NOT NULL DEFAULT '0.00' COMMENT '金额', + `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态', + `pay_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '押金付款方式', + `pay_way` tinyint(1) NOT NULL DEFAULT '0' COMMENT '付款方式', + `pay_account` varchar(60) NOT NULL DEFAULT '' COMMENT '付款账号', + `pay_confirm_time` int(10) NOT NULL DEFAULT '0' COMMENT '押金确认时间', + `refund_time` int(10) NOT NULL DEFAULT '0' COMMENT '退款时间', + `create_time` int(10) NOT NULL DEFAULT '0' COMMENT '添加时间', + `update_time` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='会长押金'; + +-- 2020-02-10 yulingwei 推广工会管理 新增属性类型 +ALTER TABLE `tab_promote_belong` +MODIFY COLUMN `company_belong` tinyint(1) UNSIGNED NOT NULL DEFAULT 3 COMMENT '工会归属:0-内团;1-外团 2-分发联盟 3 无' AFTER `verify_status`, +MODIFY COLUMN `company_relation` tinyint(1) UNSIGNED NOT NULL DEFAULT 2 COMMENT '工会关系:0-自主开发及维护;1-只维护 2 无' AFTER `company_belong`; +ADD COLUMN `company_type` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '工会类型 1公司 2个人' AFTER `can_view_recharge`; + +-- 2020-02-10 cxj 推广提现--新增审核模式 +ALTER TABLE `tab_withdraw` +ADD COLUMN `review_type` tinyint(3) NOT NULL DEFAULT 1 COMMENT '审核模式:1-人工审核 2-自动审核';