测试资源代码修正

master
zhengyongxing 5 years ago
parent a9e6dafad3
commit b6b97c130d

@ -396,6 +396,9 @@ class TestResourceController extends ThinkController
$map['create_time'] = array('BETWEEN',array(strtotime($_REQUEST['start']),strtotime($_REQUEST['end'])+24*60*60-1));
unset($_REQUEST['start']);unset($_REQUEST['end']);
}
if(!empty($_REQUEST['promote_id'])||$_REQUEST['promote_id']=='0') {
$map['tab_test_resource.promote_id']=I('promote_id');
}
//
$res = D("test_resource")->getResourceCout($map,$page,$row);
// dump($res);

@ -33,9 +33,9 @@ class TestResourceModel extends Model{
$promote_id=session("promote_auth.pid");
//获取基本信息
$res = $this
->table("tab_test_resource as test")
->field("test.*,user.check_status")
->join('tab_user user on test.user_id=user.id','left')
->table("tab_test_resource")
->field("tab_test_resource.*,user.check_status")
->join('tab_user user on tab_test_resource.user_id=user.id','left')
->page($page,$row)
->order("create_time desc")
->where($map)

@ -66,6 +66,21 @@
<if condition="$_GET['server_name'] neq ''"><option value="{$_GET['server_name']}">{$_GET['server_name']}</option></if>
</select>
</div>
<div class="input-list search_item input-list-gamenoticestatus">
<select name="promote_level" style="color:#444" class="select_gallery" id="promote_level">
<option value="">请选择推广员等级</option>
<option value="1" <?php if ($_POST['promote_level'] == 1):?>selected<?php endif;?>>会长</option>
<option value="2" <?php if ($_POST['promote_level'] == 2):?>selected<?php endif;?>>部门长</option>
<option value="3" <?php if ($_POST['promote_level'] == 3):?>selected<?php endif;?>>组长</option>
<option value="4" <?php if ($_POST['promote_level'] == 4):?>selected<?php endif;?>>组员</option>
</select>
-
</div>
<div class="input-list search_item input-list-gamenoticestatus">
<select name="promote_id" style="color:#444" class="select_gallery" id="promote_id">
<option value="">请选择推广员</option>
</select>
</div>
<div class="input-list">
<input type="text" name="user_account" placeholder="测试账号" class="" value="{:I('user_account')}"/>&nbsp;
@ -195,6 +210,7 @@
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('testResource/index')}');
$(".select_gallery").select2();
$(function(){
$('#time-start').datetimepicker({
@ -231,6 +247,30 @@
}
window.location.href = url;
});
var promote_id = "{:I('promote_id')}";
$("#promote_level").change(function(){
$.ajax({
url:"{:U('Ajax/getPromotersByLevelOther')}",
type:"get",
data:{level:$("#promote_level option:selected").val()},
dataType:'json',
success:function(response){
str = '<option value="">请选择推广员</option>' +
// '<option value="0"'+(promote_id && 0 == promote_id?'selected':'')+'>官方渠道</option>' +
'';
data = response.data;
for (var i in data){
str += "<option value='"+data[i].id+"' "+(promote_id && data[i].id == promote_id?'selected':'')+">"+data[i].nickname+"</option>"
}
$("#promote_id").empty();
$("#promote_id").append(str);
$("#promote_id").select2();
}
})
});
$("#promote_level").change();
$(".paixu").click(function(){
var that=$(this);
$data_order=that.attr('data-order');

@ -1222,6 +1222,18 @@ MODIFY COLUMN `company_relation` tinyint(1) NOT NULL DEFAULT 0 COMMENT '工会
ALTER TABLE `tab_withdraw`
ADD COLUMN `review_type` tinyint(3) NOT NULL DEFAULT 1 COMMENT '审核模式1-人工审核 2-自动审核';
--2020-02-10 sunke --
ALTER TABLE `tab_promote_company`
ADD COLUMN `settlement_contact` VARCHAR(60) 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) 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) NOT NULL DEFAULT '0' COMMENT '银行卡名' AFTER `bank_card`,
ADD COLUMN `bank_name` VARCHAR(60) NOT NULL DEFAULT '0' COMMENT '收款银行' AFTER `bank_cardname`,
ADD COLUMN `bank_address` VARCHAR(60) NOT NULL DEFAULT '0' COMMENT '开户网点' AFTER `bank_name`,
ADD COLUMN `content` VARCHAR(255) NULL DEFAULT '' COMMENT '备注' AFTER `bank_address`;
--2020-02-11 chenzhi 广--
ALTER TABLE `tab_promote_company`
ADD COLUMN `platform_name` VARCHAR(60) NOT NULL DEFAULT '' COMMENT '平台名称' AFTER `bank_address`,
@ -1233,6 +1245,26 @@ ADD COLUMN `is_sign_contact` tinyint(3) NOT NULL DEFAULT 0 COMMENT '是否签署
ADD COLUMN `company_belong` tinyint(1) UNSIGNED NOT NULL DEFAULT 3 COMMENT '工会归属0-内团1-外团 2-分发联盟 3 无' AFTER `is_sign_contact`,
ADD COLUMN `resources` VARCHAR(2000) NULL DEFAULT '' COMMENT '文档' AFTER `company_belong`;
-- 添加测试订单录入表 郑昌隆 2020-02-12
DROP TABLE IF EXISTS `tab_test_order`;
CREATE TABLE `tab_test_order` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`order_type` tinyint(2) DEFAULT '0' COMMENT '0-未知1-sdk充值2-平台币充值3-超级签充值',
`server_type` tinyint(2) DEFAULT '1' COMMENT '1-测试内网 2-测试外网',
`order_no` varchar(256) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '平台充值订单号',
`cp_order_no` varchar(256) COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'CP订单号',
`user_account` varchar(30) COLLATE utf8mb4_bin DEFAULT '' COMMENT '用户账号',
`game_id` int(11) DEFAULT '0' COMMENT '游戏ID',
`game_name` varchar(30) COLLATE utf8mb4_bin DEFAULT '' COMMENT '游戏名称',
`order_amount` decimal(10,2) DEFAULT NULL COMMENT '订单金额',
`pay_amount` decimal(10,2) DEFAULT NULL COMMENT '支付金额',
`pay_time` int(11) DEFAULT '0' COMMENT '交易时间',
`pay_way` int(11) DEFAULT NULL COMMENT '-1绑币,0平台币,1支付宝,2微信,7金猪,9双乾支付-支付宝,10双乾支付-银联,15双乾支付-快捷',
`add_time` int(11) DEFAULT '0' COMMENT '添加时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-- 2020-02-12 zyx 推广提现--新增审核模式
ALTER TABLE `tab_statement`
MODIFY COLUMN `ext_field` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '扩展字段,如果是下游为提现单号' AFTER `pay_type`;
@ -1428,6 +1460,24 @@ CREATE TABLE `tab_user_action_log` (
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;
-- 2020-03-04 zyx 添加可用余额统计表
CREATE TABLE `tab_promote_game_available_balance` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`promote_id` int(11) NOT NULL DEFAULT 0 COMMENT '推广员id',
`promote_account` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '推广员账号',
`game_id` int(11) NOT NULL DEFAULT 0 COMMENT '游戏id',
`game_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '游戏名称',
`server_id` int(11) NOT NULL DEFAULT 0 COMMENT '游戏区服',
`server_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '区服名称',
`available_balance` int(11) NOT NULL DEFAULT 0 COMMENT '可用余额',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;
-- 2020-03-05 zyx spend添加索引
ALTER TABLE `tab_spend`
ADD INDEX `pay_channel`(`pay_way`, `pay_status`, `game_id`) USING BTREE,
ADD INDEX `pay_channel_type`(`pay_status`, `pay_way`) USING BTREE;
-- 2020-03-05 yulingwei 工单表
CREATE TABLE `tab_work_order_info` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
@ -1451,6 +1501,20 @@ CREATE TABLE `tab_work_order_info` (
`resource_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '资源数',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-- 为游戏统计新增spend索引 chenzhi 2020/03/11
ALTER TABLE `tab_spend`
ADD INDEX `game_time`(`game_id`,`pay_time`) USING BTREE;
-- 为公会统计新增spend索引 chenzhi 2020/03/11
ALTER TABLE `tab_spend`
ADD INDEX `promote_time`(`promote_id`,`pay_time`) USING BTREE;
-- liaojinling 用户重复标识
ALTER TABLE `tab_user`
ADD INDEX `index_device_ip` (`device_number`, `last_login_ip`) USING BTREE ;
ALTER TABLE `tab_user`
ADD COLUMN `is_repeat` tinyint(1) not null default 0 comment '是否重复用户[设备/IP]';
-- 2020-03-04 zyx 添加可用余额统计表
CREATE TABLE `tab_promote_game_available_balance` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@ -1557,6 +1621,31 @@ CREATE TABLE `tab_pay_channel_intention` (
`create_time` int(11) NULL DEFAULT 0 COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
-- 2020-03-23 zyx 市场结算统计表添加
CREATE TABLE `tab_market_balance` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`my_time` varchar(11) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '当前年份月份',
`pay_amount` decimal(11, 2) NULL DEFAULT 0.00 COMMENT '金额',
`game_id` int(11) NULL DEFAULT 0 COMMENT '游戏id',
`game_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '游戏名称',
`game_names` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '游戏名称排除设备',
`promote_id` int(11) NULL DEFAULT 0 COMMENT '推广员id',
`promote_account` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '推广员账号',
`company_relation` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '公司关联',
`company_belong` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '公司内外团',
`root_id` int(11) NULL DEFAULT 0 COMMENT '推广员根id',
`account` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '推广员根账号',
`ratio` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT '0',
`turnover_ratio` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT '0',
`game_ratio` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT '0',
`upstream` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT '0' COMMENT '上游流水',
`downstream` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT '0' COMMENT '下游流水',
`highquality` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT '0' COMMENT '绩优流水',
`sdk_version` int(11) NULL DEFAULT 1 COMMENT '游戏设备类型',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;
ALTER TABLE `tab_pay_channel_intention`
ADD COLUMN `pay_status` tinyint(2) NULL DEFAULT 0 COMMENT '支付状态 0未支付 1已支付' AFTER `create_time`;
ALTER TABLE `tab_pay_channel_intention`
@ -1605,6 +1694,14 @@ CREATE TABLE `tab_finance_compare_info` (
KEY `pay_way` (`pay_way`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='财务导入对账详情表';
-- zyx 20200417
ALTER TABLE `tab_spend`
ADD COLUMN `old_change_promote_id` int(11) NULL DEFAULT 0 COMMENT '修改配置前渠道' AFTER `old_promote_account`,
ADD COLUMN `old_change_promote_account` varchar(30) NOT NULL default '' COMMENT '修改配置前渠道账号' AFTER `old_change_promote_id`;
ALTER TABLE `tab_deposit`
ADD COLUMN `old_change_promote_id` int(11) NULL DEFAULT 0 COMMENT '修改配置前渠道' ,
ADD COLUMN `old_change_promote_account` varchar(30) NOT NULL default '' COMMENT '修改配置前渠道账号' ;
-- zyx 20200420
ALTER TABLE `platform`.`sys_auth_rule`
MODIFY COLUMN `title` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '规则中文描述' AFTER `name`;

Loading…
Cancel
Save