解决冲突

master
ELF 5 years ago
commit c4934613ae

@ -1658,4 +1658,53 @@ class QueryController extends ThinkController
}
public function getPromoteSettlementType()
{
$promoteId = intval(I('post.promote_id', 0));
$settlementType = [];
if ($promoteId > 0) {
$promote = D('promote')->field('level, settlement_type')->where(array('id' => $promoteId))->find();
if (empty($promote) || $promote['level'] != 1 || empty($promote['settlement_type'])) {
$settlementType = [];
} else {
$settlementType = WithdrawModel::$settlementTypeList;
unset($settlementType[WithdrawModel::SETTLEMENT_TYPE_OTHER]);
if ($promote['settlement_type'] == 1) {
unset($settlementType[WithdrawModel::SETTLEMENT_TYPE_MONTH]);
} else {
unset($settlementType[WithdrawModel::SETTLEMENT_TYPE_WEEK]);
unset($settlementType[WithdrawModel::SETTLEMENT_TYPE_RECOUP]);
}
}
}
$this->ajaxReturn(['settlement_type' => $settlementType]);
}
public function getAmountBySettlementType()
{
$withdrawModel = new WithdrawModel();
$promoteId = intval(I('promote_id', 0));
$settlementType = intval(I('settlement_type', 0));
$time = I('time', '');
if (empty($promoteId) || !in_array($settlementType, [2, 3])) {
$this->ajaxReturn(['balance' => 0]);
}
$promote = M('promote', 'tab_')->find($promoteId);
if (empty($promote) || $promote['level'] != 1 || $promote['ver_status'] != 1 || empty($time)) {
$this->ajaxReturn(['balance' => 0]);
}
$data['begin_time'] = strtotime($time);
$data['end_time'] = strtotime('+1 month', $data['begin_time']) - 1;
if ($settlementType == 2) {
$balance = $withdrawModel->getMonthAmount($promote, $data);
} else {
$balance = $withdrawModel->getRecoupAmount($promote, $data);
}
$this->ajaxReturn(['balance' => $balance]);
}
}

@ -330,13 +330,13 @@ class BaseController extends HomeController
case 'Home/Promote/index':
break;
case 'Home/Safe/verifyPassword':
break;
break;
case 'Home/Safe/safeDocument':
break;
case 'Home/Promote/popRuleDetail':
break;
case 'Home/Promote/popRuleDetail':
break;
case 'Home/Promote/popRuleFinish':
break;
break;
default:
$this->tips($status,U('Safe/modifyBaseInfo'));
break;

@ -206,23 +206,6 @@
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script>
var tips = '{$tips}'
var message = '{$message}'
if(tips == 1) {
layer.open({
type: 1,
title: "提示",
area:['300px'],
closeBtn: 1,
shadeClose: true,
skin: 'yourclass',
btn:['确认','返回'],
content: '<div style="height:60px;display:flex;justify-content:center;align-content:center;align-items:center;">'+message+'</div>',
end:function(){window.location.href="{:U('Promote/index')}";},
yes:function(){window.location.href="{:U('Safe/modifyBaseInfo')}"},
});
}
var pop_ids = {$match_rules_id};
function pop_rulus_content(id, force = false)
{
@ -264,6 +247,24 @@
else
return null;
}
var tips = '{$tips}'
var message = '{$message}'
if(tips == 1) {
layer.open({
type: 1,
title: "提示",
area:['300px'],
closeBtn: 1,
shadeClose: true,
skin: 'yourclass',
btn:['确认','返回'],
content: '<div style="height:60px;display:flex;justify-content:center;align-content:center;align-items:center;">'+message+'</div>',
end:function(){window.location.href="{:U('Promote/index')}";},
yes:function(){window.location.href="{:U('Safe/modifyBaseInfo')}"},
});
}
$(function(){
$(".select_gallery").select2();
$('.icon').each(function() {

@ -917,6 +917,7 @@ ADD COLUMN `beta_url` varchar(150) NOT NULL DEFAULT '' COMMENT 'Beta链接';
ALTER TABLE `tab_game`
ADD COLUMN `pay_config` varchar(255) NOT NULL COMMENT '支付渠道 wx 微信 zfb 支付宝 quick 快捷 (gf 官方 sq 双乾';
<<<<<<< HEAD
-- 2019-12-30
-- 会长管理后台提现 cxj
ALTER TABLE `tab_withdraw`
@ -934,6 +935,8 @@ ADD COLUMN `last_op_type` tinyint(3) NOT NULL DEFAULT 1 COMMENT '最后操作人
ALTER TABLE `tab_promote`
ADD COLUMN `settlement_type` tinyint(3) NOT NULL DEFAULT 1 COMMENT '结算类型1-周结 2-月结';
=======
>>>>>>> release
ALTER TABLE tab_promote add `company_belong` tinyint(1) NOT NULL DEFAULT '0' COMMENT '工会归属0-内团1-外团';
ALTER TABLE tab_promote add `company_relation` tinyint(1) NOT NULL DEFAULT '0' COMMENT '工会关系0-自主开发及维护1-只维护';
-- 游戏的合作方新增联系人,联系电话,邮寄地址,公司税号,收款方名称,银行账号,开户行 liuweiwen 2020-01-03
@ -1033,20 +1036,51 @@ CREATE TABLE `tab_cp_game_ratio` (
-- 玩家列表账户锁定添加备注 2020-01-09 郑昌隆
ALTER TABLE `tab_user` ADD COLUMN `lock_remark` varchar(512) NOT NULL DEFAULT '' COMMENT '账号锁定原因' after lock_status;
-- 2019-12-30
-- 会长管理后台提现 cxj
ALTER TABLE `tab_withdraw`
ADD COLUMN `settlement_begin_time` int(10) NOT NULL DEFAULT 0 COMMENT '结算开始时间' AFTER `old_promote_account`;
ALTER TABLE `tab_withdraw`
ADD COLUMN `op_id` int(11) NOT NULL DEFAULT 0 COMMENT '操作id';
ALTER TABLE `tab_withdraw`
ADD COLUMN `op_type` tinyint(3) NOT NULL DEFAULT 1 COMMENT '操作人1-推广员 2-管理员 3-自动';
ALTER TABLE `tab_withdraw`
ADD COLUMN `last_op_id` int(11) NOT NULL DEFAULT 0 COMMENT '最后操作人id',
ADD COLUMN `last_op_type` tinyint(3) NOT NULL DEFAULT 1 COMMENT '最后操作人1-推广员 2-管理员 3-自动';
-- 平台规则
CREATE TABLE `sys_document_pop_rules` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '平台规则表',
`title` varchar(100) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`desc` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '描述',
`content` text COLLATE utf8mb4_bin,
`sort` smallint(3) unsigned NOT NULL DEFAULT '0' COMMENT '权重',
`type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '类型 0不弹窗 1弹出单次 2循环弹出',
`pop_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '弹窗时间',
`operate_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '操作时间',
`operater_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '操作者ID',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-- 2019-12-31
-- 推广员结算类型 cxj
ALTER TABLE `tab_promote`
ADD COLUMN `settlement_type` tinyint(3) NOT NULL DEFAULT 1 COMMENT '结算类型1-周结 2-月结';
ALTER TABLE tab_promote add `company_belong` tinyint(1) NOT NULL DEFAULT '0' COMMENT '工会归属0-内团1-外团';
ALTER TABLE tab_promote add `company_relation` tinyint(1) NOT NULL DEFAULT '0' COMMENT '工会关系0-自主开发及维护1-只维护';
-- 2020-01-02
-- 提现结算类型 cxj
ALTER TABLE `tab_withdraw`
ADD COLUMN `settlement_type` tinyint(3) NOT NULL DEFAULT 3 COMMENT '结算类型1-周结 2-月结 3-管理员提现 4-推广员提现 5-其他';
-- 2020 01-03 cxj
ALTER TABLE `sys_file`
MODIFY COLUMN `mime` char(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '文件mime类型';
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 '渠道分成比例';
-- 2020 01-06 cxj
ALTER TABLE `tab_promote_game_ratio`
ADD COLUMN `turnover_ratio` varchar(2000) NOT NULL COMMENT '流水分成比例' AFTER `last_ratio_status`;
ALTER TABLE `tab_promote_game_ratio`
ADD COLUMN `last_turnover_ratio` varchar(2000) NOT NULL COMMENT '上次流水分成比例' AFTER `turnover_ratio`;
-- 2020 01-07 cxj
ALTER TABLE `tab_withdraw`
ADD COLUMN `game_ratio` varchar(5000) NOT NULL COMMENT '游戏提现实际分成比例';
ALTER TABLE `tab_withdraw`
MODIFY COLUMN `settlement_type` tinyint(3) NOT NULL DEFAULT 1 COMMENT '结算类型1-周结 2-月结 9-其他';
-- 2020 01-13
-- 公会分成比例申请记录
@ -1070,3 +1104,17 @@ CREATE TABLE `tab_promote_game_ratio_log` (
PRIMARY KEY (`id`),
KEY `promote_id` (`promote_id`,`game_id`,`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-- 平台规则
CREATE TABLE `sys_document_pop_rules` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '平台规则表',
`title` varchar(100) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`desc` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '描述',
`content` text COLLATE utf8mb4_bin,
`sort` smallint(3) unsigned NOT NULL DEFAULT '0' COMMENT '权重',
`type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '类型 0不弹窗 1弹出单次 2循环弹出',
`pop_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '弹窗时间',
`operate_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '操作时间',
`operater_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '操作者ID',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

Loading…
Cancel
Save