mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-05-22 06:49:15 +08:00
ComposerUpdate
This commit is contained in:
parent
3db49e3b57
commit
4f3d9bc921
@ -11,7 +11,7 @@
|
||||
Target Server Version : 50562
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 20/01/2021 18:34:07
|
||||
Date: 28/01/2021 16:01:16
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
@ -35,7 +35,7 @@ CREATE TABLE `system_menu` (
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_system_menu_status`(`status`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 90 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-菜单' ROW_FORMAT = COMPACT;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 94 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-菜单' ROW_FORMAT = COMPACT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of system_menu
|
||||
@ -67,7 +67,7 @@ INSERT INTO `system_menu` VALUES (71, 68, '轮播图片管理', 'layui-icon layu
|
||||
INSERT INTO `system_menu` VALUES (73, 67, '商城管理(开发中)', '', '', '#', '', '_self', 0, 1, '2020-09-08 02:51:30');
|
||||
INSERT INTO `system_menu` VALUES (75, 73, '商品分类管理', 'layui-icon layui-icon-form', 'data/shop_goods_cate/index', 'data/shop_goods_cate/index', '', '_self', 70, 1, '2020-09-08 03:35:58');
|
||||
INSERT INTO `system_menu` VALUES (76, 73, '商品数据管理', 'layui-icon layui-icon-star', 'data/shop_goods/index', 'data/shop_goods/index', '', '_self', 90, 1, '2020-09-08 07:13:19');
|
||||
INSERT INTO `system_menu` VALUES (77, 73, '会员用户管理', 'layui-icon layui-icon-user', 'data/user/index', 'data/user/index', '', '_self', 100, 1, '2020-09-10 01:48:02');
|
||||
INSERT INTO `system_menu` VALUES (77, 90, '会员用户管理', 'layui-icon layui-icon-user', 'data/user/index', 'data/user/index', '', '_self', 900, 1, '2020-09-10 01:48:02');
|
||||
INSERT INTO `system_menu` VALUES (78, 73, '订单数据管理', 'layui-icon layui-icon-template-1', 'data/shop_order/index', 'data/shop_order/index', '', '_self', 60, 1, '2020-09-10 01:48:41');
|
||||
INSERT INTO `system_menu` VALUES (79, 73, '订单发货管理', 'layui-icon layui-icon-transfer', 'data/shop_order_send/index', 'data/shop_order_send/index', '', '_self', 50, 1, '2020-09-10 01:50:12');
|
||||
INSERT INTO `system_menu` VALUES (81, 73, '快递公司管理', 'layui-icon layui-icon-website', 'data/shop_truck_company/index', 'data/shop_truck_company/index', '', '_self', 0, 1, '2020-09-15 08:47:46');
|
||||
@ -78,6 +78,10 @@ INSERT INTO `system_menu` VALUES (85, 68, '会员服务协议', 'layui-icon layu
|
||||
INSERT INTO `system_menu` VALUES (86, 68, '关于我们描述', 'layui-icon layui-icon-app', 'data/config/about', 'data/config/about', '', '_self', 40, 1, '2020-09-22 16:12:44');
|
||||
INSERT INTO `system_menu` VALUES (87, 68, '支付参数管理', 'layui-icon layui-icon-rmb', 'data/shop_payment/index', 'data/shop_payment/index', '', '_self', 6, 1, '2020-12-12 09:08:09');
|
||||
INSERT INTO `system_menu` VALUES (88, 68, '系统通知管理', 'layui-icon layui-icon-notice', 'data/user_notify/index', 'data/user_notify/index', '', '_self', 6, 1, '2021-01-20 10:07:32');
|
||||
INSERT INTO `system_menu` VALUES (89, 73, '余额充值记录', 'layui-icon layui-icon-rmb', 'data/user_balance/index', 'data/user_balance/index', '', '_self', 95, 1, '2021-01-20 10:09:49');
|
||||
INSERT INTO `system_menu` VALUES (89, 90, '余额充值记录', 'layui-icon layui-icon-rmb', 'data/user_balance/index', 'data/user_balance/index', '', '_self', 800, 1, '2021-01-20 10:09:49');
|
||||
INSERT INTO `system_menu` VALUES (90, 67, '用户管理', '', '', '#', '', '_self', 0, 1, '2021-01-22 05:43:01');
|
||||
INSERT INTO `system_menu` VALUES (91, 90, '用户等级管理', 'layui-icon layui-icon-senior', 'data/user_level/index', 'data/user_level/index', '', '_self', 700, 1, '2021-01-22 05:43:27');
|
||||
INSERT INTO `system_menu` VALUES (92, 90, '用户折扣方案', 'layui-icon layui-icon-set', 'data/user_discount/index', 'data/user_discount/index', '', '_self', 0, 1, '2021-01-27 05:44:51');
|
||||
INSERT INTO `system_menu` VALUES (93, 90, '用户提现管理', 'layui-icon layui-icon-component', 'data/user_transfer/index', 'data/user_transfer/index', '', '_self', 0, 1, '2021-01-28 06:48:34');
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
3999
admin_v6.sql
3999
admin_v6.sql
File diff suppressed because it is too large
Load Diff
@ -18,7 +18,7 @@ class OrderClear extends Command
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('xdata:OrderClear');
|
||||
$this->setDescription('定时清理商城订单数据');
|
||||
$this->setDescription('批量清理商城订单数据');
|
||||
}
|
||||
|
||||
/**
|
||||
|
66
app/data/command/UserTransfer.php
Normal file
66
app/data/command/UserTransfer.php
Normal file
@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
namespace app\data\command;
|
||||
|
||||
use app\data\service\DataService;
|
||||
use think\admin\Command;
|
||||
use think\console\Input;
|
||||
use think\console\Output;
|
||||
use WePay\Transfers;
|
||||
|
||||
/**
|
||||
* 用户提现处理
|
||||
* Class UserTransfer
|
||||
* @package app\data\command
|
||||
*/
|
||||
class UserTransfer extends Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('xdata:UserTransfer');
|
||||
$this->setDescription('批量执行线上打款操作');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Input $input
|
||||
* @param Output $output
|
||||
* @return void
|
||||
* @throws \think\db\exception\DbException
|
||||
*/
|
||||
protected function execute(Input $input, Output $output)
|
||||
{
|
||||
$map = ['type' => 1, 'status' => 3];
|
||||
foreach ($this->app->db->name('DataUserTransfer')->where($map)->cursor() as $vo) try {
|
||||
$wechat = Transfers::instance(DataService::instance()->payment());
|
||||
$result = $wechat->create([
|
||||
'openid' => $vo['openid'],
|
||||
'amount' => $vo['amount'] * 100,
|
||||
'partner_trade_no' => $vo['code'],
|
||||
'spbill_create_ip' => '127.0.0.1',
|
||||
'check_name' => 'NO_CHECK',
|
||||
'desc' => '微信余额提现',
|
||||
]);
|
||||
if ($result['return_code'] === 'SUCCESS' && $result['result_code'] === 'SUCCESS') {
|
||||
$this->app->db->name('DataUserTransfer')->where(['code' => $vo['code']])->update([
|
||||
'status' => 4,
|
||||
'trade_no' => $result['partner_trade_no'],
|
||||
'trade_time' => $result['payment_time'],
|
||||
'change_time' => date('Y-m-d H:i:s'),
|
||||
'change_desc' => '线上提现成功',
|
||||
]);
|
||||
} else {
|
||||
$this->app->db->name('DataUserTransfer')->where(['code' => $vo['code']])->update([
|
||||
'change_time' => date('Y-m-d H:i:s'),
|
||||
'change_desc' => $result['err_code_des'] ?? '线上提现失败',
|
||||
]);
|
||||
}
|
||||
} catch (\Exception $exception) {
|
||||
$this->output->writeln("订单 {$vo['code']} 提现失败,{$exception->getMessage()}");
|
||||
$this->app->db->name('DataUserTransfer')->where(['code' => $vo['code']])->update([
|
||||
'change_time' => date('Y-m-d H:i:s'),
|
||||
'change_desc' => $exception->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
98
app/data/controller/UserTransfer.php
Normal file
98
app/data/controller/UserTransfer.php
Normal file
@ -0,0 +1,98 @@
|
||||
<?php
|
||||
|
||||
namespace app\data\controller;
|
||||
|
||||
use app\data\service\UserService;
|
||||
use think\admin\Controller;
|
||||
use think\admin\extend\CodeExtend;
|
||||
use think\admin\service\AdminService;
|
||||
|
||||
/**
|
||||
* 用户提现管理
|
||||
* Class UserTransfer
|
||||
* @package app\data\controller
|
||||
*/
|
||||
class UserTransfer extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
private $table = 'DataUserTransfer';
|
||||
|
||||
/**
|
||||
* 用户提现管理
|
||||
* @menu true
|
||||
* @auth true
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '用户提现管理';
|
||||
$query = $this->_query($this->table);
|
||||
// 用户条件搜索
|
||||
$db = $this->_query('DataUser')->like('phone,username|nickname#nickname')->db();
|
||||
if ($db->getOptions('where')) $query->whereRaw("uid in {$db->field('id')->buildSql()}");
|
||||
// 数据列表处理
|
||||
$query->equal('type,status')->dateBetween('create_at')->order('id desc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据列表处理
|
||||
* @param array $data
|
||||
*/
|
||||
protected function _page_filter(array &$data)
|
||||
{
|
||||
UserService::instance()->buildByUid($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 提现审核打款
|
||||
* @auth true
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function audit()
|
||||
{
|
||||
if ($this->request->isGet()) {
|
||||
$this->_form($this->table, 'audit', 'code');
|
||||
} else {
|
||||
$data = $this->_vali([
|
||||
'remark.default' => '',
|
||||
'code.require' => '打款单号不能为空!',
|
||||
'status.require' => '交易审核操作类型!',
|
||||
'status.in:0,1,2,3,4' => '交易审核操作类型!',
|
||||
]);
|
||||
$map = ['code' => $data['code']];
|
||||
$find = $this->app->db->name($this->table)->where($map)->find();
|
||||
if (empty($find)) $this->error('不允许操作审核!');
|
||||
// 提现状态(0已拒绝, 1待审核, 2已审核, 3打款中, 4已打款, 5已收款)
|
||||
if (in_array($data['status'], [0, 1, 2, 3])) {
|
||||
$data['last_at'] = date('Y-m-d H:i:s');
|
||||
} elseif ($data['status'] == 4) {
|
||||
$data['trade_no'] = CodeExtend::uniqidDate(14);
|
||||
$data['trade_time'] = date('Y-m-d H:i:s');
|
||||
$data['change_time'] = date('Y-m-d H:i:s');
|
||||
$data['change_desc'] = ($data['remark'] ?: '线下打款成功') . ' By ' . AdminService::instance()->getUserName();
|
||||
}
|
||||
if ($this->app->db->name($this->table)->strict(false)->where($map)->update($data) !== false) {
|
||||
$this->success('操作成功');
|
||||
} else {
|
||||
$this->error('操作失败!');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 后台打款服务
|
||||
* @auth true
|
||||
*/
|
||||
public function sync()
|
||||
{
|
||||
$this->_queue('提现到余额定时处理', 'xdata:UserTransfer', 0, [], 0, 50);
|
||||
}
|
||||
|
||||
}
|
@ -143,6 +143,7 @@ class Center extends Auth
|
||||
if (is_numeric(stripos($from['path'], "-{$this->uuid}-"))) $this->error('不能绑定下属');
|
||||
$data['path'] = rtrim($from['path'] ?: '-', '-') . '-' . $from['id'] . '-';
|
||||
$data['layer'] = substr_count($data['path'], '-');
|
||||
$data['pfrom'] = $from['from'] ?? 0;
|
||||
if ($this->app->db->name($this->table)->where(['id' => $this->uuid])->update($data) !== false) {
|
||||
$this->success('绑定邀请人成功', UserService::instance()->total($this->uuid));
|
||||
} else {
|
||||
|
48
app/data/service/DataService.php
Normal file
48
app/data/service/DataService.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace app\data\service;
|
||||
|
||||
use think\admin\Exception;
|
||||
use think\admin\Service;
|
||||
use think\admin\storage\LocalStorage;
|
||||
|
||||
/**
|
||||
* 基础数据服务
|
||||
* Class DataService
|
||||
* @package app\agent\service
|
||||
*/
|
||||
class DataService extends Service
|
||||
{
|
||||
/**
|
||||
* 获取支付配置
|
||||
* @return array|void
|
||||
* @throws \think\admin\Exception
|
||||
*/
|
||||
public function payment(): array
|
||||
{
|
||||
try {
|
||||
$map = ['type' => PaymentService::PAYMENT_WECHAT_GZH, 'status' => 1, 'deleted' => 0];
|
||||
$payment = $this->app->db->name('ShopPayment')->where($map)->order('sort desc,id desc')->find();
|
||||
if (empty($payment)) throw new Exception('读取有效的支付参数失败');
|
||||
// 解析服务号支付参数
|
||||
[, , $params] = PaymentService::config('', $payment);
|
||||
if (empty($params)) throw new Exception('读取有效的支付参数失败');
|
||||
if (empty($params['wechat_mch_key_text']) || empty($params['wechat_mch_cert_text'])) {
|
||||
throw new Exception('微信商户支付证书内容不能为空');
|
||||
}
|
||||
$k1 = LocalStorage::instance()->set("{$params['code']}_key.pem", $params['wechat_mch_key_text'], true);
|
||||
$k2 = LocalStorage::instance()->set("{$params['code']}_cert.pem", $params['wechat_mch_cert_text'], true);
|
||||
return [
|
||||
'appid' => $params['wechat_appid'],
|
||||
'mch_id' => $params['wechat_mch_id'],
|
||||
'mch_key' => $params['wechat_mch_key'],
|
||||
'ssl_key' => $k1['file'],
|
||||
'ssl_cer' => $k2['file'],
|
||||
'cache_path' => $this->app->getRootPath() . 'runtime' . DIRECTORY_SEPARATOR . 'wechat',
|
||||
];
|
||||
} catch (\Exception $exception) {
|
||||
throw new Exception($exception->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -222,63 +222,58 @@ class UserService extends Service
|
||||
{
|
||||
$user = $this->app->db->name('DataUser')->where(['id' => $uid])->find();
|
||||
if (empty($user)) return true;
|
||||
[$level, $title] = [0, '普通用户'];
|
||||
[$vipName, $vipNumber] = ['普通用户', 0];
|
||||
// 统计历史数据
|
||||
$teamsDirect = $this->app->db->name('DataUser')->where(['pid1' => $uid])->count();
|
||||
$teamsIndirect = $this->app->db->name('DataUser')->where(['pid2' => $uid])->count();
|
||||
$amountTotal = $this->app->db->name('ShopOrder')->where(['uid' => $uid])->whereIn('status', [3, 4, 5])->sum('amount_total');
|
||||
$teamsDirect = $this->app->db->name('DataUser')->where(['from' => $uid])->count();
|
||||
$teamsIndirect = $this->app->db->name('DataUser')->where(['pfrom' => $uid])->count();
|
||||
$orderAmount = $this->app->db->name('ShopOrder')->where(['uid' => $uid])->whereIn('status', [3, 4, 5])->sum('amount_total');
|
||||
// 计算会员级别
|
||||
foreach ($this->app->db->name('DataUserLevel')->where(['status' => 1])->order('number desc')->select()->toArray() as $item) {
|
||||
foreach ($this->app->db->name('DataUserLevel')->where(['status' => 1])->order('number desc')->cursor() as $item) {
|
||||
$l1 = empty($item['goods_vip_status']) || $user['vip_auth'] > 0;
|
||||
$l2 = empty($item['teams_users_status']) || $item['teams_users_number'] <= $teamsDirect + $teamsIndirect;
|
||||
$l3 = empty($item['teams_direct_status']) || $item['teams_direct_number'] <= $teamsDirect;
|
||||
$l4 = empty($item['teams_indirect_status']) || $item['teams_indirect_number'] <= $teamsIndirect;
|
||||
$l5 = empty($item['order_amount_status']) || $item['order_amount_number'] <= $amountTotal;
|
||||
$l2 = empty($item['order_amount_status']) || $item['order_amount_number'] <= $orderAmount;
|
||||
$l3 = empty($item['teams_users_status']) || $item['teams_users_number'] <= $teamsDirect + $teamsIndirect;
|
||||
$l4 = empty($item['teams_direct_status']) || $item['teams_direct_number'] <= $teamsDirect;
|
||||
$l5 = empty($item['teams_indirect_status']) || $item['teams_indirect_number'] <= $teamsIndirect;
|
||||
if (
|
||||
($item['upgrade_type'] == 0 && ($l1 || $l2 || $l3 || $l4 || $l5)) /* 满足任何条件可以等级 */
|
||||
($item['upgrade_type'] == 0 && ($l1 || $l2 || $l3 || $l4 || $l5)) /* 满足任何条件可以等级 */
|
||||
||
|
||||
($item['upgrade_type'] == 1 && ($l1 && $l2 && $l3 && $l4 && $l5)) /* 满足所有条件可以等级 */
|
||||
) {
|
||||
[$level, $title] = [$item['number'], $item['name']];
|
||||
[$vipName, $vipNumber] = [$item['name'], $item['number']];
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 购买商品升级
|
||||
$query = $this->app->db->name('ShopOrderItem')->alias('b')->rightJoin('store_order a', 'b.order_no=a.order_no');
|
||||
$tempLevel = $query->whereRaw("a.uid={$uid} and a.pay_status=1 and a.status in (3,4,5) and b.vip_mod=1")->max('b.vip_level');
|
||||
if ($tempLevel > $level) {
|
||||
$tempLevelInfo = $this->app->db->name('DataUserLevel')->where(['number' => $tempLevel, 'status' => 1])->find();
|
||||
if (!empty($tempLevelInfo)) [$level, $title] = [$tempLevelInfo['number'], $tempLevelInfo['name']];
|
||||
$tmpNumber = $query->whereRaw("a.uid={$uid} and a.payment_status=1 and a.status in (3,4,5) and b.vip_entry=1")->max('b.vip_number');
|
||||
if ($tmpNumber > $vipNumber) {
|
||||
$map = ['number' => $tmpNumber, 'status' => 1];
|
||||
$levelInfo = $this->app->db->name('DataUserLevel')->where($map)->find();
|
||||
if (!empty($levelInfo)) [$vipNumber, $vipName] = [$levelInfo['number'], $levelInfo['name']];
|
||||
}
|
||||
// 统计当日数据
|
||||
// $where = ['pay_date_frist' => date('Y-m-d')];
|
||||
// $dailyTeamsDirect = $this->app->db->name('DataUser')->where($where)->where(['pid1' => $uid])->count();
|
||||
// $dailyTeamsIndirect = $this->app->db->name('DataUser')->where($where)->where(['pid2' => $uid])->count();
|
||||
// 统计订单统计
|
||||
$orderAmountTotal = $this->app->db->name('ShopOrder')->whereRaw("uid={$uid} and status in (3,4,5)")->sum('amount_goods');
|
||||
// 统计团队业绩
|
||||
// $teamsPerformanceDirect = $this->app->db->name('ShopOrder')->whereRaw("from_uid={$uid} and status in (3,4,5)")->sum('price_discount');
|
||||
// $mysql2 = $this->app->db->name('DataUser')->field('id')->where(['pid1' => $uid])->buildSql();
|
||||
// $teamsPerformanceIndirect = $this->app->db->name('ShopOrder')->whereRaw("from_uid in {$mysql2} and status in (3,4,5)")->sum('price_discount');
|
||||
// 更新会员数据
|
||||
$usql = $this->app->db->name('DataUser')->field('id')->whereRaw("`from`={$uid}")->buildSql();
|
||||
$teamsAmountDirect = $this->app->db->name('ShopOrder')->whereRaw("`from`={$uid} and status in (3,4,5)")->sum('amount_goods');
|
||||
$teamsAmountIndirect = $this->app->db->name('ShopOrder')->whereRaw("`from` in {$usql} and status in (3,4,5)")->sum('amount_goods');
|
||||
// 更新用户数据
|
||||
$data = [
|
||||
'vip_name' => $title,
|
||||
'vip_number' => $level,
|
||||
// 'teams_total' => $teamsDirect + $teamsIndirect,
|
||||
// 'teams_direct' => $teamsDirect,
|
||||
// 'teams_indirect' => $teamsIndirect,
|
||||
// 'amount_order_total' => $amountTotal,
|
||||
// 'teams_performance_total' => $teamsPerformanceDirect + $teamsPerformanceIndirect,
|
||||
// 'teams_performance_direct' => $teamsPerformanceDirect,
|
||||
// 'teams_performance_indirect' => $teamsPerformanceIndirect,
|
||||
// 'amount_profit_total' => $this->app->db->name('StoreProfitRecord')->where(['uid' => $uid])->sum('profit_price'),
|
||||
// 'amount_profit_used' => $this->app->db->name('StoreProfitUsed')->where(['uid' => $uid])->whereIn('status', [1, 2, 3])->sum('pay_price'),
|
||||
// 'amount_profit_lock' => $this->app->db->name('StoreProfitRecord')->where(['uid' => $uid, 'profit_status' => '0'])->sum('profit_price'),
|
||||
// 'daily_teams_total' => $dailyTeamsDirect + $dailyTeamsIndirect,
|
||||
// 'daily_teams_direct' => $dailyTeamsDirect,
|
||||
// 'daily_teams_indirect' => $dailyTeamsIndirect,
|
||||
'vip_name' => $vipName,
|
||||
'vip_number' => $vipNumber,
|
||||
'teams_users_total' => $teamsDirect + $teamsIndirect,
|
||||
'teams_users_direct' => $teamsDirect,
|
||||
'teams_users_indirect' => $teamsIndirect,
|
||||
'teams_amount_total' => $teamsAmountDirect + $teamsAmountIndirect,
|
||||
'teams_amount_direct' => $teamsAmountDirect,
|
||||
'teams_amount_indirect' => $teamsAmountIndirect,
|
||||
'order_amount_total' => $orderAmountTotal,
|
||||
];
|
||||
if ($data['vip_level'] !== $user['vip_level']) $data['vip_date'] = date('Y-m-d H:i:s');
|
||||
if ($data['vip_number'] !== $user['vip_number']) {
|
||||
$data['vip_datetime'] = date('Y-m-d H:i:s');
|
||||
}
|
||||
$this->app->db->name('DataUser')->where(['id' => $uid])->update($data);
|
||||
return ($parent && $user['pid2'] > 0) ? $this->syncLevel($user['pid2'], false) : true;
|
||||
return ($parent && $user['pfrom'] > 0) ? $this->syncLevel($user['pfrom'], false) : true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3,6 +3,7 @@
|
||||
use app\data\command\OrderClear;
|
||||
use app\data\command\UserBalance;
|
||||
use app\data\command\UserLevel;
|
||||
use app\data\command\UserTransfer;
|
||||
use think\Console;
|
||||
|
||||
Console::starting(function (Console $console) {
|
||||
@ -10,6 +11,7 @@ Console::starting(function (Console $console) {
|
||||
$console->addCommand(OrderClear::class);
|
||||
$console->addCommand(UserBalance::class);
|
||||
$console->addCommand(UserLevel::class);
|
||||
$console->addCommand(UserTransfer::class);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -33,8 +33,8 @@
|
||||
<td class="nowrap">
|
||||
<div class="headimg" data-tips-image data-lazy-src="{$vo.user.headimg|default='__ROOT__/static/theme/img/headimg.png'}"></div>
|
||||
<div class="inline-block sub-span-blue">
|
||||
用户昵称:{$vo.user.nickname|default='--'}<br>
|
||||
用户手机:<span>{$vo.user.phone|default='--'}</span><br>
|
||||
<div>昵称:<span>{$vo.user.nickname|default='--'}</span></div>
|
||||
<div>手机:<span>{$vo.user.phone|default='--'}</span></div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="nowrap sub-span-blue">
|
||||
|
@ -17,14 +17,14 @@
|
||||
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">充值时间</label>
|
||||
<div class="layui-input-inline">
|
||||
<label class="layui-input-inline">
|
||||
<input data-date-range name="create_at" value="{:input('create_at','')}" placeholder="请选择充值时间" class="layui-input">
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-inline">
|
||||
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> 搜 索</button>
|
||||
</div>
|
||||
</form>
|
||||
<script>form.render()</script>
|
||||
<script>layui.form.render()</script>
|
||||
</fieldset>
|
37
app/data/view/user_transfer/audit.html
Normal file
37
app/data/view/user_transfer/audit.html
Normal file
@ -0,0 +1,37 @@
|
||||
<form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">
|
||||
|
||||
<div class="layui-card-body padding-left-40">
|
||||
|
||||
<div class="layui-form-item">
|
||||
<span class="color-green font-w7">审核操作类型</span>
|
||||
<span class="color-desc margin-left-5">Audit type</span>
|
||||
<!-- 提现状态(0失败, 1待审核, 2已审核, 3打款中, 4已打款, 5已收款) -->
|
||||
<div class="layui-input relative notselect">
|
||||
{foreach(['已拒绝','待审核', '已审核', '打款中','已打款'] as $k => $v)}
|
||||
{if $k eq $vo.status}
|
||||
<label class="think-radio"><input checked type="radio" name="status" value='{$k}' lay-ignore> {$v}</label>
|
||||
{else}
|
||||
<label class="think-radio"><input type="radio" name="status" value='{$k}' lay-ignore> {$v}</label>
|
||||
{/if}{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="relative block">
|
||||
<span class="color-green font-w7">审核操作描述</span>
|
||||
<span class="color-desc margin-left-5">Audit Remark</span>
|
||||
<textarea class="layui-textarea" placeholder="请输入审核描述" name="remark">{$vo.remark|default=''}</textarea>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="hr-line-dashed"></div>
|
||||
{notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
|
||||
|
||||
<div class="layui-form-item text-center">
|
||||
<button class="layui-btn" type='submit'>保存数据</button>
|
||||
<button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗?" data-close>取消编辑</button>
|
||||
</div>
|
||||
|
||||
</form>
|
87
app/data/view/user_transfer/index.html
Normal file
87
app/data/view/user_transfer/index.html
Normal file
@ -0,0 +1,87 @@
|
||||
{extend name="../../admin/view/main"}
|
||||
|
||||
{block name="button"}
|
||||
<!--{if auth('sync')}-->
|
||||
<a class="layui-btn layui-btn-sm layui-btn-primary" data-queue="{:url('sync')}">打款服务</a>
|
||||
<!--{/if}-->
|
||||
{/block}
|
||||
|
||||
{block name="content"}
|
||||
<div class="think-box-shadow">
|
||||
{include file='user_transfer/index_search'}
|
||||
<table class="layui-table" lay-skin="line">
|
||||
{notempty name='list'}
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='list-table-check-td think-checkbox'>
|
||||
<label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
|
||||
</th>
|
||||
<th>提现用户</th>
|
||||
<th>提现订单</th>
|
||||
<th>提现方式</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{/notempty}
|
||||
<tbody>
|
||||
{foreach $list as $key => $vo}
|
||||
<tr>
|
||||
<td class='list-table-check-td think-checkbox'>
|
||||
<label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
|
||||
</td>
|
||||
<td class="sub-span-blue nowrap">
|
||||
<div class="headimg" data-tips-image data-lazy-src="{$vo.user.headimg|default='__ROOT__/static/theme/img/headimg.png'}"></div>
|
||||
<div class="inline-block">
|
||||
{notempty name='vo.user.username'}
|
||||
<div>姓名:<span>{$vo.user.username|default='-'}</span></div>
|
||||
{else}
|
||||
<div>昵称:<span>{$vo.user.nickname|default='-'}</span></div>
|
||||
{/notempty}
|
||||
<div>手机:<span>{$vo.user.phone|default='-'}</span></div>
|
||||
</div>
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
<div class="text-middle">
|
||||
提现金额:<b class="color-blue">{$vo.amount+0}</b> 元
|
||||
{eq name='vo.status' value='0'}<span class="layui-badge layui-bg-red margin-left-5">已失败</span>{/eq}
|
||||
{eq name='vo.status' value='1'}<span class="layui-badge layui-bg-cyan margin-left-5">待审核</span>{/eq}
|
||||
{eq name='vo.status' value='2'}<span class="layui-badge layui-bg-blue margin-left-5">已审核</span>{/eq}
|
||||
{eq name='vo.status' value='3'}<span class="layui-badge layui-bg-blue margin-left-5">待打款</span>{/eq}
|
||||
{eq name='vo.status' value='4'}<span class="layui-badge layui-bg-green margin-left-5">已打款</span>{/eq}
|
||||
{eq name='vo.status' value='5'}<span class="layui-badge layui-bg-green margin-left-5">已完成</span>{/eq}
|
||||
</div>
|
||||
提现单号:<span class="color-blue">{$vo.code|default='--'}</span><br>
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
{eq name='vo.type' value='2'}
|
||||
银行卡号:{$vo.bank_code|default='-'}<br>
|
||||
银行信息:{$vo.bank_name|default='-'}( {$vo.bank_user|default='-'} )<br>
|
||||
{else}
|
||||
<div><span class="layui-badge layui-bg-blue">提现到余额</span></div>
|
||||
<div class="color-desc">{$vo.remark|default='-'}</div>
|
||||
{/eq}
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
申请时间:{$vo.create_at|format_datetime}<br>
|
||||
最后处理:{$vo.change_time|format_datetime}<br>
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
交易时间:{$vo.trade_time|format_datetime}<br>
|
||||
交易描述:<span class="color-desc">{$vo.change_desc|default='--'}</span><br>
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
<!--{if auth('audit') and !in_array($vo.status,[4,5])}-->
|
||||
<a class="layui-btn layui-btn-sm layui-btn-normal" data-title="提现审核管理" data-modal="{:url('audit')}?code={$vo.code}">操 作</a>
|
||||
<!--{/if}-->
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
|
||||
|
||||
</div>
|
||||
{/block}
|
63
app/data/view/user_transfer/index_search.html
Normal file
63
app/data/view/user_transfer/index_search.html
Normal file
@ -0,0 +1,63 @@
|
||||
<fieldset>
|
||||
<legend>条件搜索</legend>
|
||||
<form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
|
||||
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">用户手机</label>
|
||||
<label class="layui-input-inline">
|
||||
<input name="phone" value="{:input('phone')}" placeholder="请输入用户手机" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">用户昵称</label>
|
||||
<label class="layui-input-inline">
|
||||
<input name="nickname" value="{:input('nickname')}" placeholder="请输入用户昵称" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">提现方式</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="type">
|
||||
<option value="">-- 全部 --</option>
|
||||
{foreach ['1'=>'提现到余额', '2'=>'提现到银行'] as $k=>$v}
|
||||
{if input('type') eq $k.''}
|
||||
<option selected value="{$k}">{$v}</option>
|
||||
{else}
|
||||
<option value="{$k}">{$v}</option>
|
||||
{/if}{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">打款状态</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="status">
|
||||
<option value="">-- 全部 --</option>
|
||||
{foreach ['已拒绝', '待审核', '已审核', '待打款', '已打款','已完成'] as $k=>$v}
|
||||
{if input('status') eq $k.''}
|
||||
<option selected value="{$k}">{$v}</option>
|
||||
{else}
|
||||
<option value="{$k}">{$v}</option>
|
||||
{/if}{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">申请时间</label>
|
||||
<div class="layui-input-inline">
|
||||
<input data-date-range name="create_at" value="{:input('create_at')}" placeholder="请选择申请时间" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-inline">
|
||||
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> 搜 索</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>window.form.render()</script>
|
||||
|
||||
</fieldset>
|
6
vendor/composer/autoload_classmap.php
vendored
6
vendor/composer/autoload_classmap.php
vendored
@ -196,6 +196,7 @@ return array(
|
||||
'app\\data\\command\\OrderClear' => $baseDir . '/app/data/command/OrderClear.php',
|
||||
'app\\data\\command\\UserBalance' => $baseDir . '/app/data/command/UserBalance.php',
|
||||
'app\\data\\command\\UserLevel' => $baseDir . '/app/data/command/UserLevel.php',
|
||||
'app\\data\\command\\UserTransfer' => $baseDir . '/app/data/command/UserTransfer.php',
|
||||
'app\\data\\controller\\Config' => $baseDir . '/app/data/controller/Config.php',
|
||||
'app\\data\\controller\\NewsItem' => $baseDir . '/app/data/controller/NewsItem.php',
|
||||
'app\\data\\controller\\NewsMark' => $baseDir . '/app/data/controller/NewsMark.php',
|
||||
@ -206,13 +207,16 @@ return array(
|
||||
'app\\data\\controller\\ShopOrderSend' => $baseDir . '/app/data/controller/ShopOrderSend.php',
|
||||
'app\\data\\controller\\ShopOrderService' => $baseDir . '/app/data/controller/ShopOrderService.php',
|
||||
'app\\data\\controller\\ShopPayment' => $baseDir . '/app/data/controller/ShopPayment.php',
|
||||
'app\\data\\controller\\ShopPaymentItem' => $baseDir . '/app/data/controller/ShopPaymentItem.php',
|
||||
'app\\data\\controller\\ShopTruckCompany' => $baseDir . '/app/data/controller/ShopTruckCompany.php',
|
||||
'app\\data\\controller\\ShopTruckTemplate' => $baseDir . '/app/data/controller/ShopTruckTemplate.php',
|
||||
'app\\data\\controller\\User' => $baseDir . '/app/data/controller/User.php',
|
||||
'app\\data\\controller\\UserBalance' => $baseDir . '/app/data/controller/UserBalance.php',
|
||||
'app\\data\\controller\\UserDiscount' => $baseDir . '/app/data/controller/UserDiscount.php',
|
||||
'app\\data\\controller\\UserLevel' => $baseDir . '/app/data/controller/UserLevel.php',
|
||||
'app\\data\\controller\\UserMessage' => $baseDir . '/app/data/controller/UserMessage.php',
|
||||
'app\\data\\controller\\UserNotify' => $baseDir . '/app/data/controller/UserNotify.php',
|
||||
'app\\data\\controller\\UserTransfer' => $baseDir . '/app/data/controller/UserTransfer.php',
|
||||
'app\\data\\controller\\api\\Auth' => $baseDir . '/app/data/controller/api/Auth.php',
|
||||
'app\\data\\controller\\api\\Data' => $baseDir . '/app/data/controller/api/Data.php',
|
||||
'app\\data\\controller\\api\\Goods' => $baseDir . '/app/data/controller/api/Goods.php',
|
||||
@ -227,11 +231,13 @@ return array(
|
||||
'app\\data\\controller\\api\\auth\\Config' => $baseDir . '/app/data/controller/api/auth/Config.php',
|
||||
'app\\data\\controller\\api\\auth\\News' => $baseDir . '/app/data/controller/api/auth/News.php',
|
||||
'app\\data\\controller\\api\\auth\\Order' => $baseDir . '/app/data/controller/api/auth/Order.php',
|
||||
'app\\data\\service\\DataService' => $baseDir . '/app/data/service/DataService.php',
|
||||
'app\\data\\service\\GoodsService' => $baseDir . '/app/data/service/GoodsService.php',
|
||||
'app\\data\\service\\MessageService' => $baseDir . '/app/data/service/MessageService.php',
|
||||
'app\\data\\service\\NewsService' => $baseDir . '/app/data/service/NewsService.php',
|
||||
'app\\data\\service\\OrderService' => $baseDir . '/app/data/service/OrderService.php',
|
||||
'app\\data\\service\\PaymentService' => $baseDir . '/app/data/service/PaymentService.php',
|
||||
'app\\data\\service\\PrizeService' => $baseDir . '/app/data/service/PrizeService.php',
|
||||
'app\\data\\service\\TruckService' => $baseDir . '/app/data/service/TruckService.php',
|
||||
'app\\data\\service\\UserService' => $baseDir . '/app/data/service/UserService.php',
|
||||
'app\\data\\service\\payment\\AlipayPaymentService' => $baseDir . '/app/data/service/payment/AlipayPaymentService.php',
|
||||
|
6
vendor/composer/autoload_static.php
vendored
6
vendor/composer/autoload_static.php
vendored
@ -319,6 +319,7 @@ class ComposerStaticInit4f89fd0e0503ccf740f2fa5757825d7b
|
||||
'app\\data\\command\\OrderClear' => __DIR__ . '/../..' . '/app/data/command/OrderClear.php',
|
||||
'app\\data\\command\\UserBalance' => __DIR__ . '/../..' . '/app/data/command/UserBalance.php',
|
||||
'app\\data\\command\\UserLevel' => __DIR__ . '/../..' . '/app/data/command/UserLevel.php',
|
||||
'app\\data\\command\\UserTransfer' => __DIR__ . '/../..' . '/app/data/command/UserTransfer.php',
|
||||
'app\\data\\controller\\Config' => __DIR__ . '/../..' . '/app/data/controller/Config.php',
|
||||
'app\\data\\controller\\NewsItem' => __DIR__ . '/../..' . '/app/data/controller/NewsItem.php',
|
||||
'app\\data\\controller\\NewsMark' => __DIR__ . '/../..' . '/app/data/controller/NewsMark.php',
|
||||
@ -329,13 +330,16 @@ class ComposerStaticInit4f89fd0e0503ccf740f2fa5757825d7b
|
||||
'app\\data\\controller\\ShopOrderSend' => __DIR__ . '/../..' . '/app/data/controller/ShopOrderSend.php',
|
||||
'app\\data\\controller\\ShopOrderService' => __DIR__ . '/../..' . '/app/data/controller/ShopOrderService.php',
|
||||
'app\\data\\controller\\ShopPayment' => __DIR__ . '/../..' . '/app/data/controller/ShopPayment.php',
|
||||
'app\\data\\controller\\ShopPaymentItem' => __DIR__ . '/../..' . '/app/data/controller/ShopPaymentItem.php',
|
||||
'app\\data\\controller\\ShopTruckCompany' => __DIR__ . '/../..' . '/app/data/controller/ShopTruckCompany.php',
|
||||
'app\\data\\controller\\ShopTruckTemplate' => __DIR__ . '/../..' . '/app/data/controller/ShopTruckTemplate.php',
|
||||
'app\\data\\controller\\User' => __DIR__ . '/../..' . '/app/data/controller/User.php',
|
||||
'app\\data\\controller\\UserBalance' => __DIR__ . '/../..' . '/app/data/controller/UserBalance.php',
|
||||
'app\\data\\controller\\UserDiscount' => __DIR__ . '/../..' . '/app/data/controller/UserDiscount.php',
|
||||
'app\\data\\controller\\UserLevel' => __DIR__ . '/../..' . '/app/data/controller/UserLevel.php',
|
||||
'app\\data\\controller\\UserMessage' => __DIR__ . '/../..' . '/app/data/controller/UserMessage.php',
|
||||
'app\\data\\controller\\UserNotify' => __DIR__ . '/../..' . '/app/data/controller/UserNotify.php',
|
||||
'app\\data\\controller\\UserTransfer' => __DIR__ . '/../..' . '/app/data/controller/UserTransfer.php',
|
||||
'app\\data\\controller\\api\\Auth' => __DIR__ . '/../..' . '/app/data/controller/api/Auth.php',
|
||||
'app\\data\\controller\\api\\Data' => __DIR__ . '/../..' . '/app/data/controller/api/Data.php',
|
||||
'app\\data\\controller\\api\\Goods' => __DIR__ . '/../..' . '/app/data/controller/api/Goods.php',
|
||||
@ -350,11 +354,13 @@ class ComposerStaticInit4f89fd0e0503ccf740f2fa5757825d7b
|
||||
'app\\data\\controller\\api\\auth\\Config' => __DIR__ . '/../..' . '/app/data/controller/api/auth/Config.php',
|
||||
'app\\data\\controller\\api\\auth\\News' => __DIR__ . '/../..' . '/app/data/controller/api/auth/News.php',
|
||||
'app\\data\\controller\\api\\auth\\Order' => __DIR__ . '/../..' . '/app/data/controller/api/auth/Order.php',
|
||||
'app\\data\\service\\DataService' => __DIR__ . '/../..' . '/app/data/service/DataService.php',
|
||||
'app\\data\\service\\GoodsService' => __DIR__ . '/../..' . '/app/data/service/GoodsService.php',
|
||||
'app\\data\\service\\MessageService' => __DIR__ . '/../..' . '/app/data/service/MessageService.php',
|
||||
'app\\data\\service\\NewsService' => __DIR__ . '/../..' . '/app/data/service/NewsService.php',
|
||||
'app\\data\\service\\OrderService' => __DIR__ . '/../..' . '/app/data/service/OrderService.php',
|
||||
'app\\data\\service\\PaymentService' => __DIR__ . '/../..' . '/app/data/service/PaymentService.php',
|
||||
'app\\data\\service\\PrizeService' => __DIR__ . '/../..' . '/app/data/service/PrizeService.php',
|
||||
'app\\data\\service\\TruckService' => __DIR__ . '/../..' . '/app/data/service/TruckService.php',
|
||||
'app\\data\\service\\UserService' => __DIR__ . '/../..' . '/app/data/service/UserService.php',
|
||||
'app\\data\\service\\payment\\AlipayPaymentService' => __DIR__ . '/../..' . '/app/data/service/payment/AlipayPaymentService.php',
|
||||
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// This file is automatically generated at:2021-01-26 13:56:16
|
||||
// This file is automatically generated at:2021-01-28 16:01:32
|
||||
declare (strict_types = 1);
|
||||
return array (
|
||||
0 => 'think\\admin\\Library',
|
||||
|
Loading…
x
Reference in New Issue
Block a user