Merge branch 'dev' of 47.111.118.107:/srv/git/platform into dev-cz

master
chenzhi 5 years ago
commit 831c728cda

@ -19,6 +19,11 @@ return array(
'GET_INFO_KEY' => 'wmkjtx_kj213',
'OA' => array(
'testUrl' => 'http://oa.76ba.com',
'formalUrl' => 'http://oa.76ba.com',
),
/* 文件上传相关配置 */
'DOWNLOAD_UPLOAD' => array(
'mimes' => '', //允许上传的文件MiMe类型

@ -891,9 +891,13 @@ public function auto_rrdae(){
}
//根据时间统计玩家充值
public function userPlayDataCount()
public function userPlayDataCount($time = '')
{
$time = strtotime(date('Y-m-d 00:00:00', time() - (3600 * 24)));
if ($time == '') {
$time = strtotime(date('Y-m-d 00:00:00', time() - (3600 * 24)));
} else {
$time = strtotime(date('Y-m-d 00:00:00', strtotime($time)));
}
$res = M('user_play_data_count', 'tab_')->where(array('create_time' => $time))->find();
if (empty($res)) {
$map['pay_time'] = ['between', [$time, strtotime(date('Y-m-d 23:59:59', $time))]];

@ -140,7 +140,7 @@ class ConsoleController extends Think {
public function deleteRepeatUserPlayInfo()
{
$gameIds = [157, 155, 153, 150, 151, 148, 175, 142, 143, 172, 173, 155, 154];
$gameIds = [157, 155, 153, 150, 151, 148, 175, 142, 143, 172, 173, 155, 154, 180];
foreach($gameIds as $gameId) {
$this->doDeleteRepeatUserPlayInfo($gameId);
}
@ -194,7 +194,7 @@ class ConsoleController extends Think {
public function deleteRepeatUserPlayInfo2()
{
$gameIds = [157, 148, 150, 151, 158, 175, 142, 143, 172, 173, 154, 155, 176, 165, 164, 179, 156, 153];
$gameIds = [157, 148, 150, 151, 158, 175, 142, 143, 172, 173, 154, 155, 176, 165, 164, 179, 156, 153, 180];
foreach ($gameIds as $gameId) {
$this->doDeleteRepeatUserPlayInfo2($gameId);
}
@ -245,4 +245,22 @@ class ConsoleController extends Think {
}
}
}
public function resetIndexChart()
{
for ($i=1; $i<100; $i++) {
$item = M('index_chart', 'tab_')->where(['id' => $i])->find();
if ($item) {
$item['new_user_hours'] = json_encode(unserialize($item['new_user_hours']));
$item['active_user_hours'] = json_encode(unserialize($item['active_user_hours']));
$item['active_user_list'] = json_encode(unserialize($item['active_user_list']));
$item['pay_user_hours'] = json_encode(unserialize($item['pay_user_hours']));
$item['pay_user_list'] = json_encode(unserialize($item['pay_user_list']));
$item['pay_money_hours'] = json_encode(unserialize($item['pay_money_hours']));
$item['promote_new_hours'] = json_encode(unserialize($item['promote_new_hours']));
$item['all_count'] = json_encode(unserialize($item['all_count']));
M("index_chart_1", "tab_")->add($item);
}
}
}
}

@ -41,6 +41,8 @@ class DeductBindRecordController extends ThinkController {
public function deductBindBalance(){
if(IS_POST){
$_REQUEST['user_id'] = (M('user','tab_')->field('id')->where(['account'=>$_REQUEST['user_id']])->find())['id'];
if(!isset($_REQUEST['user_id']) || $_REQUEST['user_id']<1){
$this->error("请选择账号");
}

@ -260,14 +260,24 @@ class IndexController extends AdminController {
$count1 = array();
$active_user_list = [];
$pay_user_list = [];
$dbdata = M("IndexChart","tab_")->field("new_user_count,active_user_count,active_user_list,pay_user_count,pay_user_list,pay_money_count,promote_new_count")
->where($map)->select();
$dbdata = M("IndexChart","tab_")->field("FROM_UNIXTIME(`date`, '%Y-%m-%d') as time,new_user_count,active_user_count,active_user_list,pay_user_count,pay_user_list,pay_money_count,promote_new_count")
->where($map)
->group("time")
->select();
//替换数据
$temparr = array();
for ($i=0; $i < count($datelist); $i++) {
$temparr[$datelist[$i]]['news'] = 0;
$temparr[$datelist[$i]]['active'] = 0;
$temparr[$datelist[$i]]['player'] = 0;
$temparr[$datelist[$i]]['money'] = 0;
}
foreach($dbdata as $k => $v) {
$data['news'][$k] = $v['new_user_count'];
$data['active'][$k] = $v['active_user_count'];
$data['player'][$k] = $v['pay_user_count'];
$data['money'][$k] = $v['pay_money_count'];
$temparr[$v['time']]['news'] =$v['new_user_count'];
$temparr[$v['time']]['active'] =$v['active_user_count'];
$temparr[$v['time']]['player'] =$v['pay_user_count'];
$temparr[$v['time']]['money'] =$v['pay_money_count'];
$active_user_list += json_decode($v['active_user_list'],true);
unset($v['active_user_list']);
unset($dbdata[$k]['active_user_list']);
@ -278,6 +288,14 @@ class IndexController extends AdminController {
$count1['pay_money_count'] += $v['pay_money_count'];
$count1['promote_new_count'] += $v['promote_new_count'];
}
foreach ($temparr as $key => $value) {
# code...
$data['news'][] = $value['news'];
$data['active'][] = $value['active'];
$data['player'][] = $value['player'];
$data['money'][] = $value['money'];
}
unset($dbdata);
$count1['active_user_count'] = count(array_flip(array_flip($active_user_list)));
unset($active_user_list);

@ -837,8 +837,8 @@ class MemberController extends ThinkController
*/
public function lock_status($id="", $lock_status, $accounts = "")
{
if ($accounts) $map['account'] = ['in', array_unique(explode(',', $accounts))];
if ($id) $map['id'] = ['in', array_unique(explode(',', $id))];
if ($accounts) $map['account'] = ['in', array_unique(explode("\n", $accounts))];
if ($id) $map['id'] = ['in', array_unique(explode("\n", $id))];
$users = M('user', 'tab_')->where($map)->field('id')->select();
$res = M('user', 'tab_')->where($map)->setField(['lock_status' => $lock_status]);
if ($res) {

@ -110,9 +110,9 @@ class PromoteController extends ThinkController
$arr['pageSize'] = 1000;
ksort($arr);
reset($arr);
$sign = md5(http_build_query($arr) . 'wmkjtx_kj213');
$sign = md5(http_build_query($arr) . C('GET_INFO_KEY'));
$arr['sign'] = $sign;
$re_data = curl_post('http://test.oa.76ba.com/api/wanmeng/platformAccount', $arr);
$re_data = curl_post(C('OA.formalUrl') . '/api/wanmeng/platformAccount', $arr);
$re_data = json_decode($re_data, true);
if ($re_data['code'] == 1) {
$oa = $re_data['data'];
@ -151,7 +151,7 @@ class PromoteController extends ThinkController
reset($arr);
$sign = md5(http_build_query($arr) . 'wmkjtx_kj213');
$arr['sign'] = $sign;
$re_data = curl_post('http://test.oa.76ba.com/api/wanmeng/verifyBind', $arr);
$re_data = curl_post(C('OA.formalUrl') . '/api/wanmeng/verifyBind', $arr);
$re_data = json_decode($re_data, true)['data'];
foreach ($list_data as $k => $v) {
$oa_val = $re_data[trim($v['account'])];

@ -69,7 +69,7 @@
<tr>
<td class="l">账户余额:</td>
<td class="r">
<span class="balance">0.00</span>平台
<span class="balance">0.00</span>绑定
</td>
</tr>
<tr>

@ -501,7 +501,7 @@ $(function(){
function shenhe(status){
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
return $(elem).val();
}).get().join(',');
}).get().join("\n");
var desc = '';
if (status == 0) {
desc = '锁定';
@ -511,8 +511,8 @@ $(function(){
layer.prompt({
formType: 2,
value: text,
placeholder : '玩家账号(英文逗号隔开',
title: '请输入要'+desc+'的玩家账号(英文逗号隔开)',
placeholder : '玩家账号(一个账号一行',
title: '请输入要'+desc+'的玩家账号(一个账号一行)',
area: ['800px', '350px'] //自定义文本域宽高
}, function(value, index, elem){
if(value=='') {

@ -37,7 +37,7 @@ class PlistParser
$this->xml = $xml;
} else {
$plist = new CFPropertyList();
$plist->parseBinary($content);
$plist->parse($content);
$this->plist = $plist;
}
return true;

@ -16,6 +16,7 @@ class Notify2Controller extends BaseController
*/
public function notify()
{
C(api('Config/lists'));
$apitype = I('get.apitype');#获取支付api类型
if (IS_POST && !empty($_POST)) {

@ -481,17 +481,7 @@ class DownloadController extends BaseController {
$map1['chain'] = ['like','%'.'/'.PID.'/'.'%'];
$rs = M('promote','tab_')->where($map1)->field('id,account,nickname')->select();
$childPromoteIds = '';
if(empty($rs)) {
$map['tab_test_resource.promote_id'] = PID;
}else {
foreach ($rs as $rsKey => $rsValue) {
$id = $rsValue['id'];
$childPromoteIds .= $id.',';
}
$childPromoteIds = rtrim($childPromoteIds, ',');
$childPromoteIds .= ',' . PID;
$map['tab_test_resource.promote_id'] = ['in', $childPromoteIds];
}
$map['tab_test_resource.promote_id'] = PID;
if(!empty(I('role_name'))){
$map['role_name']=['like','%'.I('role_name').'%'];
@ -547,17 +537,7 @@ class DownloadController extends BaseController {
$map1['chain'] = ['like','%'.'/'.PID.'/'.'%'];
$rs = M('promote','tab_')->where($map1)->field('id,account,nickname')->select();
$childPromoteIds = '';
if(empty($rs)) {
$map['tab_test_resource.promote_id'] = PID;
}else {
foreach ($rs as $rsKey => $rsValue) {
$id = $rsValue['id'];
$childPromoteIds .= $id.',';
}
$childPromoteIds = rtrim($childPromoteIds, ',');
$childPromoteIds .= ',' . PID;
$map['tab_test_resource.promote_id'] = ['in', $childPromoteIds];
}
$map['tab_test_resource.promote_id'] = PID;
if(!empty(I('type'))||I('type')==='0'){
$map['apply_status']=I('type');
@ -617,33 +597,23 @@ class DownloadController extends BaseController {
$map1['chain'] = ['like','%'.'/'.PID.'/'.'%'];
$rs = M('promote','tab_')->where($map1)->field('id,account,nickname')->select();
$childPromoteIds = '';
if(empty($rs)) {
$map['tab_test_resource.promote_id'] = PID;
}else {
foreach ($rs as $rsKey => $rsValue) {
$id = $rsValue['id'];
$childPromoteIds .= $id.',';
}
$childPromoteIds = rtrim($childPromoteIds, ',');
$childPromoteIds .= ',' . PID;
$map['tab_test_resource.promote_id'] = ['in', $childPromoteIds];
}
$map['tab_test_resource.promote_id'] = PID;
if(!empty(I('server_name'))){
$map['tab_test_resource.server_name']=I('server_name');
}
if(!empty(I('game_name'))){
$map['tab_test_resource.game_name']=I('game_name');
}
if(!empty(I('role_name'))){
$map['tab_test_resource.role_name']=['like','%'.I('role_name').'%'];
}
if(!empty(I('user_account'))){
$map['tab_test_resource.user_account']=['like','%'.I('user_account').'%'];
}
if(!empty(I('promote_id'))){
$map['tab_test_resource.promote_id']=I('promote_id');
}
if(!empty(I('server_name'))){
$map['tab_test_resource.server_name']=I('server_name');
}
if(!empty(I('game_name'))){
$map['tab_test_resource.game_name']=I('game_name');
}
if(!empty(I('role_name'))){
$map['tab_test_resource.role_name']=['like','%'.I('role_name').'%'];
}
if(!empty(I('user_account'))){
$map['tab_test_resource.user_account']=['like','%'.I('user_account').'%'];
}
if(!empty(I('promote_id'))){
$map['tab_test_resource.promote_id']=I('promote_id');
}
$conditions = json_encode($map,TRUE);
$addtime = time();
@ -831,6 +801,9 @@ class DownloadController extends BaseController {
* @author sunke
*/
public function regist_data_export() {
if (empty(I('begtime')) || empty(I('endtime'))) {
$this->error('请选择起止时间');
}
$beginTime = strtotime(I('begtime') . ' 00:00:00');
$endtime = strtotime(I('endtime') . ' 23:59:59');
if (($endtime - $beginTime) > 31 * 24 * 3600) {
@ -852,7 +825,7 @@ class DownloadController extends BaseController {
}
$levelPromote = $this->getLevelPromote();
$queryPromote = $this->getQueryPromote($levelPromote);
$map2[] = [
'_logic' => 'or',
'id' => $queryPromote['id'],

@ -663,7 +663,7 @@
$('.add-game').on('click', function () {
var thisElement = $(this);
var gameId = thisElement.attr('game-id');
var promoteType = thisElement.attr('promote-type');
var promoteType = parseInt(thisElement.attr('promote-type'));
$.ajax({
type: "post",
@ -690,8 +690,16 @@
});
}
if (promoteType == 3) {
$('#add_promote_title').text('添加推广员:');
switch (promoteType) {
case 2:
$('#add_promote_title').text('添加部长:');
break;
case 3:
$('#add_promote_title').text('添加组长:');
break;
case 4:
$('#add_promote_title').text('添加推广员:');
break;
}
$.myMethod("#add_promote_data",tagData,"add_promote_ids");

@ -76,8 +76,7 @@
<a class="side_tabbar" style="z-index: 1" href="http://wpa.qq.com/msgrd?v=3&amp;uin={:C('PC_SET_SERVER_QQ')}&amp;site=qq&amp;menu=yes" target="_blank">
<img src="__IMG__/index_about/qrcode.png" alt="">
</a>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=IlhuMR32KKlrV3pR6BuvSLVLQKQeEjwP"></script>
<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=IlhuMR32KKlrV3pR6BuvSLVLQKQeEjwP"></script>
<script src="__JS__/collaborate.js" type="text/javascript"></script>
<!-- WPA start -->
<script id="qd28857862714ea9ff78fbe4007a9d7ba302bde88b51" src="https://wp.qiye.qq.com/qidian/2885786271/4ea9ff78fbe4007a9d7ba302bde88b51" charset="utf-8" async defer></script>

@ -3,6 +3,7 @@ namespace Mobile\Controller;
use Org\Ipa365SDK\Ipa365;
use Org\WeixinSDK\Weixin;
use User\Api\MemberApi;
use Think\Log;
class SsgController extends BaseController {
const USER_NOT_ILLEGAL = -1; //用户名不合法
@ -19,7 +20,7 @@ class SsgController extends BaseController {
const CODE_ERROR = -97; //验证码错误
const RETURN_SUCCESS = 1;
const RETURN_FALSE = 2;
const signprice = 0.1; //充值金额
const signprice = 10; //充值金额
public function login()
@ -591,7 +592,6 @@ class SsgController extends BaseController {
$param['callback'] = "https://".$_SERVER['HTTP_HOST']."/mobile.php/Ssg/install_show/user_id/{$userId}/game_id/{$gameId}/order_id/{$orderId}";
//$param['notifyurl'] = "https://".$_SERVER['HTTP_HOST']."/callback.php/Notify/notify/apitype/alipay";
}
$ali_pay = $this->alipay($param);
redirect($ali_pay['url']);
}else{

@ -8,6 +8,7 @@
namespace Think;
use Org\UcenterSDK\Ucservice;
use Think\Log;
class Pay
{
@ -167,8 +168,9 @@ class Pay
break;
}
$notifyurl = $vo->getNotifyUrl();
if (!$notifyurl)
$notifyurl = 'http://' . $_SERVER ['HTTP_HOST'] . '/callback.php/Notify2/notify/apitype/alipay/methodtype/notify';
if (!$notifyurl){
$notifyurl = 'https://' . $_SERVER ['HTTP_HOST'] . '/callback.php/Notify2/notify/apitype/alipay/methodtype/notify';
}
$request->setNotifyUrl($notifyurl);
switch ($type) {

Loading…
Cancel
Save