Commit 7de8a5a2 authored by zazaname's avatar zazaname

聚合服务端后台V1.0

parent 6c649c03
<?php
namespace app\admin\controller\data;
use app\common\controller\AdminController;
use EasyAdmin\annotation\ControllerAnnotation;
use EasyAdmin\annotation\NodeAnotation;
use think\App;
/**
* @ControllerAnnotation(title="data_register_retain")
*/
class RegisterRetain extends AdminController
{
use \app\admin\traits\Curd;
public function __construct(App $app)
{
parent::__construct($app);
$this->model = new \app\admin\model\DataRegisterRetain();
}
}
\ No newline at end of file
<?php
namespace app\admin\model;
use app\common\model\TimeModel;
class DataRegisterRetain extends TimeModel
{
protected $name = "data_register_retain";
protected $deleteTime = false;
}
\ No newline at end of file
<div class="layuimini-container">
<div class="layuimini-main">
<table id="currentTable" class="layui-table layui-hide"
data-auth-add="{:auth('data.register_retain/add')}"
data-auth-edit="{:auth('data.register_retain/edit')}"
data-auth-delete="{:auth('data.register_retain/delete')}"
lay-filter="currentTable">
</table>
</div>
</div>
\ No newline at end of file
......@@ -71,7 +71,7 @@ class CmdLog
{
$msg = self::$out_sta.date("Y-m-d H:i:s")." [{$log_type}] " . $msg .self::$out_end. "\n";
}
Log::record($msg);
Log::write($msg);
echo $msg;
}
......
......@@ -84,6 +84,14 @@ class Send
$params['sign'] = md5($signStr);
$response = Requests::post($gamesInfo['send_url'],['Accept' => 'application/json'],$params)->body;
Db::table('app_order')->where(['order_id'=>$orderInfo['order_id']])->update(['wap_number'=>Db::raw('wap_number+1')]);
// 补单记录
Db::table("app_callback_log")->insert([
'order_id' => $orderInfo['order_id'],
'requrl' => $gamesInfo['send_url'],
'reqparams' => json_encode($params),
'reqresult' => $response,
'reqtime' => time(),
]);
$response_arr = json_decode($response,true);
if($response_arr['code'] === 200){
Db::table('app_order')->where(['order_id'=>$orderInfo['order_id']])->update(['gstatus'=>1]);
......
......@@ -19,13 +19,14 @@ define(["jquery", "easy-admin"], function ($, ea) {
init: init,
cols: [[
{type: 'checkbox'},
{field: 'app_id', title: '游戏ID'},
{field: 'product_name', title: '主游戏'},
{field: 'app_name', title: '子游戏名称'},
{field: 'appkey', title: 'appkey',search:false},
{field: 'paykey', title: 'paykey',search:false},
{field: 'app_id',width: 100, title: '游戏ID'},
{field: 'product_name',width: 200, title: '主游戏'},
{field: 'app_name', width: 200, title: '子游戏名称'},
{field: 'appkey', width: 300, title: 'appkey',search:false},
{field: 'paykey', width: 300, title: 'paykey',search:false},
{
field: 'status',
width: 100,
title: '状态',
search:false,
templet: function (d) {
......@@ -38,6 +39,7 @@ define(["jquery", "easy-admin"], function ($, ea) {
},
{
field: 'is_test',
width: 100,
title: '是否测试',
search:false,
templet: function (d) {
......@@ -48,9 +50,9 @@ define(["jquery", "easy-admin"], function ($, ea) {
}
}
},
{field: 'add_user', title: '创建人',search:false},
{field: 'add_time', title: '创建时间',search:false},
{width: 250, title: '操作', templet: ea.table.tool},
{field: 'add_user', width: 200, title: '创建人',search:false},
{field: 'add_time', width: 200, title: '创建时间',search:false},
{width: 200, title: '操作', templet: ea.table.tool},
]],
});
......
......@@ -20,19 +20,20 @@ define(["jquery", "easy-admin"], function ($, ea) {
toolbar: ['refresh'],
cols: [[
{type: 'checkbox'},
{field: 'id', title: '序号', search: false},
{field: 'uid', title: '用户id'},
{field: 'order_id', title: '平台订单号'},
{field: 'cp_order_id', title: 'CP订单号'},
{field: 'ver', title: '渠道号'},
{field: 'appid', title: '游戏ID'},
{field: 'server_id', title: '服务器ID', search: false},
{field: 'server_name', title: '区服名称', search: false},
{field: 'role_id', title: '角色ID', search: false},
{field: 'role_name', title: '角色名'},
{field: 'role_level', title: '角色等级', search: false},
{field: 'id', width:80,title: '序号', search: false},
{field: 'uid', width:100,title: '用户id'},
{field: 'order_id', width:200,title: '平台订单号'},
{field: 'cp_order_id', width:150,title: 'CP订单号'},
{field: 'ver', width:100,title: '渠道号'},
{field: 'appid', width:100,title: '游戏ID'},
{field: 'server_id', width:100,title: '服务器ID', search: false},
{field: 'server_name', width:100,title: '区服名称', search: false},
{field: 'role_id', width:100,title: '角色ID', search: false},
{field: 'role_name', width:100,title: '角色名'},
{field: 'role_level', width:100,title: '角色等级', search: false},
{
field: 'status',
width:100,
title: '订单状态',
search: false,
templet: function (d) {
......@@ -48,6 +49,7 @@ define(["jquery", "easy-admin"], function ($, ea) {
},
{
field: 'gstatus',
width:100,
title: '游戏状态',
search: false,
templet: function (d) {
......@@ -60,13 +62,14 @@ define(["jquery", "easy-admin"], function ($, ea) {
}
}
},
{field: 'money', title: '下单金额(元)', search: false},
{field: 'amount', title: '到账金额(元)', search: false},
{field: 'subject', title: '商品标题', search: false},
{field: 'wap_number', title: '补发次数', search: false},
{field: 'create_time', title: '下单时间', search: 'range'},
{field: 'money', width:100,title: '下单金额(元)', search: false},
{field: 'amount', width:100,title: '到账金额(元)', search: false},
{field: 'subject', width:100,title: '商品标题', search: false},
{field: 'wap_number', width:100,title: '补发次数', search: false},
{field: 'create_time', width:200,title: '下单时间', search: 'range'},
{
title: '操作',
width:150,
templet: ea.table.tool,
operat: [
[
......
......@@ -20,7 +20,7 @@ define(["jquery", "easy-admin"], function ($, ea) {
cols: [[
{type: 'checkbox'},
{field: 'product_id', title: '序号',search: false},
{field: 'product_name', title: '主游戏名称'},
{field: 'product_name', title: '主游戏名称',search:'xm-select',selectList: {0: '禁用', 1: '启用'}},
{field: 'add_user', title: '创建人',search: false},
{field: 'add_time', title: '添加时间',search: false},
{width: 250, title: '操作', templet: ea.table.tool},
......
......@@ -18,15 +18,15 @@ define(["jquery", "easy-admin"], function ($, ea) {
init: init,
cols: [[
{type: 'checkbox'},
{field: 'id', title: '序号',search:false},
{field: 'ver_name', title: '渠道名称'},
{field: 'ver_code', title: '渠道号'},
{field: 'app_name', title: '对接游戏'},
{field: 'ver_appid', title: '渠道appid',search:false},
{field: 'ver_appkey', title: '渠道appkey',search:false},
{field: 'ver_paykey', title: '渠道paykey',search:false},
{field: 'add_user', title: '添加人',search:false},
{field: 'add_time', title: '添加时间',search:false},
{field: 'id', width: 100,title: '序号',search:false},
{field: 'ver_name', width: 200, title: '渠道名称'},
{field: 'ver_code', width: 100, title: '渠道号'},
{field: 'app_name', width: 200, title: '对接游戏'},
{field: 'ver_appid', width: 100, title: '渠道appid',search:false},
{field: 'ver_appkey',width: 250, title: '渠道appkey',search:false},
{field: 'ver_paykey', width: 250, title: '渠道paykey',search:false},
{field: 'add_user', width: 100, title: '添加人',search:false},
{field: 'add_time', width: 200, title: '添加时间',search:false},
{width: 250, title: '操作', templet: ea.table.tool},
]],
});
......
define(["jquery", "easy-admin"], function ($, ea) { var init = { table_elem: '#currentTable', table_render_id: 'currentTableRenderId', index_url: 'data.register_retain/index', add_url: 'data.register_retain/add', edit_url: 'data.register_retain/edit', delete_url: 'data.register_retain/delete', export_url: 'data.register_retain/export', modify_url: 'data.register_retain/modify', }; var Controller = { index: function () { var util = layui.util; ea.table.render({ init: init, toolbar: ['refresh'], cols: [[ {type: 'checkbox'}, {field: 'id', width:100, title: '序号',search:false}, {field: 'day_time', width:150, title: '日期',search: 'range', timeType: 'date',searchValue: util.toDateString(new Date(new Date().getTime() - 7 * 24 * 3600 * 1000), 'yyyy-MM-dd') + ' - ' + util.toDateString(new Date(), 'yyyy-MM-dd')}, {field: 'ver_code', width:100, title: '渠道号'}, {field: 'appid', width:100, title: '注册游戏'}, {field: 'reg_num', width:100, title: '新增注册',search:false}, {field: 'login_num', width:100, title: '登录数',search:false}, {field: 'day1', width:100, title: '次日留存',search:false}, {field: 'day2', width:100, title: '3日留存',search:false}, {field: 'day3', width:100, title: '4日留存',search:false}, {field: 'day4', width:100, title: '5日留存',search:false}, {field: 'day5', width:100, title: '6日留存',search:false}, {field: 'day6', width:100, title: '7日留存',search:false}, {field: 'day7', width:100, title: '8日留存',search:false}, {field: 'day8', width:100, title: '9日留存',search:false}, {field: 'day9', width:100, title: '10日留存',search:false}, {field: 'day10', width:100, title: '11日留存',search:false}, {field: 'day11', width:100, title: '12日留存',search:false}, {field: 'day12', width:100, title: '13日留存',search:false}, {field: 'day13', width:100, title: '14日留存',search:false}, {field: 'day14', width:100, title: '15日留存',search:false}, {field: 'day15', width:100, title: '16日留存',search:false}, {field: 'day16', width:100, title: '17日留存',search:false}, {field: 'day17', width:100, title: '18日留存',search:false}, {field: 'day18', width:100, title: '19日留存',search:false}, {field: 'day19', width:100, title: '20日留存',search:false}, {field: 'day20', width:100, title: '21日留存',search:false}, {field: 'day21', width:100, title: '22日留存',search:false}, {field: 'day22', width:100, title: '23日留存',search:false}, {field: 'day23', width:100, title: '24日留存',search:false}, {field: 'day24', width:100, title: '25日留存',search:false}, {field: 'day25', width:100, title: '26日留存',search:false}, {field: 'day26', width:100, title: '27日留存',search:false}, {field: 'day27', width:100, title: '28日留存',search:false}, {field: 'day28', width:100, title: '29日留存',search:false}, {field: 'day29', width:100, title: '30日留存',search:false}, {field: 'day44', width:100, title: '45日留存',search:false}, {field: 'day59', width:100, title: '60日留存',search:false}, {field: 'day89', width:100, title: '90日留存',search:false}, {field: 'day119', width:100, title: '120日留存',search:false}, {field: 'day149', width:100, title: '150日留存',search:false}, {field: 'day179', width:100, title: '180日留存',search:false}, {field: 'create_date', width:200, title: '更新时间',search:false}, ]], }); ea.listen(); }, add: function () { ea.listen(); }, edit: function () { ea.listen(); }, }; return Controller;});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment