提交
This commit is contained in:
parent
07c3140587
commit
04c6b70377
|
|
@ -68,8 +68,15 @@ composer require yzalis/identicon
|
|||
composer require topthink/think-image
|
||||
php think UserStatisticsHour
|
||||
```
|
||||
##
|
||||
1. 接入微信小程序订单(需要订单页面,订单详情页面)
|
||||
2. 修改前端支付页面,当抽数不够时,只显示对应的按钮。
|
||||
3.
|
||||
|
||||
|
||||
SELECT goods_id,goods_title,goods_price,order_total,order_zhe_total,price,use_money,use_integral,use_money2,addtime,pay_time,prize_num,use_coupon FROM `order` where user_id=21544 and status=1
|
||||
|
||||
##
|
||||
原抽无限赏奖逻辑(内存消耗过大,不在使用)
|
||||
```sh
|
||||
// #组合中奖商品
|
||||
|
|
|
|||
|
|
@ -23,100 +23,93 @@ class Statistics extends Base
|
|||
|
||||
public function profit(Request $request)
|
||||
{
|
||||
$goodId = trim(input('get.goodId'));
|
||||
$title = trim(input('get.title'));
|
||||
$id = trim(input('get.goodId'));
|
||||
$status = trim(input('get.status'));
|
||||
$type = trim(input('get.type'));
|
||||
$addtime = trim(input('get.addtime'));
|
||||
|
||||
// 构建查询条件
|
||||
$whe = [];
|
||||
if ($title)
|
||||
$whe[] = ['title', 'like', '%' . $title . '%'];
|
||||
if ($id)
|
||||
$whe[] = ['id', '=', $id];
|
||||
if ($status)
|
||||
$whe[] = ['status', '=', $status];
|
||||
if ($type)
|
||||
$whe[] = ['type', '=', $type];
|
||||
$where = [['delete_time', '=', null]];
|
||||
if ($goodId) {
|
||||
$where[] = ['id', '=', $goodId];
|
||||
}
|
||||
if ($title) {
|
||||
$where[] = ['title', 'like', '%' . $title . '%'];
|
||||
}
|
||||
if ($status) {
|
||||
$where[] = ['status', '=', $status];
|
||||
}
|
||||
if ($type) {
|
||||
$where[] = ['type', '=', $type];
|
||||
}
|
||||
|
||||
// 解析时间范围
|
||||
$whe3 = [];
|
||||
$whe4 = [];
|
||||
$startTime = 0;
|
||||
$endTime = time();
|
||||
if ($addtime) {
|
||||
[$start_time, $end_time] = $this->parseTimeRange($addtime);
|
||||
$whe3[] = ['addtime', 'BETWEEN', [$start_time, $end_time]];
|
||||
$whe4[] = ['addtime', 'BETWEEN', [$start_time, $end_time]];
|
||||
$times = explode(' - ', $addtime);
|
||||
$startTime = strtotime($times[0]);
|
||||
$endTime = strtotime($times[1]);
|
||||
}
|
||||
|
||||
// 获取商品ID列表
|
||||
$goodList = GoodsModel::where($whe)->column('id');
|
||||
if (empty($goodList)) {
|
||||
// 获取测试用户ID
|
||||
$testUsers = User::where('istest', '>', 0)->column('id');
|
||||
$testUserIds = empty($testUsers) ? [0] : $testUsers;
|
||||
$testUserIdsStr = implode(',', $testUserIds);
|
||||
|
||||
View::assign([
|
||||
// 构建SQL查询
|
||||
$query = Db::name('goods')->alias('goods')
|
||||
->field([
|
||||
'goods.id',
|
||||
'goods.title',
|
||||
'goods.imgurl',
|
||||
'goods.price',
|
||||
'goods.stock',
|
||||
'goods.status',
|
||||
'goods.type',
|
||||
'(SELECT COALESCE(sum(use_money), 0) + COALESCE(sum(price), 0) FROM `order` WHERE status=1 AND (price>0 OR use_money>0) AND pay_time > ' . $startTime . ' and pay_time < ' . $endTime . ' AND goods_id=goods.id AND status=1 AND user_id NOT IN (' . $testUserIdsStr . ')) AS use_money',
|
||||
'(SELECT COALESCE(sum(goodslist_money), 0) FROM `order_list` WHERE goods_id=goods.id AND user_id NOT IN (' . $testUserIdsStr . ') AND addtime > ' . $startTime . ' and addtime < ' . $endTime . ') AS sc_money',
|
||||
'(SELECT COALESCE(sum(goodslist_money), 0) FROM `order_list` WHERE goods_id=goods.id AND LENGTH(recovery_num)>0 AND user_id NOT IN (' . $testUserIdsStr . ') AND addtime > ' . $startTime . ' and addtime < ' . $endTime . ') AS re_money',
|
||||
'(SELECT COALESCE(sum(goodslist_money), 0) FROM `order_list` WHERE goods_id=goods.id AND LENGTH(send_num)>0 AND user_id NOT IN (' . $testUserIdsStr . ') AND addtime > ' . $startTime . ' and addtime < ' . $endTime . ') AS fh_money',
|
||||
'(SELECT count(1) FROM `order_list` WHERE goods_id=goods.id AND user_id NOT IN (' . $testUserIdsStr . ') AND addtime > ' . $startTime . ' and addtime < ' . $endTime . ' and parent_goods_list_id=0 ) AS cj_count'
|
||||
])
|
||||
->where($where)
|
||||
->order(['goods.id' => 'desc']);
|
||||
|
||||
'sum_dingdan' => 0,
|
||||
'sum_shiji' => 0,
|
||||
'sum_chuhuo' => 0,
|
||||
'price_all' => 0,
|
||||
'sum_shijilirun' => 0,
|
||||
'sum_dingdanlirun' => 0,
|
||||
'use_money_all' => 0,
|
||||
'order_total_all' => 0,
|
||||
'list' => [],
|
||||
'count' => 0,
|
||||
'page' => '',
|
||||
]);
|
||||
return View::fetch("Statistics/profit");
|
||||
// 获取列表数据
|
||||
$list = $query->select()->toArray();
|
||||
|
||||
// 计算总金额
|
||||
$totalIncome = 0;
|
||||
$totalCost = 0;
|
||||
$totalProfit = 0;
|
||||
$totalReMoney = 0;
|
||||
$totalFhMoney = 0;
|
||||
|
||||
foreach ($list as &$item) {
|
||||
// 计算单个盒子的利润和利润率
|
||||
$item['profit'] = $item['use_money'] - $item['sc_money'];
|
||||
$item['profit_rate'] = $item['use_money'] > 0 ? round(($item['profit'] / $item['use_money']) * 100, 2) : 0;
|
||||
$item['is_negative'] = $item['profit'] < 0;
|
||||
|
||||
// 计算总金额
|
||||
$totalIncome += $item['use_money'];
|
||||
$totalCost += $item['sc_money'];
|
||||
$totalReMoney += $item['re_money'];
|
||||
$totalFhMoney += $item['fh_money'];
|
||||
}
|
||||
|
||||
// 获取测试用户ID列表
|
||||
$userList = User::where('istest', '>', 0)->column('id');
|
||||
|
||||
// 订单筛选条件
|
||||
$whe3[] = ['user_id', 'not in', $userList];
|
||||
$whe3[] = ['status', '=', 1];
|
||||
$whe3[] = ['goods_id', 'in', $goodList];
|
||||
|
||||
$whe4[] = ['user_id', 'not in', $userList];
|
||||
$whe4[] = ['goods_id', 'in', $goodList];
|
||||
|
||||
// 统计订单数据
|
||||
$orderTotals = OrderModel::where($whe3)
|
||||
->field('SUM(order_total) as order_total_all,
|
||||
SUM(order_zhe_total) as order_zhe_total_all,
|
||||
SUM(price) as price_all,
|
||||
SUM(use_money) as use_money_all')
|
||||
->find();
|
||||
|
||||
$goodslistMoneyAll = OrderList::where($whe4)->sum('goodslist_money');
|
||||
|
||||
// 获取商品列表
|
||||
$data = GoodsModel::getList($whe, "*", "id desc", 20);
|
||||
|
||||
// 计算每个商品的订单详情
|
||||
foreach ($data['list'] as &$value) {
|
||||
$value = array_merge($value, $this->calculateOrderDetails($value['id'], $userList, $addtime));
|
||||
}
|
||||
|
||||
// 计算利润
|
||||
$sum_shijilirun = round($orderTotals->order_zhe_total_all - $goodslistMoneyAll, 2);
|
||||
$sum_dingdanlirun = round($orderTotals->order_total_all - $goodslistMoneyAll, 2);
|
||||
$totalProfit = $totalIncome - $totalCost;
|
||||
|
||||
// 传递数据给视图
|
||||
View::assign([
|
||||
|
||||
'sum_dingdan' => $orderTotals->order_total_all,
|
||||
'sum_shiji' => $orderTotals->order_zhe_total_all,
|
||||
'sum_chuhuo' => $goodslistMoneyAll,
|
||||
'price_all' => $orderTotals->price_all,
|
||||
'sum_shijilirun' => $sum_shijilirun,
|
||||
'sum_dingdanlirun' => $sum_dingdanlirun,
|
||||
'use_money_all' => $orderTotals->use_money_all,
|
||||
'order_total_all' => $orderTotals->order_total_all,
|
||||
'list' => $data['list'],
|
||||
'count' => $data['count'],
|
||||
'page' => $data['page'],
|
||||
'list' => $list,
|
||||
'totalIncome' => $totalIncome,
|
||||
'totalCost' => $totalCost,
|
||||
'totalProfit' => $totalProfit,
|
||||
'totalReMoney' => $totalReMoney,
|
||||
'totalFhMoney' => $totalFhMoney,
|
||||
]);
|
||||
|
||||
return View::fetch("Statistics/profit");
|
||||
|
|
@ -413,5 +406,148 @@ class Statistics extends Base
|
|||
return View::fetch('Statistics/userstatistics');
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单列表
|
||||
*/
|
||||
public function orderList(Request $request)
|
||||
{
|
||||
$goodsId = $request->param('goods_id', 0, 'intval');
|
||||
|
||||
// 获取测试用户ID
|
||||
$testUsers = User::where('istest', '>', 0)->column('id');
|
||||
|
||||
// 查询条件
|
||||
$where = [
|
||||
['status', '=', 1],
|
||||
['goods_id', '=', $goodsId]
|
||||
];
|
||||
|
||||
if (!empty($testUsers)) {
|
||||
$where[] = ['user_id', 'not in', $testUsers];
|
||||
}
|
||||
|
||||
// 获取订单列表
|
||||
$list = OrderModel::where($where)
|
||||
->append(['user_info'])
|
||||
->order('id', 'desc')
|
||||
->paginate(['list_rows' => 50, 'query' => request()->param()]);
|
||||
|
||||
// 传递数据给视图
|
||||
View::assign([
|
||||
'list' => $list,
|
||||
'page' => $list->render(),
|
||||
'goods_id' => $goodsId
|
||||
]);
|
||||
|
||||
return View::fetch("Statistics/orderList");
|
||||
}
|
||||
|
||||
/**
|
||||
* 出货列表
|
||||
*/
|
||||
public function goodsList(Request $request)
|
||||
{
|
||||
$goodsId = $request->param('goods_id', 0, 'intval');
|
||||
|
||||
// 获取测试用户ID
|
||||
$testUsers = User::where('istest', '>', 0)->column('id');
|
||||
|
||||
// 查询条件
|
||||
$where = [
|
||||
['goods_id', '=', $goodsId]
|
||||
];
|
||||
|
||||
if (!empty($testUsers)) {
|
||||
$where[] = ['user_id', 'not in', $testUsers];
|
||||
}
|
||||
|
||||
// 获取出货列表
|
||||
$list = OrderList::where($where)
|
||||
->order('id', 'desc')
|
||||
->paginate(['list_rows' => 50, 'query' => request()->param()]);
|
||||
|
||||
// 传递数据给视图
|
||||
View::assign([
|
||||
'list' => $list,
|
||||
'page' => $list->render(),
|
||||
'goods_id' => $goodsId
|
||||
]);
|
||||
|
||||
return View::fetch("Statistics/goodsList");
|
||||
}
|
||||
|
||||
/**
|
||||
* 兑换列表
|
||||
*/
|
||||
public function exchangeList(Request $request)
|
||||
{
|
||||
$goodsId = $request->param('goods_id', 0, 'intval');
|
||||
|
||||
// 获取测试用户ID
|
||||
$testUsers = User::where('istest', '>', 0)->column('id');
|
||||
|
||||
// 查询条件
|
||||
$where = [
|
||||
['goods_id', '=', $goodsId]
|
||||
];
|
||||
|
||||
$where[] = ['recovery_num', '!=', ''];
|
||||
// $where[] = ['recovery_num', '!=', null];
|
||||
|
||||
if (!empty($testUsers)) {
|
||||
$where[] = ['user_id', 'not in', $testUsers];
|
||||
}
|
||||
|
||||
// 获取兑换列表
|
||||
$list = OrderList::where($where)
|
||||
->order('id', 'desc')
|
||||
->paginate(['list_rows' => 50, 'query' => request()->param()]);
|
||||
|
||||
// 传递数据给视图
|
||||
View::assign([
|
||||
'list' => $list,
|
||||
'page' => $list->render(),
|
||||
'goods_id' => $goodsId
|
||||
]);
|
||||
|
||||
return View::fetch("Statistics/exchangeList");
|
||||
}
|
||||
|
||||
/**
|
||||
* 发货列表
|
||||
*/
|
||||
public function shipmentList(Request $request)
|
||||
{
|
||||
$goodsId = $request->param('goods_id', 0, 'intval');
|
||||
|
||||
// 获取测试用户ID
|
||||
$testUsers = User::where('istest', '>', 0)->column('id');
|
||||
|
||||
// 查询条件
|
||||
$where = [
|
||||
['goods_id', '=', $goodsId]
|
||||
];
|
||||
|
||||
$where[] = ['send_num', '<>', ''];
|
||||
// $where[] = ['send_num', '<>', null];
|
||||
|
||||
if (!empty($testUsers)) {
|
||||
$where[] = ['user_id', 'not in', $testUsers];
|
||||
}
|
||||
|
||||
// 获取发货列表
|
||||
$list = OrderList::where($where)
|
||||
->order('id', 'desc')
|
||||
->paginate(['list_rows' => 50, 'query' => request()->param()]);
|
||||
|
||||
// 传递数据给视图
|
||||
View::assign([
|
||||
'list' => $list,
|
||||
'page' => $list->render(),
|
||||
'goods_id' => $goodsId
|
||||
]);
|
||||
|
||||
return View::fetch("Statistics/shipmentList");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -312,6 +312,14 @@ Route::rule('productcate_del', 'ProductCate/del', 'GET|POST');
|
|||
Route::rule('statistics_profit', 'Statistics/profit', 'GET');
|
||||
//数据看台
|
||||
Route::rule('statistics_dataStand', 'Statistics/DataStand', 'GET');
|
||||
//兑换列表
|
||||
Route::rule('statistics_exchangeList', 'Statistics/exchangeList', 'GET');
|
||||
//发货列表
|
||||
Route::rule('statistics_shipmentList', 'Statistics/shipmentList', 'GET');
|
||||
//出货列表
|
||||
Route::rule('statistics_orderList', 'Statistics/goodsList', 'GET');
|
||||
//支付订单
|
||||
Route::rule('statistics_order', 'Statistics/orderList', 'GET');
|
||||
|
||||
//利润支出
|
||||
Route::rule('ProfitExpenses', 'Profit/index', 'GET');
|
||||
|
|
|
|||
0
app/admin/view/Goods/goods_extend.html
Normal file → Executable file
0
app/admin/view/Goods/goods_extend.html
Normal file → Executable file
73
app/admin/view/Statistics/exchangeList.html
Normal file
73
app/admin/view/Statistics/exchangeList.html
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
{include file="Public:header2"/}
|
||||
|
||||
<body>
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">兑换列表</div>
|
||||
<div class="layui-card-body">
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>ID</th>
|
||||
<th>订单ID</th>
|
||||
<th>用户ID</th>
|
||||
<th>兑换单号</th>
|
||||
<th>盒子ID</th>
|
||||
<th>奖品ID</th>
|
||||
<th>奖品名称</th>
|
||||
<th>奖品图片</th>
|
||||
<th>奖品价值</th>
|
||||
<th>兑换价值</th>
|
||||
<th>奖品类型</th>
|
||||
<th>添加时间</th>
|
||||
<th>选择时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="list" id="vo" key="i"}
|
||||
<tr>
|
||||
<td>{$i}</td>
|
||||
<td>{$vo.id}</td>
|
||||
<td>{$vo.order_id}</td>
|
||||
<td>{$vo.user_id}</td>
|
||||
<td>{$vo.recovery_num}</td>
|
||||
<td>{$vo.goods_id}</td>
|
||||
<td>{$vo.goodslist_id}</td>
|
||||
<td>{$vo.goodslist_title}</td>
|
||||
<td>
|
||||
<img src="{$vo.goodslist_imgurl}" style="height:40px;" onerror="this.src='/static/admin/images/nopic.jpg'">
|
||||
</td>
|
||||
<td>¥ {$vo.goodslist_price}</td>
|
||||
<td>¥ {$vo.goodslist_money}</td>
|
||||
<td>
|
||||
{if condition="$vo.goodslist_type eq 1"}
|
||||
<span class="layui-badge layui-bg-green">现货</span>
|
||||
{elseif condition="$vo.goodslist_type eq 2"}
|
||||
<span class="layui-badge layui-bg-orange">预售</span>
|
||||
{elseif condition="$vo.goodslist_type eq 3"}
|
||||
<span class="layui-badge layui-bg-blue">货币</span>
|
||||
{elseif condition="$vo.goodslist_type eq 4"}
|
||||
<span class="layui-badge layui-bg-purple">宝箱</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{$vo.addtime|date="Y-m-d H:i:s"}</td>
|
||||
<td>{$vo.choice_time|date="Y-m-d H:i:s"}</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
{if condition="empty($list)"}
|
||||
<tr>
|
||||
<td colspan="13" style="text-align:center;">暂时没有数据!</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="layui-box layui-laypage layui-laypage-default">
|
||||
{$page|raw}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="Public:footer"/}
|
||||
</body>
|
||||
</html>
|
||||
81
app/admin/view/Statistics/goodsList.html
Normal file
81
app/admin/view/Statistics/goodsList.html
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
{include file="Public:header2"/}
|
||||
|
||||
<body>
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">出货列表</div>
|
||||
<div class="layui-card-body">
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>订单ID</th>
|
||||
<th>用户ID</th>
|
||||
<th>盒子ID</th>
|
||||
<th>盒子排序</th>
|
||||
<th>奖品ID</th>
|
||||
<th>奖品名称</th>
|
||||
<th>奖品图片</th>
|
||||
<th>奖品价值</th>
|
||||
<th>兑换价值</th>
|
||||
<th>奖品类型</th>
|
||||
<th>状态</th>
|
||||
<th>添加时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td>{$vo.id}</td>
|
||||
<td>{$vo.order_id}</td>
|
||||
<td>{$vo.user_id}</td>
|
||||
<td>{$vo.goods_id}</td>
|
||||
<td>{$vo.num}</td>
|
||||
<td>{$vo.goodslist_id}</td>
|
||||
<td>{$vo.goodslist_title}</td>
|
||||
<td>
|
||||
<img src="{$vo.goodslist_imgurl}" style="height:40px;" onerror="this.src='/static/admin/images/nopic.jpg'">
|
||||
</td>
|
||||
<td>¥ {$vo.goodslist_price}</td>
|
||||
<td>¥ {$vo.goodslist_money}</td>
|
||||
<td>
|
||||
{if condition="$vo.goodslist_type eq 1"}
|
||||
<span class="layui-badge layui-bg-green">现货</span>
|
||||
{elseif condition="$vo.goodslist_type eq 2"}
|
||||
<span class="layui-badge layui-bg-orange">预售</span>
|
||||
{elseif condition="$vo.goodslist_type eq 3"}
|
||||
<span class="layui-badge layui-bg-blue">货币</span>
|
||||
{elseif condition="$vo.goodslist_type eq 4"}
|
||||
<span class="layui-badge layui-bg-purple">宝箱</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{if condition="$vo.status eq 0"}
|
||||
<span class="layui-badge layui-bg-gray">待选择</span>
|
||||
{elseif condition="$vo.status eq 1"}
|
||||
<span class="layui-badge layui-bg-green">回收</span>
|
||||
{elseif condition="$vo.status eq 2"}
|
||||
<span class="layui-badge layui-bg-orange">选择发货</span>
|
||||
{elseif condition="$vo.status eq 3"}
|
||||
<span class="layui-badge layui-bg-blue">发布集市</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{$vo.addtime|date="Y-m-d H:i:s"}</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
{if condition="empty($list)"}
|
||||
<tr>
|
||||
<td colspan="13" style="text-align:center;">暂时没有数据!</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="layui-box layui-laypage layui-laypage-default">
|
||||
{$page|raw}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="Public:footer"/}
|
||||
</body>
|
||||
</html>
|
||||
73
app/admin/view/Statistics/orderList.html
Normal file
73
app/admin/view/Statistics/orderList.html
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
{include file="Public:header2"/}
|
||||
|
||||
<body>
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">支付订单列表</div>
|
||||
<div class="layui-card-body">
|
||||
<table class="layui-table" style="width: 1800px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>订单ID</th>
|
||||
<th>订单号</th>
|
||||
<th>用户ID</th>
|
||||
<th>用户昵称</th>
|
||||
<th>盒子ID</th>
|
||||
<th>盒子名称</th>
|
||||
<th>订单总金额</th>
|
||||
<th>实际支付</th>
|
||||
<th>微信</th>
|
||||
<th>钻石</th>
|
||||
<th>UU币</th>
|
||||
<th>达达卷</th>
|
||||
<th>优惠券抵扣</th>
|
||||
<th>订单状态</th>
|
||||
<th>下单时间</th>
|
||||
<th>支付时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td>{$i}</td>
|
||||
<td>{$vo.id}</td>
|
||||
<td>{$vo.order_num}</td>
|
||||
<td>{$vo.user_id}</td>
|
||||
<td>{$vo.user_info? $vo.user_info.nickname:$vo.user_id}</td>
|
||||
<td>{$vo.goods_id}</td>
|
||||
<td>{$vo.goods_title}</td>
|
||||
<td>¥ {$vo.order_total}</td>
|
||||
<td>¥ {$vo.order_zhe_total}</td>
|
||||
<td>¥ {$vo.price}</td>
|
||||
<td>¥ {$vo.use_money}</td>
|
||||
<td>¥ {$vo.use_coupon}</td>
|
||||
<td>¥ {$vo.use_integral}</td>
|
||||
<td>¥ {$vo.use_money2}</td>
|
||||
<td>
|
||||
{if condition="$vo.status eq 1"}
|
||||
<span class="layui-badge layui-bg-green">已支付</span>
|
||||
{else}
|
||||
<span class="layui-badge layui-bg-gray">未支付</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{$vo.addtime|date="Y-m-d H:i:s"}</td>
|
||||
<td>{$vo.pay_time|date="Y-m-d H:i:s"}</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
{if condition="empty($list)"}
|
||||
<tr>
|
||||
<td colspan="13" style="text-align:center;">暂时没有数据!</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="layui-box layui-laypage layui-laypage-default">
|
||||
{$page|raw}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="Public:footer"/}
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
{include file="Public:header2"/}
|
||||
{include file="Public:header3"/}
|
||||
|
||||
<body>
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-card">
|
||||
|
||||
<!-- 搜索条件区域 -->
|
||||
<form method="get" class="layui-form layui-card-header layuiadmin-card-header-auto">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
|
|
@ -32,8 +32,6 @@
|
|||
<div class="layui-input-inline" style="width: 180px;margin-left: 0px">
|
||||
<select name="type" id="goodsType" style="width:100%">
|
||||
<option value="">--盒子类型--</option>
|
||||
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -45,186 +43,172 @@
|
|||
</div>
|
||||
|
||||
<div class="layui-inline">
|
||||
<button class="layui-btn layuiadmin-btn-useradmin mmm" lay-submit
|
||||
lay-filter="LAY-user-front-search">
|
||||
<button class="layui-btn layuiadmin-btn-useradmin mmm" lay-submit lay-filter="LAY-user-front-search">
|
||||
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- 统计摘要区域 -->
|
||||
<div class="layui-card-body">
|
||||
<div style="text-align: right;">
|
||||
订单收入:<span style="background-color: yellow;font-weight: 600;">{$sum_dingdan}</span>
|
||||
实际收入:<span style="background-color: yellow;font-weight: 600;">{$sum_shiji}</span>
|
||||
微信收入:<span style="background-color: yellow;font-weight: 600;">{$price_all}</span>
|
||||
余额收入:<span style="background-color: yellow;font-weight: 600;">{$use_money_all}</span>
|
||||
|
||||
出货价值:<span style="background-color: yellow;font-weight: 600;">{$sum_chuhuo}</span>
|
||||
订单利润:<span style="background-color: yellow;font-weight: 600;">{if condition="$sum_dingdanlirun < 0"}
|
||||
<span style="color: red;">{$sum_dingdanlirun}</span>
|
||||
{elseif condition="$sum_dingdanlirun >= 0"}
|
||||
{$sum_dingdanlirun}
|
||||
{/if}
|
||||
</span>
|
||||
实际利润:<span style="background-color: yellow;font-weight: 600;">
|
||||
{if condition="$sum_shijilirun < 0"} <span style="color: red;">{$sum_shijilirun}</span>
|
||||
{elseif condition="$sum_shijilirun >= 0"}
|
||||
{$sum_shijilirun}
|
||||
{/if}
|
||||
</span>
|
||||
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">总收入</div>
|
||||
<div class="layui-card-body" style="font-size: 24px; color: #01AAED;">
|
||||
¥ {$totalIncome|default="0"|round=2}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">总出货价值</div>
|
||||
<div class="layui-card-body" style="font-size: 24px; color: #FFB800;">
|
||||
¥ {$totalCost|default="0"|round=2}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">总利润</div>
|
||||
<div class="layui-card-body" style="font-size: 24px; color: {$totalProfit >= 0 ? '#5FB878' : '#FF5722'};">
|
||||
¥ {$totalProfit|default="0"|round=2}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">总兑换/发货价值</div>
|
||||
<div class="layui-card-body" style="font-size: 24px;">
|
||||
<span style="color: #FF9800;">¥ {$totalReMoney|default="0"|round=2}</span> /
|
||||
<span style="color: #673AB7;">¥ {$totalFhMoney|default="0"|round=2}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 数据表格区域 -->
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>盒子ID</th>
|
||||
<th>盒子名称</th>
|
||||
<th>盒子类型/状态</th>
|
||||
<th>盒子数据</th>
|
||||
<!-- <th>订单数量</th>
|
||||
<th>抽奖次数</th> -->
|
||||
<th>支付金额</th>
|
||||
<th>抵扣相关</th>
|
||||
<th>支付金额合计</th>
|
||||
<th>盒子单价</th>
|
||||
<th>抽奖次数</th>
|
||||
<th>收入</th>
|
||||
<th>出货价值</th>
|
||||
<th>兑换价值</th>
|
||||
<th>发货价值</th>
|
||||
<th>利润</th>
|
||||
<th>利润率</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<tr {if condition="$vo.is_negative"}style="background-color: #ffebee;"{/if}>
|
||||
<td>{$vo.id}</td>
|
||||
<td>{$vo.title}</td>
|
||||
<td>
|
||||
{if condition="$vo['type'] eq 1"}
|
||||
<div style="cursor:pointer;">
|
||||
{$vo['id']}
|
||||
</div>
|
||||
{elseif condition="$vo['type'] eq 11"}
|
||||
<div style="cursor:pointer;">
|
||||
{$vo['id']}
|
||||
</div>
|
||||
|
||||
{else }
|
||||
|
||||
{$vo['id']}
|
||||
{/if}
|
||||
</td>
|
||||
|
||||
<td>{$vo['title']}</td>
|
||||
<td>
|
||||
{if condition="$vo['type'] eq 1"}
|
||||
<button class="layui-btn layui-btn-normal layui-btn-radius layui-btn-sm">一番赏</button>
|
||||
{elseif condition="$vo['type'] eq 2"}
|
||||
<button class="layui-btn layui-btn-normal layui-btn-radius layui-btn-sm">无限赏</button>
|
||||
{elseif condition="$vo['type'] eq 3"}
|
||||
<button class="layui-btn layui-btn-normal layui-btn-radius layui-btn-sm">擂台赏</button>
|
||||
{elseif condition="$vo['type'] eq 5"}
|
||||
<button class="layui-btn layui-btn-normal layui-btn-radius layui-btn-sm">积分赏</button>
|
||||
{elseif condition="$vo['type'] eq 6"}
|
||||
<button class="layui-btn layui-btn-normal layui-btn-radius layui-btn-sm">全局赏</button>
|
||||
{elseif condition="$vo['type'] eq 8"}
|
||||
<button class="layui-btn layui-btn-normal layui-btn-radius layui-btn-sm">领主赏</button>
|
||||
{elseif condition="$vo['type'] eq 9"}
|
||||
<button class="layui-btn layui-btn-normal layui-btn-radius layui-btn-sm">连击赏</button>
|
||||
{elseif condition="$vo['type'] eq 10"}
|
||||
<button class="layui-btn layui-btn-normal layui-btn-radius layui-btn-sm">商城赏</button>
|
||||
{elseif condition="$vo['type'] eq 11"}
|
||||
<button class="layui-btn layui-btn-normal layui-btn-radius layui-btn-sm">自制赏</button>
|
||||
{if condition="$vo.type eq 1"}
|
||||
<button class="layui-btn layui-btn-normal layui-btn-radius layui-btn-xs">一番赏</button>
|
||||
{elseif condition="$vo.type eq 2"}
|
||||
<button class="layui-btn layui-btn-normal layui-btn-radius layui-btn-xs">无限赏</button>
|
||||
{elseif condition="$vo.type eq 3"}
|
||||
<button class="layui-btn layui-btn-normal layui-btn-radius layui-btn-xs">擂台赏</button>
|
||||
{elseif condition="$vo.type eq 5"}
|
||||
<button class="layui-btn layui-btn-normal layui-btn-radius layui-btn-xs">积分赏</button>
|
||||
{elseif condition="$vo.type eq 6"}
|
||||
<button class="layui-btn layui-btn-normal layui-btn-radius layui-btn-xs">全局赏</button>
|
||||
{elseif condition="$vo.type eq 8"}
|
||||
<button class="layui-btn layui-btn-normal layui-btn-radius layui-btn-xs">领主赏</button>
|
||||
{elseif condition="$vo.type eq 9"}
|
||||
<button class="layui-btn layui-btn-normal layui-btn-radius layui-btn-xs">连击赏</button>
|
||||
{elseif condition="$vo.type eq 10"}
|
||||
<button class="layui-btn layui-btn-normal layui-btn-radius layui-btn-xs">商城赏</button>
|
||||
{elseif condition="$vo.type eq 11"}
|
||||
<button class="layui-btn layui-btn-normal layui-btn-radius layui-btn-xs">自制赏</button>
|
||||
{/if}
|
||||
/
|
||||
{if condition="$vo['status'] eq 1" }
|
||||
上架
|
||||
{elseif condition="$vo['status'] eq 2"}
|
||||
下架
|
||||
{elseif condition="$vo['status'] eq 3"}
|
||||
售罄
|
||||
{if condition="$vo.status eq 1"}
|
||||
<span class="layui-badge layui-bg-green">上架</span>
|
||||
{elseif condition="$vo.status eq 2"}
|
||||
<span class="layui-badge layui-bg-gray">下架</span>
|
||||
{elseif condition="$vo.status eq 3"}
|
||||
<span class="layui-badge layui-bg-orange">售罄</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>盒子单价:{$vo['price']}</br>
|
||||
订单数量:{$vo['order_count']}</br>
|
||||
抽奖次数:{$vo['count_OrderList']}</br>
|
||||
</td>
|
||||
|
||||
<td>¥ {$vo.price}</td>
|
||||
<td>{$vo.cj_count}</td>
|
||||
<td>
|
||||
微信-支付金额:{$vo['count_price']}</br>
|
||||
钻石-支付金额: {$vo['count_yue']}</br>
|
||||
<span class="layui-badge layui-bg-blue">¥ {$vo.use_money|default="0"|round=2}</span>
|
||||
</td>
|
||||
<td>
|
||||
积分抵扣: {$vo['count_use_score']}</br>
|
||||
优惠卷抵扣:{$vo['count_use_coupon']}
|
||||
<span class="layui-badge layui-bg-orange">¥ {$vo.sc_money|default="0"|round=2}</span>
|
||||
</td>
|
||||
<th>
|
||||
订单收入:{$vo['order_total']}</br>
|
||||
实际收入:<span style="color: red;">{$vo['order_zhe_total']}</span>(去除折扣)</br>
|
||||
收入核算1:{$vo['order_total']}(订单数量*价格)</br>
|
||||
收入核算2:{$vo['count_heji']}(微信+余额+各种抵扣)</br>
|
||||
|
||||
</th>
|
||||
<td>出货价值:{$vo['goodslist_price']}</td>
|
||||
<td>实际利润:
|
||||
{if condition="$vo['lirun'] < 0"} <span style="color: red;">{$vo['lirun']}</span></br>
|
||||
利润率:<span style="color: red;"> {$vo['lirulv']}%</span></br>
|
||||
{elseif condition="$vo['lirun'] >= 0"}
|
||||
{$vo['lirun']}</br>
|
||||
实际利润率: {$vo['lirulv']}%</br>
|
||||
{/if}
|
||||
|
||||
订单利润:
|
||||
{if condition="$vo['liruns'] < 0"} <span style="color: red;">
|
||||
{$vo['liruns']}</span></br>
|
||||
订单利润率:<span style="color: red;"> {$vo['lirulvs']}%</span></br>
|
||||
{elseif condition="$vo['liruns'] >= 0"}
|
||||
{$vo['liruns']}</br>
|
||||
订单利润率: {$vo['lirulvs']}%</br>
|
||||
{/if}
|
||||
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
<span class="layui-badge" style="background-color: #FF9800;">¥ {$vo.re_money|default="0"|round=2}</span>
|
||||
</td>
|
||||
{/volist}
|
||||
|
||||
{if condition="empty($list)"}
|
||||
<td>
|
||||
<span class="layui-badge" style="background-color: #673AB7;">¥ {$vo.fh_money|default="0"|round=2}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="layui-badge {if condition="$vo.profit >= 0"}layui-bg-green{else}layui-bg-red{/if}">
|
||||
¥ {$vo.profit|default="0"|round=2}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="layui-badge {if condition="$vo.profit_rate >= 0"}layui-bg-green{else}layui-bg-red{/if}">
|
||||
{$vo.profit_rate|default="0"|round=2}%
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<button class="layui-btn layui-btn-xs" onclick="viewOrders({$vo.id})">支付订单</button>
|
||||
<button class="layui-btn layui-btn-normal layui-btn-xs" onclick="viewOrderLists({$vo.id})">出货明细</button>
|
||||
<button class="layui-btn layui-btn-warm layui-btn-xs" onclick="viewExchangeList({$vo.id})">兑换明细</button>
|
||||
<button class="layui-btn layui-btn-primary layui-btn-xs" onclick="viewShipmentList({$vo.id})">发货明细</button>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
{if condition="empty($list)"}
|
||||
<tr>
|
||||
<td colspan='11' style="text-align:center;">暂时没有数据!</td>
|
||||
<td colspan="11" style="text-align:center;">暂时没有数据!</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="layui-box layui-laypage layui-laypage-default">
|
||||
{$page|raw}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="Public:footer"/}
|
||||
{include file="Public:footer3"/}
|
||||
<script type="text/javascript">
|
||||
layui.use(['layer', 'laydate', 'table', 'form'], function () {
|
||||
var $ = layui.$;
|
||||
//执行一个laydate实例
|
||||
var layer = layui.layer;
|
||||
var laydate = layui.laydate;
|
||||
var form = layui.form;
|
||||
|
||||
// 日期时间范围
|
||||
laydate.render({
|
||||
elem: '#addtime'
|
||||
, type: 'datetime'
|
||||
, range: true
|
||||
elem: '#addtime',
|
||||
type: 'datetime',
|
||||
range: true
|
||||
});
|
||||
|
||||
// 加载盒子类型数据
|
||||
$.ajax({
|
||||
url: '{:url("/admin/api/goods/types")}',
|
||||
type: 'GET',
|
||||
success: function (res) {
|
||||
if (res.code === 0) {
|
||||
// 保存类型数据到全局变量
|
||||
window.goodsTypes = res.data;
|
||||
|
||||
var html = '<option value="">--盒子类型--</option>';
|
||||
console.log('{$Request.get.type}');
|
||||
|
||||
$.each(res.data, function (index, item) {
|
||||
if(item.value=='{$Request.get.type}'){
|
||||
if(item.value == '{$Request.get.type}'){
|
||||
html += '<option value="' + item.value + '" title="' + item.remark + '" selected>' + item.fl_name + '</option>';
|
||||
}else{
|
||||
} else {
|
||||
html += '<option value="' + item.value + '" title="' + item.remark + '">' + item.fl_name + '</option>';
|
||||
}
|
||||
});
|
||||
|
|
@ -233,63 +217,59 @@
|
|||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// laydate.render({
|
||||
// elem: '#endtime'
|
||||
// // , type: 'datetime'
|
||||
// // , range: true
|
||||
// });
|
||||
|
||||
})
|
||||
|
||||
|
||||
//添加奖品
|
||||
function month_add() {
|
||||
var url = "{:url('/admin/month_add')}";
|
||||
// 查看支付订单列表
|
||||
function viewOrders(goodsId) {
|
||||
var url = "{:url('/admin/statistics_order')}?goods_id=" + goodsId;
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '添加奖品',
|
||||
title: '支付订单列表',
|
||||
shadeClose: false,
|
||||
shade: 0.3,
|
||||
area: ['90%', '90%'],
|
||||
content: url,
|
||||
content: url
|
||||
});
|
||||
}
|
||||
|
||||
//编辑奖品
|
||||
function month_edit(id) {
|
||||
var url = "{:url('/admin/month_edit?id=" + id + "')}";
|
||||
// 查看出货列表
|
||||
function viewOrderLists(goodsId) {
|
||||
var url = "{:url('/admin/statistics_orderList')}?goods_id=" + goodsId;
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '编辑奖品',
|
||||
title: '出货列表',
|
||||
shadeClose: false,
|
||||
shade: 0.3,
|
||||
area: ['90%', '90%'],
|
||||
content: url,
|
||||
content: url
|
||||
});
|
||||
}
|
||||
|
||||
//上下架
|
||||
function del(id) {
|
||||
layer.confirm('确认要执行删除操作吗?', function () {
|
||||
var url = "{:url('/admin/month_del')}";
|
||||
var load = layer.load(2);
|
||||
var $ = layui.$;
|
||||
$.post(url, { "id": id }, function (data) {
|
||||
if (data.status == 1) {
|
||||
layer.msg('删除成功', { icon: 1, time: 1000 }, function () {
|
||||
location.reload();
|
||||
});
|
||||
} else {
|
||||
layer.msg(data.msg, { icon: 2, anim: 6, time: 1000 }, function () {
|
||||
layer.close(load);
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
// 查看兑换列表
|
||||
function viewExchangeList(goodsId) {
|
||||
var url = "{:url('/admin/statistics_exchangeList')}?goods_id=" + goodsId;
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '兑换列表',
|
||||
shadeClose: false,
|
||||
shade: 0.3,
|
||||
area: ['90%', '90%'],
|
||||
content: url
|
||||
});
|
||||
}
|
||||
|
||||
// 查看发货列表
|
||||
function viewShipmentList(goodsId) {
|
||||
var url = "{:url('/admin/statistics_shipmentList')}?goods_id=" + goodsId;
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '发货列表',
|
||||
shadeClose: false,
|
||||
shade: 0.3,
|
||||
area: ['90%', '90%'],
|
||||
content: url
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
79
app/admin/view/Statistics/shipmentList.html
Normal file
79
app/admin/view/Statistics/shipmentList.html
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
{include file="Public:header"/}
|
||||
|
||||
<body>
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">发货列表</div>
|
||||
<div class="layui-card-body">
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>订单ID</th>
|
||||
<th>用户ID</th>
|
||||
<th>发货单号</th>
|
||||
<th>盒子ID</th>
|
||||
<th>奖品ID</th>
|
||||
<th>奖品名称</th>
|
||||
<th>奖品图片</th>
|
||||
<th>奖品价值</th>
|
||||
<th>兑换价值</th>
|
||||
<th>奖品类型</th>
|
||||
<th>保险状态</th>
|
||||
<th>添加时间</th>
|
||||
<th>选择时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td>{$vo.id}</td>
|
||||
<td>{$vo.order_id}</td>
|
||||
<td>{$vo.user_id}</td>
|
||||
<td>{$vo.send_num}</td>
|
||||
<td>{$vo.goods_id}</td>
|
||||
<td>{$vo.goodslist_id}</td>
|
||||
<td>{$vo.goodslist_title}</td>
|
||||
<td>
|
||||
<img src="{$vo.goodslist_imgurl}" style="height:40px;" onerror="this.src='/static/admin/images/nopic.jpg'">
|
||||
</td>
|
||||
<td>¥ {$vo.goodslist_price}</td>
|
||||
<td>¥ {$vo.goodslist_money}</td>
|
||||
<td>
|
||||
{if condition="$vo.goodslist_type eq 1"}
|
||||
<span class="layui-badge layui-bg-green">现货</span>
|
||||
{elseif condition="$vo.goodslist_type eq 2"}
|
||||
<span class="layui-badge layui-bg-orange">预售</span>
|
||||
{elseif condition="$vo.goodslist_type eq 3"}
|
||||
<span class="layui-badge layui-bg-blue">货币</span>
|
||||
{elseif condition="$vo.goodslist_type eq 4"}
|
||||
<span class="layui-badge layui-bg-purple">宝箱</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{if condition="$vo.insurance_is eq 0"}
|
||||
<span class="layui-badge layui-bg-gray">否</span>
|
||||
{elseif condition="$vo.insurance_is eq 1"}
|
||||
<span class="layui-badge layui-bg-green">是</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{$vo.addtime|date="Y-m-d H:i:s"}</td>
|
||||
<td>{$vo.choice_time|date="Y-m-d H:i:s"}</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
{if condition="empty($list)"}
|
||||
<tr>
|
||||
<td colspan="14" style="text-align:center;">暂时没有数据!</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="layui-box layui-laypage layui-laypage-default">
|
||||
{$page|raw}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="Public:footer"/}
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -193,7 +193,7 @@
|
|||
trigger: 'axis'
|
||||
},
|
||||
legend: {
|
||||
data: ['登录', '注册', '消费人数', '微信充值人数']
|
||||
data: ['登录', '注册']
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
|
|
@ -241,18 +241,18 @@
|
|||
|
||||
data: registerData // 使用生成的时间序列数据
|
||||
},
|
||||
{
|
||||
name: '消费人数',
|
||||
type: 'line',
|
||||
// {
|
||||
// name: '消费人数',
|
||||
// type: 'line',
|
||||
|
||||
data: consumeData // 使用生成的时间序列数据
|
||||
},
|
||||
{
|
||||
name: '微信充值人数',
|
||||
type: 'line',
|
||||
stack: 'Total',
|
||||
data: consume_rmb_count // 使用生成的时间序列数据
|
||||
}
|
||||
// data: consumeData // 使用生成的时间序列数据
|
||||
// },
|
||||
// {
|
||||
// name: '微信充值人数',
|
||||
// type: 'line',
|
||||
// stack: 'Total',
|
||||
// data: consume_rmb_count // 使用生成的时间序列数据
|
||||
// }
|
||||
]
|
||||
};
|
||||
|
||||
|
|
@ -269,7 +269,7 @@
|
|||
trigger: 'axis'
|
||||
},
|
||||
legend: {
|
||||
data: ['总消费', '微信充值', '余额充值']
|
||||
data: ['总消费', '微信消费', '钻石消费']
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
|
|
@ -312,13 +312,13 @@
|
|||
data: recharge_sum // 使用生成的时间序列数据
|
||||
},
|
||||
{
|
||||
name: '微信充值',
|
||||
name: '微信消费',
|
||||
type: 'line',
|
||||
|
||||
data: recharge_amount // 使用生成的时间序列数据
|
||||
},
|
||||
{
|
||||
name: '余额充值',
|
||||
name: '钻石消费',
|
||||
type: 'line',
|
||||
|
||||
data: balance_consume // 使用生成的时间序列数据
|
||||
|
|
@ -338,7 +338,7 @@
|
|||
trigger: 'axis'
|
||||
},
|
||||
legend: {
|
||||
data: ['利润', '总收入', '总支出']
|
||||
data: ['总收入', '总支出']
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
|
|
@ -374,12 +374,12 @@
|
|||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '利润',
|
||||
type: 'line',
|
||||
// {
|
||||
// name: '利润',
|
||||
// type: 'line',
|
||||
|
||||
data: all_money // 使用生成的时间序列数据
|
||||
},
|
||||
// data: all_money // 使用生成的时间序列数据
|
||||
// },
|
||||
{
|
||||
name: '总收入',
|
||||
type: 'line',
|
||||
|
|
@ -395,8 +395,8 @@
|
|||
]
|
||||
};
|
||||
// 使用刚指定的配置项和数据显示图表
|
||||
var lirun = echarts.init(document.getElementById('lirun'));
|
||||
lirun.setOption(option2);
|
||||
// var lirun = echarts.init(document.getElementById('lirun'));
|
||||
// lirun.setOption(option2);
|
||||
|
||||
// 指定图表的配置项和数据
|
||||
var option3 = {
|
||||
|
|
@ -464,8 +464,8 @@
|
|||
]
|
||||
};
|
||||
// 使用刚指定的配置项和数据显示图表
|
||||
var qita = echarts.init(document.getElementById('qita'));
|
||||
qita.setOption(option3);
|
||||
// var qita = echarts.init(document.getElementById('qita'));
|
||||
// qita.setOption(option3);
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@ class FuLiWu extends Base
|
|||
public function fuliwu_user_winning_records(Request $request)
|
||||
{
|
||||
$user = $this->getUser();
|
||||
$user_id = $user['user_id'];
|
||||
$user_id = $user['id'];
|
||||
|
||||
$list = OrderList::where('user_id', '=', $user_id)
|
||||
->where('order_type', '=', 15)
|
||||
|
|
|
|||
|
|
@ -287,8 +287,8 @@ class Goods extends Base
|
|||
#概率
|
||||
if ($surplus_stock > 0) {
|
||||
$pro_basics = bcdiv("$surplus_stock", "$all_surplus_stock", 4);
|
||||
$pro = '概率:' . ($pro_basics * 100) . '%';
|
||||
$pro_num = ($pro_basics * 100);
|
||||
$pro = '概率:' . removeTrailingZeros(($pro_basics * 100)) . '%';
|
||||
$pro_num = removeTrailingZeros(($pro_basics * 100));
|
||||
} else {
|
||||
$pro = '概率:' . 0 . '%';
|
||||
$pro_num = 0;
|
||||
|
|
@ -441,8 +441,8 @@ class Goods extends Base
|
|||
}
|
||||
if ($value_1['stock'] == 0) {
|
||||
//保留两位小数
|
||||
$value_1['pro'] = '概率:' . round($value_1['real_pro'], 2) . '%';
|
||||
$value_1['pro_num'] = round($value_1['real_pro'], 2);
|
||||
$value_1['pro'] = '概率:' . removeTrailingZeros(round($value_1['real_pro'], 2)) . '%';
|
||||
$value_1['pro_num'] = removeTrailingZeros(round($value_1['real_pro'], 2));
|
||||
unset($value_1['surplus_stock']);
|
||||
unset($value_1['stock']);
|
||||
continue;
|
||||
|
|
@ -459,7 +459,7 @@ class Goods extends Base
|
|||
#概率
|
||||
if ($surplus_stock_1 > 0) {
|
||||
//计算概率,保留两位小数
|
||||
$pro_num_1 = round(($surplus_stock_1 / $goodsList_surplus_stock) * 100, 2);
|
||||
$pro_num_1 = removeTrailingZeros(round(($surplus_stock_1 / $goodsList_surplus_stock) * 100, 2) );
|
||||
$pro_1 = '概率:' . $pro_num_1 . '%';
|
||||
} else {
|
||||
$pro_1 = '概率:' . 0 . '%';
|
||||
|
|
|
|||
|
|
@ -567,7 +567,7 @@ class Login extends Base
|
|||
public function ip_location($last_login_ip)
|
||||
{
|
||||
if ($last_login_ip) {
|
||||
$url = "https://restapi.amap.com/v3/ip?key=6a46ad822120e393956e89d498e8c40b&ip=" . "$last_login_ip" . "";
|
||||
$url = "https://restapi.amap.com/v3/ip?key=2bf9bdfeb03a8835ce324443eb18e4da&ip=" . "$last_login_ip" . "";
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $url);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
|
|
@ -682,35 +682,7 @@ class Login extends Base
|
|||
$data = $wxServer->getAccessTokenOffiaccountSign($url);
|
||||
return $this->renderSuccess('', $data);
|
||||
}
|
||||
public function test()
|
||||
{
|
||||
$account_token['token'] = "77f6358084be8d5545747911e7f9d5ad5644a114";
|
||||
$account_token['logintype'] = "2";
|
||||
return $this->renderSuccess("登录成功", $account_token);
|
||||
}
|
||||
|
||||
public function test1()
|
||||
{
|
||||
$share_image = getConfig("base")['share_image'];
|
||||
$public_path = dirname($_SERVER['SCRIPT_FILENAME']);
|
||||
$poster_bg = $public_path . $share_image;
|
||||
// var_dump($poster_bg);
|
||||
// $rule = getConfig('base');
|
||||
// $draw_people_num = $rule['draw_people_num'];
|
||||
// $user_id = 31;
|
||||
// $pid = 24;
|
||||
// if(!empty($pid)){
|
||||
// $num = 0;
|
||||
// $num = ProfitDraw::where(['type'=>5,'user_id'=>$pid])->count();
|
||||
// if(bccomp("$num","$draw_people_num") < 0){
|
||||
// #可以获得一张抽奖券
|
||||
// $res= User::changeDraw($pid, 1,5 , '获得一张抽奖券',$user_id);
|
||||
// var_dump($res);
|
||||
// }
|
||||
|
||||
// }
|
||||
// log::info($res);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -762,7 +734,7 @@ class Login extends Base
|
|||
);
|
||||
// //将数据写入redis,过期时间为当天剩余的时间
|
||||
// $redis->set($redis_key, json_encode($user), 86400 - time() % 86400);
|
||||
return $this->renderSuccess('登录记录成功', [
|
||||
return $this->renderSuccess('登录成功', [
|
||||
'uid' => $user['uid'] ?: $user['id'],
|
||||
'nickname' => $user['nickname'],
|
||||
'headimg' => imageUrl($user['headimg'])
|
||||
|
|
|
|||
|
|
@ -1156,18 +1156,18 @@ class Notify extends Base
|
|||
$currentRange = 0;
|
||||
foreach ($goodslist as $good) {
|
||||
|
||||
if ($good['stock'] <= 0) {
|
||||
continue;
|
||||
}
|
||||
// if ($good['stock'] <= 0) {
|
||||
// continue;
|
||||
// }
|
||||
#判断今日库存
|
||||
$user_quanju_count = OrderList::field('id')
|
||||
->where('goods_id', '=', $goods_id)
|
||||
->where('parent_goods_list_id', '=', 0)
|
||||
->where('addtime', '>=', $todayMidnight)
|
||||
->count();
|
||||
if ($user_quanju_count >= $good['stock']) {
|
||||
continue;
|
||||
}
|
||||
// if ($user_quanju_count >= $good['stock']) {
|
||||
// continue;
|
||||
// }
|
||||
$rangeStart = $currentRange;
|
||||
$currentRange += $good['real_pro'];
|
||||
$probabilityRanges[] = [
|
||||
|
|
@ -1203,7 +1203,10 @@ class Notify extends Base
|
|||
->order('id desc')
|
||||
->value('luck_no');
|
||||
$luck_no++;
|
||||
|
||||
$doubling = $prize_info['doubling'];
|
||||
if(!$doubling){
|
||||
$doubling=0;
|
||||
}
|
||||
#新增记录
|
||||
$save_prize_info = [
|
||||
'order_id' => $order_id,
|
||||
|
|
@ -1211,7 +1214,7 @@ class Notify extends Base
|
|||
'status' => 0,#0未操作 1选择兑换 2选择发货
|
||||
'goods_id' => $goods_id,
|
||||
'num' => 0,
|
||||
'doubling' => $prize_info['doubling'],
|
||||
'doubling' => $doubling,
|
||||
'shang_id' => $prize_info['shang_id'],
|
||||
'goodslist_id' => $prize_info['id'],
|
||||
'goodslist_title' => $prize_info['title'],
|
||||
|
|
@ -1359,7 +1362,10 @@ class Notify extends Base
|
|||
->order('id desc')
|
||||
->value('luck_no');
|
||||
$luck_no++;
|
||||
|
||||
$doubling =$prize_info['doubling'];
|
||||
if(!$doubling){
|
||||
$doubling=0;
|
||||
}
|
||||
#新增记录
|
||||
$save_prize_info = [
|
||||
'order_id' => $order_id,
|
||||
|
|
@ -1367,7 +1373,7 @@ class Notify extends Base
|
|||
'status' => 0,#0未操作 1选择兑换 2选择发货
|
||||
'goods_id' => $goods_id,
|
||||
'num' => 0,
|
||||
'doubling' => $prize_info['doubling'],
|
||||
'doubling' => $doubling,
|
||||
'shang_id' => $prize_info['shang_id'],
|
||||
'goodslist_id' => $prize_info['id'],
|
||||
'goodslist_title' => $prize_info['title'],
|
||||
|
|
@ -1574,7 +1580,7 @@ class Notify extends Base
|
|||
Db::name('goods_king_rank')->where([['user_id', '=', $infinite_goods['king_user_id']], ['goods_id', '=', $v['goods_id']]])->order('id', 'desc')->limit(1)->inc('z_nums', 1)->update();
|
||||
$king_money = $infinite_goods['lingzhu_fan'];
|
||||
if ($king_money && $king_money > 0) {
|
||||
|
||||
|
||||
Db::name('goods_king_rank')->where([['user_id', '=', $infinite_goods['king_user_id']], ['goods_id', '=', $v['goods_id']]])->order('id', 'desc')->limit(1)->inc('money', floatval($king_money))->update();
|
||||
|
||||
// User::changeIntegral($infinite_goods['king_user_id'], $king_money, 4, '领主收益');
|
||||
|
|
|
|||
134
app/api/controller/Order.php
Normal file
134
app/api/controller/Order.php
Normal file
|
|
@ -0,0 +1,134 @@
|
|||
<?php
|
||||
|
||||
namespace app\api\controller;
|
||||
|
||||
use app\common\model\Order as OrderModel;
|
||||
use app\common\model\OrderList;
|
||||
use think\facade\Db;
|
||||
|
||||
/**
|
||||
* 订单控制器
|
||||
*/
|
||||
class Order extends Base
|
||||
{
|
||||
/**
|
||||
* 获取微信支付订单列表
|
||||
*
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function getOrderList()
|
||||
{
|
||||
// 获取当前登录用户
|
||||
$user = $this->getUser();
|
||||
|
||||
// 获取分页参数
|
||||
$page = $this->request->param('page', 1);
|
||||
$pageSize = $this->request->param('page_size', 10);
|
||||
|
||||
// 获取订单列表
|
||||
$orderQuery = Db::name('order')
|
||||
->field('goods_id, goods_title, goods_price, order_total, order_zhe_total, price, use_money, use_integral, use_money2, addtime, pay_time, prize_num, use_coupon, order_num')
|
||||
->where([
|
||||
'user_id' => $user['id'],
|
||||
'status' => 1
|
||||
])
|
||||
->order('addtime desc');
|
||||
|
||||
// 获取总数
|
||||
$total = $orderQuery->count();
|
||||
|
||||
// 获取分页数据
|
||||
$orderList = $orderQuery->page($page, $pageSize)->select()->toArray();
|
||||
|
||||
// 格式化数据
|
||||
foreach ($orderList as &$order) {
|
||||
// 格式化时间
|
||||
$order['addtime'] = date('Y-m-d H:i:s', $order['addtime']);
|
||||
$order['pay_time'] = $order['pay_time'] ? date('Y-m-d H:i:s', $order['pay_time']) : '';
|
||||
// 格式化价格数据
|
||||
$order['goods_price'] = (float)$order['goods_price'];
|
||||
$order['order_total'] = (float)$order['order_total'];
|
||||
$order['order_zhe_total'] = (float)$order['order_zhe_total'];
|
||||
$order['price'] = (float)$order['price'];
|
||||
$order['use_money'] = (float)$order['use_money'];
|
||||
$order['use_money2'] = (float)$order['use_money2'];
|
||||
}
|
||||
unset($order);
|
||||
|
||||
// 返回分页数据
|
||||
$data = [
|
||||
'list' => $orderList,
|
||||
'total' => $total,
|
||||
'page' => (int)$page,
|
||||
'page_size' => (int)$pageSize,
|
||||
'total_pages' => ceil($total / $pageSize)
|
||||
];
|
||||
|
||||
return $this->renderSuccess('获取成功', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单详情
|
||||
*
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function getOrderDetail()
|
||||
{
|
||||
// 获取订单编号
|
||||
$orderNum = $this->request->param('order_num', '');
|
||||
if (empty($orderNum)) {
|
||||
return $this->renderError('订单编号不能为空');
|
||||
|
||||
}
|
||||
|
||||
// 获取当前登录用户
|
||||
$user = $this->getUser();
|
||||
|
||||
// 获取订单详情
|
||||
$orderInfo = Db::name('order')
|
||||
->field('goods_id, goods_title, goods_price, id, order_total, order_zhe_total, price, use_money, use_integral, use_money2, addtime, pay_time, prize_num, use_coupon')
|
||||
->where([
|
||||
'status' => 1,
|
||||
'order_num' => $orderNum
|
||||
])
|
||||
->find();
|
||||
|
||||
if (!$orderInfo) {
|
||||
return $this->renderError('订单不存在');
|
||||
|
||||
}
|
||||
|
||||
// 格式化时间
|
||||
$orderInfo['addtime'] = date('Y-m-d H:i:s', $orderInfo['addtime']);
|
||||
$orderInfo['pay_time'] = $orderInfo['pay_time'] ? date('Y-m-d H:i:s', $orderInfo['pay_time']) : '';
|
||||
|
||||
// 格式化价格数据
|
||||
$orderInfo['goods_price'] = (float)$orderInfo['goods_price'];
|
||||
$orderInfo['order_total'] = (float)$orderInfo['order_total'];
|
||||
$orderInfo['order_zhe_total'] = (float)$orderInfo['order_zhe_total'];
|
||||
$orderInfo['price'] = (float)$orderInfo['price'];
|
||||
$orderInfo['use_money'] = (float)$orderInfo['use_money'];
|
||||
$orderInfo['use_money2'] = (float)$orderInfo['use_money2'];
|
||||
|
||||
// 获取订单商品列表
|
||||
$orderGoods = Db::name('order_list')
|
||||
->field('goodslist_title, goodslist_imgurl, goodslist_price, addtime')
|
||||
->where([
|
||||
'order_id' => $orderInfo['id']
|
||||
])
|
||||
->select()->toArray();
|
||||
|
||||
// 格式化订单商品数据
|
||||
foreach ($orderGoods as &$goods) {
|
||||
$goods['addtime'] = date('Y-m-d H:i:s', $goods['addtime']);
|
||||
$goods['goodslist_price'] = (float)$goods['goodslist_price'];
|
||||
$goods['goodslist_imgurl'] = imageUrl($goods['goodslist_imgurl']);
|
||||
}
|
||||
unset($goods);
|
||||
|
||||
$orderInfo['goods_list'] = $orderGoods;
|
||||
|
||||
return $this->renderSuccess('获取成功', $orderInfo);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -179,7 +179,7 @@ class Pay extends Base
|
|||
return $this->wxpay($order_num, $total, $title, $openid, $notify);
|
||||
} elseif ($type == 4) {
|
||||
//积分 商城购买
|
||||
$order = ProductOrder::getInfo(['order_num' => $order_num]);
|
||||
$order = OrderModel::getInfo(['order_num' => $order_num]);
|
||||
$total = $order['total_money'];
|
||||
$notify = 'https://' . $_SERVER['HTTP_HOST'] . '/api/notify/order_notify4';
|
||||
return $this->wxpay($order_num, $total, $title, $openid, $notify);
|
||||
|
|
|
|||
|
|
@ -199,4 +199,10 @@ Route::rule('login_record', 'Login/recordLogin', 'GET|POST');
|
|||
Route::any('advlist', 'Index/getAdvert');
|
||||
Route::any('recordConsume', 'Index/record');
|
||||
Route::any('getPeopleList', 'Index/get_user_yaoqing');
|
||||
Route::any('getRankList', 'Index/getRankList');
|
||||
Route::any('getRankList', 'Index/getRankList');
|
||||
|
||||
#============================
|
||||
#Order.php订单管理
|
||||
#============================
|
||||
Route::any('order_list', 'Order/getOrderList');
|
||||
Route::any('order_detail', 'Order/getOrderDetail');
|
||||
|
|
@ -8,6 +8,9 @@ use think\console\Input;
|
|||
use think\console\Output;
|
||||
use think\facade\Db;
|
||||
|
||||
/**
|
||||
* 自动下架利润率过低的盒子
|
||||
*/
|
||||
class AutoGoodsOffshelf extends Command
|
||||
{
|
||||
protected function configure()
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ class FlwOpen extends Command
|
|||
protected function special_prize_notice_time($goods_id, $goods_title)
|
||||
{
|
||||
|
||||
echo ('福利屋开奖$goods_id' . $goods_id . '福利屋开奖$goods_title' . $goods_title) . PHP_EOL;
|
||||
$res = [];
|
||||
$num = 0; #第几箱
|
||||
print_r('$goods_id' . $goods_id);
|
||||
|
|
@ -101,6 +102,8 @@ class FlwOpen extends Command
|
|||
->toArray();
|
||||
// 如果没有参与用户,直接返回
|
||||
if (empty($all_order_list)) {
|
||||
|
||||
echo ('福利屋开奖完成没有用户参加, goods_id: ' . $goods_id) . PHP_EOL;
|
||||
Goods::where(['id' => $goods_id])->update(['is_open' => 1, 'status' => 3]);
|
||||
return $res;
|
||||
}
|
||||
|
|
@ -187,10 +190,10 @@ class FlwOpen extends Command
|
|||
// 更新福利屋状态为已开奖
|
||||
|
||||
echo ('福利屋开奖完成 goods_id: ' . $goods_id) . PHP_EOL;
|
||||
Log::info('福利屋开奖完成 goods_id: ' . $goods_id. PHP_EOL) ;
|
||||
Log::info('福利屋开奖完成 goods_id: ' . $goods_id . PHP_EOL);
|
||||
} else {
|
||||
echo ('福利屋开奖未完成 goods_id: ' . $goods_id . ', 未处理用户数: ' . $unprocessed_count) . PHP_EOL;
|
||||
Log::info('福利屋开奖未完成 goods_id: ' . $goods_id . ', 未处理用户数: ' . $unprocessed_count) ;
|
||||
Log::info('福利屋开奖未完成 goods_id: ' . $goods_id . ', 未处理用户数: ' . $unprocessed_count);
|
||||
}
|
||||
|
||||
return $res;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,9 @@ use think\console\input\Option;
|
|||
use think\console\Output;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 月榜定榜
|
||||
*/
|
||||
class RankMonth extends Command
|
||||
{
|
||||
protected function configure()
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@ use think\console\Output;
|
|||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 周榜定榜
|
||||
*/
|
||||
class RankWeek extends Command
|
||||
{
|
||||
protected function configure()
|
||||
|
|
|
|||
|
|
@ -16,12 +16,17 @@ use app\common\model\OrderList;
|
|||
use app\common\model\OrderListRecovery;
|
||||
use app\common\model\ProfitExpenses;
|
||||
use app\common\model\ProfitRvenue;
|
||||
use app\common\model\UserLoginLog;
|
||||
|
||||
class UserStatisticsDay extends Command
|
||||
{
|
||||
// php think UserStatisticsDay
|
||||
/**
|
||||
* 用户每天数据统计
|
||||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('UserStatisticsHour')->setDescription('用户每天数据统计');
|
||||
$this->setName('UserStatisticsDay')->setDescription('用户每天数据统计');
|
||||
}
|
||||
|
||||
protected function execute(Input $input, Output $output)
|
||||
|
|
@ -42,9 +47,12 @@ class UserStatisticsDay extends Command
|
|||
|
||||
$today_start = strtotime($today);
|
||||
$today_end = strtotime($today . ' +1 day');
|
||||
// 查询当天的登录人数
|
||||
$loginCount = UserAccount::where('last_login_time', '>=', $today_start)
|
||||
->where('last_login_time', '<', $today_end)
|
||||
// // 查询当天的登录人数
|
||||
// $loginCount = UserAccount::where('last_login_time', '>=', $today_start)
|
||||
// ->where('last_login_time', '<', $today_end)
|
||||
// ->count('DISTINCT user_id');
|
||||
$loginCount = UserLoginLog::where('login_time','>=',$today_start)
|
||||
->where('login_time','<',$today_end)
|
||||
->count('DISTINCT user_id');
|
||||
//当天注册人数
|
||||
$registerCount = User::where('addtime', '>=', $today_start)
|
||||
|
|
@ -86,12 +94,13 @@ class UserStatisticsDay extends Command
|
|||
)->sum('use_money');
|
||||
|
||||
//今日消费
|
||||
$order_zhe_total = OrderModel::where('status', '=', 1)->whereNotIn('user_id', $userNotArray)
|
||||
->whereBetweenTime(
|
||||
'addtime',
|
||||
$today_start,
|
||||
$today_end
|
||||
)->sum('order_zhe_total');
|
||||
$order_zhe_total= $order_today_price+$money_today;
|
||||
// $order_zhe_total = OrderModel::where('status', '=', 1)->whereNotIn('user_id', $userNotArray)
|
||||
// ->whereBetweenTime(
|
||||
// 'addtime',
|
||||
// $today_start,
|
||||
// $today_end
|
||||
// )->sum('order_zhe_total');
|
||||
//今日消费
|
||||
$consume_order_count = OrderModel::where('status', '=', 1)->whereNotIn('user_id', $userNotArray)
|
||||
->whereBetweenTime(
|
||||
|
|
|
|||
|
|
@ -281,10 +281,10 @@ if (!function_exists('create_order_no')) {
|
|||
// 在MH_后面添加商户前缀,而不是替换MH_
|
||||
$pre = 'MH_' . $merchant_prefix;
|
||||
}
|
||||
|
||||
|
||||
// 获取当前域名的微信小程序配置
|
||||
$miniprogramConfig = \app\common\helper\MiniprogramHelper::getMiniprogramConfig();
|
||||
|
||||
|
||||
// 如果小程序配置存在且有订单前缀,则添加到订单号中
|
||||
if (!empty($miniprogramConfig) && !empty($miniprogramConfig['order_prefix'])) {
|
||||
// 在现有前缀后面添加小程序订单前缀
|
||||
|
|
@ -788,4 +788,14 @@ function getData($url, $header)
|
|||
curl_close($ch);
|
||||
|
||||
return $handles;
|
||||
}
|
||||
if (!function_exists('removeTrailingZeros')) {
|
||||
function removeTrailingZeros($numStr)
|
||||
{
|
||||
if (strpos($numStr, '.') !== false) {
|
||||
$numStr = rtrim($numStr, '0'); // 移除右侧的零
|
||||
$numStr = rtrim($numStr, '.'); // 处理小数点后全零的情况
|
||||
}
|
||||
return $numStr;
|
||||
}
|
||||
}
|
||||
|
|
@ -42,7 +42,7 @@ class UserLoginLog extends Model
|
|||
|
||||
// 如果今天已记录,则不再记录
|
||||
if ($exist) {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
// 添加登录记录
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@ return [
|
|||
'url' => '/admin/record',
|
||||
'name' => '流水排行',
|
||||
],
|
||||
[
|
||||
'url' => '/admin/vip',
|
||||
'name' => 'VIP管理',
|
||||
],
|
||||
// [
|
||||
// 'url' => '/admin/vip',
|
||||
// 'name' => 'VIP管理',
|
||||
// ],
|
||||
[
|
||||
'url' => '/admin/user_invite',
|
||||
'name' => '用户邀请列表',
|
||||
|
|
@ -99,10 +99,10 @@ return [
|
|||
'url' => '/admin/ProfitRvenue',
|
||||
'name' => '其它收入',
|
||||
],
|
||||
[
|
||||
'url' => '/admin/user_statistics',
|
||||
'name' => '数据统计',
|
||||
],
|
||||
// [
|
||||
// 'url' => '/admin/user_statistics',
|
||||
// 'name' => '数据统计',
|
||||
// ],
|
||||
],
|
||||
],
|
||||
[
|
||||
|
|
|
|||
BIN
public/storage/poster/share/21549.png
Normal file
BIN
public/storage/poster/share/21549.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
64
table.sql
64
table.sql
|
|
@ -56,7 +56,7 @@ CREATE TABLE `admin_goods_log` (
|
|||
`ip` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT '登录ip',
|
||||
`addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '登录时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='管理员登录日志';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='管理员登录日志';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
|
@ -72,7 +72,7 @@ CREATE TABLE `admin_login_log` (
|
|||
`ip` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT '登录ip',
|
||||
`addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '登录时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='管理员登录日志';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='管理员登录日志';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
|
@ -90,7 +90,7 @@ CREATE TABLE `admin_operation_log` (
|
|||
`content` text COLLATE utf8_unicode_ci,
|
||||
`addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '操作时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=973 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='管理员操作日志';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2789 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='管理员操作日志';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
|
@ -238,7 +238,7 @@ CREATE TABLE `collect` (
|
|||
`type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '1一番赏 2无限赏 3擂台赏 4抽卡机 5积分赏 6全局赏 7福利盲盒 8领主赏 9连击赏',
|
||||
`addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=FIXED;
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=FIXED;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
|
@ -300,7 +300,7 @@ CREATE TABLE `coupon_receive` (
|
|||
`ttype` int(2) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `id` (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户优惠券表';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=46 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户优惠券表';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
|
@ -441,7 +441,7 @@ CREATE TABLE `goods` (
|
|||
UNIQUE KEY `id` (`id`) USING BTREE,
|
||||
KEY `status` (`status`) USING BTREE,
|
||||
KEY `type` (`type`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1013 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='盒子';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1046 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='盒子';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
|
@ -461,7 +461,7 @@ CREATE TABLE `goods_extend` (
|
|||
`pay_coupon` tinyint(1) NOT NULL DEFAULT '1' COMMENT '优惠券支付',
|
||||
`is_deduction` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否抵扣 1:抵扣 0:支付',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='盒子扩展表';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='盒子扩展表';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
|
@ -533,7 +533,7 @@ CREATE TABLE `goods_list` (
|
|||
KEY `surplus_stock` (`surplus_stock`) USING BTREE,
|
||||
KEY `prize_code` (`prize_code`) USING BTREE,
|
||||
KEY `card_no` (`card_no`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=134 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='盒子奖品';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=533 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='盒子奖品';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
|
@ -928,9 +928,9 @@ CREATE TABLE `order` (
|
|||
`order_total` decimal(10,2) unsigned NOT NULL COMMENT '订单总金额',
|
||||
`order_zhe_total` decimal(10,2) unsigned NOT NULL COMMENT '订单折扣金额',
|
||||
`price` decimal(10,2) unsigned NOT NULL COMMENT '微信支付',
|
||||
`use_money` decimal(10,2) unsigned NOT NULL COMMENT '余额抵扣',
|
||||
`use_integral` decimal(10,2) unsigned NOT NULL COMMENT '潮币抵扣',
|
||||
`use_score` decimal(10,2) unsigned NOT NULL COMMENT '积分抵扣',
|
||||
`use_money` decimal(10,2) unsigned NOT NULL COMMENT '钻石支付',
|
||||
`use_integral` decimal(10,2) unsigned NOT NULL COMMENT 'UU币支付',
|
||||
`use_score` decimal(10,2) unsigned NOT NULL COMMENT '积分抵扣,未使用',
|
||||
`use_draw` int(11) DEFAULT '0' COMMENT '抽奖券抵扣',
|
||||
`use_item_card` int(11) DEFAULT '0' COMMENT '道具卡抵扣 (使用的数量)',
|
||||
`zhe` decimal(10,2) unsigned NOT NULL COMMENT '折扣',
|
||||
|
|
@ -945,7 +945,7 @@ CREATE TABLE `order` (
|
|||
`addtime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '下单时间',
|
||||
`pay_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '付款时间',
|
||||
`pay_type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '1微信 2支付宝',
|
||||
`order_type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '1一番赏 2无限赏 3擂台赏 4抽卡机 5积分赏 6全局赏 7福利盲盒 8领主赏 9连击赏',
|
||||
`order_type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '盒子类型',
|
||||
`kd_is` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '1卡单',
|
||||
`coupon_id` int(11) DEFAULT '0' COMMENT '优惠券id',
|
||||
`use_coupon` decimal(10,2) DEFAULT '0.00' COMMENT '优惠券抵扣',
|
||||
|
|
@ -956,7 +956,7 @@ CREATE TABLE `order` (
|
|||
`click_id` int(11) DEFAULT NULL,
|
||||
`is_flw` int(1) NOT NULL DEFAULT '0' COMMENT '是否为福利屋',
|
||||
`zdfh_time` int(10) DEFAULT '0' COMMENT '自动发货时间',
|
||||
`use_money2` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '货币2抵扣金额',
|
||||
`use_money2` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '达达卷支付',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `id` (`id`) USING BTREE,
|
||||
UNIQUE KEY `order_num` (`order_num`) USING BTREE,
|
||||
|
|
@ -964,7 +964,7 @@ CREATE TABLE `order` (
|
|||
KEY `goods_id` (`goods_id`) USING BTREE,
|
||||
KEY `num` (`num`) USING BTREE,
|
||||
KEY `status` (`status`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=87 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='订单表';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=246 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='订单表';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
|
@ -989,12 +989,12 @@ CREATE TABLE `order_list` (
|
|||
`goodslist_imgurl` varchar(255) DEFAULT NULL COMMENT '奖品封面图',
|
||||
`goodslist_price` decimal(10,2) unsigned NOT NULL COMMENT '奖品价值',
|
||||
`goodslist_money` decimal(10,2) unsigned NOT NULL COMMENT '奖品回收',
|
||||
`goodslist_type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '1现货 2预售',
|
||||
`goodslist_type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '1现货 2预售,3货币,4 宝箱',
|
||||
`goodslist_sale_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '预售时间',
|
||||
`addtime` int(10) unsigned NOT NULL COMMENT '创建时间',
|
||||
`choice_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '选择发货/回收时间',
|
||||
`insurance_is` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '保险柜0否 1是',
|
||||
`order_type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '1一番赏 2无限赏 3擂台赏 4抽卡机 5积分赏 6全局赏 7福利盲盒 8领主赏 9连击赏 10权益领取',
|
||||
`order_type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '盒子类型',
|
||||
`order_list_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '特殊奖品中奖订单id',
|
||||
`luck_no` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '抽奖序号',
|
||||
`prize_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '奖品code',
|
||||
|
|
@ -1020,7 +1020,7 @@ CREATE TABLE `order_list` (
|
|||
KEY `goodslist_type` (`goodslist_type`) USING BTREE,
|
||||
KEY `shang_id` (`shang_id`) USING BTREE,
|
||||
KEY `goodslist_id` (`goodslist_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=558 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='订单明细';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2259 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='订单明细';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
|
@ -1041,7 +1041,7 @@ CREATE TABLE `order_list_recovery` (
|
|||
UNIQUE KEY `id` (`id`) USING BTREE,
|
||||
UNIQUE KEY `recovery_num` (`recovery_num`) USING BTREE,
|
||||
KEY `user_id` (`user_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='打包记录';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='打包记录';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
|
@ -1097,7 +1097,7 @@ CREATE TABLE `picture` (
|
|||
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '1 正常 2 删除',
|
||||
`type` tinyint(1) DEFAULT NULL COMMENT '存储位置 1=本地 2= 阿里云',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=221 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
|
@ -1162,7 +1162,7 @@ CREATE TABLE `profit_integral` (
|
|||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `id` (`id`) USING BTREE,
|
||||
KEY `user_id` (`user_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='财务明细';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='财务明细';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
|
@ -1185,7 +1185,7 @@ CREATE TABLE `profit_money` (
|
|||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `id` (`id`) USING BTREE,
|
||||
KEY `user_id` (`user_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=73 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='财务明细';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=217 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='财务明细';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
|
@ -1208,7 +1208,7 @@ CREATE TABLE `profit_money2` (
|
|||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `id` (`id`) USING BTREE,
|
||||
KEY `user_id` (`user_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='财务明细';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='财务明细';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
|
@ -1230,7 +1230,7 @@ CREATE TABLE `profit_ou_qi` (
|
|||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `id` (`id`) USING BTREE,
|
||||
KEY `user_id` (`user_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='欧气值明细';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='欧气值明细';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
|
@ -1410,7 +1410,7 @@ CREATE TABLE `reward` (
|
|||
`update_time` int(11) DEFAULT NULL,
|
||||
`reward_id` varchar(64) NOT NULL COMMENT '关联表id',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=151 DEFAULT CHARSET=utf8mb4 COMMENT='奖励表';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=152 DEFAULT CHARSET=utf8mb4 COMMENT='奖励表';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
|
@ -1517,7 +1517,7 @@ CREATE TABLE `user` (
|
|||
`uid` varchar(16) NOT NULL COMMENT '唯一编号',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `id` (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=21547 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
|
@ -1541,7 +1541,7 @@ CREATE TABLE `user_account` (
|
|||
`ip_city` varchar(50) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `id` (`id`) USING BTREE
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
|
@ -1662,7 +1662,7 @@ CREATE TABLE `user_login_log` (
|
|||
KEY `idx_date` (`login_date`) USING BTREE,
|
||||
KEY `idx_year_month` (`year`,`month`) USING BTREE,
|
||||
KEY `idx_year_week` (`year`,`week`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='用户登录记录表';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='用户登录记录表';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
|
@ -1759,7 +1759,7 @@ CREATE TABLE `user_sign` (
|
|||
`update_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
|
||||
`sign_type` tinyint(2) NOT NULL DEFAULT '0' COMMENT '月签到还是累计签到',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户签到表';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户签到表';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
|
@ -1791,7 +1791,7 @@ CREATE TABLE `user_statistics` (
|
|||
`all_recycle_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '总收入',
|
||||
`all_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '总利润',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='用户统计表';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='用户统计表';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
|
@ -1814,7 +1814,7 @@ CREATE TABLE `user_task_list` (
|
|||
`updatetime` int(11) NOT NULL,
|
||||
`deltime` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='用户完成任务记录表';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='用户完成任务记录表';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
|
@ -1899,7 +1899,7 @@ CREATE TABLE `wxpay_log` (
|
|||
`addtime` int(14) unsigned DEFAULT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `order_no` (`order_no`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='微信/支付宝支付信息';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='微信/支付宝支付信息';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
|
@ -1936,4 +1936,4 @@ CREATE TABLE `yushou` (
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2025-04-09 22:54:10
|
||||
-- Dump completed on 2025-04-10 22:23:48
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user