Merge branch 'hotfix/reset_data_session' of wmtx/platform into release

添加会长无需重新登录/补链通知
master
万盟天下 4 years ago committed by Gogs
commit efa4c14c89

@ -9,7 +9,7 @@
namespace Addons\SiteStat;
use Common\Controller\Addon;
use Base\Service\AdminNoticeService;
/**
* 系统环境信息插件
* @author thinkphp
@ -700,13 +700,19 @@ class SiteStatAddon extends Addon
//$gift_list = array_merge($ty_gift,$new_gift_list); */
/* 2018-08-24 lwx add start */
$gift_list = M('giftbag','tab_')->field('tab_giftbag.id,tab_giftbag.giftbag_name,tab_giftbag.server_id,tab_giftbag.server_name,tab_game.game_name')
->join('tab_game on (tab_game.id = tab_giftbag.game_id)','inner')
->where('LENGTH(tab_giftbag.novice)-LENGTH(REPLACE(tab_giftbag.novice, ",", ""))+1<10')->select();
/* 2018-08-24 lwx add end */
$gift_list = M('giftbag','tab_')->field('tab_giftbag.id,tab_giftbag.giftbag_name,tab_giftbag.server_id,tab_giftbag.server_name,tab_game.game_name')
->join('tab_game on (tab_game.id = tab_giftbag.game_id)','inner')
->where('LENGTH(tab_giftbag.novice)-LENGTH(REPLACE(tab_giftbag.novice, ",", ""))+1<10')->select();
/* 2018-08-24 lwx add end */
$userAuth = session('user_auth');
$adminNoticeService = new AdminNoticeService();
$adminNoticeService->accept($userAuth['uid']);
$notices = $adminNoticeService->getAdminNotices($userAuth['uid']);
$this->assign('notices',$notices);
$this->assign('gift_list',$gift_list);
}

@ -24,6 +24,28 @@ $(document).ready(function () {
width: 60%;
padding-left: 6%;
}
.notice-btn {
display: inline-block;
/* width: 86px; */
height: 22px;
line-height: 22px;
text-align: center;
vertical-align: middle;
color: #ffffff;
border: 1px solid currentColor;
border-radius: 3px;
margin-left: 5px;
padding: 0px 5px;
background-color: #18b1ea;
cursor: pointer;
}
.notice-btn.readed-btn {
color: #ffffff;
background-color: #a5b6c8;
}
.notice-btn.delete-notice-btn {
background-color: #f56c6c;
}
</style>
<div class="zwm_xg">
@ -174,27 +196,48 @@ $(document).ready(function () {
<td colspan="2">
<div class="zw_bd" style="height:301px;overflow:hidden;overflow-y:auto;">
<table cellpadding="1" cellspacing="1" style="width:100%;">
<?php foreach($notices as $notice):?>
<tr data-id="<?=$notice['id']?>">
<td><?=$notice['title']?></td>
<td>
<?php if($notice['type'] == 'shift-player'):?>
<a target="_blank" href="{:U('Mend/recordList',array('account'=>$notice['target']))}">
<span><?=$notice['content']?></span>
</a>
<?php if($notice['status'] == 0):?>
<button class="read-btn notice-btn" type="button">标为已读</button>
<?php else:?>
<button class="readed-btn notice-btn" type="button">已读</button>
<?php endif;?>
<button class="delete-notice-btn notice-btn" type="button">删除</button>
<?php else:?>
<span><?=$notice['content']?></span>
<?php endif;?>
</td>
</tr>
<?php endforeach;?>
<volist name="fl_set" id="vo">
<tr>
<td>【返利设置】</td>
<td><a href="/admin.php?s=/Rebate/lists.html"><span>【{$vo.game_name}】充值返利已到期</span></a></td>
</tr>
<tr>
<td>【返利设置】</td>
<td><a href="/admin.php?s=/Rebate/lists.html"><span>【{$vo.game_name}】充值返利已到期</span></a></td>
</tr>
</volist>
<volist name="gift_list" id="vo">
<tr>
<td>【礼包列表】</td>
<td>
<a href="{:U('Giftbag/edit',array('id'=>$vo['id']))}">
<if condition="$vo['server_id'] eq 0">
<span>【{$vo.game_name}】{$vo.giftbag_name}数量不足</span>
<else/>
<span>【{$vo.game_name}】{$vo.server_name} {$vo.giftbag_name}数量不足</span>
</if>
</a>
</td>
</tr>
<tr>
<td>【礼包列表】</td>
<td>
<a href="{:U('Giftbag/edit',array('id'=>$vo['id']))}">
<if condition="$vo['server_id'] eq 0">
<span>【{$vo.game_name}】{$vo.giftbag_name}数量不足</span>
<else/>
<span>【{$vo.game_name}】{$vo.server_name} {$vo.giftbag_name}数量不足</span>
</if>
</a>
</td>
</tr>
</volist>
</table>
</div>
@ -472,5 +515,42 @@ $(".js_indexSetup").click(function(){
content: ['{:U("Index/setup")}', 'no'], //iframe的urlno代表不显示滚动条
});
});
$('.read-btn').on({
click: function () {
var that = this
var id = $(this).parents('tr').eq(0).attr('data-id')
$.ajax({
url: '{:U("User/readAdminNotice")}',
type: 'post',
dataType: 'json',
data: {id: id},
success: function(result) {
if (result.status == 1) {
$(that).removeClass('read-btn').addClass('readed-btn').off('click')
$(that).html('已读')
}
layer.msg(result.info)
}
})
}
})
$('.delete-notice-btn').on({
click: function () {
var that = this
var id = $(this).parents('tr').eq(0).attr('data-id')
$.ajax({
url: '{:U("User/deleteAdminNotice")}',
type: 'post',
dataType: 'json',
data: {id: id},
success: function(result) {
if (result.status == 1) {
$(that).parents('tr').eq(0).remove()
}
layer.msg(result.info)
}
})
}
})
</script>
</block>

@ -1653,6 +1653,20 @@ function getPowerPromoteIds()
return $promoteIds;
}
function resetUserAuth()
{
$userAuth = session('user_auth');
$adminData = getAdminData($userAuth['uid']);
$groupId = getGameGroup($userAuth['uid']);
$userAuth['data_empower_type'] = $adminData['data_empower_type'];
$userAuth['data_president'] = $adminData['data_president'];
$userAuth['show_data'] = $adminData['show_data'];
session('user_group_id',$groupId);
session('user_auth', $userAuth);
session('user_auth_sign', data_auth_sign($userAuth));
session('user_auth_promote_ids', null);
}
/**
* 为数据权限添加筛选参数
* @param array $map 查询条件
@ -3090,3 +3104,14 @@ function dateFormat($date) {
return date("Y.m.d",strtotime($date));
}
function getOrderHtml($field, $orderField, $orderType)
{
if ($orderField == $field && $orderType == 'asc') {
return '<span></span>';
} elseif ($orderField == $field && $orderType == 'desc') {
return '<span></span>';
} else {
return '<img src="/Public/Admin/images/paixu.png" width="13px">';
}
}

@ -571,6 +571,9 @@ class AuthManagerController extends AdminController{
'data_president'=>$promoteData,
'show_data'=>$show_data
))) {
resetUserAuth();
addOperationLog(array(
"op_type"=>1,
"key"=> M("AuthGroup")->where("id={$gid}")->field("title")->find()['title'],

@ -1446,245 +1446,118 @@ class FinanceController extends ThinkController
$this->display();
}
public function valueDetail($p=1) {
public function valueDetail($p=1)
{
$page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据
$row=10;
if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;}
$nowTime = date('Y-m-d');
$initBegTime = date('Y-m-d', strtotime('-6 day', strtotime($nowTime)));
$initEndTime = date('Y-m-d', time());
$sort = $_REQUEST['sort'];
if (empty($sort)) {
$sort = 13;
}
if(!empty($_REQUEST['user_account'])) {
$map['account'] = $_REQUEST['user_account'];
$map0['account'] = $_REQUEST['user_account'];
$userId = M('user', 'tab_')->where(['account'=>$_REQUEST['user_account']])->getField('id');
$map1['user_id'] = $userId;
$map2['user_id'] = $userId;
$map3['user_id'] = $userId;
$map4['user_id'] = $userId;
if(isset($_REQUEST['row'])) {
$row = $_REQUEST['row'];
} else {
$row = 10;
}
if (!empty($_REQUEST['timestart']) && !empty($_REQUEST['timeend'])) {
$map['create_time'] = array('between', [strtotime($_REQUEST['timestart']), strtotime($_REQUEST['timeend']) + 86399]);
} elseif (!empty($_REQUEST['timestart']) && empty($_REQUEST['timeend'])) {
$map['create_time'] = array('between', [strtotime($_REQUEST['timestart']), time()]);
} elseif (empty($_REQUEST['timestart']) && !empty($_REQUEST['timeend'])) {
$map['create_time'] = array('elt', (strtotime($_REQUEST['timeend']) + 86399));
$isExport = I('export', 0);
$startedAt = I('timestart', '');
$endedAt = I('timeend', '');
$userAccount = I('user_account', '');
$orderField = I('order_field', '');
$orderType = I('order_type', '');
}elseif (empty($_REQUEST['timestart']) && empty($_REQUEST['timeend']) && empty(I('user_account'))) {
$map['create_time'] = array('between', [strtotime($initBegTime), strtotime($initEndTime) + 86399]);
}
$order = 'id desc';
if ($sort == 1) {
$order = 'spendvalue desc';
}
if ($sort == 2) {
$order = 'deposit desc';
$map = [];
$lastMap = [];
$map['_string'] = $lastMap['_string'] = '1=1';
if ($startedAt != '') {
$map['_string'] .= ' and create_time >=' . strtotime($startedAt . ' 00:00:00');
}
if ($sort == 3 || $sort == 5) {
$order = 'spendvalue desc';
if ($endedAt != '') {
$map['_string'] .= ' and create_time <=' . strtotime($endedAt . ' 23:59:59');
$lastMap['_string'] .= ' and create_time <=' . strtotime($endedAt . ' 23:59:59');
}
if ($sort == 4) {
$order = 'spendvalue asc';
$userMap = [];
if ($userAccount != '') {
$userMap['account'] = $userAccount;
}
$valueSubSql = M('value_detail_log', 'tab_')->field([
'abs(IFNULL(sum(IF(pay_type=1,value,0)), 0)) amount1',
'IFNULL(sum(IF(pay_type=2,value,0)), 0) amount2',
'IFNULL(sum(IF(pay_type=3,value,0)), 0) amount3',
'user_id'
])
->where($map)
->group('user_id')
->select(false);
$lastSubSql = M('value_detail_log', 'tab_')->field(['CONVERT(SUBSTRING_INDEX(group_concat(id order by `create_time` desc),",",1), UNSIGNED INTEGER)'])
->where($lastMap)
->group('user_id')
->select(false);
$reaminSubSql = M('value_detail_log', 'tab_')->field('user_id, after_value amount')
->where(['_string' => 'id in(' . $lastSubSql . ')'])
->group('user_id')
->select(false);
$this->checkListOrCountAuthRestMap($userMap, []);
if ($sort == 6) {
$order = 'deposit desc';
}
if ($sort == 7) {
$order = 'deposit asc';
}
$query = M('user', 'tab_')
->alias('a')
->where($userMap)
->join('left join (' . $valueSubSql . ') b on a.id=b.user_id')
->join('left join (' . $reaminSubSql . ') c on a.id=c.user_id');
$countQuery = clone $query;
$sumQuery = clone $query;
if ($sort == 9) {
$order = 'promoteCoin desc';
}
if ($sort == 10) {
$order = 'promoteCoin asc';
$order = 'id desc';
if ($orderField != '') {
$order = $orderField . ' ' . ($orderType == '' ? 'desc' : $orderType);
}
if ($sort == 11) {
$order = 'id asc';
}
if ($sort == 12) {
$order = 'id desc';
}
$columns = ['a.account', 'a.id', 'a.balance', 'b.amount1 spend_value', 'b.amount2 deposit_value', 'b.amount3 promote_value', 'c.amount remain'];
if ($sort == 16) {
$order = 'restvalue desc';
}
if ($sort == 17) {
$order = 'restvalue asc';
$records = [];
if ($isExport == 1) {
$records = $query->field($columns)->order($order)->limit(10000)->select();
} else {
$records = $query->field($columns)->order($order)->page($page, $row)->select();
}
if ($sort == 19) {
$order = 'totalvalue desc';
foreach ($records as $key => $record) {
$records[$key]['spend_value'] = number_format(abs(floatval($record['spend_value'])), 2, '.', '');
$records[$key]['deposit_value'] = number_format(abs(floatval($record['deposit_value'])), 2, '.', '');
$records[$key]['promote_value'] = number_format(floatval($record['promote_value']), 2, '.', '');
$records[$key]['remain'] = number_format(floatval($record['remain']), 2, '.', '');
}
if ($sort == 20) {
$order = 'totalvalue asc';
$count = $countQuery->count();
$sumColumns = ['sum(a.balance) balance', 'sum(b.amount1) spend_value', 'sum(b.amount2) deposit_value', 'sum(b.amount3) promote_value', 'sum(c.amount) remain'];
$summary = $sumQuery->field($sumColumns)->find();
if($isExport == 1) {
$getData = $_GET;
unset($getData['export']);
addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U(CONTROLLER_NAME.'/'.ACTION_NAME,$getData),'menu'=>"财务-数据统计-平台币统计-导出"]);
data2csv($records, '平台币统计', [
'id' => '账号ID',
'account' => '玩家账号',
'balance' => '当前平台币余额',
'remain' => '平台币余额',
'spend_value' => '平台币直充支出',
'deposit_value' => '平台币直充金额',
'promote_value' => '后台发放平台币',
]);
}
$this->assign('sorting', $sort);
$map5['v.pay_type'] = 1;
$map5['v.create_time'] = $map['create_time'];
$map5[] = ['u.id = v.user_id'] ;
$map6[] = ['u.id = v.user_id'];
$map6['v.pay_type'] = 2;
$map6['v.create_time'] = $map['create_time'];
$map7[] = ['u.id = v.user_id'];
$map7['v.pay_type'] = 3;
$map7['v.create_time'] = $map['create_time'];
$map8[] = ['u.id = v.user_id'];
$map8['v.create_time'] = $map['create_time'];
$map9[] = ['u.id = v.user_id'];
$map9['v.pay_type'] = 3;
if (!empty($map['create_time'][1][1])) {
$map9['v.create_time'] = ['elt', $map['create_time'][1][1] ];
}
if (!empty($map['create_time'][1][0]) && empty($map['create_time'][1][1])) {
$map9['v.create_time'] = ['egt', $map['create_time'][1][0] ];
$page = set_pagination($count, $row);
if($page) {
$this->assign('_page', $page);
}
$valueQuery5 = M('value_detail_log', 'tab_')->alias('v')->field('IFNULL(sum(abs(v.value)), 0) as spend_value')
->where($map5)->buildSql();
$valueQuery6 = M('value_detail_log', 'tab_')->alias('v')->field('sum(v.value) as spend_value')
->where($map6)->buildSql();
$valueQuery7 = M('value_detail_log', 'tab_')->alias('v')->field('sum(v.value) as spend_value')
->where($map7)->buildSql();
$valueQuery9 = M('value_detail_log', 'tab_')->alias('v')->field('IFNULL(sum(abs(v.value)), 0) as spend_value')
->where($map9)->buildSql();
$valueQuery8 = M('value_detail_log', 'tab_')->alias('v')->field('after_value')->where($map8)->order('create_time desc')->limit(1)->buildSql();
$datas = M('user', 'tab_')->alias('u')->field("u.id, u.account, {$valueQuery8} as totalvalue, {$valueQuery5} as spendvalue, {$valueQuery6} as deposit, {$valueQuery7} as promoteCoin , if (({$valueQuery8}) - ({$valueQuery9}) > 0, ({$valueQuery8}) - ({$valueQuery9}), 0) as restvalue")->where($map0)->page($page,$row)->order($order)->group('u.id')->select();
$query = M('user', 'tab_')->alias('u')->field("u.id, u.account, {$valueQuery8} as totalvalue, {$valueQuery5} as spendvalue, {$valueQuery6} as deposit, {$valueQuery7} as promoteCoin , if (({$valueQuery8}) - ({$valueQuery9}) > 0, ({$valueQuery8}) - ({$valueQuery9}), 0) as restvalue")->where($map0)->order($order)->group('u.id')->buildSql();
$allTotalValue1 = M()->alias('t')->table($query)->sum('t.totalvalue');
$allRestValue = M()->alias('rest')->table($query)->sum('rest.restvalue');
// var_dump($datas);die();
// $datas = M('user', 'tab_')
// ->field('id, account')
// ->where($map0)
// ->page($page,$row)
// ->order('id desc')
// ->select();
$count = M('user', 'tab_')
->field('id, account')
->where($map)
->count();
$ids = array_column($datas, 'id');
if(empty($ids)) {
$ids = [-100];
}
$allDatas = [];
foreach($datas as $key => $data) {
$id = $data['id'];
$account = $data['account'];
$allDatas[$key]['user_id'] = $id;
$allDatas[$key]['user_account'] = $account;
$spend = $data['spendvalue'];
if(empty($spend)) {
$spend = '0.00';
}else {
$spend = number_format(abs($spend),2,'.','');
}
$deposit = $data['deposit'];
if(empty($deposit)) {
$deposit = '0.00';
}
$promoteCoin = $data['promotecoin'];
if(empty($promoteCoin)) {
$promoteCoin = '0.00';
}
$restValue = $data['restvalue'];
if(empty($restValue)) {
$restValue = '0.00';
}
$alltotalvalue = $data['totalvalue'];
if(empty($alltotalvalue)) {
$alltotalvalue = '0.00';
}
// $allDatas[$key]['bind_balance'] = $bind_balance;
$allDatas[$key]['after_value'] = $alltotalvalue ;
$allDatas[$key]['rest_value'] = $restValue ;
$allDatas[$key]['spend_amount'] = $spend;
$allDatas[$key]['deposit_amount'] = $deposit;
$allDatas[$key]['coin_amount'] = $promoteCoin;
}
$map1['create_time'] = $map['create_time'];
$map1['pay_type'] = 1;
$totalSpend = M('value_detail_log', 'tab_')->where($map1)->sum('value');
$totalSpend = empty($totalSpend) ? '0.00' : $totalSpend;
$totalSpend = number_format(abs($totalSpend),2,'.','');
$map2['create_time'] = $map['create_time'];
$map2['pay_type'] = 2;
$deposit = M('value_detail_log', 'tab_')->where($map2)->sum('value');
$deposit= empty($deposit) ? '0.00' : number_format($deposit,2,'.','');
$map3['create_time'] = $map['create_time'];
$map3['pay_type'] = 3;
$allpromoteCoin = M('value_detail_log', 'tab_')->where($map3)->sum('value');
$allpromoteCoin = empty($allpromoteCoin) ? '0.00' : number_format($allpromoteCoin,2,'.','');
$map4['create_time'] = $map['create_time'];
if($_REQUEST['user_account']) {
$banlace = M('value_detail_log', 'tab_')->field('user_id, after_value')->where($map4)->order('create_time desc')->limit(1)->select();
}else {
$banlace = M('value_detail_log', 'tab_')->field('user_id, after_value')->where($map4)->order('create_time desc')->select();
}
// $banlaceTotal = '0.00';
// foreach($banlace as $k222 => $vvv) {
// $banlaceTotal += $vvv['after_value'];
// }
// $banlaceTotal = number_format($banlaceTotal,2,'.','');
$map['user_id'] = ['in', $ids];
// $newValueByTimeDatas = M('value_detail_log', 'tab_')->field('user_id, after_value, create_time')->where($map)->order('create_time desc')->limit(1)->select();
// var_dump($newValueByTimeDatas);
// // var_dump($newValueByTimeDatas);die();
// foreach ($allDatas as $k => $allData) {
// $allDatas[$k]['after_value'] = "0.00";
// foreach ($newValueByTimeDatas as $key1 => $newValueByTimeData ) {
// if (intval($allData['user_id']) == intval($newValueByTimeData['user_id'])) {
// $allDatas[$k]['after_value'] = $newValueByTimeData['after_value'];
// break;
// }else {
// $allDatas[$k]['after_value'] = "0.00";
// }
// }
// }
$this->checkListOrCountAuthRestMap($map,[]);
$page = set_pagination($count,$row);
if($page) {$this->assign('_page', $page);}
if(empty($_REQUEST['timestart']) && empty($_REQUEST['timeend']) && empty(I('user_account'))) {
$this->assign('starttime', $initBegTime);
$this->assign('endtime', $initEndTime);
}else {
$this->assign('starttime', $_REQUEST['timestart']);
$this->assign('endtime', $_REQUEST['timeend']);
}
$this->assign('banlaceTotal', $allTotalValue1);
$this->assign('total', $totalSpend);
$this->assign('deposit', $deposit);
$this->assign('promoteCoin', $allpromoteCoin);
$this->assign('data', $allDatas);
$this->assign('resttotal', $allRestValue);
$this->assign('_page', $page);
$this->assign('records', $records);
$this->assign('summary', $summary);
$this->assign('orderField', $orderField);
$this->assign('orderType', $orderType);
$this->display();
}

@ -1262,6 +1262,7 @@ class PromoteCompanyController extends ThinkController
$dataPresident = array_diff($dataPresident, $subPromoteIds);
}
M('auth_group',"sys_")->where(['title'=>'市场总监'])->save(['data_president'=>implode(',', $dataPresident)]);
resetUserAuth();
}
}
}

@ -12,6 +12,7 @@ namespace Admin\Controller;
use User\Api\UserApi;
use Com\Wechat;
use Com\WechatAuth;
use Base\Service\AdminNoticeService;
/**
* 后台用户控制器
@ -839,4 +840,20 @@ class UserController extends AdminController
}
return $this->ajaxReturn(array('status' => 1, 'data' => $lists));
}
public function readAdminNotice()
{
$id = I('id', 0);
$service = new AdminNoticeService();
$service->read($id);
$this->success('标记成功');
}
public function deleteAdminNotice()
{
$id = I('id', 0);
$service = new AdminNoticeService();
$service->delete($id);
$this->success('删除成功');
}
}

@ -90,35 +90,17 @@
<div class="input-list">
<input type="text" id="time-start" name="timestart" class="" value="{$starttime}"
placeholder="开始时间"/>
placeholder="开始时间" autocomplete="off"/>
-
<div class="input-append date" id="datetimepicker" style="display:inline-block">
<input type="text" id="time-end" name="timeend" class="" value="{$endtime}"
placeholder="结束时间"/>
placeholder="结束时间" autocomplete="off"/>
<span class="add-on"><i class="icon-th"></i></span>
</div>
</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>-->
<input type="hidden" name="" value="" class="sortBy">
<input type="hidden" name="sort" value="" id="sort">
<input type="hidden" name="order_type" value="<?=$orderType?>">
<input type="hidden" name="order_field" value="">
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search"
@ -128,7 +110,6 @@
</div>
<!-- 数据列表 -->
<div class="data_list">
<div>
@ -136,83 +117,63 @@
<!-- 表头 -->
<thead>
<tr>
<if condition="$sorting eq 13">
<th class="pointer-hand" onclick="idsort(0)" id="zheng"><div class="tooltip">账号ID<img src="__IMG__/paixu.png" width="13px"><span class="tooltiptext"><span style="margin-left: -10px">检测时间最后一秒玩家留存的平台币</span></span></div></th>
<elseif condition="$sorting eq 12" />
<th class="pointer-hand" onclick="idsort(1)" id="dao"><div class="tooltip">账号ID<span ></span><span class="tooltiptext"><span style="margin-left: -10px">检测时间最后一秒玩家留存的平台币</span></span></div></th>
<elseif condition="$sorting eq 11" />
<th class="pointer-hand" onclick="idsort(2)" id="sheng"><div class="tooltip">账号ID<span></span><span class="tooltiptext"><span style="margin-left: -10px">检测时间最后一秒玩家留存的平台币</span></span></div></th>
<else />
<th class="pointer-hand" onclick="idsort(0)" id="zheng"><div class="tooltip">账号ID<img src="__IMG__/paixu.png" width="13px"><span class="tooltiptext"><span style="margin-left: -10px">检测时间最后一秒玩家留存的平台币</span></span></div></th>
</if>
<th class="pointer-hand">
<div class="tooltip">
<a class="paixu" data-order='id'>账号ID<?=getOrderHtml('id', $orderField, $orderType)?></a>
<span class="tooltiptext"><span style="margin-left: -10px">用户ID</span></span>
</div>
</th>
<th>玩家账号</th>
<if condition="$sorting eq 13">
<th class="pointer-hand" onclick="idsort(19)" id="zheng1"><div class="tooltip">平台币余额<img src="__IMG__/paixu.png" width="13px"><span class="tooltiptext"><span style="margin-left: -10px">检测时间最后一秒玩家留存的平台币</span></span></div></th>
<elseif condition="$sorting eq 19" />
<th class="pointer-hand" onclick="idsort(20)" id="dao1"><div class="tooltip">平台币余额<span ></span><span class="tooltiptext"><span style="margin-left: -10px">检测时间最后一秒玩家留存的平台币</span></span></div></th>
<elseif condition="$sorting eq 20" />
<th class="pointer-hand" onclick="idsort(21)" id="sheng1"><div class="tooltip">平台币余额<span ></span><span class="tooltiptext"><span style="margin-left: -10px">检测时间最后一秒玩家留存的平台币</span></span></div></th>
<else />
<th class="pointer-hand" onclick="idsort(19)" id="zheng1"><div class="tooltip">平台币余额<img src="__IMG__/paixu.png" width="13px"><span class="tooltiptext"><span style="margin-left: -10px">检测时间最后一秒玩家留存的平台币</span></span></div></th>
</if>
<if condition="$sorting eq 13">
<th class="pointer-hand" onclick="idsort(16)" id="zheng1"><div class="tooltip">平台币直充余额<img src="__IMG__/paixu.png" width="13px"><span class="tooltiptext"><span style="margin-left: -10px">检测时间最后一秒玩家累计消耗的平台币(只记录直充部分)</span></span></div></th>
<elseif condition="$sorting eq 16" />
<th class="pointer-hand" onclick="idsort(17)" id="dao1"><div class="tooltip">平台币直充余额<span ></span><span class="tooltiptext"><span style="margin-left: -10px">检测时间最后一秒玩家累计消耗的平台币(只记录直充部分)</span></span></div></th>
<elseif condition="$sorting eq 17" />
<th class="pointer-hand" onclick="idsort(18)" id="sheng1"><div class="tooltip">平台币直充余额<span ></span><span class="tooltiptext"><span style="margin-left: -10px">检测时间最后一秒玩家累计消耗的平台币(只记录直充部分)</span></span></div></th>
<else />
<th class="pointer-hand" onclick="idsort(16)" id="zheng1"><div class="tooltip">平台币直充余额<img src="__IMG__/paixu.png" width="13px"><span class="tooltiptext"><span style="margin-left: -10px">检测时间最后一秒玩家累计消耗的平台币(只记录直充部分)</span></span></div></th>
</if>
<if condition="$sorting eq 13">
<th class="pointer-hand" onclick="idsort(3)" id="zheng1"><div class="tooltip">平台币直充支出<img src="__IMG__/paixu.png" width="13px"><span class="tooltiptext"><span style="margin-left: -10px">检测时间内玩家累计消耗的平台币(只记录直充部分)</span></span></div></th>
<elseif condition="$sorting eq 3" />
<th class="pointer-hand" onclick="idsort(4)" id="dao1"><div class="tooltip">平台币直充支出<span ></span><span class="tooltiptext"><span style="margin-left: -10px">检测时间内玩家累计消耗的平台币(只记录直充部分)</span></span></div></th>
<elseif condition="$sorting eq 4" />
<th class="pointer-hand" onclick="idsort(5)" id="sheng1"><div class="tooltip">平台币直充支出<span ></span><span class="tooltiptext"><span style="margin-left: -10px">检测时间内玩家累计消耗的平台币(只记录直充部分)</span></span></div></th>
<else />
<th class="pointer-hand" onclick="idsort(3)" id="zheng1"><div class="tooltip">平台币直充支出<img src="__IMG__/paixu.png" width="13px"><span class="tooltiptext"><span style="margin-left: -10px">检测时间内玩家累计消耗的平台币(只记录直充部分)</span></span></div></th>
</if>
<if condition="$sorting eq 13">
<th class="pointer-hand" onclick="idsort(6)" id="zheng1"><div class="tooltip">平台币直充金额<img src="__IMG__/paixu.png" width="13px"><span class="tooltiptext"><span style="margin-left: -10px">检测时间内玩家累计消耗的平台币(只记录直充部分)</span></span></div></th>
<elseif condition="$sorting eq 6" />
<th class="pointer-hand" onclick="idsort(7)" id="dao1"><div class="tooltip">平台币直充金额<span ></span><span class="tooltiptext"><span style="margin-left: -10px">检测时间内玩家累计消耗的平台币(只记录直充部分)</span></span></div></th>
<elseif condition="$sorting eq 7" />
<th class="pointer-hand" onclick="idsort(8)" id="sheng1"><div class="tooltip">平台币直充金额<span ></span><span class="tooltiptext"><span style="margin-left: -10px">检测时间内玩家累计消耗的平台币(只记录直充部分)</span></span></div></th>
<else />
<th class="pointer-hand" onclick="idsort(6)" id="zheng1"><div class="tooltip">平台币直充金额<img src="__IMG__/paixu.png" width="13px"><span class="tooltiptext"><span style="margin-left: -10px">检测时间内玩家累计消耗的平台币(只记录直充部分)</span></span></div></th>
</if>
<if condition="$sorting eq 13">
<th class="pointer-hand" onclick="idsort(9)" id="zheng1"><div class="tooltip">后台发放平台币<img src="__IMG__/paixu.png" width="13px"><span class="tooltiptext"><span style="margin-left: -10px">检测时间内玩家累计后台发放的平台币(只记录直充部分)</span></span></div></th>
<elseif condition="$sorting eq 9" />
<th class="pointer-hand" onclick="idsort(10)" id="dao1"><div class="tooltip">后台发放平台币<span ></span><span class="tooltiptext"><span style="margin-left: -10px">检测时间内玩家累计后台发放的平台币(只记录直充部分)</span></span></div></th>
<elseif condition="$sorting eq 10" />
<th class="pointer-hand" onclick="idsort(15)" id="sheng1"><div class="tooltip">后台发放平台币<span ></span><span class="tooltiptext"><span style="margin-left: -10px">检测时间内玩家累计后台发放的平台币(只记录直充部分)</span></span></div></th>
<else />
<th class="pointer-hand" onclick="idsort(9)" id="zheng1"><div class="tooltip">后台发放平台币<img src="__IMG__/paixu.png" width="13px"><span class="tooltiptext"><span style="margin-left: -10px">检测时间内玩家累计后台发放的平台币(只记录直充部分)</span></span></div></th>
</if>
<th class="pointer-hand">
<div class="tooltip">
<a class="paixu" data-order='balance'>当前平台币余额<?=getOrderHtml('balance', $orderField, $orderType)?></a>
<span class="tooltiptext"><span style="margin-left: -10px">当前用户平台币余额(不随搜索时间变化)</span></span>
</div>
</th>
<th class="pointer-hand">
<div class="tooltip">
<a class="paixu" data-order='remain'>平台币余额<?=getOrderHtml('remain', $orderField, $orderType)?></a>
<span class="tooltiptext"><span style="margin-left: -10px">检测时间最后一秒玩家留存的平台币</span></span>
</div>
</th>
<th class="pointer-hand">
<div class="tooltip">
<a class="paixu" data-order='spend_value'>平台币直充支出<?=getOrderHtml('spend_value', $orderField, $orderType)?></a>
<span class="tooltiptext"><span style="margin-left: -10px">检测时间内玩家累计消耗的平台币(只记录直充部分)</span></span>
</div>
</th>
<th class="pointer-hand">
<div class="tooltip">
<a class="paixu" data-order='deposit_value'>平台币直充金额<?=getOrderHtml('deposit_value', $orderField, $orderType)?></a>
<span class="tooltiptext"><span style="margin-left: -10px">检测时间内玩家累计充值的平台币(只记录直充部分)</span></span>
</div>
</th>
<th class="pointer-hand">
<div class="tooltip">
<a class="paixu" data-order='promote_value'>后台发放平台币<?=getOrderHtml('promote_value', $orderField, $orderType)?></a>
<span class="tooltiptext"><span style="margin-left: -10px">检测时间内玩家累计后台发放的平台币(只记录直充部分)</span></span>
</div>
</th>
<th>操作</th>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<empty name ="data">
<empty name ="records">
<td colspan="11" class="text-center">aOh! 暂时还没有内容!</td>
<else />
<volist name="data" id="data">
<volist name="records" id="data">
<tr>
<td>{$data.user_id}</td>
<td>{$data.user_account}</td>
<td>{$data.after_value}</td>
<td>{$data.rest_value}</td>
<td><span>{$data.spend_amount}</span></td>
<td>{$data.deposit_amount}</td>
<td>{$data.coin_amount}</td>
<td>{$data.id}</td>
<td>{$data.account}</td>
<td>{$data.balance}</td>
<td>{$data.remain}</td>
<td>{$data.spend_value}</td>
<td>{$data.deposit_value}</td>
<td>{$data.promote_value}</td>
<td>
<a href="{:U('Finance/definiteDetaile',['user_id'=>$data['user_id'], 'timestart'=>$starttime, 'timeend'=>$endtime])}" >查看详情</a>
<a href="{:U('Finance/definiteDetaile',['user_id'=>$data['id'], 'timestart'=>I('timestart', ''), 'timeend'=>I('timeend', '')])}" >查看详情</a>
</td>
</tr>
@ -220,11 +181,11 @@
</empty>
<tr>
<td colspan="2">汇总(检索时间内所有数据的统计)</td>
<td>{$banlaceTotal}</td>
<td>{$resttotal}</td>
<td>{$total}</td>
<td>{$deposit}</td>
<td>{$promoteCoin}</td>
<td><?=$summary['balance']?></td>
<td><?=$summary['remain']?></td>
<td><?=abs($summary['spend_value'])?></td>
<td><?=$summary['deposit_value']?></td>
<td><?=$summary['promote_value']?></td>
<td></td>
</tr>
</tbody>
@ -233,7 +194,7 @@
</div>
<div class="page">
<if condition="$role_export_check eq true ">
<a class="sch-btn" href="{:U('Export/expUser',array_merge(array('id'=>28,'xlsname'=>'平台币统计','timestart'=>$starttime,'timeend'=>$endtime),I('get.')))}">导出</a>
<a id="page-download" class="sch-btn" href="javascript:;" data-href="{:U('Finance/valueDetail', array_merge(['export' => 1], I('get.')))}">导出</a>
</if>
{$_page|default=''}
</div>
@ -268,11 +229,17 @@
</script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('Finance/valueDetail')}');
highlight_subnav("{:U('Finance/valueDetail')}");
$(function () {
//搜索功能
$("#search").click(function () {
var url = $(this).attr('url');
$('.jssearch').find('[name=order_type]').val('');
$('.jssearch').find('[name=order_field]').val('');
search()
});
function search() {
var url = $('#search').attr('url');
var query = $('.jssearch').find('input').serialize();
query += "&" + $('.jssearch').find('select').serialize();
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
@ -291,27 +258,30 @@
}
}
window.location.href = url;
});
}
$(".paixu").click(function () {
var that = $(this);
$data_order = that.attr('data-order');
$order_type = '{$userarpu_order}';
if ($order_type == '' || $order_type == '4') {
$(".sortBy").attr('name', 'data_order');
val = '3,' + $data_order;
$(".sortBy").attr('value', val);
$("#search").click();
} else if ($order_type == '3') {
$(".sortBy").attr('name', 'data_order');
val = '4,' + $data_order;
$(".sortBy").attr('value', val);
$("#search").click();
var orderField = that.attr('data-order');
$('.jssearch').find('[name=order_field]').val(orderField);
var beforeType = $('.jssearch').find('[name=order_type]').val();
var beforeField = $('.jssearch').find('[name=order_field]').val();
if (beforeField != orderField) {
beforeType = '';
}
if (beforeType == '' || beforeType == 'asc') {
$('.jssearch').find('[name=order_type]').val('desc');
} else {
$('.jssearch').find('[name=order_type]').val('asc');
}
search()
});
//回车自动提交
$('.jssearch').find('input').keyup(function (event) {
if (event.keyCode === 13) {
$("#search").click();
$('.jssearch').find('[name=order_type]').val('');
$('.jssearch').find('[name=order_field]').val('');
search()
}
});
@ -423,6 +393,19 @@
})
$('#page-download').on({
click: function () {
var downloadUrl = $(this).attr('data-href')
layer.confirm('此页面数据量大仅支持导出前10000条记录继续导出', {
btn: ['确定','取消'] //按钮
}, function() {
window.location.href = downloadUrl
layer.closeAll()
}, function() {
});
}
})
/**
@ -478,87 +461,4 @@
});
});
</script>
<script>
function idsort(status) {
if(status == 0) {
document.getElementById('sort').value = 11
document.getElementById('search').click();
}
if (status == 1 ) {
document.getElementById('sort').value = 11
document.getElementById('search').click();
}
if (status == 2 ) {
alert('aaa')
document.getElementById('sort').value = 12
document.getElementById('search').click();
}
if (status == 3) {
document.getElementById('sort').value = 4
document.getElementById('search').click();
}
if (status == 4) {
document.getElementById('sort').value = 4
document.getElementById('search').click();
}
if (status == 5) {
document.getElementById('sort').value = 3
document.getElementById('search').click();
}
if (status == 6) {
document.getElementById('sort').value = 6
document.getElementById('search').click();
}
if (status == 7) {
document.getElementById('sort').value = 7
document.getElementById('search').click();
}
if (status == 8) {
document.getElementById('sort').value = 6
document.getElementById('search').click();
}
if (status == 9) {
document.getElementById('sort').value = 9
document.getElementById('search').click();
}
if (status == 10) {
document.getElementById('sort').value = 10
document.getElementById('search').click();
}
if (status == 15) {
document.getElementById('sort').value = 9
document.getElementById('search').click();
}
if (status == 16) {
document.getElementById('sort').value = 16
document.getElementById('search').click();
}
if (status == 17) {
document.getElementById('sort').value = 17
document.getElementById('search').click();
}
if (status == 18) {
document.getElementById('sort').value = 16
document.getElementById('search').click();
}
if (status == 19) {
document.getElementById('sort').value = 19
document.getElementById('search').click();
}
if (status == 20) {
document.getElementById('sort').value = 20
document.getElementById('search').click();
}
if (status == 21) {
document.getElementById('sort').value = 19
document.getElementById('search').click();
}
}
</script>
</block>

@ -76,7 +76,7 @@
<option value="">下拉选择</option>
<option value="-1">{:C('OFFICIEL_CHANNEL')}</option>
<volist name=":get_promote_list()" id="vo">
<option value="{$vo.id}">{$vo.account}{:get_parent_promoteto($vo['id'])}</option>
<option value="{$vo.id}">{$vo.account}</option>
</volist>
</select>
<input type="hidden" name="promote_id" value='{$data.promote_id}'/>

@ -0,0 +1,82 @@
<?php
namespace Base\Service;
use Base\Facade\Request;
class AdminNoticeService
{
public function accept($uid)
{
$notices = M('admin_notice','tab_')
->where([
'start_time' => ['elt', time()],
'end_time' => ['egt', time()],
'_string' => 'concat(",", admin_ids, ",") like "%,' . $uid . ',%"'
])
->getField('id', true);
if (empty($notices) || count($notices) == 0) {
return;
}
$readNotices = M('admin_notice_read', 'tab_')->where(['admin_id' => $uid, 'notice_id' => ['in', $notices]])->getField('notice_id', true);
$unreadNotices = $readNotices ? array_diff($notices, $readNotices) : $notices;
$records = [];
foreach ($unreadNotices as $noticeId) {
$records[] = [
'notice_id' => $noticeId,
'admin_id' => $uid,
'create_time' => time(),
'update_time' => time()
];
}
M('admin_notice_read', 'tab_')->addAll($records);
}
public function read($id)
{
M('admin_notice_read', 'tab_')->where(['id' => $id])->save(['status' => 1, 'update_time' => time()]);
}
public function delete($id)
{
M('admin_notice_read', 'tab_')->where(['id' => $id])->save(['status' => 2, 'update_time' => time()]);
}
public function getAdminNotices($uid)
{
$items = M('admin_notice_read', 'tab_')->field(['notice_id', 'status'])->where(['admin_id' => $uid, 'status' => ['in', [0, 1]]])->order('create_time desc')->select();
if (empty($items) || count($items) == 0) {
return [];
}
$ids = array_column($items, 'notice_id');
$notices = M('admin_notice','tab_')
->where([
'id' => ['in', $ids],
'start_time' => ['elt', time()],
'end_time' => ['egt', time()],
])
->select();
if ($notices) {
$notices = index_by_column('id', $notices);
}
$records = [];
foreach ($items as $item) {
$notice = $notices[$item['notice_id']] ?? null;
if (is_null($notice)) {
continue;
}
$records[] = [
'id' => $item['notice_id'],
'status' => $item['status'],
'type' => $notice['type'],
'content' => $notice['content'],
'title' => $notice['title'],
'target' => $notice['target'],
];
}
return $records;
}
}

@ -47,6 +47,7 @@ class MarketService
$dataPresident = explode(',', $authGroup['data_president']);
if (!in_array($promote['id'], $dataPresident)) {
M('auth_group', 'sys_')->where(['title'=>'市场总监'])->save(['data_president' => $authGroup['data_president'] . ',' . $promote['id']]);
resetUserAuth();
}
}

@ -276,6 +276,7 @@ class PromoteCompanyService
$dataPresident = array_diff($dataPresident, $subPromoteIds);
}
M('auth_group', 'sys_')->where(['title' => '市场总监'])->save(['data_president' => implode(',', $dataPresident)]);
resetUserAuth();
}
}
}

@ -321,9 +321,8 @@ class PromoteService {
$toPromote = M('promote', 'tab_')->where(['id' => $toPromoteId])->find();
$fromPromote = M('promote', 'tab_')->where(['id' => $fromPromoteId])->find();
$toPromote = $toPromote ?? ['id' => 0, 'account' => C('OFFICIEL_CHANNEL')];
$fromPromote = $fromPromote ?? ['id' => 0, 'account' => C('OFFICIEL_CHANNEL')];
$toPromote = $toPromote ?? ['id' => 0, 'account' => C('OFFICIEL_CHANNEL'), 'company_id' => 0];
$fromPromote = $fromPromote ?? ['id' => 0, 'account' => C('OFFICIEL_CHANNEL'), 'company_id' => 0];
if ($fromPromote['id'] == 0 && count($shiftIds) == 0) {
return ['status' => false, 'msg' => '官方渠道玩家不能全部迁移'];
@ -339,14 +338,26 @@ class PromoteService {
$users = M('user', 'tab_')->field(['id', 'account', 'nickname'])->where($map)->select();
$spendMap['pay_time'] = ['egt', $orderTime];
$spendMap['is_check'] = ['in','1,2'];
$spendMap['settle_check'] = 0;
$spendMap['selle_status'] = 0;
$spendMap['pay_status'] = 1;
$payAmountRows = M('spend', 'tab_')
->field(['user_id', 'sum(pay_amount) payAmount'])
->field(['user_id', 'sum(pay_amount) pay_amount'])
->where($spendMap)
->group('user_id')
->select();
$payAmountRows = index_by_column('user_id', $payAmountRows);
$users = index_by_column('id', $users);
$notices = [];
$formConpany = M('promote_company', 'tab_')->field(['company_name', 'company_belong'])->where(['id' => $fromPromote['company_id']])->find();
$toConpany = M('promote_company', 'tab_')->field(['company_name', 'company_belong'])->where(['id' => $toPromote['company_id']])->find();
$belongs = PromoteCompanyService::$belongs;
$mends = [];
foreach ($users as $item) {
$amount = isset($payAmountRows[$item['id']]) ? round(floatval($payAmountRows[$item['id']]['pay_amount']), 2) : 0;
$mends[] = [
'user_id' => $item['id'],
'user_account' => $item['account'],
@ -358,12 +369,28 @@ class PromoteService {
'remark' => $remark == '' ? ($task['creator_type'] == 0 ? '后台补链' : '玩家迁移') : $remark,
'order_time' => $orderTime,
'create_time' => time(),
'pay_amount' => isset($payAmountRows[$item['id']]) ? intval($payAmountRows[$item['id']]['payAmount']) : 0,
'pay_amount' => $amount,
'op_id' => $creator ? $creator['id'] : 0,
'op_account' => $opAccount,
'op_type' => $task['creator_type'],
'bind_type' => 1,
];
if ($amount > 500) {
$userWord = '玩家账号' . $item['account'];
$fromWord = $fromPromote['account'] . ($formConpany ? '(' . $belongs[$formConpany['company_belong']] . '-' . $formConpany['company_name'] : '');
$toWord = $toPromote['account'] . ($toConpany ? '(' . $belongs[$toConpany['company_belong']] . '-' . $toConpany['company_name'] : '');
$content = $userWord . ', 从' . $fromWord . '换绑到' . $toWord . '换绑金额超过500达到' . $amount . '元';
$notices[] = [
'type' => 'shift-player',
'title' => '换绑额度超500',
'content' => $content,
'admin_ids' => '1',
'create_time' => time(),
'target' => $item['account'],
'start_time' => time(),
'end_time' => time() + 7*24*3600,
];
}
}
$model = new Model();
@ -375,6 +402,10 @@ class PromoteService {
return ['status' => false, 'msg' => '系统异常,添加变更记录失败'];
}
if (count($notices) > 0) {
M('admin_notice', 'tab_')->addAll($notices);
}
$updateData = [
'promote_id' => $toPromote['id'],
'promote_account' => $toPromote['account']
@ -398,15 +429,17 @@ class PromoteService {
M('user_play', 'tab_')->where($otherMap)->save($updateData);
M('user_play_info', 'tab_')->where($otherMap)->save($updateData);
$orderMap1 = $otherMap;
$orderMap1['pay_time'] = ['egt', $orderTime];
M('spend', 'tab_')->where($orderMap1)->where(['is_check' => ['in','1,2'], 'settle_check' => 0, 'selle_status' => 0])->save(array_merge($updateData, $updateMarket)); // 只改未对账的数据
M('bind_spend', 'tab_')->where($orderMap1)->save($updateData);
unset($spendMap['pay_status']);
M('spend', 'tab_')->where($spendMap)->save(array_merge($updateData, $updateMarket)); // 只改未对账的数据
$bindMap = $otherMap;
$bindMap['pay_time'] = ['egt', $orderTime];
M('bind_spend', 'tab_')->where($bindMap)->save($updateData);
$orderMap2 = $otherMap;
$orderMap2['create_time'] = ['egt', $orderTime];
M('deposit', 'tab_')->where($orderMap2)->save(array_merge($updateData, $updateMarket));
M('user_play_data_count', 'tab_')->where($orderMap2)->save(['promote_id' => $toPromote['id']]);
$orderMap = $otherMap;
$orderMap['create_time'] = ['egt', $orderTime];
M('deposit', 'tab_')->where($orderMap)->save(array_merge($updateData, $updateMarket));
M('user_play_data_count', 'tab_')->where($orderMap)->save(['promote_id' => $toPromote['id']]);
$status = M('shift_task', 'sys_')->where('id=' . $task['id'])->save(['status' => 1, 'handle_time' => time()]);
if (!$status) {
@ -1032,6 +1065,7 @@ class PromoteService {
$id = M('promote', 'tab_')->getLastInsID();
$info = M('sys_auth_group')->where(['title'=>'市场总监'])->find();
M('sys_auth_group')->where(['title'=>'市场总监'])->save(['data_president'=>$info['data_president'].",".$id]);
resetUserAuth();
}
return $insert;

@ -2517,6 +2517,28 @@ CREATE TABLE `tab_payment_orders` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `tab_admin_notice` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(20) NOT NULL COMMENT '提示类型',
`title` varchar(32) NOT NULL COMMENT '标题',
`content` varchar(255) NOT NULL COMMENT '内容',
`admin_ids` varchar(255) NOT NULL DEFAULT '' COMMENT '接收管理员ID',
`target` varchar(255) NOT NULL DEFAULT '' COMMENT '对应标识',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`start_time` int(11) NOT NULL DEFAULT '0' COMMENT '展示开始时间',
`end_time` int(11) NOT NULL DEFAULT '0' COMMENT '展示结束时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `tab_admin_notice_read` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`notice_id` int(11) NOT NULL COMMENT '通知ID',
`admin_id` int(11) NOT NULL COMMENT '管理员ID',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) NOT NULL DEFAULT '0' COMMENT '更新时间',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态 0 未读 1 已读',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/**
@ -2628,4 +2650,4 @@ ALTER TABLE `tab_company_info`
ADD COLUMN `invoice_item` varchar(255) NULL DEFAULT '' COMMENT '开票内容' AFTER `fax_ratio`,
ADD COLUMN `invoice_type` varchar(255) NULL DEFAULT '' COMMENT '开票类型' AFTER `invoice_item`,
ADD COLUMN `register_phone` varchar(24) NULL DEFAULT '' COMMENT '注册电话' AFTER `invoice_type`,
ADD COLUMN `register_address` varchar(255) NULL DEFAULT '' COMMENT '注册地址' AFTER `register_phone`;
ADD COLUMN `register_address` varchar(255) NULL DEFAULT '' COMMENT '注册地址' AFTER `register_phone`;

Loading…
Cancel
Save