From 3ff1553356cf0107b852a9f72a0e2bd4d048a581 Mon Sep 17 00:00:00 2001 From: youda Date: Thu, 10 Apr 2025 02:46:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .cursor/rules/mhbase.mdc | 0 .env | 10 +- README_AUTO_OFFSHELF.md | 0 app/admin/controller/AdvertType.php | 0 app/admin/controller/Base.php | 25 + app/admin/controller/Goods.php | 220 +- app/admin/controller/GoodsExtend.php | 219 - app/admin/controller/GoodsType.php | 0 app/admin/controller/Reward.php | 0 app/admin/controller/SignConfig.php | 0 app/admin/controller/WelfareHouse.php | 0 app/admin/middleware/DomainBind.php | 6 +- app/admin/route/app.php | 14 +- app/admin/view/AdvertType/add.html | 0 app/admin/view/AdvertType/list_all.html | 0 app/admin/view/Config/miniprogram.html | 0 app/admin/view/Config/systemconfig.html | 18 + app/admin/view/Goods/goods.html | 255 +- app/admin/view/Goods/goods_add.html | 59 +- app/admin/view/Goods/goods_edit.html | 47 +- app/admin/view/Goods/goods_extend.html | 92 + app/admin/view/Goods/goodslist.html | 53 +- app/admin/view/Goods/goodslist_add.html | 48 +- app/admin/view/Goods/goodslist_edit.html | 24 +- app/admin/view/Goods/offshelf/log.html | 0 app/admin/view/Goods/type_add.html | 0 app/admin/view/Goods/type_edit.html | 0 app/admin/view/Goods/type_index.html | 0 .../view/GoodsExtend/goodsextend_edit.html | 97 - .../view/GoodsExtend/goodsextendlist.html | 646 --- app/admin/view/Public/footer3.html | 0 app/admin/view/Public/header3.html | 0 app/admin/view/Reward/add.html | 0 app/admin/view/Reward/edit.html | 0 app/admin/view/Reward/index.html | 0 app/admin/view/SignConfig/add.html | 0 app/admin/view/SignConfig/edit.html | 0 app/admin/view/SignConfig/index.html | 0 app/admin/view/SignConfig/reward_edit.html | 0 app/admin/view/User/login_stat.html | 0 app/admin/view/User/user_integral_detail.html | 0 app/admin/view/User/user_money_detail.html | 0 app/admin/view/User/user_score_detail.html | 0 app/admin/view/welfare_house/add.html | 0 app/admin/view/welfare_house/edit.html | 0 app/admin/view/welfare_house/index.html | 0 app/api/controller/AliNotify.php | 2472 ----------- app/api/controller/Base.php | 2 +- app/api/controller/Config.php | 0 app/api/controller/FuLiWu.php | 16 +- app/api/controller/Goods.php | 215 +- app/api/controller/Index.php | 110 +- app/api/controller/Infinite.php | 272 +- app/api/controller/Notify.php | 206 +- app/api/controller/Sign.php | 0 app/api/controller/WelfareHouse.php | 0 app/api/middleware/DomainBind.php | 4 +- app/api/route/app.php | 6 +- app/command/AutoGoodsOffshelf.php | 0 app/command/CreateOffshelfLogTable.php | 0 app/command/FlwOpen.php | 8 +- app/common/helper/ConfigHelper.php | 0 app/common/helper/MiniprogramHelper.php | 0 app/common/helper/WxPayHelper.php | 0 app/common/model/AdvertType.php | 0 app/common/model/GoodsExtend.php | 68 + app/common/model/GoodsExtendList.php | 72 - app/common/model/GoodsType.php | 0 app/common/model/Reward.php | 0 app/common/model/SignConfig.php | 0 app/common/model/SignConfigReward.php | 0 app/common/model/UserLoginLog.php | 0 app/common/model/WelfareHouse.php | 0 app/common/service/CommonService.php | 0 app/common/service/RewardService.php | 0 config/api.php | 11 +- config/menu.php | 21 +- goods.json | 345 ++ public/js/reward-component.js | 0 public/js/v2.10.3/layui/css/layui.css | 0 public/js/v2.10.3/layui/font/iconfont.eot | Bin public/js/v2.10.3/layui/font/iconfont.svg | 0 public/js/v2.10.3/layui/font/iconfont.ttf | Bin public/js/v2.10.3/layui/font/iconfont.woff | Bin public/js/v2.10.3/layui/font/iconfont.woff2 | Bin public/js/v2.10.3/layui/layui.js | 0 public/static/admin/reward-component.js | 0 public/storage/poster/share/5.png | Bin 0 -> 16899 bytes public/storage/poster/share/6148.png | 0 public/storage/poster/share/6157.png | Bin public/storage/poster/share/6158.png | 0 public/storage/poster/share/6165.png | Bin .../image/20250402/1743585174596970.gif | Bin .../image/20250409/1744133826198051.png | Bin 0 -> 25857 bytes table.sql | 3847 +++++++++-------- 抽奖算法优化说明.md | 0 96 files changed, 3746 insertions(+), 5762 deletions(-) mode change 100644 => 100755 .cursor/rules/mhbase.mdc mode change 100644 => 100755 README_AUTO_OFFSHELF.md mode change 100644 => 100755 app/admin/controller/AdvertType.php delete mode 100755 app/admin/controller/GoodsExtend.php mode change 100644 => 100755 app/admin/controller/GoodsType.php mode change 100644 => 100755 app/admin/controller/Reward.php mode change 100644 => 100755 app/admin/controller/SignConfig.php mode change 100644 => 100755 app/admin/controller/WelfareHouse.php mode change 100644 => 100755 app/admin/middleware/DomainBind.php mode change 100644 => 100755 app/admin/view/AdvertType/add.html mode change 100644 => 100755 app/admin/view/AdvertType/list_all.html mode change 100644 => 100755 app/admin/view/Config/miniprogram.html create mode 100644 app/admin/view/Goods/goods_extend.html mode change 100644 => 100755 app/admin/view/Goods/offshelf/log.html mode change 100644 => 100755 app/admin/view/Goods/type_add.html mode change 100644 => 100755 app/admin/view/Goods/type_edit.html mode change 100644 => 100755 app/admin/view/Goods/type_index.html delete mode 100755 app/admin/view/GoodsExtend/goodsextend_edit.html delete mode 100755 app/admin/view/GoodsExtend/goodsextendlist.html mode change 100644 => 100755 app/admin/view/Public/footer3.html mode change 100644 => 100755 app/admin/view/Public/header3.html mode change 100644 => 100755 app/admin/view/Reward/add.html mode change 100644 => 100755 app/admin/view/Reward/edit.html mode change 100644 => 100755 app/admin/view/Reward/index.html mode change 100644 => 100755 app/admin/view/SignConfig/add.html mode change 100644 => 100755 app/admin/view/SignConfig/edit.html mode change 100644 => 100755 app/admin/view/SignConfig/index.html mode change 100644 => 100755 app/admin/view/SignConfig/reward_edit.html mode change 100644 => 100755 app/admin/view/User/login_stat.html mode change 100644 => 100755 app/admin/view/User/user_integral_detail.html mode change 100644 => 100755 app/admin/view/User/user_money_detail.html mode change 100644 => 100755 app/admin/view/User/user_score_detail.html mode change 100644 => 100755 app/admin/view/welfare_house/add.html mode change 100644 => 100755 app/admin/view/welfare_house/edit.html mode change 100644 => 100755 app/admin/view/welfare_house/index.html delete mode 100755 app/api/controller/AliNotify.php mode change 100644 => 100755 app/api/controller/Config.php mode change 100644 => 100755 app/api/controller/FuLiWu.php mode change 100644 => 100755 app/api/controller/Sign.php mode change 100644 => 100755 app/api/controller/WelfareHouse.php mode change 100644 => 100755 app/api/middleware/DomainBind.php mode change 100644 => 100755 app/command/AutoGoodsOffshelf.php mode change 100644 => 100755 app/command/CreateOffshelfLogTable.php mode change 100644 => 100755 app/common/helper/ConfigHelper.php mode change 100644 => 100755 app/common/helper/MiniprogramHelper.php mode change 100644 => 100755 app/common/helper/WxPayHelper.php mode change 100644 => 100755 app/common/model/AdvertType.php create mode 100644 app/common/model/GoodsExtend.php delete mode 100755 app/common/model/GoodsExtendList.php mode change 100644 => 100755 app/common/model/GoodsType.php mode change 100644 => 100755 app/common/model/Reward.php mode change 100644 => 100755 app/common/model/SignConfig.php mode change 100644 => 100755 app/common/model/SignConfigReward.php mode change 100644 => 100755 app/common/model/UserLoginLog.php mode change 100644 => 100755 app/common/model/WelfareHouse.php mode change 100644 => 100755 app/common/service/CommonService.php mode change 100644 => 100755 app/common/service/RewardService.php mode change 100644 => 100755 config/api.php create mode 100755 goods.json mode change 100644 => 100755 public/js/reward-component.js mode change 100644 => 100755 public/js/v2.10.3/layui/css/layui.css mode change 100644 => 100755 public/js/v2.10.3/layui/font/iconfont.eot mode change 100644 => 100755 public/js/v2.10.3/layui/font/iconfont.svg mode change 100644 => 100755 public/js/v2.10.3/layui/font/iconfont.ttf mode change 100644 => 100755 public/js/v2.10.3/layui/font/iconfont.woff mode change 100644 => 100755 public/js/v2.10.3/layui/font/iconfont.woff2 mode change 100644 => 100755 public/js/v2.10.3/layui/layui.js mode change 100644 => 100755 public/static/admin/reward-component.js create mode 100755 public/storage/poster/share/5.png mode change 100644 => 100755 public/storage/poster/share/6148.png mode change 100644 => 100755 public/storage/poster/share/6157.png mode change 100644 => 100755 public/storage/poster/share/6158.png mode change 100644 => 100755 public/storage/poster/share/6165.png mode change 100644 => 100755 public/ueditor/php/upload/image/20250402/1743585174596970.gif create mode 100755 public/ueditor/php/upload/image/20250409/1744133826198051.png mode change 100644 => 100755 table.sql mode change 100644 => 100755 抽奖算法优化说明.md diff --git a/.cursor/rules/mhbase.mdc b/.cursor/rules/mhbase.mdc old mode 100644 new mode 100755 diff --git a/.env b/.env index 89cab74..d30629e 100755 --- a/.env +++ b/.env @@ -1,4 +1,4 @@ -APP_DEBUG = true +APP_DEBUG = false [APP] DEFAULT_TIMEZONE = Asia/Shanghai @@ -6,12 +6,12 @@ DEFAULT_TIMEZONE = Asia/Shanghai [DATABASE] TYPE = mysql HOSTNAME = 127.0.0.1 -DATABASE = xinglanmh_shequt -USERNAME = xinglanmh_shequt -PASSWORD = t3aihzA23RcB6RT8 +DATABASE = youda_test +USERNAME = youda_test +PASSWORD = youda_test HOSTPORT = 3306 CHARSET = utf8 -DEBUG = true +DEBUG = false [LANG] default_lang = zh-cn diff --git a/README_AUTO_OFFSHELF.md b/README_AUTO_OFFSHELF.md old mode 100644 new mode 100755 diff --git a/app/admin/controller/AdvertType.php b/app/admin/controller/AdvertType.php old mode 100644 new mode 100755 diff --git a/app/admin/controller/Base.php b/app/admin/controller/Base.php index 6af5dfa..44ce15a 100755 --- a/app/admin/controller/Base.php +++ b/app/admin/controller/Base.php @@ -22,11 +22,36 @@ class Base extends MyController public $admin_id = 0; public $config = []; + + /** + * 访问白名单,无需验证登录 + * @var array + */ + protected $whiteList = [ + // 格式:'控制器/方法' => true + // 例如:'login/index' => true, + 'goods/sync_goods' => true, + ]; + /** * 后台初始化 */ public function initialize() { + // 获取当前控制器和方法 + $controller = strtolower(request()->controller()); + $action = strtolower(request()->action()); + $currentRoute = $controller . '/' . $action; + + // 检查是否在白名单中 + if (isset($this->whiteList[$currentRoute]) && $this->whiteList[$currentRoute] === true) { + // 在白名单中,跳过登录验证 + $this->config = getConfig('base'); + View::assign("config", $this->config); + return; + } + + // 不在白名单中,进行登录验证 if (!session('admin_id') || !session('admin_token')) { echo ""; die; diff --git a/app/admin/controller/Goods.php b/app/admin/controller/Goods.php index 55b3b7c..f1ba70d 100755 --- a/app/admin/controller/Goods.php +++ b/app/admin/controller/Goods.php @@ -52,6 +52,18 @@ class Goods extends Base $list = $query->page($page, $limit)->select()->toArray(); + // 获取盒子ID集合 + $goodsIds = array_column($list, 'id'); + + // 获取盒子扩展信息 + $goodsExtendList = []; + if (!empty($goodsIds)) { + $goodsExtends = \app\common\model\GoodsExtend::whereIn('goods_id', $goodsIds)->select()->toArray(); + foreach ($goodsExtends as $extend) { + $goodsExtendList[$extend['goods_id']] = $extend; + } + } + // 处理图片路径 foreach ($list as &$item) { $item['imgurl'] = imageUrl($item['imgurl']); @@ -60,6 +72,14 @@ class Goods extends Base } // 添加格式化时间 $item['addtime_text'] = date('Y-m-d H:i', $item['addtime']); + + // 添加扩展信息 + $item['goods_extend'] = isset($goodsExtendList[$item['id']]) ? $goodsExtendList[$item['id']] : null; + + // 修改时间处理 + if(isset($item['update_time']) && $item['update_time']){ + $item['update_time_text'] = date('Y-m-d H:i', $item['update_time']); + } } return $this->renderTable('获取成功', $count, $list); @@ -72,7 +92,7 @@ class Goods extends Base { // 查询可用的盒子类型 $goodsTypeList = Db::name('goods_type') - ->field('value,sort_order,remark,is_fenlei,fl_name') + ->field('value,sort_order,remark,is_fenlei,fl_name,pay_wechat,pay_balance,pay_currency,pay_currency2,pay_coupon,is_deduction') ->where('is_fenlei', 1) ->order('sort_order') ->select() @@ -142,7 +162,7 @@ class Goods extends Base } $data['prize_num'] = 0; $data['category_id'] = 0; - } elseif ($data['type'] == 2 || $data['type'] == 16) { + } elseif ($data['type'] == 2 || $data['type'] == 16 || $data['type'] == 17) { $data['stock'] = 0; $data['lock_is'] = 0; $data['lock_time'] = 0; @@ -390,7 +410,7 @@ class Goods extends Base } $data['prize_num'] = 0; $data['category_id'] = 0; - } elseif ($type == 2 || $type == 16) { + } elseif ($type == 2 || $type == 16 || $type == 17) { $data['stock'] = 0; $data['lock_is'] = 0; $data['lock_time'] = 0; @@ -642,7 +662,7 @@ class Goods extends Base if ($type == 1 || $type == 3 || $type == 5 || $type == 6 || $type == 10 || $type == 11) { $where[] = ['num', '=', 1]; - } elseif ($type == 2 || $type == 8 || $type == 9 || $type == 15 || $type == 16) { + } elseif ($type == 2 || $type == 8 || $type == 9 || $type == 15 || $type == 16 || $type == 17) { $where[] = ['num', '=', 0]; } else { return $this->renderError('请求参数错误1'); @@ -687,7 +707,7 @@ class Goods extends Base } $real_pro1 += $goods_list_item['real_pro']; } - if ($type == 2 || $type == 8 || $type == 9 || $type == 15 || $type == 16) { + if ($type == 2 || $type == 8 || $type == 9 || $type == 15 || $type == 16 || $type == 17) { $goods_list[] = ['title' => '宝箱概率合计', 'real_pro' => $real_pro1, 'id' => -1]; } $item['children'] = $goods_list; @@ -715,7 +735,7 @@ class Goods extends Base if( $goods_list_id){ $shang = Shang::where('id', '<=', 33)->where('id', '>', 5)->select()->toArray(); } - } elseif ($info['type'] == 2 || $info['type'] == 8 || $info['type'] == 9 || $info['type'] == 16) { + } elseif ($info['type'] == 2 || $info['type'] == 8 || $info['type'] == 9 || $info['type'] == 16 || $info['type'] == 17 ) { $shang = Shang::where('id', 'between', [34, 38])->select()->toArray(); } elseif ($info['type'] == 3) { $shang = Shang::where('id', 'between', [4, 33])->select()->toArray(); @@ -833,7 +853,13 @@ class Goods extends Base if (RegInt($data['stock'])) { return $this->renderError('奖品数量设置错误,请设置大于0的整数'); } - } else { + } elseif ($type == 17) { + $prize_code = getPrizeCode() . '_' . time(); + $data['prize_code'] = $prize_code; + $data['surplus_stock'] = $data['stock']; + + } + else { return $this->err('请求参数错误'); } if (RegZero($data['sort'])) { @@ -887,7 +913,7 @@ class Goods extends Base if( $goods_list_id){ $shang = Shang::where('id', '<=', 33)->where('id', '>', 5)->select()->toArray(); } - } elseif ($info['type'] == 2 || $info['type'] == 8 || $info['type'] == 9 || $info['type'] == 16) { + } elseif ($info['type'] == 2 || $info['type'] == 8 || $info['type'] == 9 || $info['type'] == 16 || $info['type'] == 17 ) { $shang = Shang::where('id', 'between', [34, 38])->select()->toArray(); } elseif ($info['type'] == 15) { $shang = Shang::where('id', '>=', 114)->select()->toArray(); @@ -955,7 +981,7 @@ class Goods extends Base if ($type == 1 || $type == 5 || $type == 10 || $type == 6 || $type == 11 || $type == 15) { - } elseif ($type == 2 || $type == 8 || $type == 9 || $type == 16) { + } elseif ($type == 2 || $type == 8 || $type == 9 || $type == 16 || $type == 17) { if (RegMoney($data['real_pro'] * 10000)) { return $this->renderError('真实概率设置错误,最多保留四位小数'); } @@ -1667,4 +1693,180 @@ class Goods extends Base } } + /** + * 盒子扩展设置 + */ + public function goods_extend(Request $request) + { + $goods_id = $request->param('goods_id/d'); + if (!$goods_id) { + return $this->renderError("参数错误"); + } + + // 获取盒子信息 + $goods = GoodsModel::where('id', $goods_id)->find(); + if (!$goods) { + return $this->renderError("盒子不存在"); + } + + if ($request->isPost()) { + $data = $request->post(); + + // 验证参数 + $data['goods_id'] = $goods_id; + $data['pay_wechat'] = isset($data['pay_wechat']) ? 1 : 0; + $data['pay_balance'] = isset($data['pay_balance']) ? 1 : 0; + $data['pay_currency'] = isset($data['pay_currency']) ? 1 : 0; + $data['pay_currency2'] = isset($data['pay_currency2']) ? 1 : 0; + $data['pay_coupon'] = isset($data['pay_coupon']) ? 1 : 0; + $data['is_deduction'] = isset($data['is_deduction']) ? 1 : 0; + + // 查询是否已存在 + $exist = \app\common\model\GoodsExtend::getByGoodsId($goods_id); + + Db::startTrans(); + try { + if ($exist) { + // 更新 + \app\common\model\GoodsExtend::where('goods_id', $goods_id)->update($data); + } else { + // 新增 + \app\common\model\GoodsExtend::create($data); + } + Db::commit(); + return json(['status' => 1, 'msg' => '保存成功']); + } catch (\Exception $e) { + Db::rollback(); + return json(['status' => 0, 'msg' => '保存失败: ' . $e->getMessage()]); + } + } + + // 获取扩展设置 + $extend = \app\common\model\GoodsExtend::getByGoodsId($goods_id); + + if (!$extend) { + // 从goods_type表获取默认值 + $goodsType = Db::name('goods_type') + ->field('pay_wechat, pay_balance, pay_currency, pay_currency2, pay_coupon, is_deduction') + ->where('value', $goods['type']) + ->find(); + + if ($goodsType) { + // 如果找到了盒子类型的默认配置 + $extend = [ + 'goods_id' => $goods_id, + 'pay_wechat' => $goodsType['pay_wechat'], + 'pay_balance' => $goodsType['pay_balance'], + 'pay_currency' => $goodsType['pay_currency'], + 'pay_currency2' => $goodsType['pay_currency2'], + 'pay_coupon' => $goodsType['pay_coupon'], + 'is_deduction' => $goodsType['is_deduction'] + ]; + } else { + // 如果没找到,使用默认值 + $extend = [ + 'goods_id' => $goods_id, + 'pay_wechat' => 1, + 'pay_balance' => 1, + 'pay_currency' => 1, + 'pay_currency2' => 1, + 'pay_coupon' => 1, + 'is_deduction' => 1 + ]; + } + } + + View::assign('goods', $goods); + View::assign('extend', $extend); + return View::fetch("Goods/goods_extend"); + } + + /** + * 删除盒子扩展设置 + */ + public function goods_extend_del(Request $request) + { + $goods_id = $request->param('goods_id/d'); + if (!$goods_id) { + return json(['status' => 0, 'msg' => '参数错误']); + } + + // 获取盒子信息 + $goods = GoodsModel::where('id', $goods_id)->find(); + if (!$goods) { + return json(['status' => 0, 'msg' => '盒子不存在']); + } + + // 删除扩展设置 + $result = \app\common\model\GoodsExtend::deleteByGoodsId($goods_id); + if ($result) { + return json(['status' => 1, 'msg' => '删除成功']); + } else { + return json(['status' => 0, 'msg' => '删除失败或扩展设置不存在']); + } + } + + /** + * 更新盒子排序 + */ + public function update_goods_sort(Request $request) + { + $id = $request->post('id/d'); + $sort = $request->post('sort/d'); + + if (empty($id)) { + return json(['status' => 0, 'msg' => '参数错误']); + } + + // 验证排序值 + if (!is_numeric($sort) || $sort < 0) { + return json(['status' => 0, 'msg' => '排序值必须是非负整数']); + } + + // 获取盒子信息 + $goods = GoodsModel::where('id', $id)->find(); + if (!$goods) { + return json(['status' => 0, 'msg' => '盒子不存在']); + } + + // 更新排序值 + $result = GoodsModel::where('id', $id)->update(['sort' => $sort]); + if ($result) { + return json(['status' => 1, 'msg' => '更新成功']); + } else { + return json(['status' => 0, 'msg' => '更新失败']); + } + } + + /** + * 更新奖品排序 + */ + public function goodslist_edit_sort(Request $request) + { + $id = $request->post('id/d'); + $sort = $request->post('sort/d'); + + if (empty($id)) { + return json(['status' => 0, 'msg' => '参数错误']); + } + + // 验证排序值 + if (!is_numeric($sort) || $sort < 0) { + return json(['status' => 0, 'msg' => '排序值必须是非负整数']); + } + + // 获取奖品信息 + $goodsList = GoodsList::where('id', $id)->find(); + if (!$goodsList) { + return json(['status' => 0, 'msg' => '奖品不存在']); + } + + // 更新排序值 + $result = GoodsList::where('id', $id)->update(['sort' => $sort]); + if ($result) { + return json(['status' => 1, 'msg' => '更新成功']); + } else { + return json(['status' => 0, 'msg' => '更新失败']); + } + } } diff --git a/app/admin/controller/GoodsExtend.php b/app/admin/controller/GoodsExtend.php deleted file mode 100755 index 209ad4a..0000000 --- a/app/admin/controller/GoodsExtend.php +++ /dev/null @@ -1,219 +0,0 @@ -param('goods_id/d', 0); - $num = $request->param('num/d', 1); - $info = GoodsModel::where(['id' => $goods_id])->find(); - if (!$info) { - return $this->renderError('请求参数错误'); - } - - $type = $info['type']; - $title = trim(input('get.title')); - $lian_ji_type = input('get.lian_ji_type'); - $whe = array(); - $whe[] = ['goods_id', '=', $goods_id]; - if ($num > $info['stock']) { - $num = $info['stock']; - } - - if ($type == 1 || $type == 3 || $type == 5 || $type == 6 || $type == 10 || $type == 11) { - if ($num <= 0) { - $num = 1; - } - if ($num != 0) { - $whe[] = ['num', '=', $num]; - } - } elseif ($type == 2 || $type == 8 || $type == 9) { - $whe[] = ['num', '=', 0]; - } else { - return $this->renderError('请求参数错误1'); - } - if (!empty($title)) { - $whe[] = ['title', 'like', '%' . $title . '%']; - } - if (!empty($lian_ji_type)) { - $whe[] = ['lian_ji_type', '=', $lian_ji_type]; - } - $field = "*"; - $order = "sort desc,shang_id asc,id asc"; - $data = GoodsList::getList($whe, $field, $order, 150); - $stock = array_sum(array_column($data['list'], 'stock')); - $surplus_stock = array_sum(array_column($data['list'], 'surplus_stock')); - $reward_num_count = $stock - $surplus_stock; - - - //GoodsModel - $goodsExtendLists = GoodsExtendListModel::getGoodsExtendList($goods_id); - // $idArray = array_map(function($item) { - // return $item['id']; - // }, $data); - // Shang::where(['id' => $value['shang_id']])->value('title'); - $real_pro = 0; - $goods_extend_reward_num = 0; - foreach ($data['list'] as &$value) { - $value['shang'] = Shang::where(['id' => $value['shang_id']])->value('title'); - $real_pro += $value['real_pro']; - // $value['rownum'] = $goodsExtendLists::where(['id' => $goods_id])->find(); - //找到匹配的数据 - $value['goods_extend_reward_num'] = 0; - $value['goods_extend_rawrd_type'] = 0; - $value['goods_extend'] = []; - if (count($goodsExtendLists) > 0) { - - - - foreach ($goodsExtendLists as $item) { - // $temp_goods_extend_data = GoodsExtendListModel::where('prize_code', '=', $goods["prize_code"])->find(); - // if ($item['prize_code'] == $value['prize_code']) { - if ($item['goods_list_id'] == $value['id']) { - $goods_extend_reward_num = $item['reward_num']; // 替换为你需要的字段名 - $value['goods_extend_reward_num'] = $goods_extend_reward_num; - $value['goods_extend'] = $item; - $value['goods_extend_rawrd_type'] = $item['rawrd_type']; - $value['goods_extend_reward_num_1'] = $item['reward_num_1']; - break; // 找到第一个匹配的对象后退出循环 - } - } - } - } - View::assign('list', $data['list']); - View::assign('count', $data['count']); - View::assign('page', $data['page']); - View::assign('goods_id', $goods_id); - View::assign('type', $type); - View::assign('goods_model', $info); - View::assign('num', $num ); - View::assign('real_pro', $real_pro); - View::assign('reward_num_count',$reward_num_count); - return View::fetch("GoodsExtend/goodsextendlist"); - - } - - /** - * 编辑奖品 - */ - public function goodsextendlist_edit(Request $request) - { - $id = 0; - if (!$request->isPost()) { - $id = $request->param('id/d', 0); - - $goods_extend_list_model = GoodsExtendListModel::getGoodsIdExtendList($id); - View::assign('goods_extend', $goods_extend_list_model); - return View::fetch('GoodsExtend/goodsextend_edit'); - } else { - - $data = input('post.'); - if (empty($data['ids'])) { - return $this->renderError('请求参数错误1'); - } - if (empty($data['value'])) { - return $this->renderError('请求参数错误1'); - } - - // if (RegZero($data['value'])) { - // return $this->renderError('请输入整数'); - // } - if (RegZero($data['goodid'])) { - return $this->renderError('请求参数错误'); - } - $value = $data['value']; - $ids = $data['ids']; - $goodid = $data['goodid']; - $save_goods_extend_data = []; - - // rawrd_type:3, - // reward_num:0, - // reward_num1:0, - // reward_num2:0 - // $ordinary_prize = GoodsList::where('goods_id', '=', $goods_id) - // ->where('num', '=', $num) - // ->where('shang_id', 'between', self::$shang_prize_id) - // ->order('sort desc,shang_id asc') - // ->select()->toArray(); - - foreach ($ids as $item) { - $goods_list_id = intval($item); - if ($goods_list_id > 0) { - $goods = GoodsList::where(['id' => $goods_list_id])->find(); - if ($goods) { - // $temp_goods_extend_data = GoodsExtendListModel::where('prize_code', '=', $goods["prize_code"])->find(); //getGoodsIdExtendList($goods_list_id); - $temp_goods_extend_data = GoodsExtendListModel::where('goods_list_id', '=', $goods_list_id)->find(); //getGoodsIdExtendList($goods_list_id); - if ($temp_goods_extend_data === null) { - // 创建新的数据 - $temp_goods_extend_data = new GoodsExtendListModel(); - } - - // 更新现有数据 - $temp_goods_extend_data->goods_list_id = $item; - $temp_goods_extend_data->reward_num = $value['reward_num']; - $temp_goods_extend_data->rawrd_type = $value['rawrd_type']; - $temp_goods_extend_data->reward_num_1 = $value['reward_num_1']; - $temp_goods_extend_data->goods_id = $goodid; - $temp_goods_extend_data->prize_code = $goods["prize_code"]; - $save_goods_extend_data[] = $temp_goods_extend_data; - } - } - } - // 保存数据到数据库中 - foreach ($save_goods_extend_data as $data) { - $data->save(); // save() 方法将自动处理是插入还是更新 - } - return $this->renderSuccess('编辑成功'); - - } - } - - - /** - * 编辑奖品 - */ - public function goodsextendlist_del(Request $request) - { - if (!$request->isPost()) { - return $this->renderError(''); - } else { - $data = input('post.'); - if (empty($data['goods_list_id'])) { - return $this->renderError('请求参数错误1'); - } - - $goods_list_id = $data['goods_list_id']; - $save_goods_extend_data = GoodsExtendListModel::where('goods_list_id', '=', $goods_list_id)->select(); - // 保存数据到数据库中 - foreach ($save_goods_extend_data as $data) { - if ($data) { - $data->delete(); // delete() 方法将从数据库中删除该对象 - } - - } - - - return $this->renderSuccess('编辑成功'); - - } - } - - -} diff --git a/app/admin/controller/GoodsType.php b/app/admin/controller/GoodsType.php old mode 100644 new mode 100755 diff --git a/app/admin/controller/Reward.php b/app/admin/controller/Reward.php old mode 100644 new mode 100755 diff --git a/app/admin/controller/SignConfig.php b/app/admin/controller/SignConfig.php old mode 100644 new mode 100755 diff --git a/app/admin/controller/WelfareHouse.php b/app/admin/controller/WelfareHouse.php old mode 100644 new mode 100755 diff --git a/app/admin/middleware/DomainBind.php b/app/admin/middleware/DomainBind.php old mode 100644 new mode 100755 index 66925c3..6f8eb6c --- a/app/admin/middleware/DomainBind.php +++ b/app/admin/middleware/DomainBind.php @@ -43,11 +43,11 @@ class DomainBind if (!$this->checkDomain($domain)) { // 记录被拒绝的请求 \think\facade\Log::warning('域名访问被拒绝: ' . $domain . ', 路径: ' . $path); - return $this->error('域名未授权,无法访问', 403); + return $this->error('未授权,无法访问', 403); } // 域名允许,记录请求信息(可选,仅用于调试) - \think\facade\Log::info('域名访问通过: ' . $domain . ', 路径: ' . $path); + // \think\facade\Log::info('域名访问通过: ' . $domain . ', 路径: ' . $path); // 域名允许,继续处理请求 return $next($request); @@ -92,7 +92,7 @@ class DomainBind // 1. 从配置文件中获取额外允许的域名 try { - $configDomains = Config::get('admin.api_domains', []); + $configDomains = Config::get('api.admin_domains', []); if (!empty($configDomains) && is_array($configDomains)) { foreach ($configDomains as $d) { $d = trim($d); diff --git a/app/admin/route/app.php b/app/admin/route/app.php index eb4f8b6..48a7ece 100755 --- a/app/admin/route/app.php +++ b/app/admin/route/app.php @@ -174,6 +174,7 @@ Route::rule('goodslist', 'Goods/goodslist', 'GET|POST'); Route::rule('goodslist_add', 'Goods/goodslist_add', 'GET|POST'); Route::rule('goodslist_edit', 'Goods/goodslist_edit', 'GET|POST'); Route::rule('goodslist_del', 'Goods/goodslist_del', 'GET|POST'); +Route::rule('goodslist_edit_sort', 'Goods/goodslist_edit_sort', 'POST'); Route::rule('give', 'Goods/give', 'GET|POST'); Route::rule('give_add', 'Goods/give_add', 'GET|POST'); Route::rule('give_edit', 'Goods/give_edit', 'GET|POST'); @@ -195,13 +196,14 @@ Route::rule('drawlist_del', 'Draw/drawlist_del', 'GET|POST'); Route::rule('draw_add', 'Draw/draw_add', 'GET|POST'); Route::rule('get_sync_addresses', 'Goods/get_sync_addresses', 'GET'); Route::rule('sync_goods', 'Goods/sync_goods', 'POST'); +Route::any('goods_edit', 'Goods/goods_edit'); +Route::any('goods_del', 'Goods/goods_del'); +Route::any('goodslist', 'Goods/goodslist'); +Route::any('goods_extend', 'Goods/goods_extend'); +Route::any('goods_extend_del', 'Goods/goods_extend_del'); +Route::post('update_goods_sort', 'Goods/update_goods_sort'); + -#============================ -#盒子扩展 -#============================ -Route::rule('goodsextendlist', 'GoodsExtend/goodsextendlist', 'GET|POST'); -Route::rule('goodsextendlist_edit', 'GoodsExtend/goodsextendlist_edit', 'GET|POST'); -Route::rule('goodsextendlist_del', 'GoodsExtend/goodsextendlist_del', 'POST'); #============================ #Order.php订单管理 #============================ diff --git a/app/admin/view/AdvertType/add.html b/app/admin/view/AdvertType/add.html old mode 100644 new mode 100755 diff --git a/app/admin/view/AdvertType/list_all.html b/app/admin/view/AdvertType/list_all.html old mode 100644 new mode 100755 diff --git a/app/admin/view/Config/miniprogram.html b/app/admin/view/Config/miniprogram.html old mode 100644 new mode 100755 diff --git a/app/admin/view/Config/systemconfig.html b/app/admin/view/Config/systemconfig.html index 64bb0e5..48d36b1 100755 --- a/app/admin/view/Config/systemconfig.html +++ b/app/admin/view/Config/systemconfig.html @@ -150,6 +150,24 @@
每日消费达到此金额后可签到,0表示不限制
+
+ +
+ +
外卖盒子的ID,设置为0表示不启用
+
+
+
+ +
+ +
每日免费送抽奖的ID,设置为0表示不启用
+
+
diff --git a/app/admin/view/Goods/goods.html b/app/admin/view/Goods/goods.html index 9835c5b..21ee232 100755 --- a/app/admin/view/Goods/goods.html +++ b/app/admin/view/Goods/goods.html @@ -1,7 +1,7 @@ -{include file="Public:header2"/} +{include file="Public:header3"/} -
+
@@ -33,15 +33,13 @@ + +
-
- - -
@@ -103,6 +101,81 @@ {{# } }} + + + + + + + + + + + + - {include file="Public:footer"/} + {include file="Public:footer3"/} diff --git a/app/admin/view/Goods/goods_add.html b/app/admin/view/Goods/goods_add.html index 15d7080..fb50838 100755 --- a/app/admin/view/Goods/goods_add.html +++ b/app/admin/view/Goods/goods_add.html @@ -1,4 +1,9 @@ {include file="Public:header2"/} + @@ -98,6 +103,7 @@
+
@@ -105,6 +111,7 @@
+
每天允许购买的次数,0不限制
@@ -232,8 +239,8 @@
-
- +
+
@@ -255,12 +262,12 @@ placeholder="请输入从多少抽数后开始检测" class="layui-input" style="width: 600px">
-
+
- -
用户需要消费满此金额才能看到此盒子,0表示都能看到
+ +
用户需要消费满此金额才能看到此盒子,0表示都能看到
@@ -334,7 +341,7 @@ $(".lingzhu_fan").hide(); $(".lingzhu_shang_id").hide(); $("#goods_describe_div").hide(); - $("#div_daily_xiangou").show(); // 初始显示每日限购次数 + $(".flw_time_config").hide(); // 显示福利屋时间配置 $(".lian_ji_num").hide(); $(".id_stock").show(); @@ -347,7 +354,11 @@ $(".show_is").show(); $(".sale_time").show(); $("#div_daily_xiangou").show(); // 显示每日限购 - + // 显示福利屋相关字段 + $("#goods_describe_div").hide(); // 显示盒子描述 + $(".flw_time_config").hide(); // 显示福利屋时间配置 + $("#div_daily_xiangou").hide(); // 显示每日限购次数 + $("#div_quanju_xiangou").hide(); //2023-11 $(".rage_is").hide(); $(".rage").hide(); @@ -357,12 +368,18 @@ $(".lingzhu_shang_id").hide(); $(".lian_ji_num").hide(); $(".lian_ji_shang_id").hide(); + $('.jiesuojine').show(); form.on('radio(type)', function (data) { console.log('aaa'); - + var value = data.value; // 当前选中的value值 $("#div_daily_xiangou").show(); $("#goods_describe_div").hide(); + $('.jiesuojine').show(); + $(".flw_time_config").hide(); // 显示福利屋时间配置 + $("#div_daily_xiangou").hide(); // 显示每日限购次数 + $("#div_quanju_xiangou").hide(); + $('.zidongxiajia').show(); if (value == 1 || value == 11) { $(".id_stock").show(); $(".id_lock_is").show(); @@ -538,6 +555,26 @@ $(".lingzhu_shang_id").hide(); $(".lian_ji_num").hide(); $(".lian_ji_shang_id").hide(); + } else if (value == 17) { + $(".id_stock").hide(); + $(".id_lock_is").hide(); + $(".id_lock_time").hide(); + $(".id_prize_num").hide(); + $(".coupon_is").hide(); + $(".coupon_pro").hide(); + $(".integral_is").hide(); + $(".show_is").hide(); + $(".sale_time").hide(); + $(".new_is").hide(); + $('.zidongxiajia').hide(); + //2023-11 + $(".rage_is").hide(); + $(".rage").hide(); + $(".item_card_id").hide(); + $(".lian_ji_num").hide(); + $(".lian_ji_shang_id").hide(); + $("#div_daily_xiangou").show(); // 显示每日限购 + $('.jiesuojine').hide(); } }); // 自动下架开关切换事件 @@ -548,13 +585,13 @@ $('.xiajia-config').hide(); } }); - + // 首抽五折切换事件 form.on('radio(shou_zhe)', function (data) { // 仅记录选择,不做界面显示变化 console.log('首抽五折设置为:', data.value); }); - + //执行实例 upload.render({ accept: 'imgurl' diff --git a/app/admin/view/Goods/goods_edit.html b/app/admin/view/Goods/goods_edit.html index 8e7dcf6..279e888 100755 --- a/app/admin/view/Goods/goods_edit.html +++ b/app/admin/view/Goods/goods_edit.html @@ -268,10 +268,10 @@
-
+
-
用户需要消费满此金额才能看到此盒子,0表示都能看到
@@ -327,8 +327,8 @@ type_switch(value); }) - // 初始化时间选择器 - laydate.render({ + // 初始化时间选择器 + laydate.render({ elem: '#flw_start_time', type: 'datetime' }); @@ -344,7 +344,7 @@ }); // 如果是福利屋类型,初始时隐藏自动下架选项 - if ({$type} == 15) { + if ({$type} == 15||{$type} == 17) { $("[name='is_auto_xiajia']").parents(".layui-form-item").hide(); } @@ -360,9 +360,22 @@ }); function type_switch(value) { + $('#isshouwchou').show(); $("#goods_describe_div").hide(); $(".lian_ji_num").hide(); + $("#goods_describe_div").hide(); // 显示盒子描述 + $(".flw_time_config").hide(); // 显示福利屋时间配置 + $("#div_daily_xiangou").hide(); // 显示每日限购次数 + $("#div_quanju_xiangou").hide(); + $('.lingzhu_fan').hide(); + $('.lingzhu_shang_id').hide(); + $('.lian_ji_num').hide(); + $('.lian_ji_shang_id').hide(); + $('.jiesuojine').hide(); + $('.zidongxiajia').show(); + $('.jiesuojine').show(); + if (value == 1 || value == 11) { $(".id_stock").show(); $(".id_lock_is").show(); @@ -539,11 +552,31 @@ $(".lingzhu_shang_id").hide(); $(".lian_ji_num").hide(); $(".lian_ji_shang_id").hide(); + } else if (value == 17) { + $(".lingzhu_is").hide(); + $(".id_stock").hide(); + $(".id_lock_is").hide(); + $(".id_lock_time").hide(); + $(".id_prize_num").hide(); + $(".coupon_is").hide(); + $(".coupon_pro").hide(); + $(".integral_is").hide(); + $(".show_is").hide(); + $(".sale_time").hide(); + $(".new_is").hide(); + $('.zidongxiajia').hide(); + //2023-11 + $(".rage_is").hide(); + $(".rage").hide(); + $(".item_card_id").hide(); + $(".lian_ji_num").hide(); + $(".lian_ji_shang_id").hide(); + $("#div_daily_xiangou").show(); // 显示每日限购 + $('.jiesuojine').hide(); } } - // 自动下架开关切换事件 - form.on('radio(autoXiajia)', function (data) { + form.on('radio(autoXiajia)', function (data) { if (data.value == "1") { $('.xiajia-config').show(); } else { diff --git a/app/admin/view/Goods/goods_extend.html b/app/admin/view/Goods/goods_extend.html new file mode 100644 index 0000000..8260734 --- /dev/null +++ b/app/admin/view/Goods/goods_extend.html @@ -0,0 +1,92 @@ +{include file="Public:header2"/} + + +
+
+
盒子扩展设置
+
+
+ + +
+ +
+
ID: {$goods.id} | 名称: {$goods.title}
+
+
+ +
+ +
+ + + + + +
+
+ +
+ +
+ + +
+
+ +
+
+ + + +
+
+
+
+
+
+ + {include file="Public:footer"/} + + + + \ No newline at end of file diff --git a/app/admin/view/Goods/goodslist.html b/app/admin/view/Goods/goodslist.html index cae4a4d..54c5fbe 100755 --- a/app/admin/view/Goods/goodslist.html +++ b/app/admin/view/Goods/goodslist.html @@ -30,14 +30,12 @@ +
-
- -
@@ -153,11 +151,11 @@ columns.push({ field: 'price', title: '价格信息', templet: '#priceTpl', minWidth: 150 }); // 根据类型添加特定列 - if ([1, 3, 5,6, 10, 11, 15].indexOf(goodsType) > -1) { + if ([1, 3, 5,6, 10, 11, 15,17].indexOf(goodsType) > -1) { columns.push({ field: 'stock', title: '奖品数量', minWidth: 100 }); } - if ([2, 8, 9, 16].indexOf(goodsType) > -1) { + if ([2, 8, 9, 16,17].indexOf(goodsType) > -1) { columns.push({ field: 'real_pro', title: '真实概率', templet: function (d) { return d.real_pro + '%' @@ -174,7 +172,7 @@ } - columns.push({ field: 'sort', title: '排序', minWidth: 80 }); + columns.push({ field: 'sort', title: '排序', minWidth: 80, edit: 'text' }); columns.push({ title: '操作', toolbar: '#operationTpl', minWidth: 210, fixed: 'right' }); // 渲染表格 @@ -206,12 +204,6 @@ }, cols: [columns], parseData: (res) => { - // console.log(res); - // res.data[0].children = [res.data[1]]; - // res.data[0].children[0].id=9989; - // res.data[0].isParent = true; - // console.log(res.data); - return { "totalRow": { "real_pro": res.code.real_pro, @@ -265,6 +257,43 @@ openAddLayer(data.goods_id, data.id); } }); + + // 监听单元格编辑 + table.on('edit(goodsListTable)', function(obj){ + var value = obj.value, // 得到修改后的值 + data = obj.data, // 得到所在行所有键值 + field = obj.field; // 得到字段 + + // 排序字段修改 + if (field === 'sort') { + var loadIndex = layer.load(2); + // 发送请求保存修改 + $.ajax({ + url: '{:url("/admin/goodslist_edit_sort")}', + type: 'POST', + data: { + id: data.id, + sort: value + }, + success: function(res) { + layer.close(loadIndex); + if (res.status === 1) { + layer.msg('排序修改成功', {icon: 1, time: 1000}); + } else { + layer.msg(res.msg || '修改失败', {icon: 2, anim: 6, time: 2000}); + // 重载表格以恢复原值 + table.reload('goodsListTable'); + } + }, + error: function() { + layer.close(loadIndex); + layer.msg('网络错误,请稍后重试', {icon: 2, anim: 6, time: 2000}); + // 重载表格以恢复原值 + table.reload('goodsListTable'); + } + }); + } + }); // 打开添加层 function openAddLayer(goodsId, goods_list_id = '') { diff --git a/app/admin/view/Goods/goodslist_add.html b/app/admin/view/Goods/goodslist_add.html index 3cfee41..05d174b 100755 --- a/app/admin/view/Goods/goodslist_add.html +++ b/app/admin/view/Goods/goodslist_add.html @@ -28,7 +28,7 @@ {/if}
-
+
+ title="宝箱" {if $goods_list_id}disabled{/if} {if $type eq 17}disabled{/if}>
- 货币:抽到后直接发放,不会到用户的盒柜里 + 货币:抽到后会发放“赠送货币”中配置的数据,本奖品不会到用户的盒柜里。
+ 盒子类型为特殊盒子时,无法选择宝箱
@@ -53,7 +55,7 @@
-
+
-
+
{if $type eq 1 || $type eq 3 || $type eq 5 || $type eq 10 || $type eq 6 || $type eq 11 - || $type eq 15} + || $type eq 15|| $type eq 17}
+ {if $type eq 17 } +
+ 当盒子类型为:特殊奖品,奖品数量为每天能够抽中的次数,当天此奖品数量抽完后,不在进入奖池。0则不进入奖池 +
+ {/if}
@@ -93,22 +101,26 @@
{/if} - {if $type eq 2 || $type eq 8 || $type eq 9 || $type eq 16} + {if $type eq 2 || $type eq 8 || $type eq 9 || $type eq 16 || $type eq 17}
-
+
%
{/if} - {if $type eq 16} + {if $type eq 16 || $type eq 17 }
+
+ 用户抽到后会发放相同价值的UU币(如:价值10元的奖品,赠送倍率为2。用户抽中后发放本奖品和1000的UU币)。 +
{/if} @@ -131,6 +143,9 @@
+
+ 用户抽到后会发放对应的货币。 +
@@ -143,7 +158,7 @@
- +
@@ -187,16 +202,25 @@ }); //现货/预售切换 form.on('radio(goods_type)', function (data) { - console.log(111111); + $(".shoujia").show(); + $(".cankao").show(); var value = data.value; // 当前选中的value值 if (value == 1) { $("#sale_time").val('') $(".sale_time").hide() } else if (value == 2) { $(".sale_time").show() - } else if (value == 3 || value == 4) { + } else if (value == 3) { $("#sale_time").val('') $(".sale_time").hide() + } else if (value == 4) { + $("#sale_time").val('') + $(".sale_time").hide() + $(".shoujia").hide(); + $(".cankao").hide(); + $("input[name=price]").val(0); + $("input[name=sc_money]").val(0); + $("input[name=money]").val(0); } }); diff --git a/app/admin/view/Goods/goodslist_edit.html b/app/admin/view/Goods/goodslist_edit.html index ea880ad..ac74ef9 100755 --- a/app/admin/view/Goods/goodslist_edit.html +++ b/app/admin/view/Goods/goodslist_edit.html @@ -37,9 +37,10 @@ + title="宝箱" {if $goods_list_id}disabled{/if} {if $type eq 17}disabled{/if} {if $goods.goods_type eq 4} checked {/if}>
- 货币:抽到后直接发放,不会到用户的盒柜里 + 货币:抽到后会发放"赠送货币"中配置的数据,本奖品不会到用户的盒柜里。
+ 盒子类型为特殊盒子时,无法选择宝箱
@@ -76,12 +77,18 @@
{if $type eq 1 || $type eq 3 || $type eq 5 || $type eq 10 || $type eq 11 || $type eq 6 - || $type eq 15} + || $type eq 15 || $type eq 17}
+ {if $type eq 17 } +
+ 当盒子类型为:特殊奖品,奖品数量为每天能够抽中的次数,当天此奖品数量抽完后,不在进入奖池。0则不进入奖池 +
+ {/if}
{/if} @@ -94,7 +101,7 @@
{/if} - {if $type eq 2 || $type eq 8 || $type eq 9 || $type eq 16} + {if $type eq 2 || $type eq 8 || $type eq 9 || $type eq 16 || $type eq 17}
@@ -104,13 +111,17 @@
{/if} - {if $type eq 16} + {if $type eq 16 || $type eq 17}
+
+ 用户抽到后会发放相同价值的UU币(如:价值10元的奖品,赠送倍率为2。用户抽中后发放本奖品和1000的UU币)。 +
{/if} @@ -134,6 +145,9 @@
+
+ 用户抽到后会发放对应的货币。 +
diff --git a/app/admin/view/Goods/offshelf/log.html b/app/admin/view/Goods/offshelf/log.html old mode 100644 new mode 100755 diff --git a/app/admin/view/Goods/type_add.html b/app/admin/view/Goods/type_add.html old mode 100644 new mode 100755 diff --git a/app/admin/view/Goods/type_edit.html b/app/admin/view/Goods/type_edit.html old mode 100644 new mode 100755 diff --git a/app/admin/view/Goods/type_index.html b/app/admin/view/Goods/type_index.html old mode 100644 new mode 100755 diff --git a/app/admin/view/GoodsExtend/goodsextend_edit.html b/app/admin/view/GoodsExtend/goodsextend_edit.html deleted file mode 100755 index 6278880..0000000 --- a/app/admin/view/GoodsExtend/goodsextend_edit.html +++ /dev/null @@ -1,97 +0,0 @@ -{include file="Public:header2"/} - -
-
-
-
-
-
-
- - -
-
- -
-
-
-
-
-
-
-
-
-{include file="Public:footer"/} - - - - - - diff --git a/app/admin/view/GoodsExtend/goodsextendlist.html b/app/admin/view/GoodsExtend/goodsextendlist.html deleted file mode 100755 index 482d1e2..0000000 --- a/app/admin/view/GoodsExtend/goodsextendlist.html +++ /dev/null @@ -1,646 +0,0 @@ -{include file="Public:header2"/} - - - -
-
-
-
-
-
- -
-
- -
- - -
-
-
当前第{$num}箱,共{$goods_model['stock']}箱,当前已抽{$reward_num_count}。
-
-
- -
-
-
-
- -
- -
-
-
- -
- {include file="Public:footer"/} - - - - - \ No newline at end of file diff --git a/app/admin/view/Public/footer3.html b/app/admin/view/Public/footer3.html old mode 100644 new mode 100755 diff --git a/app/admin/view/Public/header3.html b/app/admin/view/Public/header3.html old mode 100644 new mode 100755 diff --git a/app/admin/view/Reward/add.html b/app/admin/view/Reward/add.html old mode 100644 new mode 100755 diff --git a/app/admin/view/Reward/edit.html b/app/admin/view/Reward/edit.html old mode 100644 new mode 100755 diff --git a/app/admin/view/Reward/index.html b/app/admin/view/Reward/index.html old mode 100644 new mode 100755 diff --git a/app/admin/view/SignConfig/add.html b/app/admin/view/SignConfig/add.html old mode 100644 new mode 100755 diff --git a/app/admin/view/SignConfig/edit.html b/app/admin/view/SignConfig/edit.html old mode 100644 new mode 100755 diff --git a/app/admin/view/SignConfig/index.html b/app/admin/view/SignConfig/index.html old mode 100644 new mode 100755 diff --git a/app/admin/view/SignConfig/reward_edit.html b/app/admin/view/SignConfig/reward_edit.html old mode 100644 new mode 100755 diff --git a/app/admin/view/User/login_stat.html b/app/admin/view/User/login_stat.html old mode 100644 new mode 100755 diff --git a/app/admin/view/User/user_integral_detail.html b/app/admin/view/User/user_integral_detail.html old mode 100644 new mode 100755 diff --git a/app/admin/view/User/user_money_detail.html b/app/admin/view/User/user_money_detail.html old mode 100644 new mode 100755 diff --git a/app/admin/view/User/user_score_detail.html b/app/admin/view/User/user_score_detail.html old mode 100644 new mode 100755 diff --git a/app/admin/view/welfare_house/add.html b/app/admin/view/welfare_house/add.html old mode 100644 new mode 100755 diff --git a/app/admin/view/welfare_house/edit.html b/app/admin/view/welfare_house/edit.html old mode 100644 new mode 100755 diff --git a/app/admin/view/welfare_house/index.html b/app/admin/view/welfare_house/index.html old mode 100644 new mode 100755 diff --git a/app/api/controller/AliNotify.php b/app/api/controller/AliNotify.php deleted file mode 100755 index 1eaf824..0000000 --- a/app/api/controller/AliNotify.php +++ /dev/null @@ -1,2472 +0,0 @@ -quan_prize_notice($order); - } - - /** - * 特殊奖品开奖 拳王赏 - * @param $order 订单信息 - */ - protected function quan_prize_notice($order) - { - $res = []; - $goods_id = $order['goods_id']; - $num = $order['num']; - $order_type = $order['order_type']; - #盒子 - $goods_info = Goods::field('prize_num,stock')->where(['id' => $goods_id])->find(); - #特殊奖品存在where('goods_id', '=', $goods_id) - $special_prize = GoodsList::where('goods_id', '=', $goods_id) - ->where('num', '=', $num) - ->where('surplus_stock', '>', 0) - ->where('shang_id', '=', self::$shang_give_quan_id) - ->order('prize_num desc') - ->select(); - // dd($special_prize); - $user_ids = []; - foreach ($special_prize as $value) { - $surplus_give_stock = $value ? $value['surplus_stock'] : 0; - if ($value && $surplus_give_stock > 0) { - - #符合条件的订单 - $quan_prize_num = $value['prize_num']; - // dd($quan_prize_num); - // var_dump($quan_prize_num); - $prize_num_data = OrderList::field('id,user_id,count(`id`) as all_num') - ->where('goods_id', '=', $goods_id) - ->where('num', '=', $num) - ->where('order_type', '=', $order_type) - ->where('shang_id', '=', self::$shang_give_w_id) - ->having('all_num', '>=', $quan_prize_num) - ->group('user_id') - ->select()->toArray(); - - $prize_num_data_arr = []; - foreach ($prize_num_data as $val) { - if ($val['all_num'] >= $quan_prize_num && !in_array($val['user_id'], $user_ids)) { - $prize_num_data_arr[] = $val; - } - } - // dd($prize_num_data_arr); - if ($prize_num_data_arr) { - // dd($prize_num_data); - #多个随机 - shuffle($prize_num_data_arr); - - $quan_prize_info = $prize_num_data_arr[0]; - - $user_id = $quan_prize_info['user_id']; - $user_ids[] = $quan_prize_info['user_id']; - - $order_goods = [ - 'order_id' => 0, - 'user_id' => $user_id, - 'status' => 0,#0未操作 1选择兑换 2选择发货 - 'goods_id' => $goods_id, - 'num' => $num, - 'shang_id' => $value['shang_id'], - 'goodslist_id' => $value['id'], - 'goodslist_title' => $value['title'], - 'goodslist_imgurl' => $value['imgurl'], - 'goodslist_price' => $value['price'], - 'goodslist_money' => $value['money'], - 'goodslist_type' => $value['goods_type'], - 'goodslist_sale_time' => $value['sale_time'], - 'addtime' => time(), - 'prize_code' => $value['prize_code'], - 'order_type' => $order_type, - 'order_list_id' => 0, - ]; - // var_dump($order_goods); - #新增奖品列表 - $res[] = OrderList::insert($order_goods); - - #减少库存 - $res[] = GoodsList::field('surplus_stock') - ->where(['id' => $value['id']]) - ->dec('surplus_stock') - ->update(); - // var_dump($res); - } - } - - } - #赏品 - $goods_list_zd = GoodsList::where(['goods_id' => $goods_id]) - ->where(['num' => 1]) - ->select()->toArray(); - if ($goods_list_zd) { - #循环数据 - $save_sports_data = []; - $start_num = $goods_info['stock'] + 1; - for ($i = $start_num; $i <= $start_num; $i++) { - foreach ($goods_list_zd as $k => $v) { - unset($v['id']); - unset($v['num']); - $v['num'] = $i; - $v['surplus_stock'] = $v['stock']; - $save_sports_data[] = $v; - } - } - #添加赏品 - $res[] = GoodsList::insertAll($save_sports_data); - #增加库存 - $res[] = Goods::where(['id' => $goods_id])->inc('stock', 1)->update(); - } - return $res; - } - - /* - * 支付宝支付回调修改订单状态 - */ - public function alipay_notify() - { - //原始订单号 - $out_trade_no = input('out_trade_no'); - //支付宝交易号 - $trade_no = input('trade_no'); - //交易状态 - $trade_status = input('trade_status'); - $ext_infos = input('ext_infos'); - $table = input('subject'); - - // Log::info('alipay_notify=================$out_trade_no' . $out_trade_no); - // Log::info('alipay_notify=================$trade_no' . $out_trade_no); - // Log::info('$table=================$table'.$table ); - Db::name('pay_log')->insert([ - 'user_id' => '11', - 'out_trade_no' => $out_trade_no, - 'addtime' => time(), - 'trade_no' => $trade_no, - 'content' => $trade_status - ]); - - if ($trade_status == 'TRADE_SUCCESS') { - - - - // try { - // $orderInfo111 = Order::where('order_num', '=', $out_trade_no) - // ->where('status', '=', 0) - // ->find(); - // if($orderInfo111){ - // $user111 = User::where('id', $orderInfo111['user_id'])->find(); - // if($user111){ - // Db::name('wxpay_log')->insert([ - // 'order_no' => $data['out_trade_no'], - // 'content' => json_encode($data), - // 'type' => 2, - // 'user_id' => $user111['id'], - // 'addtime' => time(), - // ]); - // } - // } - - // } catch (\Throwable $e) { - // $this->CallbackSuccess(); - // } - $user = null; - if ($table == 'user_recharge') {#余额充值 - $orderInfo = UserRecharge::where('order_num', '=', $out_trade_no) - ->where(['status' => 1]) - ->find(); - #这个订单存在状态对 - if ($orderInfo && $orderInfo['status'] == 1) { - $user = User::where('id', $orderInfo['user_id'])->find(); - - $user_id = $orderInfo['user_id']; - $money = $orderInfo['money']; - Db::startTrans(); - #修改订单状态 - $res[] = UserRecharge::field('status,pay_time') - ->where(['id' => $orderInfo['id']])->update([ - 'status' => 2, - 'pay_time' => time(), - ]); - $res[] = User::changeMoney($user_id, $money, 2, '在线充值'); - #记录微信支付 - $res[] = ProfitPay::insert([ - 'user_id' => $user_id, - 'order_num' => $out_trade_no, - 'change_money' => $money, - 'content' => '支付宝', - 'pay_type' => 2,#1微信 2支付宝 - 'addtime' => time(), - ]); - if (resCheck($res)) { - Db::commit(); - echo 'success'; - } else { - Db::rollback(); - echo 'fail'; - } - } else { - echo 'success'; - Log::info('$orderInfo=================重复'); - return; - } - } elseif ($table == 'order_yfs' || $table == 'order_lts' || $table == 'order_zzs') {#抽赏一番赏 擂台赏 - $orderInfo = Order::where('order_num', '=', $out_trade_no) - ->where('status', '=', 0) - ->find(); - $user = User::where('id', $orderInfo['user_id'])->find(); - #这个订单存在状态对 - if ($orderInfo && $orderInfo['status'] == 0) { - $user_id = $orderInfo['user_id']; - $price = $orderInfo['price']; - - Db::startTrans(); - try { - #开盒子 - $res[] = $this->drawprize_notice($user_id, $orderInfo['id'], $orderInfo['goods_id'], $orderInfo['num']); - - $this->wx_gf_fahuo($user_id, $orderInfo['order_num']); - #广告收益回调 - if (!empty($orderInfo['click_id']) && !empty($orderInfo['ad_id'])) { - $order_ad_num = Order::where('user_id', '=', $user_id)->where('status', '=', 1)->where('ad_id', '>', 0)->where('click_id', '>', 0)->where('price', '>', 0)->count(); - if ($order_ad_num <= 1) { - - $this->ad_notify($orderInfo['ad_id'], $orderInfo['click_id']); - - } - - } - } catch (\Throwable $e) { - Db::rollback(); - #卡单了 - Order::field('kd_is')->where(['id' => $orderInfo['id']]) - ->update(['kd_is' => 1]); - #通知微信 - $this->CallbackSuccess(); - } - #记录微信支付 - $res[] = ProfitPay::insert([ - 'user_id' => $user_id, - 'order_num' => $out_trade_no, - 'change_money' => $price, - 'content' => '购买盒子' . $orderInfo['goods_title'], - 'pay_type' => 2,#1微信 2支付宝 - 'addtime' => time(), - ]); - if (resCheck($res)) { - Db::commit(); - } else { - Db::rollback(); - } - } - } elseif ($table == 'order_wxs') {#抽赏无限赏 - $orderInfo = Order::where('order_num', '=', $out_trade_no) - ->where('status', '=', 0) - ->find(); - $user = User::where('id', $orderInfo['user_id'])->find(); - #这个订单存在状态对 - if ($orderInfo && $orderInfo['status'] == 0) { - $user_id = $orderInfo['user_id']; - $price = $orderInfo['price']; - Db::startTrans(); - $res[] = $this->infinite_drawprize_notice($user_id, $orderInfo['id'], $orderInfo['goods_id']); - #记录微信支付 - $res[] = ProfitPay::insert([ - 'user_id' => $user_id, - 'order_num' => $out_trade_no, - 'change_money' => $price, - 'content' => '购买盒子' . $orderInfo['goods_title'], - 'pay_type' => 2,#1微信 2支付宝 - 'addtime' => time(), - ]); - - $this->wx_gf_fahuo($user_id, $orderInfo['order_num']); - #广告收益回调 - if (!empty($orderInfo['click_id']) && !empty($orderInfo['ad_id'])) { - $order_ad_num = Order::where('user_id', '=', $user_id)->where('status', '=', 1)->where('ad_id', '>', 0)->where('click_id', '>', 0)->where('price', '>', 0)->count(); - if ($order_ad_num <= 1) { - $this->ad_notify($orderInfo['ad_id'], $orderInfo['click_id']); - } - - - } - if (resCheck($res)) { - Db::commit(); - } else { - Db::rollback(); - } - } - } elseif ($table == 'order_ckj') {#抽赏抽卡机 - $orderInfo = Order::where('order_num', '=', $out_trade_no) - ->where('status', '=', 0) - ->where('order_type', '=', 4) - ->find(); - $user = User::where('id', $orderInfo['user_id'])->find(); - #这个订单存在状态对 - if ($orderInfo && $orderInfo['status'] == 0) { - $user_id = $orderInfo['user_id']; - $price = $orderInfo['price']; - Db::startTrans(); - $res[] = $this->cardextractor_drawprize_notice($user_id, $orderInfo['id'], $orderInfo['goods_id']); - #记录微信支付 - $res[] = ProfitPay::insert([ - 'user_id' => $user_id, - 'order_num' => $out_trade_no, - 'change_money' => $price, - 'content' => '购买盒子' . $orderInfo['goods_title'], - 'pay_type' => 2,#1微信 2支付宝 - 'addtime' => time(), - ]); - - $this->wx_gf_fahuo($user_id, $orderInfo['order_num']); - - if (resCheck($res)) { - Db::commit(); - } else { - Db::rollback(); - } - } - } elseif ($table == 'order_list_send') {#背包发货 - $orderInfo = OrderListSend::where('send_num', '=', $out_trade_no) - ->where('status', '=', 0) - ->find(); - $user = User::where('id', $orderInfo['user_id'])->find(); - #这个订单存在状态对 - if ($orderInfo && $orderInfo['status'] == 0) { - $user_id = $orderInfo['user_id']; - $freight = $orderInfo['freight']; - Db::startTrans(); - $res[] = $this->reward_order_handle($user_id, $orderInfo['id']); - #记录微信支付 - $res[] = ProfitPay::insert([ - 'user_id' => $user_id, - 'order_num' => $out_trade_no, - 'change_money' => $freight, - 'content' => '背包发货', - 'pay_type' => 2,#1微信 2支付宝 - 'addtime' => time(), - ]); - - $this->wx_gf_fahuo($user_id, $orderInfo['order_num']); - - if (resCheck($res)) { - Db::commit(); - } else { - Db::rollback(); - } - } - } elseif ($table == 'order_js') { - - } - - - - - // try { - // Db::name('wxpay_log')->insert([ - // 'order_no' => $data['out_trade_no'], - // 'content' => json_encode($data), - // 'type' => 1, - // 'channel'=>2, - // 'user_id' => $user['id'], - // 'addtime' => time(), - // ]); - // } catch (\Throwable $e) { - // $this->CallbackSuccess(); - // } - - - - - - - - - } else { - echo "fail"; - } - - - - } - - /** - * - * 获取支付结果通知数据 - * return array - */ - public function order_notify() - { - #获取通知的数据 - $xml = file_get_contents("php://input"); - if (empty($xml)) { - return false; - } - #转成数组 - $data = json_decode(json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA)), true); - $sign = $data['sign']; - // Log::info('order_notify=================out_trade_no' . $data['out_trade_no']); - // Log::error('错误信息' . $e->getMessage()); - unset($data['sign']); - $newSign = $this->MakeSign($data); - $newSignAccount = $this->MakeSignAccount($data); - #验证签名 - if ($sign == $newSign || $sign == $newSignAccount) { - //如果成功返回了 - if ($data['return_code'] == 'SUCCESS' && $data['result_code'] == 'SUCCESS') { - $user = User::where('openid', $data['openid'])->find(); - try { - Db::name('wxpay_log')->insert([ - 'order_no' => $data['out_trade_no'], - 'content' => json_encode($data), - 'type' => 1, - 'user_id' => $user['id'], - 'addtime' => time(), - ]); - } catch (\Throwable $e) { - $this->CallbackSuccess(); - } - $out_trade_no = $data['out_trade_no'];//订单号 - $table = $data['attach'];#表名 - if ($table == 'user_recharge') {#余额充值 - $orderInfo = UserRecharge::where('order_num', '=', $out_trade_no) - ->where(['status' => 1]) - ->find(); - #这个订单存在状态对 - if ($orderInfo && $orderInfo['status'] == 1) { - $user_id = $orderInfo['user_id']; - $money = $orderInfo['money']; - Db::startTrans(); - #修改订单状态 - $res[] = UserRecharge::field('status,pay_time') - ->where(['id' => $orderInfo['id']])->update([ - 'status' => 2, - 'pay_time' => time(), - ]); - $res[] = User::changeMoney($user_id, $money, 2, '在线充值'); - #记录微信支付 - $res[] = ProfitPay::insert([ - 'user_id' => $user_id, - 'order_num' => $out_trade_no, - 'change_money' => $money, - 'content' => '微信支付', - 'pay_type' => 1,#1微信 2支付宝 - 'addtime' => time(), - ]); - if (resCheck($res)) { - Db::commit(); - } else { - Db::rollback(); - } - } - } elseif ($table == 'order_yfs' || $table == 'order_lts' || $table == 'order_zzs') {#抽赏一番赏 擂台赏 - $orderInfo = Order::where('order_num', '=', $out_trade_no) - ->where('status', '=', 0) - ->find(); - #这个订单存在状态对 - if ($orderInfo && $orderInfo['status'] == 0) { - $user_id = $orderInfo['user_id']; - $price = $orderInfo['price']; - Db::startTrans(); - try { - #开盒子 - $res[] = $this->drawprize_notice($user_id, $orderInfo['id'], $orderInfo['goods_id'], $orderInfo['num']); - - $this->wx_gf_fahuo($user_id, $orderInfo['order_num']); - #广告收益回调 - if (!empty($orderInfo['click_id']) && !empty($orderInfo['ad_id'])) { - $order_ad_num = Order::where('user_id', '=', $user_id)->where('status', '=', 1)->where('ad_id', '>', 0)->where('click_id', '>', 0)->where('price', '>', 0)->count(); - if ($order_ad_num <= 1) { - - $this->ad_notify($orderInfo['ad_id'], $orderInfo['click_id']); - - } - - } - } catch (\Throwable $e) { - Db::rollback(); - #卡单了 - Order::field('kd_is')->where(['id' => $orderInfo['id']]) - ->update(['kd_is' => 1]); - #通知微信 - $this->CallbackSuccess(); - } - #记录微信支付 - $res[] = ProfitPay::insert([ - 'user_id' => $user_id, - 'order_num' => $out_trade_no, - 'change_money' => $price, - 'content' => '购买盒子' . $orderInfo['goods_title'], - 'pay_type' => 1,#1微信 2支付宝 - 'addtime' => time(), - ]); - if (resCheck($res)) { - Db::commit(); - } else { - Db::rollback(); - } - } - } elseif ($table == 'order_wxs') {#抽赏无限赏 - $orderInfo = Order::where('order_num', '=', $out_trade_no) - ->where('status', '=', 0) - ->find(); - #这个订单存在状态对 - if ($orderInfo && $orderInfo['status'] == 0) { - $user_id = $orderInfo['user_id']; - $price = $orderInfo['price']; - Db::startTrans(); - $res[] = $this->infinite_drawprize_notice($user_id, $orderInfo['id'], $orderInfo['goods_id']); - #记录微信支付 - $res[] = ProfitPay::insert([ - 'user_id' => $user_id, - 'order_num' => $out_trade_no, - 'change_money' => $price, - 'content' => '购买盒子' . $orderInfo['goods_title'], - 'pay_type' => 1,#1微信 2支付宝 - 'addtime' => time(), - ]); - - $this->wx_gf_fahuo($user_id, $orderInfo['order_num']); - #广告收益回调 - if (!empty($orderInfo['click_id']) && !empty($orderInfo['ad_id'])) { - $order_ad_num = Order::where('user_id', '=', $user_id)->where('status', '=', 1)->where('ad_id', '>', 0)->where('click_id', '>', 0)->where('price', '>', 0)->count(); - if ($order_ad_num <= 1) { - $this->ad_notify($orderInfo['ad_id'], $orderInfo['click_id']); - } - - - } - if (resCheck($res)) { - Db::commit(); - } else { - Db::rollback(); - } - } - } elseif ($table == 'order_ckj') {#抽赏抽卡机 - $orderInfo = Order::where('order_num', '=', $out_trade_no) - ->where('status', '=', 0) - ->where('order_type', '=', 4) - ->find(); - #这个订单存在状态对 - if ($orderInfo && $orderInfo['status'] == 0) { - $user_id = $orderInfo['user_id']; - $price = $orderInfo['price']; - Db::startTrans(); - $res[] = $this->cardextractor_drawprize_notice($user_id, $orderInfo['id'], $orderInfo['goods_id']); - #记录微信支付 - $res[] = ProfitPay::insert([ - 'user_id' => $user_id, - 'order_num' => $out_trade_no, - 'change_money' => $price, - 'content' => '购买盒子' . $orderInfo['goods_title'], - 'pay_type' => 1,#1微信 2支付宝 - 'addtime' => time(), - ]); - - $this->wx_gf_fahuo($user_id, $orderInfo['order_num']); - - if (resCheck($res)) { - Db::commit(); - } else { - Db::rollback(); - } - } - } elseif ($table == 'order_list_send') {#背包发货 - $orderInfo = OrderListSend::where('send_num', '=', $out_trade_no) - ->where('status', '=', 0) - ->find(); - #这个订单存在状态对 - if ($orderInfo && $orderInfo['status'] == 0) { - $user_id = $orderInfo['user_id']; - $freight = $orderInfo['freight']; - Db::startTrans(); - $res[] = $this->reward_order_handle($user_id, $orderInfo['id']); - #记录微信支付 - $res[] = ProfitPay::insert([ - 'user_id' => $user_id, - 'order_num' => $out_trade_no, - 'change_money' => $freight, - 'content' => '背包发货', - 'pay_type' => 1,#1微信 2支付宝 - 'addtime' => time(), - ]); - - $this->wx_gf_fahuo($user_id, $orderInfo['order_num']); - - if (resCheck($res)) { - Db::commit(); - } else { - Db::rollback(); - } - } - } elseif ($table == 'order_js') { - - } - } - } - $this->CallbackSuccess(); - } - - /* - 广告推广 - */ - public function ad_notify($ads_id, $click_id) - { - $tencent_ad = Ads::where('id', $ads_id)->find(); - if (!empty($tencent_ad)) { - $result = tencent_ad_attribution($click_id, 1, $tencent_ad['account_id'], $tencent_ad['access_token'], $tencent_ad['user_action_set_id']); - dump($result); - } - } - - /** - * 生成签名 - * @return 签名 - */ - public function MakeSign($params) - { - //签名步骤一:按字典序排序数组参数 - ksort($params); - $string = $this->ToUrlParams($params); - //签名步骤二:在string后加入KEY - $string = $string . "&key=" . static::$secretKey; - //签名步骤三:MD5加密 - $string = md5($string); - //签名步骤四:所有字符转为大写 - $result = strtoupper($string); - return $result; - } - - - /** - * 生成签名 - * @return 签名 - */ - public function MakeSignAccount($params) - { - //签名步骤一:按字典序排序数组参数 - ksort($params); - $string = $this->ToUrlParams($params); - //签名步骤二:在string后加入KEY - $string = $string . "&key=" . static::$secretKeyAccount; - //签名步骤三:MD5加密 - $string = md5($string); - //签名步骤四:所有字符转为大写 - $result = strtoupper($string); - return $result; - } - - /** - * 将参数拼接为url: key=value&key=value - * @param $params - * @return string - */ - public function ToUrlParams($params) - { - $string = ''; - if (!empty($params)) { - $array = array(); - foreach ($params as $key => $value) { - $array[] = $key . '=' . $value; - } - $string = implode("&", $array); - } - return $string; - } - - /** - * 接收通知成功后应答输出XML数据 - * @param string $xml - */ - public function CallbackSuccess() - { - $html = ""; - die($html); - } - - /** - * 抽赏开始抽赏====================================================== - * @param int $user_id 会员id - * @param int $order_id 订单ID - * @param int $goods_id 盒子id - * @param int $num 盒子箱号 - */ - public function drawprize_notice($user_id = 0, $order_id = 0, $goods_id = 0, $num = 0) - { - - $res = []; - $order = Order::where(['id' => $order_id]) - ->where(['user_id' => $user_id]) - ->where(['goods_id' => $goods_id]) - ->where(['num' => $num]) - ->where(['status' => 0]) - ->where('order_type', 'in', [1, 3, 5, 6, 11]) - ->find(); - - if ($order) { - //判断是否限制购买一次 - $sbuser = User::where(['id' => $user_id])->find(); - $sbgoods = User::where(['id' => $goods_id])->find(); - $user_xiangou_count = OrderList::field('id')->where('goods_id', '=', $goods_id) - ->where('num', '=', $num) - ->where('shang_id', 'between', [10, 38]) - ->where('order_type', 'in', [1, 3, 5, 6, 11]) - ->where('user_id', '=', $user_id) - ->count(); - - if (($sbgoods['type'] == 6 || $sbgoods['type'] == 1) && $sbgoods['quanju_xiangou'] > 0) { - if ($user_xiangou_count >= $sbgoods['quanju_xiangou']) { - Log::info('====用户id' . $user_id . '试图作弊,已停发本次赏品'); - Log::info('====用户id' . $user_id . '试图作弊,已停发本次赏品'); - Log::info('====用户id' . $user_id . '试图作弊,已停发本次赏品'); - $res1[] = 0; - return $res1; - } - } - - - - #改变状态 - $res[] = Order::field('status,pay_time') - ->where(['id' => $order['id']]) - ->update([ - 'status' => 1, - 'pay_time' => time(), - ]); - #扣余额 - if ($order['use_money'] > 0) { - $res[] = User::changeMoney($order['user_id'], -$order['use_money'], 3, '购买盒子' . $order['goods_title']); - } - #扣星岚币 - if ($order['use_integral'] > 0) { - $res[] = User::changeIntegral($order['user_id'], -$order['use_integral'], 2, '购买盒子' . $order['goods_title']); - } - #扣积分 - if ($order['use_score'] > 0) { - $res[] = User::changeScore($order['user_id'], -$order['use_score'], 2, '购买盒子' . $order['goods_title']); - } - - if ($order['use_money2'] > 0) { - $res[] = User::changeMoney2($order['user_id'], -$order['use_money2'], 2, '购买盒子' . $order['goods_title']); - } - #判断一下优惠券 - if (!empty($order['coupon_id'])) { - $coupon = CouponReceiveModel::where(['id' => $order['coupon_id'], 'status' => 0])->update(['status' => 1]); - } - - #判断是否发积分 - - #分销奖励 - $res[] = User::distribution($order); - #分销奖励 - //对对碰 - $ddp_goods = Goods::where('id', $goods_id)->find(); - if ($ddp_goods && ($ddp_goods['is_ddp'] == 1 || $ddp_goods['is_zp'] == 1)) { - - } else { - #普通奖品========================================================== - $res[] = $this->ordinary_prize_notice($order); - #普通奖品========================================================== - - } - - #判断是否发积分 发券 - $res[] = User::is_integral_coupon($order); - - //升级欧气值 - if ($order['price'] > 0) { - User::ou_qi_level_up($order['user_id'], $order['price']); - } - - - if ($ddp_goods && $ddp_goods['is_zp'] == 1) { - - $goodslist_xz = GoodsList::where(['goods_id' => $ddp_goods['id']]) - ->order('pro asc') - ->select()->toArray(); - $randomValue = mt_rand(1, 100); // 生成0到100之间的随机数 - $nowpro = 0; - $read_goods = []; - foreach ($goodslist_xz as $key => &$value1) { - $nowpro += $value1['pro']; - if ($randomValue < $nowpro) { - $read_goods = $value1; - Db::name('error_log')->insert([ - 'user_id' => $user_id, - 'goods_id' => $ddp_goods['id'], - 'addtime' => time(), - 'content' => '支付宝付费抽奖开启概率' . $randomValue . ',累计概率' . $nowpro . ',本商品概率' . $value1['pro'] . ',本商品名称' . $value1['title'] . ',抽取id' . $user_id, - 'trade_no' => '55' - - ]); - - $randomValue = 99999; - } - } - - $order_goods = [ - 'order_id' => $order_id, - 'user_id' => $user_id, - 'status' => 0,#0未操作 1选择兑换 2选择发货 - 'goods_id' => $read_goods['goods_id'], - 'num' => 1, - 'shang_id' => $read_goods['shang_id'], - 'goodslist_id' => $read_goods['id'], - 'goodslist_title' => $read_goods['title'], - 'goodslist_imgurl' => $read_goods['imgurl'], - 'goodslist_price' => $read_goods['price'], - 'goodslist_money' => $read_goods['money'], - 'goodslist_type' => $read_goods['goods_type'], - 'goodslist_sale_time' => $read_goods['sale_time'], - 'addtime' => time(), - 'prize_code' => $read_goods['prize_code'], - 'order_type' => 11, - 'order_list_id' => 0, - 'xz_id' => 0 - ]; - - - - $res[] = OrderList::insert($order_goods); - - } else if ($ddp_goods && $ddp_goods['is_ddp'] == 1) { - $touch = Db::name('touch_user_list')->where('goods_id', $goods_id)->where('user_id', $user_id) - ->find(); - $mystatus = 3; - if ($ddp_goods['ddp_type'] == 2) { - $mystatus = 4; - } - $updata = [ - 'cards' => '', - 'user_xy' => 0, - 'is_xy' => 0, - 'xy' => '', - 'status' => $mystatus, - 'user_id' => $user_id, - 'goods_id' => $goods_id, - 'order_id' => $order['id'], - 'update_time' => time(), - 'num' => 0 - ]; - if ($touch) { - $res[] = Db::name('touch_user_list')->where('goods_id', $goods_id)->where('user_id', $user_id) - ->update($updata); - } else { - $res[] = Db::name('touch_user_list')->insert($updata); - } - - } else { - - #特殊奖品********************************************************** - #普通奖品余量信息 - $goodslist = GoodsList::field('sum(`stock`) as stock, sum(`surplus_stock`) as surplus_stock') - ->where('goods_id', '=', $goods_id) - ->where('num', '=', $num) - ->where('shang_id', 'between', self::$shang_prize_id) - ->find(); - // var_dump($goodslist['surplus_stock']); - #普通赏销量数量 - $sale_count = $goodslist['stock'] - $goodslist['surplus_stock']; - #普通奖品一半 - $first_count = floor($goodslist['stock'] / 2); - #FIRST - if ($order['order_type'] != 3 && $sale_count >= $first_count) { - $res[] = $this->special_first_notice($order, $first_count); - } - #LAST赏 全局赏 拳王赏 - // Log::info('=================================================打印日志surplus_stock'.$goodslist['surplus_stock']); - if ($goodslist['surplus_stock'] <= 0) { - // var_dump($goodslist['surplus_stock']); - $res[] = $this->openFd($goods_id, $num); - - $res[] = $this->special_prize_notice($order, $first_count); - // var_dump($res); - #擂台赏 - if ($order['order_type'] == 3) { - $res[] = $this->quan_prize_notice($order); - } - #增加盒子库存 - $goods = Goods::field('id,stock,sale_stock') - ->where(['id' => $goods_id]) - ->find(); - $save_update = []; - $goods_sale_stock = $goods['sale_stock'] + 1; - if ($goods_sale_stock >= $goods['stock']) { - $save_update['status'] = 3; - } - $save_update['sale_stock'] = $goods_sale_stock; - $res[] = Goods::field('id,status,sale_stock') - ->where(['id' => $goods_id]) - ->update($save_update); - } - #特殊奖品********************************************************** - - - } - } else { - $res[] = 0; - } - return $res; - } - - /** - * 普通奖品开奖 - * @param $order 订单信息 - */ - protected function ordinary_prize_notice($order) - { - $user_id = $order['user_id']; - $order_id = $order['id']; - $goods_id = $order['goods_id']; - $num = $order['num']; - $order_type = $order['order_type']; - #抽奖数量 - $prize_num = $order['prize_num']; - #普通奖品信息 - $ordinary_prize = GoodsList::where('goods_id', '=', $goods_id) - ->where('num', '=', $num) - ->where('shang_id', 'between', self::$shang_prize_id) - ->order('sort desc,shang_id asc') - ->select()->toArray(); - if (!$ordinary_prize) { - $res[] = 0; - return $res; - } - //获取最低抽奖次数 - $goods_extend_model_list = GoodsExtendListModel::getGoodsExtendList($goods_id); - #抽了多少抽 - $stock = array_sum(array_column($ordinary_prize, 'stock')); - $surplus_stock = array_sum(array_column($ordinary_prize, 'surplus_stock')); - $reward_num_count = $stock - $surplus_stock; - #普通奖暂存信息 - $ordinary_prize_all = []; - #普通奖暂存信息 - $ordinary_prize_special_all = []; - #其他 - $ordinary_prize_other = []; - foreach ($ordinary_prize as $k => $v) { - #剩余 - $surplus_prize = $v['surplus_stock']; - //奖品id - $prize_code = $v['prize_code']; - $goods_list_id = $v['id']; - //扩展配置 - $goods_extend_model = $goods_extend_model_list->where('goods_list_id', '=', $goods_list_id)->first(); - //最低抽奖次数 - $reward_num = 0; - if ($goods_extend_model != null) { - if ($goods_extend_model['rawrd_type'] == 1) { - $reward_num = $goods_extend_model->reward_num; - } else if ($goods_extend_model['rawrd_type'] == 2) { - //当前抽数 - $goods_extend_model_reward_num = $goods_extend_model['reward_num']; - if ($reward_num_count < $goods_extend_model_reward_num) { - //未过期 - $v['goods_extend'] = $goods_extend_model; - $ordinary_prize_special_all[] = $v; - $ordinary_prize_all[] = $v; - continue; - } - } else if ($goods_extend_model['rawrd_type'] == 3) { - //当前抽数 - // if ($reward_num_count >= $goods_extend_model['reward_num'] && $reward_num_count <= $goods_extend_model['reward_num_1']) { - //未过期 - $v['goods_extend'] = $goods_extend_model; - $ordinary_prize_special_all[] = $v; - $ordinary_prize_all[] = $v; - continue; - // } - } - } - $prize_code = ''; - //库存数量 - for ($i = 1; $i <= $surplus_prize; $i++) { - if ($reward_num_count > 0) { - if ($reward_num_count > $reward_num) { - $ordinary_prize_other[] = $v; - - } - } else if ($v['reward_num'] > 0) { - if ($reward_num_count >= $v['reward_num']) { - #全部延迟出赏普通奖品 - $ordinary_prize_other[] = $v; - - } - } else { - #全部未延迟出赏普通奖品 - $ordinary_prize_other[] = $v; - - } - $ordinary_prize_all[] = $v; - - } - } - $is_special = true; - if ($prize_num > count($ordinary_prize_other)) { - #全部商品 - $end_ordinary_prize = $ordinary_prize_all; - $is_special = false; - } else { - #延迟出赏 - $end_ordinary_prize = $ordinary_prize_other; - } - shuffle($end_ordinary_prize); - shuffle($end_ordinary_prize); - if ($is_special) { - foreach ($ordinary_prize_special_all as $kk => $vv) { - // $surplus_prize_1 = 1; - $surplus_prize_1 = $vv['surplus_stock']; - //奖品id - $goods_extend_model_1 = $vv['goods_extend']; - for ($i = 1; $i <= $surplus_prize_1; $i++) { - //指定抽数 - if ($goods_extend_model_1['rawrd_type'] == 2) { - //指定抽奖数- - $randomNumber = $goods_extend_model_1['reward_num'] - $reward_num_count - 1; - //如果小于0,则表示 - if ($randomNumber < 0) { - $randomNumber = random_int(0, count($end_ordinary_prize)); - } - if ($randomNumber >= 0) { - //表示第二个对象 goods_list_id - if (isset($end_ordinary_prize[$randomNumber]['goods_extend'])) { - $goods_extend_model_2 = $end_ordinary_prize[$randomNumber]['goods_extend']; - if ($goods_extend_model_2 != null) { - //表示相同抽数 - if ($goods_extend_model_1['reward_num'] == $goods_extend_model_2['reward_num']) { - $randomNumber = random_int($randomNumber, count($end_ordinary_prize)); - } - } - } - if (isset($end_ordinary_prize[$randomNumber]['prize_code']) && isset($vv['prize_code'])) { - if ($end_ordinary_prize[$randomNumber]['prize_code'] == $vv['prize_code']) { - if (count($end_ordinary_prize) > $randomNumber) { - $randomNumber = random_int($randomNumber, count($end_ordinary_prize)); - } else { - $randomNumber = random_int(0, count($end_ordinary_prize)); - } - } - } - array_splice($end_ordinary_prize, $randomNumber, 0, [$vv]); - } - } - //抽奖范围 - if ($goods_extend_model_1['rawrd_type'] == 3) { - $randomNumber = 0; - if ($reward_num_count >= $goods_extend_model_1['reward_num'] && $reward_num_count <= $goods_extend_model_1['reward_num_1']) { - //在范围里面 - $max_randomNumber = $goods_extend_model_1['reward_num_1'] - $reward_num_count - 1; - $randomNumber = random_int(0, intval($max_randomNumber)); - } else if ($reward_num_count <= $goods_extend_model_1['reward_num']) { - //$goods_extend_model_1['reward_num']-$reward_num_count - $randomNumber = count($end_ordinary_prize) - 1; - } - array_splice($end_ordinary_prize, $randomNumber, 0, [$vv]); - } - } - } - } - #入库奖品 - $save_order_goods = []; - #开普通奖品 - for ($i = 0; $i < $prize_num; $i++) { - $ordinary_prize_info = $end_ordinary_prize[$i]; - $save_order_goods[ - - ] = [ - 'order_id' => $order_id, - 'user_id' => $user_id, - 'status' => 0,#0未操作 1选择兑换 2选择发货 - 'goods_id' => $goods_id, - 'num' => $num, - 'shang_id' => $ordinary_prize_info['shang_id'], - 'goodslist_id' => $ordinary_prize_info['id'], - 'goodslist_title' => $ordinary_prize_info['title'], - 'goodslist_imgurl' => $ordinary_prize_info['imgurl'], - 'goodslist_price' => $ordinary_prize_info['price'], - 'goodslist_money' => $ordinary_prize_info['money'], - 'goodslist_type' => $ordinary_prize_info['goods_type'], - 'goodslist_sale_time' => $ordinary_prize_info['sale_time'], - 'addtime' => time(), - 'prize_code' => $ordinary_prize_info['prize_code'], - 'order_type' => $order_type, - 'is_fd' => $ordinary_prize_info['is_fd'] - ]; - #减少库存 - $res[] = GoodsList::field('surplus_stock') - ->where(['id' => $ordinary_prize_info['id']]) - ->dec('surplus_stock') - ->update(); - } - if ($save_order_goods) { - #新增奖品列表 - $res[] = OrderList::insertAll($save_order_goods); - } - return $res; - } - /** - * openFd 福袋开启 - */ - protected function openFd($goods_id, $num) - { - $res = []; - $all_order_list = OrderList::field('id,num,user_id,goods_id,is_fd,status,goodslist_id')->where('goods_id', '=', $goods_id) - ->where('num', '=', $num) - ->where('is_fd', '=', 1) - ->where('status', '=', 0) - ->order('id asc') - ->select()->toArray(); - - if (count($all_order_list) > 0) { - $orders = []; - $goodss = []; - $goodslist_read = []; - $readindex = 0; - $v_goods = null; - foreach ($all_order_list as $order) { - if (!$v_goods) { - $v_goods = GoodsList::field('id,prize_code,is_fd')->where(['id' => $order['goodslist_id']])->find(); - } - - if ($v_goods['is_fd'] == 1) { - $orders[] = [ - 'id' => $order['id'], - 'recovery_num' => $order['user_id'] . 'FD' . "|" . $order['id'], - 'status' => 4, - 'choice_time' => time() - ]; - if (count($goodslist_read) == 0) { - - $goodslist_xz = GoodsList::where(['xz_pid' => $v_goods['prize_code']]) - ->order('pro asc') - ->select()->toArray(); - - foreach ($goodslist_xz as $key => &$value1) { - for ($i = 0; $i < $value1['pro']; $i++) { - $goodslist_read[] = $value1; - } - } - shuffle($goodslist_read); - shuffle($goodslist_read); - } - $read_goods = $goodslist_read[$readindex]; - $readindex++; - $goodss[] = [ - 'order_id' => 0, - 'user_id' => $order['user_id'], - 'status' => 0,#0未操作 1选择兑换 2选择发货 - 'goods_id' => $read_goods['goods_id'], - 'num' => 0, - 'shang_id' => $read_goods['shang_id'], - 'goodslist_id' => $read_goods['id'], - 'goodslist_title' => $read_goods['title'], - 'goodslist_imgurl' => $read_goods['imgurl'], - 'goodslist_price' => $read_goods['price'], - 'goodslist_money' => $read_goods['money'], - 'goodslist_type' => $read_goods['goods_type'], - 'goodslist_sale_time' => $read_goods['sale_time'], - 'addtime' => time(), - 'prize_code' => $read_goods['prize_code'], - 'order_type' => 10, - 'order_list_id' => 0, - 'xz_id' => $order['id'] - ]; - } - - } - - $orderList = new OrderList; - $res[] = $orderList->saveAll($orders); - - $res[] = OrderList::insertAll($goodss); - - } else { - $res[] = 1; - } - return $res; - } - /** - * 特殊奖品开奖 FIRST - * @param $order 订单信息 - * @param $first_count - */ - protected function special_first_notice($order, $first_count) - { - $res = []; - $goods_id = $order['goods_id']; - $num = $order['num']; - $order_type = $order['order_type']; - #特殊奖品存在 - $special_prize = GoodsList::where('goods_id', '=', $goods_id) - ->where('num', '=', $num) - ->where('surplus_stock', '>', 0) - ->where('shang_id', '=', self::$shang_give_first_id) - ->find(); - #剩余数量 - $surplus_give_stock = $special_prize ? $special_prize['surplus_stock'] : 0; - if ($special_prize && $surplus_give_stock > 0) { - #所有奖品信息 - $all_order_list = OrderList::where('goods_id', '=', $goods_id) - ->where('num', '=', $num) - ->where('order_type', '=', $order_type) - ->where('shang_id', 'between', self::$shang_prize_id) - ->order('id asc') - ->limit((int) $first_count) - ->select()->toArray(); - shuffle($all_order_list); - shuffle($all_order_list); - $prize_info = $all_order_list[0]; - $user_id = $prize_info['user_id']; - #特殊赏中奖订单id - $order_list_id = $prize_info['id']; - #中奖奖项 - $order_goods = [ - 'order_id' => 0, - 'user_id' => $user_id, - 'status' => 0,#0未操作 1选择兑换 2选择发货 - 'goods_id' => $goods_id, - 'num' => $num, - 'shang_id' => $special_prize['shang_id'], - 'goodslist_id' => $special_prize['id'], - 'goodslist_title' => $special_prize['title'], - 'goodslist_imgurl' => $special_prize['imgurl'], - 'goodslist_price' => $special_prize['price'], - 'goodslist_money' => $special_prize['money'], - 'goodslist_type' => $special_prize['goods_type'], - 'goodslist_sale_time' => $special_prize['sale_time'], - 'addtime' => time(), - 'prize_code' => $special_prize['prize_code'], - 'order_type' => $order_type, - 'order_list_id' => $order_list_id, - 'is_fd' => $special_prize['is_fd'] - ]; - #增加销量 - $res[] = GoodsList::field('surplus_stock') - ->where(['id' => $special_prize['id']]) - ->dec('surplus_stock') - ->update(); - #新增奖品列表 - $res[] = OrderList::insert($order_goods); - } else { - $res[] = 1; - } - return $res; - } - - /** - * 特殊奖品开奖 LAST 最终赏 全局赏 //备注这个位置全局赏开奖啦 - * @param $order 订单信息 - * @param $first_count - */ - protected function special_prize_notice($order, $first_count) - { - // $res = []; -// $goods_id = $order['goods_id']; -// $num = $order['num']; -// $order_type = $order['order_type']; -// #盒子 -// $goods_info = Goods::field('prize_num,stock')->where(['id' => $goods_id])->find(); -// #特殊奖品存在where('goods_id', '=', $goods_id) -// $special_prize = GoodsList::where('goods_id', '=', $goods_id) -// ->where('num', '=', $num) -// ->where('surplus_stock', '>', 0) -// ->where('shang_id', '=', self::$shang_give_quan_id) -// ->order('prize_num desc') -// ->select(); -// // dd($special_prize); - - // foreach ($special_prize as $value){ -// $surplus_give_stock = $value ? $value['surplus_stock'] : 0; -// // dd($value); -// if ($value && $surplus_give_stock > 0) { -// #符合条件的订单 -// $quan_prize_num = $value['prize_num']; -// $prize_num_data = OrderList::field('id,user_id,count(`id`) as all_num') -// ->where('goods_id', '=', $goods_id) -// ->where('num', '=', $num) -// ->where('order_type', '=', $order_type) -// ->where('shang_id', '=', self::$shang_give_w_id) -// ->having('all_num', '>=', $quan_prize_num) -// ->group('user_id') -// ->select()->toArray(); -// // dd($quan_prize_num); -// if ($prize_num_data) { -// #多个随机 -// shuffle($prize_num_data); -// $quan_prize_info = $prize_num_data[0]; -// $user_id = $quan_prize_info['user_id']; -// $order_goods = [ -// 'order_id' => 0, -// 'user_id' => $user_id, -// 'status' => 0,#0未操作 1选择兑换 2选择发货 -// 'goods_id' => $goods_id, -// 'num' => $num, -// 'shang_id' => $value['shang_id'], -// 'goodslist_id' => $value['id'], -// 'goodslist_title' => $value['title'], -// 'goodslist_imgurl' => $value['imgurl'], -// 'goodslist_price' => $value['price'], -// 'goodslist_money' => $value['money'], -// 'goodslist_type' => $value['goods_type'], -// 'goodslist_sale_time' => $value['sale_time'], -// 'addtime' => time(), -// 'prize_code' => $value['prize_code'], -// 'order_type' => $order_type, -// 'order_list_id' => 0, -// ]; -// #新增奖品列表 -// $res[] = OrderList::insert($order_goods); -// #减少库存 -// $res[] = GoodsList::field('surplus_stock') -// ->where(['id' => $special_prize['id']]) -// ->dec('surplus_stock') -// ->update(); -// } -// } -// #赏品 -// $goods_list_zd = GoodsList::where(['goods_id' => $goods_id]) -// ->where(['num' => 1]) -// ->select()->toArray(); -// if ($goods_list_zd) { -// #循环数据 -// $save_sports_data = []; -// $start_num = $goods_info['stock'] + 1; -// for ($i = $start_num; $i <= $start_num; $i++) { -// foreach ($goods_list_zd as $k => $v) { -// unset($v['id']); -// unset($v['num']); -// $v['num'] = $i; -// $v['surplus_stock'] = $v['stock']; -// $save_sports_data[] = $v; -// } -// } -// #添加赏品 -// $res[] = GoodsList::insertAll($save_sports_data); -// #增加库存 -// $res[] = Goods::where(['id' => $goods_id])->inc('stock', 1)->update(); -// } -// } -// return $res; - $res = []; - $goods_id = $order['goods_id']; - - $flwgoods = Goods::where(['id' => $goods_id])->find(); - if ($flwgoods['is_flw'] == 1) { - Log::info('拦截福利屋直接开箱' . $goods_id); - $res[] = 1; - return $res; - } - - $num = $order['num']; - $order_type = $order['order_type']; - #特殊奖品存在 - $special_prize = GoodsList::where('goods_id', '=', $goods_id) - ->where('num', '=', $num) - ->where('surplus_stock', '>', 0) - ->where('shang_id', 'in', self::$shang_give_arr) - ->select()->toArray(); - $surplus_give_stock = $special_prize ? array_sum(array_column($special_prize, 'surplus_stock')) : 0; - if ($special_prize && $surplus_give_stock > 0) { - #所有奖品信息 - $all_order_list = OrderList::field('id,user_id') - ->where('goods_id', '=', $goods_id) - ->where('num', '=', $num) - ->where('order_type', '=', $order_type) - ->where('shang_id', 'between', self::$shang_prize_id) - ->order('id asc') - ->select()->toArray(); - $order_goods = []; - foreach ($special_prize as $k => $v) { - if ($v['shang_id'] == 4) {#全局赏 - - for ($surplus_stock_i = 0; $surplus_stock_i < $v['surplus_stock']; $surplus_stock_i++) { - $overall_order_list = $all_order_list; - shuffle($overall_order_list); - shuffle($overall_order_list); - $prize_info = $overall_order_list[0]; - $user_id = $prize_info['user_id']; - #特殊赏中奖订单id - $order_list_id = $prize_info['id']; - #中奖奖项 - $ordinary_prize_info = $v; - - if ($v['is_xz'] == 1 && ($v['is_hgxz'] == 0 && $v['is_fd'] == 0)) { - - - $goodslist_xz = GoodsList::where(['xz_pid' => $v['prize_code']]) - ->order('pro asc') - ->select()->toArray(); - $randomValue = mt_rand(1, 100); // 生成0到100之间的随机数 - $nowpro = 0; - $read_goods = []; - foreach ($goodslist_xz as $key => &$value1) { - $nowpro += $value1['pro']; - if ($randomValue < $nowpro) { - $read_goods = $value1; - Db::name('error_log')->insert([ - 'user_id' => '33', - 'goods_id' => '44', - 'addtime' => time(), - 'content' => '支付宝回调触发抽取概率' . $randomValue . ',累计概率' . $nowpro . ',本商品概率' . $value1['pro'] . ',本商品名称' . $value1['title'] . ',抽取id' . $user_id, - 'trade_no' => '55' - - ]); - - $randomValue = 99999; - } - } - - $order_goods[] = [ - 'order_id' => 0, - 'user_id' => $user_id, - 'status' => 0,#0未操作 1选择兑换 2选择发货 - 'goods_id' => $goods_id, - 'num' => $num, - 'shang_id' => $read_goods['shang_id'], - 'goodslist_id' => $read_goods['id'], - 'goodslist_title' => $read_goods['title'], - 'goodslist_imgurl' => $read_goods['imgurl'], - 'goodslist_price' => $read_goods['price'], - 'goodslist_money' => $read_goods['money'], - 'goodslist_type' => $read_goods['goods_type'], - 'goodslist_sale_time' => $read_goods['sale_time'], - 'addtime' => time(), - 'prize_code' => $read_goods['prize_code'], - 'order_type' => $order_type, - 'order_list_id' => $order_list_id, - 'is_fd' => $read_goods['is_fd'] - ]; - - } else { - $order_goods[] = [ - 'order_id' => 0, - 'user_id' => $user_id, - 'status' => 0,#0未操作 1选择兑换 2选择发货 - 'goods_id' => $goods_id, - 'num' => $num, - 'shang_id' => $ordinary_prize_info['shang_id'], - 'goodslist_id' => $ordinary_prize_info['id'], - 'goodslist_title' => $ordinary_prize_info['title'], - 'goodslist_imgurl' => $ordinary_prize_info['imgurl'], - 'goodslist_price' => $ordinary_prize_info['price'], - 'goodslist_money' => $ordinary_prize_info['money'], - 'goodslist_type' => $ordinary_prize_info['goods_type'], - 'goodslist_sale_time' => $ordinary_prize_info['sale_time'], - 'addtime' => time(), - 'prize_code' => $ordinary_prize_info['prize_code'], - 'order_type' => $order_type, - 'order_list_id' => $order_list_id, - 'is_fd' => $ordinary_prize_info['is_fd'] - ]; - } - #减少库存 - $res[] = GoodsList::field('surplus_stock') - ->where(['id' => $ordinary_prize_info['id']]) - ->dec('surplus_stock') - ->update(); - } - } else { - if ($v['shang_id'] == 2) {#LAST赏 - $last_order_list = array_slice($all_order_list, (int) $first_count); - shuffle($last_order_list); - shuffle($last_order_list); - $prize_info = $last_order_list[0]; - #中奖用户id - $user_id = $prize_info['user_id']; - #特殊赏中奖订单id - $order_list_id = $prize_info['id']; - #中奖奖项 - $ordinary_prize_info = $v; - } elseif ($v['shang_id'] == 3) {#最终赏 - $end_order_list = $all_order_list; - $prize_info = end($end_order_list); - #中奖用户id - $user_id = $prize_info['user_id']; - #特殊赏中奖订单id - $order_list_id = $prize_info['id']; - #中奖奖项 - $ordinary_prize_info = $v; - } - $order_goods[] = [ - 'order_id' => 0, - 'user_id' => $user_id, - 'status' => 0,#0未操作 1选择兑换 2选择发货 - 'goods_id' => $goods_id, - 'num' => $num, - 'shang_id' => $ordinary_prize_info['shang_id'], - 'goodslist_id' => $ordinary_prize_info['id'], - 'goodslist_title' => $ordinary_prize_info['title'], - 'goodslist_imgurl' => $ordinary_prize_info['imgurl'], - 'goodslist_price' => $ordinary_prize_info['price'], - 'goodslist_money' => $ordinary_prize_info['money'], - 'goodslist_type' => $ordinary_prize_info['goods_type'], - 'goodslist_sale_time' => $ordinary_prize_info['sale_time'], - 'addtime' => time(), - 'prize_code' => $ordinary_prize_info['prize_code'], - 'order_type' => $order_type, - 'order_list_id' => $order_list_id, - 'is_fd' => $ordinary_prize_info['is_fd'] - ]; - #减少库存 - $res[] = GoodsList::field('surplus_stock') - ->where(['id' => $ordinary_prize_info['id']]) - ->dec('surplus_stock') - ->update(); - } - } - #新增奖品列表 - $res[] = OrderList::insertAll($order_goods); - } else { - $res[] = 1; - } - return $res; - } - - /** - * 无限赏开始抽赏====================================================== - * @param int $user_id 会员id - * @param int $order_id 订单ID - * @param int $box_id 盲盒id - */ - public function infinite_drawprize_notice($user_id = 0, $order_id = 0, $goods_id = 0, $num = 0) - { - // if() - $res = []; - $order = Order::where(['id' => $order_id]) - ->where(['user_id' => $user_id]) - ->where(['goods_id' => $goods_id]) - ->where(['num' => $num]) - ->where(['status' => 0]) - ->find(); - if ($order == null && $num == 0) { - $order = Order::where(['id' => $order_id]) - ->where(['user_id' => $user_id]) - ->where(['goods_id' => $goods_id]) - ->where(['num' => 1]) - ->where(['status' => 0]) - ->find(); - if ($order != null) { - $order_type1 = $order['order_type']; - if ($order_type1 == 10) { - $num = 1; - } - } - } - if ($order) { - #改变状态 - $res[] = Order::field('status,pay_time') - ->where(['id' => $order['id']]) - ->update([ - 'status' => 1, - 'pay_time' => time(), - ]); - #扣余额 - if ($order['use_money'] > 0) { - $res[] = User::changeMoney($order['user_id'], -$order['use_money'], 3, '购买盒子' . $order['goods_title']); - } - #扣星岚币 - if ($order['use_integral'] > 0) { - $res[] = User::changeIntegral($order['user_id'], -$order['use_integral'], 2, '购买盒子' . $order['goods_title']); - } - - #判断一下优惠券 - if (!empty($order['coupon_id'])) { - $coupon = CouponReceiveModel::where(['id' => $order['coupon_id'], 'status' => 0])->update(['status' => 1]); - } - - #分销奖励 - $res[] = User::distribution($order); - - #分销奖励 - #开奖================================================== - if ($num == 1) { - $res[] = $this->infinite_shangchengshang($order); - } else { - $res[] = $this->infinite_drawprize($order); - } - - #开奖================================================== - #判断是否发积分 发券 - $res[] = User::is_integral_coupon($order); - #判断是否发积分 - - //升级欧气值 - if ($order['price'] > 0) { - User::ou_qi_level_up($order['user_id'], $order['price']); - } - - } else { - $res[] = 0; - } - - return $res; - } - - /** - * 无限赏开奖逻辑 - * @param $order 订单信息 - */ - protected function infinite_drawprize($order = []) - { - $user_id = $order['user_id'];#用户ID - $order_id = $order['id'];#订单ID - $goods_id = $order['goods_id'];#盒子ID - $prize_num = $order['prize_num'];#抽奖数量 - $order_type = $order['order_type'];#订单类型 - $whe = []; - $whe[] = ['id', '=', $order['goods_id']]; - $infinite_goods = Goods::getInfo($whe, 'type'); - - $where = []; - $where[] = ['goods_id', '=', $goods_id]; - $where[] = ['num', '=', 0]; - $where[] = ['real_pro', '>', 0]; - if ($infinite_goods['type'] == 9 && $order['is_mibao'] == 1) { - //秘宝池 - $where[] = ['lian_ji_type', '=', 1]; - } else { - //普通 - $where[] = ['lian_ji_type', '=', 0]; - } - - #查找奖品 - $goodslist = GoodsList::field('id,shang_id,real_pro') - ->where($where) - ->select()->toArray(); - if ($goodslist) { - #组合中奖商品 - $all_goods_id = []; - foreach ($goodslist as $value) { - $real_pro = $value['real_pro'] * 10000; - for ($i = 1; $i <= $real_pro; $i++) { - $all_goods_id[] = $value['id']; - } - } - - for ($i = 0; $i < $prize_num; $i++) { - #随机打乱 - shuffle($all_goods_id); - shuffle($all_goods_id); - $prize_id = $all_goods_id[0]; - $prize_info = GoodsList::where(['id' => $prize_id])->find(); - #编号 - $luck_no = OrderList::field('id') - ->where('goods_id', '=', $goods_id) - ->where('num', '=', 0) - ->where('order_type', '=', $order_type) - ->order('id desc') - ->value('luck_no'); - $luck_no++; - #新增记录 - $save_prize_info = [ - 'order_id' => $order_id, - 'user_id' => $user_id, - 'status' => 0,#0未操作 1选择兑换 2选择发货 - 'goods_id' => $goods_id, - 'num' => 0, - 'shang_id' => $prize_info['shang_id'], - 'goodslist_id' => $prize_info['id'], - 'goodslist_title' => $prize_info['title'], - 'goodslist_imgurl' => $prize_info['imgurl'], - 'goodslist_price' => $prize_info['price'], - 'goodslist_money' => $prize_info['money'], - 'goodslist_type' => $prize_info['goods_type'], - 'goodslist_sale_time' => $prize_info['sale_time'], - 'addtime' => time(), - 'prize_code' => $prize_info['prize_code'], - 'order_type' => $order_type, - 'luck_no' => $luck_no, - 'is_fd' => $prize_info['is_fd'] - ]; - #入库=== - $res[] = OrderList::insert($save_prize_info); - } - - //去除秘宝池次数 - if ($infinite_goods['type'] == 9 && $order['is_mibao'] == 1) { - User::where('id', $user_id)->dec('mb_number', $prize_num)->update(); - } - - //计算怒气值 - $this->rage($goods_id, $order_id, $user_id); - - //领主 - $this->ling_zhu($order, $order_id); - - //连击赏 - if ($infinite_goods['type'] == 9 && $order['is_mibao'] == 0) { - $this->lian_ji($order, $order_id); - } - - } else { - $res[] = 0; - } - return $res; - - } - - /** - * 无限赏开奖逻辑 - * @param $order 订单信息 - */ - protected function infinite_shangchengshang($order = []) - { - $user_id = $order['user_id'];#用户ID - $order_id = $order['id'];#订单ID - $goods_id = $order['goods_id'];#盒子ID - $prize_num = $order['prize_num'];#抽奖数量 - $order_type = $order['order_type'];#订单类型 - $whe = []; - $whe[] = ['id', '=', $order['goods_id']]; - $infinite_goods = Goods::getInfo($whe, 'type'); - $num = 1; - $where = []; - $where[] = ['goods_id', '=', $goods_id]; - $where[] = ['num', '=', $num]; - #查找奖品 - $goodslist = GoodsList::field('id,shang_id,real_pro,surplus_stock') - ->where($where) - ->select()->toArray(); - if ($goodslist) { - #组合中奖商品 - $all_goods_id = []; - foreach ($goodslist as $value) { - $surplus_stock = $value['surplus_stock']; - for ($i = 1; $i <= $surplus_stock; $i++) { - $all_goods_id[] = $value['id']; - } - } - - for ($i = 0; $i < $prize_num; $i++) { - - $prize_id = $all_goods_id[0]; - $prize_info = GoodsList::where(['id' => $prize_id])->find(); - $prize_info_surplus_stock = $prize_info['surplus_stock']; - $prize_info['surplus_stock'] = $prize_info_surplus_stock - 1; - if ($prize_info_surplus_stock < 0) { - $res[] = 0; - return; - } - $prize_info->save(); - #编号 - $luck_no = OrderList::field('id') - ->where('goods_id', '=', $goods_id) - ->where('num', '=', $num) - ->where('order_type', '=', $order_type) - ->order('id desc') - ->value('luck_no'); - $luck_no++; - #新增记录 - $save_prize_info = [ - 'order_id' => $order_id, - 'user_id' => $user_id, - 'status' => 0,#0未操作 1选择兑换 2选择发货 - 'goods_id' => $goods_id, - 'num' => $num, - 'shang_id' => $prize_info['shang_id'], - 'goodslist_id' => $prize_info['id'], - 'goodslist_title' => $prize_info['title'], - 'goodslist_imgurl' => $prize_info['imgurl'], - 'goodslist_price' => $prize_info['price'], - 'goodslist_money' => $prize_info['money'], - 'goodslist_type' => $prize_info['goods_type'], - 'goodslist_sale_time' => $prize_info['sale_time'], - 'addtime' => time(), - 'prize_code' => $prize_info['prize_code'], - 'order_type' => $order_type, - 'luck_no' => $luck_no, - 'is_fd' => $prize_info['is_fd'] - ]; - #入库=== - $res[] = OrderList::insert($save_prize_info); - } - - //去除秘宝池次数 - if ($infinite_goods['type'] == 9 && $order['is_mibao'] == 1) { - User::where('id', $user_id)->dec('mb_number', $prize_num)->update(); - } - - //计算怒气值 - $this->rage($goods_id, $order_id, $user_id); - - //领主 - $this->ling_zhu($order, $order_id); - - //连击赏 - if ($infinite_goods['type'] == 9 && $order['is_mibao'] == 0) { - $this->lian_ji($order, $order_id); - } - - } else { - $res[] = 0; - } - return $res; - - } - - //计算怒气值 - public function rage($goods_id, $order_id, $user_id) - { - $order_list = OrderList::field('id')->where(['order_id' => $order_id])->find(); - if (!$order_list) { - return false; - } - try { - $goods = Goods::field('id')->field('rage_is,rage,item_card_id')->where(['id' => $goods_id])->find(); - if ($goods['rage_is'] == 1 && $goods['rage'] > 0 && $goods['item_card_id'] > 0) { - $order = Order::field('order_total')->where(['id' => $order_id])->find(); - if ($order['order_total'] > 0) { - //获取奖品总价值 - $out_price_sum = OrderList::where(['order_id' => $order_id])->sum('goodslist_money'); - $rage_number = bcsub($order['order_total'], "$out_price_sum", 2); - $user_rage = Db::name('user_rage')->field('id,rage')->where(['user_id' => $user_id, 'goods_id' => $goods_id])->find(); - - if ($user_rage) { - $rage_number2 = bcadd((string) ($user_rage['rage']), "$rage_number", 2); - if ($rage_number2 >= $goods['rage']) { - //赠送道具卡 - $item_card = ItemCard::field('id,title')->where(['id' => $goods['item_card_id']])->find(); - if ($item_card) { - Db::name('user_item_card')->insert(['user_id' => $user_id, 'item_card_id' => $item_card['id'], 'title' => $item_card['title'], 'status' => 1, 'addtime' => time(), 'updatetime' => time()]); - } - Db::name('user_rage')->where(['user_id' => $user_id, 'goods_id' => $goods_id])->update(['rage' => 0, 'updatetime' => time()]); - } else { - Db::name('user_rage')->where(['user_id' => $user_id, 'goods_id' => $goods_id])->update(['rage' => $rage_number2, 'updatetime' => time()]); - } - - } else { - Db::name('user_rage')->insert(['user_id' => $user_id, 'goods_id' => $goods_id, 'rage' => $rage_number, 'addtime' => time(), 'updatetime' => time()]); - } - } - } - } catch (\Exception $e) { - - } - - } - - //领主 - public function ling_zhu($order, $order_id) - { - //是否开启领主模式 - $whe = []; - $whe[] = ['id', '=', $order['goods_id']]; - $infinite_goods = Goods::getInfo($whe, 'type,lingzhu_is,lingzhu_fan,lingzhu_shang_id,king_user_id'); - if ($infinite_goods['type'] != 8) { - return false; - } - - if ($infinite_goods['lingzhu_is'] == 1) { - $whe2 = []; - $whe2[] = ['order_id', '=', $order_id]; - $order_list = OrderList::getAllList($whe2, 'id,shang_id,user_id,goods_id', 'id asc'); - foreach ($order_list as $k => $v) { - if ($v['shang_id'] == $infinite_goods['lingzhu_shang_id']) { - // 查找当前池子是否有领主 - if ($infinite_goods['king_user_id'] != 0) { - Db::name('goods_king_rank')->where([['user_id', '=', $infinite_goods['king_user_id']], ['goods_id', '=', $v['goods_id']]])->order('id', 'desc')->limit(1)->update(['end_time' => time()]); - } - - //新的领主 - Goods::where(['id' => $v['goods_id']])->update(['king_user_id' => $v['user_id']]); - //多少发晋升领主 - $luck_no = OrderList::where([['goods_id', '=', $v['goods_id']], ['id', '<=', $v['id']]])->count(); - $rank = [ - 'user_id' => $v['user_id'], - 'goods_id' => $v['goods_id'], - 'count' => $luck_no, - 'order_list_id' => $v['id'], - 'addtime' => time(), - ]; - - $result = Db::name('goods_king_rank')->insert($rank); - } else { - // 查找当前池子是否有领主 - $infinite_goods = Goods::getInfo($whe, 'lingzhu_is,lingzhu_fan,lingzhu_shang_id,king_user_id'); - - if ($infinite_goods['king_user_id'] != 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('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, '领主收益'); - } - - } - } - } - } - } - - //连击赏 - public function lian_ji($order, $order_id) - { - //是否是连击赏 - $whe = []; - $whe[] = ['id', '=', $order['goods_id']]; - $infinite_goods = Goods::getInfo($whe, 'type,lian_ji_num,lian_ji_shang_id'); - if ($infinite_goods['type'] != 9) { - return false; - } - if ($order['is_mibao'] == 1) { - //减少秘宝池次数 - User::field('mb_number')->where(['id' => $order['user_id']])->dec('mb_number', $order['prize_num'])->update(); - } - $whe2 = []; - $whe2[] = ['order_id', '=', $order_id]; - $order_list = OrderList::getAllList($whe2, 'id,shang_id,goods_id,user_id', 'id asc'); - foreach ($order_list as $k => $v) { - //是否已有连击 - $user_goods_lian_ji = Db::name('user_goods_lian_ji')->where([['user_id', '=', $v['user_id']], ['goods_id', '=', $v['goods_id']]])->whereNull('deltime')->order('id', 'desc')->find(); - - if ($v['shang_id'] == $infinite_goods['lian_ji_shang_id']) { - - if ($infinite_goods['lian_ji_num'] != 0 && $infinite_goods['lian_ji_shang_id'] != 0) { - - if ($user_goods_lian_ji) { - Db::name('user_goods_lian_ji')->field('number,updatetime')->where([['user_id', '=', $v['user_id']], ['goods_id', '=', $v['goods_id']]])->whereNull('deltime')->order('id', 'desc')->inc('number', 1)->update(['updatetime' => time()]); - //连击次数是否满足条件 - $lian_ji_number = Db::name('user_goods_lian_ji')->where([['user_id', '=', $v['user_id']], ['goods_id', '=', $v['goods_id']]])->whereNull('deltime')->order('id', 'desc')->limit(1)->value('number'); - if ($lian_ji_number && $lian_ji_number >= $infinite_goods['lian_ji_num']) { - //赠送秘宝池次数 - User::field('mb_number')->where(['id' => $v['user_id']])->inc('mb_number', 1)->update(); - //清空连击次数 - Db::name('user_goods_lian_ji')->field('number,updatetime')->where([['user_id', '=', $v['user_id']], ['goods_id', '=', $v['goods_id']]])->whereNull('deltime')->order('id', 'desc')->update(['number' => 0, 'updatetime' => time()]); - } - } else { - Db::name('user_goods_lian_ji')->insert(['user_id' => $v['user_id'], 'goods_id' => $v['goods_id'], 'number' => 1, 'addtime' => time(), 'updatetime' => time()]); - } - } - } else { - if ($user_goods_lian_ji) { - Db::name('user_goods_lian_ji')->field('number,updatetime')->where([['user_id', '=', $v['user_id']], ['goods_id', '=', $v['goods_id']]])->whereNull('deltime')->order('id', 'desc')->update(['number' => 0, 'updatetime' => time()]); - } else { - Db::name('user_goods_lian_ji')->insert(['user_id' => $v['user_id'], 'goods_id' => $v['goods_id'], 'number' => 0, 'addtime' => time(), 'updatetime' => time()]); - } - } - } - - } - - /** - * 抽卡机抽奖逻辑 - * @param int $user_id - * @param int $order_id - * @param int $goods_id - */ - public function cardextractor_drawprize_notice($user_id = 0, $order_id = 0, $goods_id = 0) - { - $res = []; - // dd(11); - $order = Order::where(['id' => $order_id]) - ->where(['user_id' => $user_id]) - ->where(['goods_id' => $goods_id]) - ->where(['num' => 0]) - ->where(['status' => 0]) - ->where(['order_type' => 4]) - ->find(); - // dd($order); - if ($order) { - #改变状态 - $res[] = Order::field('status,pay_time') - ->where(['id' => $order['id']]) - ->update([ - 'status' => 1, - 'pay_time' => time(), - ]); - #扣余额 - if ($order['use_money'] > 0) { - $res[] = User::changeMoney($order['user_id'], -$order['use_money'], 3, '购买盒子' . $order['goods_title']); - } - #扣星岚币 - if ($order['use_integral'] > 0) { - $res[] = User::changeIntegral($order['user_id'], -$order['use_integral'], 2, '购买盒子' . $order['goods_title']); - } - #判断一下优惠券 - if (!empty($order['coupon_id'])) { - $coupon = CouponReceiveModel::where(['id' => $order['coupon_id'], 'status' => 0])->update(['status' => 1]); - } - #判断是否发积分 发券 - $res[] = User::is_integral_coupon($order); - #判断是否发积分 - - #分销奖励 - $res[] = User::distribution($order); - #分销奖励 - - #开奖================================================== - $res[] = $this->cardextractor_drawprize($order); - #开奖================================================== - - } else { - $res[] = 0; - } - return $res; - } - - /** - * 抽卡机开奖 - * @param array $order - */ - public function cardextractor_drawprize($order = []) - { - $user_id = $order['user_id'];#用户ID - $order_id = $order['id'];#订单ID - $goods_id = $order['goods_id'];#盒子ID - $prize_num = $order['prize_num'];#抽奖数量 - $order_type = $order['order_type'];#订单类型 - $prize_card_set = $order['prize_card_set'] ? json_decode($order['prize_card_set'], true) : '';#抽卡机必出设置 - // dd($order); - #排除必出等级卡条件 - $shang_where = []; - // dd(11111); - #必出卡等级 - $set_prize_shang = []; - if ($prize_card_set && isset($prize_card_set['shang_id']) && isset($prize_card_set['shang_count'])) { - - // dd($prize_card_set['shang_count']); - // foreach ($prize_card_set as $set_key => $set_value) { - - for ($seti = 1; $seti <= $prize_card_set['shang_count']; $seti++) { - $set_prize_shang[] = $prize_card_set['shang_id']; - } - // } - // dd($set_prize_shang); - - #排除必出等级卡条件 - $shang_where[] = ['id', 'not in', array_unique($set_prize_shang)]; - #减去必出数量 - $prize_num = $prize_num - count($set_prize_shang); - } - - // dd($shang_where); - #卡等级随机 - $shang = CardLevel::field('id,title') - // ->where('goods_id', '=', $goods_id) -// ->where('pro', '>', 0) - ->where($shang_where) - ->select()->toArray(); - // dd(1111) - // dd($shang); - if ($shang) { - - #卡等级随机 - $all_shang_id = []; - foreach ($shang as $shang_value) { - // $real_shang_pro = $shang_value['pro'] * 100; -// for ($is = 1; $is <= $real_shang_pro; $is++) { - $goods = GoodsList::where('shang_id', $shang_value['id'])->where('goods_id', '=', $goods_id)->find(); - if ($goods) { - $all_shang_id[] = $shang_value['id']; - } - - // } - } - // dd($all_shang_id); - #中奖卡等级 - $prize_shang = []; - for ($i = 0; $i < $prize_num; $i++) { - #随机打乱 - shuffle($all_shang_id); - shuffle($all_shang_id); - $prize_shang[] = $all_shang_id[0]; - } - // dd($prize_shang); - $prize_shang = array_merge($prize_shang, $set_prize_shang); - shuffle($prize_shang); - $save_prize_data = []; - // dd($prize_shang); - #根据卡等级中奖奖品 - foreach ($prize_shang as $prize_shang_id) { - #查找奖品 - $goodslist = GoodsList::field('id,shang_id,real_pro,special_stock') - ->where('goods_id', '=', $goods_id) - ->where('shang_id', '=', $prize_shang_id) - ->where('num', '=', 0) - ->where('real_pro', '>', 0) - ->where('special_stock = -100 OR special_stock > 0') - ->select()->toArray(); - if (empty($goodslist)) { - $res[] = 0; - return $res; - } - // dd($goodslist); - if ($goodslist) { - #组合中奖商品 - $all_goods_id = []; - foreach ($goodslist as $value) { - $real_pro = $value['real_pro'] * 100; - for ($i = 1; $i <= $real_pro; $i++) { - $all_goods_id[] = $value['id']; - } - } - #随机打乱 - shuffle($all_goods_id); - shuffle($all_goods_id); - $prize_id = $all_goods_id[0]; - $prize_info = GoodsList::where(['id' => $prize_id])->find(); - $save_prize_data[] = [ - 'order_id' => $order_id, - 'user_id' => $user_id, - 'status' => 0,#0未操作 1选择兑换 2选择发货 - 'goods_id' => $goods_id, - 'num' => 0, - 'shang_id' => $prize_info['shang_id'], - 'goodslist_id' => $prize_info['id'], - 'goodslist_title' => $prize_info['title'], - 'goodslist_imgurl' => $prize_info['imgurl'], - 'goodslist_price' => $prize_info['price'], - 'goodslist_money' => $prize_info['money'], - 'goodslist_type' => $prize_info['goods_type'], - 'goodslist_sale_time' => $prize_info['sale_time'], - 'addtime' => time(), - 'prize_code' => $prize_info['prize_code'], - 'order_type' => $order_type, - 'is_fd' => $prize_info['is_fd'] - ]; - if ($prize_info['special_stock'] >= 1) { - #减少库存 - $res[] = GoodsList::field('special_stock') - ->where(['id' => $prize_info['id']]) - ->dec('special_stock') - ->update(); - } - } else { - $res[] = $prize_shang_id; - } - } - #入库=== - $res[] = OrderList::insertAll($save_prize_data); - } else { - $res[] = 0; - } - return $res; - } - - /** - * 背包发货订单处理 - * @param int $user_id 用户id - * @param int $order_id 订单id - */ - public function reward_order_handle($user_id = 0, $order_id = 0) - { - $res = []; - $send_info = OrderListSend::where(['user_id' => $user_id]) - ->where('user_id', '=', $user_id) - ->where('id', '=', $order_id) - ->where('status', '=', 0)#0待支付 1待发货 2待收货 3已完成 - ->find(); - if ($send_info) { - #改变订单状态 - $res[] = OrderListSend::field('id,status,pay_time') - ->where('id', '=', $order_id) - ->update([ - 'status' => 1,#0待支付 1待发货 2待收货 3已完成 - 'pay_time' => time(),#支付时间 - ]); - #改变赏品信息 - $res[] = OrderList::field('id,status,send_num,choice_time') - ->where('user_id', '=', $user_id) - ->where('status', '=', 0) - ->where('goodslist_type', '=', 1) - ->where('send_num', '=', $send_info['send_num']) - ->update([ - 'status' => 2, - 'choice_time' => time(), - ]); - } else { - $res[] = 0; - } - return $res; - } - - - - - public function order_notify7() - { - $testxml = file_get_contents("php://input"); - $jsonxml = json_encode(simplexml_load_string($testxml, 'SimpleXMLElement', LIBXML_NOCDATA)); - $result = json_decode($jsonxml, true);//转成数组, -// wri($result['out_trade_no'], '秒杀商城回调--' . $result['out_trade_no']); - if ($result) { - //如果成功返回了 - $out_trade_no = $result['out_trade_no']; - if ($result['return_code'] == 'SUCCESS' && $result['result_code'] == 'SUCCESS') { - // writelog($out_trade_no, "秒杀商城支付成功--"); - Db::startTrans(); - $res[] = $this->order_update($out_trade_no, 7); - if (resCheck($res)) { - Db::commit(); - } else { - Db::rollback(); - } - } - } - $html = ""; - die($html); - } - - public static function order_update($order_num, $type) - { - $res = []; - $order_info = Db::name('kk_order') - ->where(['order_no' => $order_num]) - ->where(['status' => 0])#0待付款 1待发货 2待收货 3确认收货 - ->find(); - if ($order_info) { - #改变订单状态 - $res[] = Db::name('kk_order')->field('id,status,pay_time') - ->where(['id' => $order_info['id']]) - ->update([ - 'status' => 1,#0待付款 1待发货 2待收货 3确认收货 - 'pay_time' => time(),#支付时间 - ]); - if ($order_info['money'] > 0) { - // dd($order_info['user_id']); - User::changeMoney($order_info['user_id'], '-' . $order_info['money'], 7); - } - if ($order_info['integral'] > 0) { - User::changeIntegral($order_info['user_id'], '-' . $order_info['integral'], 4); - } - $goods_data = Db::name('kk_order_good') - ->field('id,goods_id,goods_num,goods_spec_id') - ->where(['order_id' => $order_info['id']]) - ->select()->toArray(); - foreach ($goods_data as $k => $v) { - #加销量 - Db::name('kk_product') - ->field('id,sale_num') - ->where('id', $v['goods_id']) - ->inc('sale_num', $v['goods_num']) - ->update(); - #减库存 - Db::name('kk_product_spec') - ->field('id,stock') - ->where('id', $v['goods_spec_id']) - ->dec('stock', $v['goods_num']) - ->update(); - } - } else { - $res[] = 0; - } - return $res; - - } - - /** - * 抽奖券====================================================== - * @param int $user_id 会员id - * @param int $order_id 订单ID - * @param int $box_id 盲盒id - */ - public function draw_drawprize_notice($user_id = 0, $order_id = 0, $goods_id = 0) - { - $res = []; - - $order = Order::where(['id' => $order_id]) - ->where(['user_id' => $user_id]) - ->where(['goods_id' => $goods_id]) - ->where(['num' => 0]) - ->where(['status' => 0]) - ->where(['order_type' => 7]) - ->find(); - if ($order) { - #改变状态 - $res[] = Order::field('status,pay_time') - ->where(['id' => $order['id']]) - ->update([ - 'status' => 1, - 'pay_time' => time(), - ]); - #扣抽奖券 - if ($order['use_draw'] > 0) { - $res[] = User::changeDraw($order['user_id'], -$order['use_draw'], 3, '抽奖券消费' . $order['goods_title']); - } - #开奖================================================== - $res[] = $this->draw_drawprize($order); - #开奖================================================== - } else { - $res[] = 0; - } - - return $res; - } - - /** - * 无限赏开奖逻辑 - * @param $order 订单信息 - */ - protected function draw_drawprize($order = []) - { - - $user_id = $order['user_id'];#用户ID - $order_id = $order['id'];#订单ID - $goods_id = $order['goods_id'];#盒子ID - $prize_num = $order['prize_num'];#抽奖数量 - $order_type = $order['order_type'];#订单类型 - - #查找奖品 - $goodslist = GoodsList::field('id,shang_id,real_pro') - ->where('goods_id', '=', $goods_id) - ->where('num', '=', 0) - ->where('real_pro', '>', 0) - ->select()->toArray(); - if ($goodslist) { - #组合中奖商品 - $all_goods_id = []; - foreach ($goodslist as $value) { - $real_pro = $value['real_pro'] * 100; - for ($i = 1; $i <= $real_pro; $i++) { - $all_goods_id[] = $value['id']; - } - } - for ($i = 0; $i < $prize_num; $i++) { - #随机打乱 - shuffle($all_goods_id); - shuffle($all_goods_id); - $prize_id = $all_goods_id[0]; - $prize_info = GoodsList::where(['id' => $prize_id])->find(); - #编号 - $luck_no = OrderList::field('id') - ->where('goods_id', '=', $goods_id) - ->where('num', '=', 0) - ->where('order_type', '=', $order_type) - ->order('id desc') - ->value('luck_no'); - $luck_no++; - #新增记录 - $save_prize_info = [ - 'order_id' => $order_id, - 'user_id' => $user_id, - 'status' => 0,#0未操作 1选择兑换 2选择发货 - 'goods_id' => $goods_id, - 'num' => 0, - 'shang_id' => $prize_info['shang_id'], - 'goodslist_id' => $prize_info['id'], - 'goodslist_title' => $prize_info['title'], - 'goodslist_imgurl' => $prize_info['imgurl'], - 'goodslist_price' => $prize_info['price'], - 'goodslist_money' => $prize_info['money'], - 'goodslist_type' => $prize_info['goods_type'], - 'goodslist_sale_time' => $prize_info['sale_time'], - 'addtime' => time(), - 'prize_code' => $prize_info['prize_code'], - 'order_type' => $order_type, - 'luck_no' => $luck_no, - 'is_fd' => $prize_info['is_fd'] - ]; - #入库=== - $res[] = OrderList::insert($save_prize_info); - } - } else { - $res[] = 0; - } - return $res; - - } - - /** - * 道具卡====================================================== - * @param int $user_id 会员id - * @param int $order_id 订单ID - * @param int $box_id 盲盒id - */ - public function item_card_notice($user_id = 0, $order_id = 0, $goods_id = 0) - { - $res = []; - - $order = Order::where(['id' => $order_id]) - ->where(['user_id' => $user_id]) - ->where(['goods_id' => $goods_id]) - ->where(['num' => 0]) - ->where(['status' => 0]) - ->find(); - if ($order) { - #改变状态 - $res[] = Order::field('status,pay_time') - ->where(['id' => $order['id']]) - ->update([ - 'status' => 1, - 'pay_time' => time(), - ]); - #扣道具卡 - if ($order['use_item_card'] > 0) { - $res[] = Db::name('user_item_card')->where(['user_id' => $user_id, 'status' => 1])->order('id asc')->limit($order['use_item_card'])->update(['status' => 2, 'order_id' => $order_id, 'updatetime' => time()]); - } - #开奖================================================== - $res[] = $this->draw_drawprize($order); - #开奖================================================== - } else { - $res[] = 0; - } - - return $res; - } - - public function wx_gf_fahuo($user_id, $order_num) - { - //微信官方发货 - $wxServer = new \app\common\server\Wx($this->app); - - $access_token = $wxServer->get_access_token(); - $open_id = Db::name('user')->where('id', $user_id)->value('openid'); - $wxServer->post_order($open_id, $access_token, $order_num); - } -} \ No newline at end of file diff --git a/app/api/controller/Base.php b/app/api/controller/Base.php index 7f3dfdc..945e967 100755 --- a/app/api/controller/Base.php +++ b/app/api/controller/Base.php @@ -48,7 +48,7 @@ class Base extends MyController $data['msg'] = "该账户已被封号,请联系客服解封"; exit(json_encode($data, 1)); } - + // 检查用户是否有UID,如果没有则生成 if (empty($user['uid'])) { // 获取用户uid配置 diff --git a/app/api/controller/Config.php b/app/api/controller/Config.php old mode 100644 new mode 100755 diff --git a/app/api/controller/FuLiWu.php b/app/api/controller/FuLiWu.php old mode 100644 new mode 100755 index b0744ed..b3607bd --- a/app/api/controller/FuLiWu.php +++ b/app/api/controller/FuLiWu.php @@ -32,11 +32,15 @@ class FuLiWu extends Base if ($type_str != 1 && $type_str != 3) { return $this->renderError('参数错误'); } + $order='sort desc,id desc'; $whe = []; $whe[] = ['status', '=', $type_str]; $paginate = 15; $whe[] = ['type', '=', 15]; $whe[] = ['is_open', '=', $type_str == 1 ? 0 : 1]; + if($type_str!=1){ + $order='open_time desc'; + } $user_id = $this->getUserId(); if ($user_id == 0) { //充值金额 @@ -53,7 +57,7 @@ class FuLiWu extends Base #盒子 $goods = GoodsModel::where($whe) ->field("id,title,imgurl,price,type,new_is,quanju_xiangou,choujiang_xianzhi,flw_start_time,flw_end_time,open_time,goods_describe,is_open") - ->order("sort desc,id desc")->paginate($paginate)->each(function ($itme) { + ->order($order)->paginate($paginate)->each(function ($itme) { $itme['imgurl'] = imageUrl($itme['imgurl']); $itme['flw_start_time'] = date('Y-m-d H:i:s', $itme['flw_start_time']); $itme['flw_end_time'] = date('Y-m-d H:i:s', $itme['flw_end_time']); @@ -133,7 +137,7 @@ class FuLiWu extends Base $goodslist = GoodsList::where('goods_id', '=', $goods_id) ->where('num', '=', 0) ->field('id,title,imgurl,imgurl_detail,stock,price,sc_money,shang_id,surplus_stock,sort') - ->order('sort asc') + ->order('shang_id desc,sort asc') ->select() ->toArray(); @@ -281,9 +285,9 @@ class FuLiWu extends Base public function fuliwu_user_records(Request $request) { $user = $this->getUser(); - $user_id = $user['user_id']; - - $list = OrderList::where(' user_id', '=', $user_id) + $user_id = $user['id']; + // $user_id = $this->getUserId(); + $list = OrderList::where('user_id', '=', $user_id) ->where('order_type', '=', 15) ->field('user_id,addtime,goodslist_title,shang_id,goods_id') ->order('addtime desc') @@ -314,7 +318,7 @@ class FuLiWu extends Base $user = $this->getUser(); $user_id = $user['user_id']; - $list = OrderList::where(' user_id', '=', $user_id) + $list = OrderList::where('user_id', '=', $user_id) ->where('order_type', '=', 15) ->where('shang_id', '>', 0) ->field('user_id,addtime,goodslist_title,shang_id,goods_id') diff --git a/app/api/controller/Goods.php b/app/api/controller/Goods.php index 03d2897..ec730f5 100755 --- a/app/api/controller/Goods.php +++ b/app/api/controller/Goods.php @@ -22,6 +22,7 @@ use app\common\model\CouponReceive as CouponReceiveModel; use app\common\model\UserCoupon; use app\common\model\GoodsType; use app\common\service\CommonService; +use app\common\model\GoodsExtend; class Goods extends Base { @@ -89,7 +90,7 @@ class Goods extends Base $whe[] = ['type', '=', 16]; } else { // $whe[] = ['type', 'not in', [4, 10, 15]]; - $whe[] = ['type', 'in', 2, 6, 8, 16]; + $whe[] = ['type', 'in', [2, 6, 8, 16]]; } $user_id = $this->getUserId(); @@ -435,6 +436,9 @@ class Goods extends Base foreach ($goodslist_1 as $key_1 => &$value_1) { $value_1['imgurl'] = imageUrl($value_1['imgurl']); + if ($value_1['shang_id'] == 38) { + unset($value_1['shang_info']); + } if ($value_1['stock'] == 0) { //保留两位小数 $value_1['pro'] = '概率:' . round($value_1['real_pro'], 2) . '%'; @@ -446,6 +450,7 @@ class Goods extends Base $surplus_stock_1 = $value_1['surplus_stock']; $pro_num_1 = 0; $pro_1 = 0; + if (array_key_exists($value_1['shang_id'], self::$shang_give_arr)) { #概率 $pro_1 = self::$shang_give_arr[$value_1['shang_id']]; @@ -468,9 +473,37 @@ class Goods extends Base return $this->renderSuccess("请求成功", $goodslist_1); } + /** + * 获取商品扩展信息 + */ + public function getGoodExtend() + { + $goods_id = request()->param('goods_id/d', 0); + $goods_type = request()->param('goods_type/d', 0); + $goods_extend = GoodsExtend::where('goods_id', $goods_id)->find(); + if (!$goods_extend) { + // 从goods_type表获取默认值 + $goodsType = Db::name('goods_type') + ->field('pay_wechat, pay_balance, pay_currency, pay_currency2, pay_coupon, is_deduction') + ->where('value', $goods_type) + ->find(); - + if ($goodsType) { + // 如果找到了盒子类型的默认配置 + $goods_extend = [ + 'goods_id' => $goods_id, + 'pay_wechat' => $goodsType['pay_wechat'], + 'pay_balance' => $goodsType['pay_balance'], + 'pay_currency' => $goodsType['pay_currency'], + 'pay_currency2' => $goodsType['pay_currency2'], + 'pay_coupon' => $goodsType['pay_coupon'], + 'is_deduction' => $goodsType['is_deduction'] + ]; + } + } + return $this->renderSuccess("请求成功", $goods_extend); + } /** * 换箱箱号 */ @@ -638,16 +671,12 @@ class Goods extends Base $coupon_id = request()->param('coupon_id/d', 0); //优惠券 #盒子信息 - $goods = Goodsmodel::field('title,imgurl_detail,type,price,status,is_shou_zhe,quanju_xiangou,lock_is,choujiang_xianzhi,lock_time')->where(['id' => $goods_id]) + $goods = Goodsmodel::field('title,imgurl_detail,type,price,status,is_shou_zhe,quanju_xiangou,lock_is,choujiang_xianzhi,lock_time,daily_xiangou')->where(['id' => $goods_id]) ->find(); if (!$goods) { return $this->renderError("盒子不存在"); } - # 获取盒子类型配置 - $goodsType = \app\common\model\GoodsType::where('value', $goods['type'])->find(); - if (!$goodsType) { - return $this->renderError("盒子类型配置不存在"); - } + if ($goods['status'] != 1) { return $this->renderError("盒子已下架"); } @@ -655,6 +684,47 @@ class Goods extends Base if (RegInt($num)) { return $this->renderError("箱号选择错误"); } + # 获取盒子类型配置 + $goods_type = $goods['type']; + $goods_extend = GoodsExtend::getGoodsExtendByGoodsId($goods_id, $goods_type); + if (!$goods_extend) { + return $this->renderError("盒子类型配置不存在"); + } + if ($goods['quanju_xiangou'] > 0) { + //限购 + $user_toDay_count = OrderList::field('id')->where('goods_id', '=', $goods_id) + ->where('user_id', '=', $user['id']) + ->where('parent_goods_list_id', '=', 0) + ->count(); + //已经达到限购先上限 + if ($goods['quanju_xiangou'] <= $user_toDay_count) { + return $this->renderError('当前限购' . $goods['quanju_xiangou'] . '次'); + } + $now_prize_num = $prize_num + $user_toDay_count; + if ($now_prize_num > $goods['quanju_xiangou']) { + return $this->renderError('购买超出限制,还允许购买' . ($goods['quanju_xiangou'] - $user_toDay_count) . '次'); + } + } + if ($goods['daily_xiangou'] > 0) { + //获取今天凌晨时间 + $todayMidnight = strtotime('today'); + //限购 + $user_toDay_count = OrderList::field('id') + ->where('goods_id', '=', $goods_id) + ->where('user_id', '=', $user['id']) + ->where('parent_goods_list_id', '=', 0) + ->where('addtime', '>=', $todayMidnight) + ->count(); + //已经达到限购先上限 + if ($user_toDay_count >= $goods['daily_xiangou']) { + return $this->renderError('今日限购' . $goods['daily_xiangou'] . '次'); + } + $now_prize_num = $prize_num + $user_toDay_count; + if ($now_prize_num > $goods['daily_xiangou']) { + return $this->renderError('购买超出限制,今日还允许购买' . ($goods['daily_xiangou'] - $user_toDay_count) . '次'); + } + } + if ($goods['type'] == 6 && $goods['quanju_xiangou'] > 0) { //限购 $user_xiangou_count = OrderList::field('id')->where('goods_id', '=', $goods_id) @@ -720,7 +790,7 @@ class Goods extends Base $coupon_price = 0; # 判断是否可使用优惠券 - if ($shou_zhe_price <= 0 && !empty($coupon_id) && $goodsType['pay_coupon'] == 1) { + if ($shou_zhe_price <= 0 && !empty($coupon_id) && $goods_extend['pay_coupon'] == 1) { # 获取优惠券信息 $coupon = CouponReceiveModel::where([ 'id' => $coupon_id, @@ -754,8 +824,8 @@ class Goods extends Base if ($shou_zhe_price <= 0) { $iszhifu = 0; # 余额抵扣 - if ($use_money_is == 1 && $goodsType['pay_balance'] == 1) { - if ($goodsType['is_deduction'] == 1) { + if ($use_money_is == 1 && $goods_extend['pay_balance'] == 1) { + if ($goods_extend['is_deduction'] == 1) { # 抵扣模式 if ($user['money'] >= $price) { $use_money = $price; @@ -777,11 +847,10 @@ class Goods extends Base } } } - # 货币1抵扣 - if ($use_integral_is == 1 && $goodsType['pay_currency'] == 1) { + if ($use_integral_is == 1 && $goods_extend['pay_currency'] == 1) { $price_in_currency = $price * 100; # 1:100比例 - if ($goodsType['is_deduction'] == 1) { + if ($goods_extend['is_deduction'] == 1) { # 抵扣模式 if ($user['integral'] >= $price_in_currency) { $use_integral = $price_in_currency; @@ -803,13 +872,10 @@ class Goods extends Base } } } - - - # 货币2抵扣 - if ($use_money2_is == 1 && $goodsType['pay_currency2'] == 1) { + if ($use_money2_is == 1 && $goods_extend['pay_currency2'] == 1) { $price_in_currency2 = $price * 100; # 1:100比例 - if ($goodsType['is_deduction'] == 1) { + if ($goods_extend['is_deduction'] == 1) { # 抵扣模式 if (isset($user['money2']) && $user['money2'] >= $price_in_currency2) { $use_money2 = $price_in_currency2; @@ -831,7 +897,7 @@ class Goods extends Base } } } - if ($goodsType['is_deduction'] == 0 && $iszhifu == 0 && $goodsType['pay_wechat'] == 0) { + if ($goods_extend['is_deduction'] == 0 && $iszhifu == 0 && $goods_extend['pay_wechat'] == 0) { return $this->renderError('请选择支付方式'); } } @@ -851,7 +917,8 @@ class Goods extends Base 'score' => $user['money2'], 'use_score' => $use_money2, 'coupon_price' => round($coupon_price, 2), - 'coupon_id' => $coupon_id + 'coupon_id' => $coupon_id, + 'goods_extend' => $goods_extend ]; return $this->renderSuccess("请求成功", $data); } @@ -877,17 +944,19 @@ class Goods extends Base $coupon_id = request()->param('coupon_id/d', 0); //优惠券 #盒子信息 - $goods = Goodsmodel::field('title,imgurl_detail,type,price,status,is_shou_zhe,quanju_xiangou,lock_is,choujiang_xianzhi,lock_time,flw_start_time,flw_end_time')->where(['id' => $goods_id]) + $goods = Goodsmodel::field('title,imgurl_detail,type,price,status,is_shou_zhe,quanju_xiangou,lock_is,choujiang_xianzhi,lock_time,flw_start_time,flw_end_time,daily_xiangou')->where(['id' => $goods_id]) ->find(); if (!$goods) { return $this->renderError("盒子不存在"); } # 获取盒子类型配置 - $goodsType = \app\common\model\GoodsType::where('value', $goods['type'])->find(); - if (!$goodsType) { + $goods_type = $goods['type']; + $goods_extend = GoodsExtend::getGoodsExtendByGoodsId($goods_id, $goods_type); + if (!$goods_extend) { return $this->renderError("盒子类型配置不存在"); } + if ($goods['status'] != 1) { return $this->renderError("盒子已下架"); } @@ -921,19 +990,39 @@ class Goods extends Base } } } - if ($goods['quanju_xiangou'] > 0) { - // <= $user_xiangou_count - // return $this->renderError('当前活动限购' . $goods['quanju_xiangou'] . '次'); //限购 - $user_xiangou_count = OrderList::field('id')->where('goods_id', '=', $goods_id) + $user_toDay_count = OrderList::field('id')->where('goods_id', '=', $goods_id) ->where('user_id', '=', $user['id']) - ->where('num', '=', $num) + ->where('parent_goods_list_id', '=', 0) ->count(); - if ($user_xiangou_count >= $goods['quanju_xiangou']) { - return $this->renderError('当前活动限购' . $goods['quanju_xiangou'] . '次'); + //已经达到限购先上限 + if ($goods['quanju_xiangou'] <= $user_toDay_count) { + return $this->renderError('当前限购' . $goods['quanju_xiangou'] . '次'); + } + $now_prize_num = $prize_num + $user_toDay_count; + if ($now_prize_num > $goods['quanju_xiangou']) { + return $this->renderError('购买超出限制,还允许购买' . ($goods['quanju_xiangou'] - $user_toDay_count) . '次'); + } + } + if ($goods['daily_xiangou'] > 0) { + //获取今天凌晨时间 + $todayMidnight = strtotime('today'); + //限购 + $user_toDay_count = OrderList::field('id') + ->where('goods_id', '=', $goods_id) + ->where('user_id', '=', $user['id']) + ->where('parent_goods_list_id', '=', 0) + ->where('addtime', '>=', $todayMidnight) + ->count(); + //已经达到限购先上限 + if ($user_toDay_count >= $goods['daily_xiangou']) { + return $this->renderError('今日限购' . $goods['daily_xiangou'] . '次'); + } + $now_prize_num = $prize_num + $user_toDay_count; + if ($now_prize_num > $goods['daily_xiangou']) { + return $this->renderError('购买超出限制,今日还允许购买' . ($goods['daily_xiangou'] - $user_toDay_count) . '次'); } - } if ($goods['type'] != 15) { @@ -1018,7 +1107,7 @@ class Goods extends Base $coupon_price = 0; # 判断是否可使用优惠券 - if ($shou_zhe_price <= 0 && !empty($coupon_id) && $goodsType['pay_coupon'] == 1) { + if ($shou_zhe_price <= 0 && !empty($coupon_id) && $goods_extend['pay_coupon'] == 1) { # 获取优惠券信息 $coupon = CouponReceiveModel::where([ 'id' => $coupon_id, @@ -1058,8 +1147,8 @@ class Goods extends Base $iszhifu = 0; # 余额抵扣 - if ($use_money_is == 1 && $goodsType['pay_balance'] == 1) { - if ($goodsType['is_deduction'] == 1) { + if ($use_money_is == 1 && $goods_extend['pay_balance'] == 1) { + if ($goods_extend['is_deduction'] == 1) { # 抵扣模式 if ($user['money'] >= $price) { $use_money = $price; @@ -1083,9 +1172,9 @@ class Goods extends Base } # 货币1抵扣 - if ($use_integral_is == 1 && $goodsType['pay_currency'] == 1) { + if ($use_integral_is == 1 && $goods_extend['pay_currency'] == 1) { $price_in_currency = $price * 100; # 1:100比例 - if ($goodsType['is_deduction'] == 1) { + if ($goods_extend['is_deduction'] == 1) { # 抵扣模式 if ($user['integral'] >= $price_in_currency) { $use_integral = $price_in_currency; @@ -1111,9 +1200,9 @@ class Goods extends Base # 货币2抵扣 - if ($use_money2_is == 1 && $goodsType['pay_currency2'] == 1) { + if ($use_money2_is == 1 && $goods_extend['pay_currency2'] == 1) { $price_in_currency2 = $price * 100; # 1:100比例 - if ($goodsType['is_deduction'] == 1) { + if ($goods_extend['is_deduction'] == 1) { # 抵扣模式 if (isset($user['money2']) && $user['money2'] >= $price_in_currency2) { $use_money2 = $price_in_currency2; @@ -1136,7 +1225,7 @@ class Goods extends Base } } - if ($goodsType['is_deduction'] == 0 && $iszhifu == 0 && $goodsType['pay_wechat'] == 0) { + if ($goods_extend['is_deduction'] == 0 && $iszhifu == 0 && $goods_extend['pay_wechat'] == 0) { return $this->renderError('请选择支付方式'); } } @@ -1577,7 +1666,7 @@ class Goods extends Base if (isset($goods['id'])) { unset($goods['id']); } - + $goods['status'] = 2; if ($existingGoods) { // 更新现有商品 $goodsId = $existingGoods->id; @@ -1598,8 +1687,26 @@ class Goods extends Base $goodsId = $goodsModel->id; } - // 处理商品列表数据 + // 创建ID映射表,用于处理子奖品关联 + $idMapping = []; + + // 先处理非子奖品(goods_list_id为0的奖品) + $parentItems = []; + $childItems = []; + + // 将奖品分为父奖品和子奖品 foreach ($goodsListData as $listItem) { + if (empty($listItem['goods_list_id'])) { + $parentItems[] = $listItem; + } else { + $childItems[] = $listItem; + } + } + + // 先处理父奖品 + foreach ($parentItems as $listItem) { + $oldId = $listItem['id']; + // 处理商品列表项 if (isset($listItem['id'])) { unset($listItem['id']); @@ -1610,6 +1717,30 @@ class Goods extends Base // 创建新的商品列表项 $goodsListModel = new GoodsList(); $goodsListModel->save($listItem); + + // 记录ID映射 + $idMapping[$oldId] = $goodsListModel->id; + } + + // 再处理子奖品 + foreach ($childItems as $listItem) { + $originalParentId = $listItem['goods_list_id']; + + // 处理商品列表项 + if (isset($listItem['id'])) { + unset($listItem['id']); + } + + $listItem['goods_id'] = $goodsId; + + // 更新goods_list_id为目标系统中的ID + if (isset($idMapping[$originalParentId])) { + $listItem['goods_list_id'] = $idMapping[$originalParentId]; + } + + // 创建新的商品列表项 + $goodsListModel = new GoodsList(); + $goodsListModel->save($listItem); } // 提交事务 diff --git a/app/api/controller/Index.php b/app/api/controller/Index.php index ec7cf56..4bd09e1 100755 --- a/app/api/controller/Index.php +++ b/app/api/controller/Index.php @@ -16,7 +16,7 @@ use think\facade\Db; use \think\Request; use app\common\model\Order; use app\common\model\ProfitMoney; - +use PhpOffice\PhpSpreadsheet\Chart\Title; class Index extends Base { @@ -86,6 +86,26 @@ class Index extends Base return $this->renderSuccess("请求成功", $content); } + + /** + * 单页 + */ + public function getDanye() + { + $type = \request()->param('type/d', 0); + $info = Danye::where(['id' => $type])->find(); + if ($info) { + $content = contentUrl($info['content']); + } else { + $content = ''; + } + return $this->renderSuccess("请求成功", [ + 'content' => $content, + 'title' => $info['title'] + ]); + } + + /** * 获取轮播图 * @return \think\response\Json @@ -216,48 +236,48 @@ class Index extends Base { // 获取排行榜类型参数 $type = request()->param('type', ''); - + // 验证排行榜类型是否有效 $validTypes = ['diamond', 'integral', 'dadajuan', 'invite']; if (!in_array($type, $validTypes)) { return $this->renderError('无效的排行榜类型'); } - + // 从配置助手获取排行榜时间设置 $timeSettings = \app\common\helper\ConfigHelper::getRankTime($type); $startTime = !empty($timeSettings['start_time']) ? strtotime($timeSettings['start_time']) : 0; $endTime = !empty($timeSettings['end_time']) ? strtotime($timeSettings['end_time']) : time(); - + // 设置分页参数 $page = request()->param('page/d', 1); $limit = request()->param('limit/d', 10); - + // 初始化返回数据 $data = []; - + // 根据不同排行榜类型查询数据 switch ($type) { case 'diamond': // 钻石排行榜 $data = $this->getDiamondRank($startTime, $endTime, $page, $limit); break; - + case 'integral': // UU币排行榜 $data = $this->getIntegralRank($startTime, $endTime, $page, $limit); break; - + case 'dadajuan': // 达达卷排行榜 $data = $this->getDadajuanRank($startTime, $endTime, $page, $limit); break; - + case 'invite': // 邀请新人排行榜 $data = $this->getInviteRank($startTime, $endTime, $page, $limit); break; } - + // 返回数据 return $this->renderSuccess('请求成功', $data); } - + /** * 获取钻石排行榜数据 * @@ -273,11 +293,15 @@ class Index extends Base $where = [ ['status', '=', 1], ['use_money', '>', 0], - ['user_id', 'not in', function ($query) { - $query->name('user')->where('istest', '>', 0)->where('status', '=', 1)->field('id'); - }] + [ + 'user_id', + 'not in', + function ($query) { + $query->name('user')->where('istest', '>', 0)->where('status', '=', 1)->field('id'); + } + ] ]; - + // 添加时间范围条件 if ($startTime > 0) { $where[] = ['pay_time', '>=', $startTime]; @@ -285,7 +309,7 @@ class Index extends Base if ($endTime > 0) { $where[] = ['pay_time', '<=', $endTime]; } - + // 查询数据 $list = Order::where($where) ->field('user_id, sum(use_money) as use_money') @@ -294,7 +318,7 @@ class Index extends Base ->page($page, $limit) ->select() ->toArray(); - + // 处理用户信息 $rankList = []; foreach ($list as $index => $item) { @@ -310,10 +334,10 @@ class Index extends Base ]; } } - + return $rankList; } - + /** * 获取UU币排行榜数据 * @@ -329,11 +353,15 @@ class Index extends Base $where = [ ['status', '=', 1], ['use_integral', '>', 0], - ['user_id', 'not in', function ($query) { - $query->name('user')->where('istest', '>', 0)->where('status', '=', 1)->field('id'); - }] + [ + 'user_id', + 'not in', + function ($query) { + $query->name('user')->where('istest', '>', 0)->where('status', '=', 1)->field('id'); + } + ] ]; - + // 添加时间范围条件 if ($startTime > 0) { $where[] = ['pay_time', '>=', $startTime]; @@ -341,7 +369,7 @@ class Index extends Base if ($endTime > 0) { $where[] = ['pay_time', '<=', $endTime]; } - + // 查询数据 $list = Order::where($where) ->field('user_id, sum(use_integral) as use_money') @@ -350,7 +378,7 @@ class Index extends Base ->page($page, $limit) ->select() ->toArray(); - + // 处理用户信息 $rankList = []; foreach ($list as $index => $item) { @@ -366,10 +394,10 @@ class Index extends Base ]; } } - + return $rankList; } - + /** * 获取达达卷排行榜数据 * @@ -385,11 +413,15 @@ class Index extends Base $where = [ ['status', '=', 1], ['use_money2', '>', 0], - ['user_id', 'not in', function ($query) { - $query->name('user')->where('istest', '>', 0)->where('status', '=', 1)->field('id'); - }] + [ + 'user_id', + 'not in', + function ($query) { + $query->name('user')->where('istest', '>', 0)->where('status', '=', 1)->field('id'); + } + ] ]; - + // 添加时间范围条件 if ($startTime > 0) { $where[] = ['pay_time', '>=', $startTime]; @@ -397,7 +429,7 @@ class Index extends Base if ($endTime > 0) { $where[] = ['pay_time', '<=', $endTime]; } - + // 查询数据 $list = Order::where($where) ->field('user_id, sum(use_money2) as use_money') @@ -406,7 +438,7 @@ class Index extends Base ->page($page, $limit) ->select() ->toArray(); - + // 处理用户信息 $rankList = []; foreach ($list as $index => $item) { @@ -422,10 +454,10 @@ class Index extends Base ]; } } - + return $rankList; } - + /** * 获取邀请新人排行榜数据 * @@ -443,7 +475,7 @@ class Index extends Base ['istest', '=', 0], // 排除测试用户 ['status', '=', 1] // 只查询状态正常的用户 ]; - + // 添加时间范围条件 if ($startTime > 0) { $where[] = ['addtime', '>=', $startTime]; @@ -451,7 +483,7 @@ class Index extends Base if ($endTime > 0) { $where[] = ['addtime', '<=', $endTime]; } - + // 查询数据 $list = User::where($where) ->field('pid, COUNT(1) as invite_count') @@ -461,7 +493,7 @@ class Index extends Base ->page($page, $limit) ->select() ->toArray(); - + // 处理用户信息 $rankList = []; foreach ($list as $index => $item) { @@ -477,7 +509,7 @@ class Index extends Base ]; } } - + return $rankList; } diff --git a/app/api/controller/Infinite.php b/app/api/controller/Infinite.php index 5e9eb42..25157be 100755 --- a/app/api/controller/Infinite.php +++ b/app/api/controller/Infinite.php @@ -17,8 +17,12 @@ use app\common\model\UserVip; use app\common\model\UserCoupon; use think\facade\Db; use app\common\model\CouponReceive as CouponReceiveModel; +use app\common\model\GoodsExtend; use \think\Request; +/** + * 无限赏 + */ class Infinite extends Base { static $shang_prize_id = [34, 38];#抽奖赏品id @@ -39,6 +43,7 @@ class Infinite extends Base if ($goods['status'] != 1) { return $this->renderError("盒子已下架"); } + $goods['addtime'] = date('Y-m-d H:i:s', $goods['addtime']); $goods['imgurl_detail'] = imageUrl($goods['imgurl_detail']); @@ -125,7 +130,7 @@ class Infinite extends Base $value['shang_color'] = $value['shang_info']['color']; unset($value['shang_info']); } - $goods_list = GoodsList::field('goods_id,shang_id,title,imgurl,price,real_pro,sc_money,goods_type,sale_time,doubling') + $goods_list = GoodsList::field('id,goods_id,shang_id,title,imgurl,price,real_pro,sc_money,goods_type,sale_time,doubling') ->append(['shang_info', 'goods_list']) ->withAttr('imgurl', function ($value, $data) { return imageUrl($value); @@ -152,6 +157,8 @@ class Infinite extends Base $type1 = 14; } elseif ($goods['type'] == 16) { $type1 = 21; + } elseif ($goods['type'] == 17) { + $type1 = 8; } $new_data = [ @@ -329,6 +336,42 @@ class Infinite extends Base return $this->renderSuccess("请求成功", $new_data); } + /** + * 盒子抽奖记录 + * @param \think\Request $request + * @return \think\response\Json + */ + public function infinite_prizerecords(Request $request) + { + $goods_id = request()->param('goods_id/d', 0); + $user_id = $this->getUserId(); + // #盒子信息 + // $goods = Goodsmodel::field('id,stock,status,type') + // ->where(['id' => $goods_id]) + // ->find(); + // if (!$goods) { + // return $this->renderError("盒子不存在"); + // } + // if ($goods['status'] != 1) { + // return $this->renderError("盒子已下架"); + // } + #中奖记录分类 + $where = []; + $where[] = ['goods_id', '=', $goods_id]; + $where[] = ['num', '=', 0]; + $where[] = ['user_id', '=', $user_id]; + $data = OrderList::field('user_id,goodslist_title,goodslist_imgurl,addtime') + ->where($where) + ->where('source', '=', 1) + ->order('id desc') + ->paginate(100)->each(function ($item) { + $item['addtime'] = date('Y-m-d H:i:s', $item['addtime']); + $item['goodslist_imgurl'] = imageUrl($item['goodslist_imgurl']); + return $item; + }); + return $this->renderSuccess("请求成功", $data); + } + /** * 下单计算金额 */ @@ -343,21 +386,67 @@ class Infinite extends Base $coupon_id = request()->param('coupon_id/d'); //优惠券 #盒子信息 - $goods = Goodsmodel::field('title,imgurl_detail,type,price,status,is_shou_zhe')->where(['id' => $goods_id]) + $goods = Goodsmodel::field('id,title,imgurl_detail,type,price,status,is_shou_zhe,quanju_xiangou,daily_xiangou,choujiang_xianzhi')->where(['id' => $goods_id]) ->find(); if (!$goods) { return $this->renderError("盒子不存在"); } - - # 获取盒子类型配置 - $goodsType = \app\common\model\GoodsType::where('value', $goods['type'])->find(); - if (!$goodsType) { - return $this->renderError("盒子类型配置不存在"); - } - if ($goods['status'] != 1) { return $this->renderError("盒子已下架"); } + $goods_type = $goods['type']; + $goods_extend = GoodsExtend::getGoodsExtendByGoodsId($goods_id, $goods_type); + if (!$goods_extend) { + return $this->renderError("盒子类型配置不存在"); + } + if ($goods['quanju_xiangou'] > 0) { + //限购 + $user_quanju_count = OrderList::field('id')->where('goods_id', '=', $goods_id) + ->where('user_id', '=', $user['id']) + ->where('parent_goods_list_id', '=', 0) + ->count(); + //已经达到限购先上限 + if ($user_quanju_count >= $goods['quanju_xiangou']) { + return $this->renderError('当前限购' . $goods['quanju_xiangou'] . '次'); + } + $now_prize_num = $prize_num + $user_quanju_count; + if ($now_prize_num > $goods['quanju_xiangou']) { + return $this->renderError('购买超出限制,还允许购买' . ($goods['quanju_xiangou'] - $user_quanju_count) . '次'); + } + + } + if ($goods['daily_xiangou'] > 0) { + //获取今天凌晨时间 + $todayMidnight = strtotime('today'); + //限购 + $user_toDay_count = OrderList::field('id') + ->where('goods_id', '=', $goods_id) + ->where('user_id', '=', $user['id']) + ->where('parent_goods_list_id', '=', 0) + ->where('addtime', '>=', $todayMidnight) + ->count(); + //已经达到限购先上限 + if ($user_toDay_count >= $goods['daily_xiangou']) { + return $this->renderError('今日限购' . $goods['daily_xiangou'] . '次'); + } + $now_prize_num = $prize_num + $user_toDay_count; + if ($now_prize_num > $goods['daily_xiangou']) { + return $this->renderError('购买超出限制,今日还允许购买' . ($goods['daily_xiangou'] - $user_toDay_count) . '次'); + } + } + $user_id = $user['id']; + $choujiang_xianzhi = $goods['choujiang_xianzhi']; + if ($choujiang_xianzhi && $choujiang_xianzhi > 0) { + $user_price = order::where('user_id', '=', $user_id)->where('status', '=', 1)->sum('price'); + if ($user_price < $choujiang_xianzhi) { + if ($user['istest'] > 0) { + $user_price = order::where('user_id', '=', $user_id)->where('status', '=', 1)->sum('order_zhe_total'); + } + if ($user_price < $choujiang_xianzhi) { + return $this->renderError("消费满" . $choujiang_xianzhi . "元可参与 已消费" . round($user_price, 2) . "元"); + } + } + } $goods['imgurl_detail'] = imageUrl($goods['imgurl_detail']); if ($goods['type'] == 9) { //连击赏 @@ -375,7 +464,7 @@ class Infinite extends Base $box_price = $goods['price']; //是否首抽五折 $shou_zhe_price = 0; - $goods_type = $goods['type']; + if ($goods['type'] != 5 && $goods_type != 10) { $is_chou = Order::field('id')->where([['user_id', '=', $user['id']], ['status', '=', 1]])->find(); $is_chou2 = Order::field('id')->where([['is_shou_zhe', '=', 1], ['status', '=', 1], ['user_id', '=', $user['id']]])->find(); @@ -390,16 +479,16 @@ class Infinite extends Base $order_total = $order_zhe_total = $price; # 初始化变量 + $coupon_id = 0; $use_money = 0; # 余额抵扣 $use_integral = 0; # 货币1抵扣 $use_money2 = 0; # 货币2抵扣 $zhe = 0; # 会员折扣 $coupon_price = 0; # 优惠券金额 - #首抽半价 if ($shou_zhe_price <= 0) { # 判断是否可使用优惠券 - if (!empty($coupon_id) && $goodsType['pay_coupon'] == 1) { + if (!empty($coupon_id) && $goods_extend['pay_coupon'] == 1) { # 获取优惠券信息 $coupon = CouponReceiveModel::where([ 'id' => $coupon_id, @@ -425,19 +514,10 @@ class Infinite extends Base } $order_zhe_total = $price; - # 会员折扣 - $vip_info = UserVip::where(['id' => $user['vip']])->find(); - if ($vip_info && $vip_info['discount'] > 0 && $goods['type'] != 10) { - $zhe = $vip_info['discount']; - $zhe_bl = bcdiv("$zhe", "10", 2); - $order_zhe_total = $price = bcmul("$price", "$zhe_bl", 2); - } - $iszhifu = 0; - # 余额抵扣 - if ($use_money_is == 1 && $goodsType['pay_balance'] == 1) { - if ($goodsType['is_deduction'] == 1) { + if ($use_money_is == 1 && $goods_extend['pay_balance'] == 1) { + if ($goods_extend['is_deduction'] == 1) { # 抵扣模式 if ($user['money'] >= $price) { $use_money = $price; @@ -460,10 +540,10 @@ class Infinite extends Base } } - # 货币1抵扣(吧唧币) - if ($use_integral_is == 1 && $goodsType['pay_currency'] == 1 && $goods_type != 10) { + # 货币1抵扣 + if ($use_integral_is == 1 && $goods_extend['pay_currency'] == 1) { $price_in_currency = $price * 100; # 1:100比例 - if ($goodsType['is_deduction'] == 1) { + if ($goods_extend['is_deduction'] == 1) { # 抵扣模式 if ($user['integral'] >= $price_in_currency) { $use_integral = $price_in_currency; @@ -489,9 +569,9 @@ class Infinite extends Base # 货币2抵扣 - if ($use_money2_is == 1 && $goodsType['pay_currency2'] == 1) { + if ($use_money2_is == 1 && $goods_extend['pay_currency2'] == 1) { $price_in_currency2 = $price * 100; # 1:100比例 - if ($goodsType['is_deduction'] == 1) { + if ($goods_extend['is_deduction'] == 1) { # 抵扣模式 if (isset($user['money2']) && $user['money2'] >= $price_in_currency2) { $use_money2 = $price_in_currency2; @@ -514,29 +594,11 @@ class Infinite extends Base } } - if ($goodsType['is_deduction'] == 0 && $iszhifu == 0 && $goodsType['pay_wechat'] == 0) { + if ($goods_extend['is_deduction'] == 0 && $iszhifu == 0 && $goods_extend['pay_wechat'] == 0) { return $this->renderError('请选择支付方式'); } - } else { - $coupon_id = 0; - $coupon_price = 0; - $use_integral = 0; - $use_money = 0; - $use_money2 = 0; - $zhe = 0; } - #一发 - $goods['price_one'] = (bcmul("{$goods['price']}", "1", 2)) * 1; - #三发 - $goods['price_three'] = (bcmul("{$goods['price']}", "3", 2)) * 1; - #五连发 - $goods['price_five'] = (bcmul("{$goods['price']}", "5", 2)) * 1; - #十连发 - $goods['price_ten'] = (bcmul("{$goods['price']}", "10", 2)) * 1; - #五十发 - $goods['price_five_ten'] = (bcmul("{$goods['price']}", "50", 2)) * 1; - #抽奖数量 $goods['prize_num'] = $prize_num; $data = [ @@ -554,6 +616,7 @@ class Infinite extends Base 'use_score' => $use_money2, 'coupon_id' => $coupon_id, 'coupon_price' => round($coupon_price, 2), + 'goods_extend' => $goods_extend ]; return $this->renderSuccess("请求成功", $data); } @@ -578,15 +641,16 @@ class Infinite extends Base $is_mibao = request()->param('is_mibao/d', 0); //连击赏下 是否是抽的秘宝池 1是 0否 #盒子信息 - $goods = Goodsmodel::field('id,title,imgurl_detail,type,price,status,is_shou_zhe,choujiang_xianzhi')->where(['id' => $goods_id]) + $goods = Goodsmodel::field('id,title,imgurl_detail,type,price,status,is_shou_zhe,choujiang_xianzhi,quanju_xiangou,daily_xiangou')->where(['id' => $goods_id]) ->find(); if (!$goods) { return $this->renderError("盒子不存在"); } # 获取盒子类型配置 - $goodsType = \app\common\model\GoodsType::where('value', $goods['type'])->find(); - if (!$goodsType) { + $goods_type = $goods['type']; + $goods_extend = GoodsExtend::getGoodsExtendByGoodsId($goods_id, $goods_type); + if (!$goods_extend) { return $this->renderError("盒子类型配置不存在"); } @@ -594,22 +658,62 @@ class Infinite extends Base return $this->renderError("盒子已下架"); } - if (!in_array($goods['type'], [2, 8, 9, 10,16])) { + if (!in_array($goods['type'], [2, 8, 9, 10, 16, 17])) { return $this->renderError("非法请求"); } - $user_id = $this->getuserid(); + + if ($goods['quanju_xiangou'] > 0) { + //限购 + $user_toDay_count = OrderList::field('id')->where('goods_id', '=', $goods_id) + ->where('user_id', '=', $user['id']) + ->where('parent_goods_list_id', '=', 0) + ->count(); + //已经达到限购先上限 + if ($goods['quanju_xiangou'] <= $user_toDay_count) { + return $this->renderError('当前限购' . $goods['quanju_xiangou'] . '次'); + } + $now_prize_num = $prize_num + $user_toDay_count; + if ($now_prize_num > $goods['quanju_xiangou']) { + return $this->renderError('购买超出限制,还允许购买' . ($goods['quanju_xiangou'] - $user_toDay_count) . '次'); + } + } + if ($goods['daily_xiangou'] > 0) { + //获取今天凌晨时间 + $todayMidnight = strtotime('today'); + //限购 + $user_toDay_count = OrderList::field('id') + ->where('goods_id', '=', $goods_id) + ->where('user_id', '=', $user['id']) + ->where('parent_goods_list_id', '=', 0) + ->where('addtime', '>=', $todayMidnight) + ->count(); + //已经达到限购先上限 + if ($user_toDay_count >= $goods['daily_xiangou']) { + return $this->renderError('今日限购' . $goods['daily_xiangou'] . '次'); + } + $now_prize_num = $prize_num + $user_toDay_count; + if ($now_prize_num > $goods['daily_xiangou']) { + return $this->renderError('购买超出限制,今日还允许购买' . ($goods['daily_xiangou'] - $user_toDay_count) . '次'); + } + } + + $user_id = $user['id']; $choujiang_xianzhi = $goods['choujiang_xianzhi']; if ($choujiang_xianzhi && $choujiang_xianzhi > 0) { - // SELECT sum(price) FROM xinglanmh_shequt_test.`order` where user_id=4445 and status=1 $user_price = order::where('user_id', '=', $user_id)->where('status', '=', 1)->sum('price'); if ($user_price < $choujiang_xianzhi) { - return $this->renderError("消费满" . $choujiang_xianzhi . "元可参与 已消费" . round($user_price, 2) . "元"); + if ($user['istest'] > 0) { + $user_price = order::where('user_id', '=', $user_id)->where('status', '=', 1)->sum('order_zhe_total'); + } + if ($user_price < $choujiang_xianzhi) { + return $this->renderError("消费满" . $choujiang_xianzhi . "元可参与 已消费" . round($user_price, 2) . "元"); + } } } $where = []; $where[] = ['goods_id', '=', $goods_id]; - $x = $goods['type']; - if ($goods['type'] == 10) { + + if ($goods_type == 10) { $where[] = ['shang_id', 'between', [10, 33]]; $where[] = ['num', '=', 1]; } else { @@ -666,6 +770,7 @@ class Infinite extends Base $order_total = $order_zhe_total = $price; # 初始化变量 + $coupon_id = 0; $use_money = 0; # 余额抵扣 $use_integral = 0; # 货币1抵扣 $use_money2 = 0; # 货币2抵扣 @@ -673,17 +778,9 @@ class Infinite extends Base $coupon_price = 0; # 优惠券金额 #使用折扣 - if ($is_shou_zhe == 1) { - $coupon_id = 0; - $coupon_price = 0; - $use_integral = 0; - $use_money = 0; - $use_money2 = 0; - #折扣 - $zhe = 0; - } else { + if ($is_shou_zhe <= 0) { # 判断是否可使用优惠券 - if (!empty($coupon_id) && $goodsType['pay_coupon'] == 1) { + if (!empty($coupon_id) && $goods_extend['pay_coupon'] == 1) { # 获取优惠券信息 $coupon = CouponReceiveModel::where([ 'id' => $coupon_id, @@ -708,21 +805,11 @@ class Infinite extends Base $price = 0; } $order_zhe_total = $price; - - #折扣 - $zhe = 0; - $vip_info = UserVip::where(['id' => $user['vip']])->find(); - if ($vip_info && $vip_info['discount'] > 0 && $goods['type'] != 10) { - $zhe = $vip_info['discount']; - $zhe_bl = bcdiv("$zhe", "10", 2); - $order_zhe_total = $price = bcmul("$price", "$zhe_bl", 2); - } - $iszhifu = 0; # 余额抵扣 - if ($use_money_is == 1 && $goodsType['pay_balance'] == 1) { - if ($goodsType['is_deduction'] == 1) { + if ($use_money_is == 1 && $goods_extend['pay_balance'] == 1) { + if ($goods_extend['is_deduction'] == 1) { # 抵扣模式 if ($user['money'] >= $price) { $use_money = $price; @@ -744,11 +831,10 @@ class Infinite extends Base } } } - - # 货币1抵扣(吧唧币) - if ($use_integral_is == 1 && $goodsType['pay_currency'] == 1 && $goods['type'] != 10) { + # 货币1抵扣 + if ($use_integral_is == 1 && $goods_extend['pay_currency'] == 1) { $price_in_currency = $price * 100; # 1:100比例 - if ($goodsType['is_deduction'] == 1) { + if ($goods_extend['is_deduction'] == 1) { # 抵扣模式 if ($user['integral'] >= $price_in_currency) { $use_integral = $price_in_currency; @@ -770,13 +856,10 @@ class Infinite extends Base } } } - - - # 货币2抵扣 - if ($use_money2_is == 1 && $goodsType['pay_currency2'] == 1) { + if ($use_money2_is == 1 && $goods_extend['pay_currency2'] == 1) { $price_in_currency2 = $price * 100; # 1:100比例 - if ($goodsType['is_deduction'] == 1) { + if ($goods_extend['is_deduction'] == 1) { # 抵扣模式 if (isset($user['money2']) && $user['money2'] >= $price_in_currency2) { $use_money2 = $price_in_currency2; @@ -799,7 +882,7 @@ class Infinite extends Base } } - if ($goodsType['is_deduction'] == 0 && $iszhifu == 0 && $goodsType['pay_wechat'] == 0) { + if ($goods_extend['is_deduction'] == 0 && $iszhifu == 0 && $goods_extend['pay_wechat'] == 0) { return $this->renderError('请选择支付方式'); } } @@ -817,6 +900,19 @@ class Infinite extends Base if ($goods['type'] == 10) { $num = 1; } + if ($goods['daily_xiangou'] > 0) { + // 查看一天内有没有未支付的订单,未支付的订单要先作废 + $order_info = Order::where('goods_id', '=', $goods_id) + ->where('user_id', '=', $user['id']) + ->where('num', '=', $num) + ->where('status', '=', 0) + ->where('addtime', '>=', time() - 86400) + ->find(); + if ($order_info) { + $order_info->status = 2; + $order_info->save(); + } + } $res = []; $order_num = create_order_no('MH_', 'order', 'order_num'); #创建订单 diff --git a/app/api/controller/Notify.php b/app/api/controller/Notify.php index 9ef90b1..f43946a 100755 --- a/app/api/controller/Notify.php +++ b/app/api/controller/Notify.php @@ -22,8 +22,9 @@ use app\common\model\UserRecharge; use app\common\model\Ads; use think\facade\Db; use app\common\model\CouponReceive as CouponReceiveModel; -use app\common\model\GoodsExtendList as GoodsExtendListModel; + use app\common\helper\ConfigHelper; +use app\common\service\RewardService; /** * Class Notify 同步处理 * @package app\index\controller @@ -632,44 +633,44 @@ class Notify extends Base protected function ordinary_prize_notice_box($ordinary_prize, $prize_num, $order_id, $user_id, $goods_id, $order_type, $num) { $res = []; - - + + try { // 过滤掉库存为0的奖品 - $valid_prizes = array_filter($ordinary_prize, function($item) { + $valid_prizes = array_filter($ordinary_prize, function ($item) { return $item['surplus_stock'] > 0; }); - + if (empty($valid_prizes)) { return [0]; // 没有有效奖品 } - + // 创建权重数组用于加权随机 $weights = []; foreach ($valid_prizes as $index => $prize) { $weights[$index] = $prize['surplus_stock']; } - + // 开普通奖品 for ($i = 0; $i < $prize_num; $i++) { // 检查是否还有可抽奖品 if (empty($weights) || array_sum($weights) <= 0) { break; } - + // 使用加权随机算法选择奖品 $selected_index = $this->weightedRandom($weights); $ordinary_prize_info = $valid_prizes[$selected_index]; - + // 减少权重以反映库存变化 $weights[$selected_index]--; - + // 如果权重为0,则从数组中移除 if ($weights[$selected_index] <= 0) { unset($weights[$selected_index]); unset($valid_prizes[$selected_index]); } - + $order_goods_info = [ 'order_id' => $order_id, 'user_id' => $user_id, @@ -690,36 +691,41 @@ class Notify extends Base 'parent_goods_list_id' => $ordinary_prize_info['goods_list_id'], 'source' => 1, // 标记来源为抽奖 ]; - + // 插入订单商品记录 $res[] = OrderList::insert($order_goods_info); - + // 减少库存 $res[] = GoodsList::where(['id' => $ordinary_prize_info['id']]) ->dec('surplus_stock') ->update(); - + // 赠送货币 if (isset($ordinary_prize_info['doubling']) && $ordinary_prize_info['doubling'] > 1) { $bei = $ordinary_prize_info['doubling'] - 1; $change_money = $ordinary_prize_info['money'] * $bei * 100; $res[] = User::changeIntegral($user_id, $change_money, 6, '抽中翻倍赏-' . $ordinary_prize_info['title'] . '赠送'); } - + if (isset($ordinary_prize_info['reward_id']) && $ordinary_prize_info['reward_id'] != '') { + RewardService::sendReward($user_id, $ordinary_prize_info['reward_id'], '抽中' . $ordinary_prize_info['title']); + } + // RewardService::sendReward($user['user_id'], $prize['reward_id'], $goods_title . '开奖'); + + // 处理宝箱奖品 if ($ordinary_prize_info['goods_type'] == 4) { // 查找宝箱奖品 $goodslist_1 = GoodsList::where(['goods_id' => $goods_id]) ->where('goods_list_id', '=', $ordinary_prize_info['id']) ->select()->toArray(); - + if (!empty($goodslist_1)) { $box_res = $this->ordinary_prize_notice_box($goodslist_1, 1, $order_id, $user_id, $goods_id, $order_type, $num); $res = array_merge($res, $box_res); } } } - + return $res; } catch (\Exception $e) { // 记录错误日志 @@ -728,7 +734,7 @@ class Notify extends Base throw $e; } } - + /** * 加权随机算法 * @param array $weights 权重数组 @@ -738,14 +744,14 @@ class Notify extends Base { $sum = array_sum($weights); $rand = mt_rand(1, $sum); - + foreach ($weights as $index => $weight) { $rand -= $weight; if ($rand <= 0) { return $index; } } - + return array_key_first($weights); // 防止浮点数精度问题导致无法选中 } @@ -925,7 +931,9 @@ class Notify extends Base ->where(['id' => $ordinary_prize_info['id']]) ->dec('surplus_stock') ->update(); - + if (isset($ordinary_prize_info['reward_id']) && $ordinary_prize_info['reward_id'] != '') { + RewardService::sendReward($user_id, $ordinary_prize_info['reward_id'], '抽中' . $ordinary_prize_info['title']); + } # 宝箱处理 if ($ordinary_prize_info['goods_type'] == 4) { # 查找宝箱奖品 @@ -985,7 +993,10 @@ class Notify extends Base ->where(['id' => $ordinary_prize_info['id']]) ->dec('surplus_stock') ->update(); - + ## 判断是否有奖励 + if (isset($ordinary_prize_info['reward_id']) && $ordinary_prize_info['reward_id'] != '') { + RewardService::sendReward($user_id, $ordinary_prize_info['reward_id'], '抽中' . $ordinary_prize_info['title']); + } # 宝箱处理 if ($ordinary_prize_info['goods_type'] == 4) { # 查找宝箱奖品 @@ -1069,6 +1080,9 @@ class Notify extends Base #开奖================================================== if ($order['order_type'] == 10) { $res[] = $this->infinite_shangchengshang($order); + } + if ($order['order_type'] == 17) { + $res[] = $this->infinite_drawprize_tesu($order); } else { $res[] = $this->infinite_drawprize($order); } @@ -1091,6 +1105,151 @@ class Notify extends Base } + /** + * 无限赏开奖逻辑 + * @param $order 订单信息 + */ + protected function infinite_drawprize_tesu($order = []) + { + $user_id = $order['user_id'];#用户ID + $order_id = $order['id'];#订单ID + $goods_id = $order['goods_id'];#盒子ID + $prize_num = $order['prize_num'];#抽奖数量 + $order_type = $order['order_type'];#订单类型 + $whe = []; + $whe[] = ['id', '=', $order['goods_id']]; + $infinite_goods = Goods::getInfo($whe, 'type'); + + $where = []; + $where[] = ['goods_id', '=', $goods_id]; + $where[] = ['num', '=', 0]; + $where[] = ['real_pro', '>', 0]; + //普通 + $where[] = ['lian_ji_type', '=', 0]; + $where[] = ['goods_list_id', '=', 0]; + #查找奖品 + $goodslist = GoodsList::field('id,shang_id,real_pro,stock') + ->where($where) + ->select()->toArray(); + if ($goodslist) { + $res[] = $this->infinite_drawprize_tesu_box($goodslist, $prize_num, $order_id, $user_id, $goods_id, $order_type); + } else { + $res[] = 0; + } + return $res; + + } + + /** + * 抽出奖品 + * @param $order 订单信息 + */ + protected function infinite_drawprize_tesu_box($goodslist, $prize_num, $order_id, $user_id, $goods_id, $order_type) + { + + // 计算总概率 + $totalProbability = array_sum(array_column($goodslist, 'real_pro')); + //获取今天凌晨时间 + $todayMidnight = strtotime('today'); + // 构建概率区间 + $probabilityRanges = []; + $currentRange = 0; + foreach ($goodslist as $good) { + + 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; + } + $rangeStart = $currentRange; + $currentRange += $good['real_pro']; + $probabilityRanges[] = [ + 'id' => $good['id'], + 'start' => $rangeStart, + 'end' => $currentRange + ]; + } + $multiple = ConfigHelper::getInfiniteMultiple(); + for ($i = 0; $i < $prize_num; $i++) { + // 生成随机数 (保持与原始方法相同的精度:100000) + + $maxRand = (int) ($totalProbability * $multiple); + $random = mt_rand(0, $maxRand) / $multiple; + + // 查找中奖奖品 + $prize_id = null; + foreach ($probabilityRanges as $range) { + if ($random >= $range['start'] && $random < $range['end']) { + $prize_id = $range['id']; + break; + } + } + + // 获取奖品信息 + $prize_info = GoodsList::where(['id' => $prize_id])->find(); + + #编号 + $luck_no = OrderList::field('id') + ->where('goods_id', '=', $goods_id) + ->where('num', '=', 0) + ->where('order_type', '=', $order_type) + ->order('id desc') + ->value('luck_no'); + $luck_no++; + + #新增记录 + $save_prize_info = [ + 'order_id' => $order_id, + 'user_id' => $user_id, + 'status' => 0,#0未操作 1选择兑换 2选择发货 + 'goods_id' => $goods_id, + 'num' => 0, + 'doubling' => $prize_info['doubling'], + 'shang_id' => $prize_info['shang_id'], + 'goodslist_id' => $prize_info['id'], + 'goodslist_title' => $prize_info['title'], + 'goodslist_imgurl' => $prize_info['imgurl'], + 'goodslist_price' => $prize_info['price'], + 'goodslist_money' => $prize_info['money'], + 'goodslist_type' => $prize_info['goods_type'], + 'goodslist_sale_time' => $prize_info['sale_time'], + 'addtime' => time(), + 'prize_code' => $prize_info['prize_code'], + 'order_type' => $order_type, + 'luck_no' => $luck_no, + 'parent_goods_list_id' => $prize_info['goods_list_id'], + ]; + + #入库=== + $res[] = OrderList::insert($save_prize_info); + # 赠送货币 + if ($prize_info['doubling'] > 1) { + $bei = $prize_info['doubling'] - 1; + $change_money = $prize_info['money'] * $bei * 100; + $res[] = User::changeIntegral($user_id, $change_money, 6, '抽中翻倍赏-' . $prize_info['title'] . '赠送'); + } + if (isset($prize_info['reward_id']) && $prize_info['reward_id'] != '') { + RewardService::sendReward($user_id, $prize_info['reward_id'], '抽中' . $prize_info['title']); + } + # 宝箱 + if ($prize_info['goods_type'] == 4) { + # 查找宝箱奖品 + $goodslist_1 = GoodsList::where(['goods_id' => $goods_id]) + ->where('goods_list_id', '=', $prize_info['id']) + ->select()->toArray(); + // $res[] = $this->infinite_drawprize_box($order); + $res[] = $this->infinite_drawprize_tesu_box($goodslist_1, 1, $order_id, $user_id, $goods_id, $order_type); + } + } + return $res; + } /** @@ -1232,6 +1391,9 @@ class Notify extends Base $change_money = $prize_info['money'] * $bei * 100; $res[] = User::changeIntegral($user_id, $change_money, 6, '抽中翻倍赏-' . $prize_info['title'] . '赠送'); } + if (isset($prize_info['reward_id']) && $prize_info['reward_id'] != '') { + RewardService::sendReward($user_id, $prize_info['reward_id'], '抽中' . $prize_info['title']); + } # 宝箱 if ($prize_info['goods_type'] == 4) { # 查找宝箱奖品 diff --git a/app/api/controller/Sign.php b/app/api/controller/Sign.php old mode 100644 new mode 100755 diff --git a/app/api/controller/WelfareHouse.php b/app/api/controller/WelfareHouse.php old mode 100644 new mode 100755 diff --git a/app/api/middleware/DomainBind.php b/app/api/middleware/DomainBind.php old mode 100644 new mode 100755 index ff120d3..034e61b --- a/app/api/middleware/DomainBind.php +++ b/app/api/middleware/DomainBind.php @@ -43,11 +43,11 @@ class DomainBind if (!$this->checkDomain($domain)) { // 记录被拒绝的请求 \think\facade\Log::warning('域名访问被拒绝: ' . $domain . ', 路径: ' . $path); - return $this->error('域名未授权,无法访问', 403); + return $this->error('未授权,无法访问', 403); } // 域名允许,记录请求信息(可选,仅用于调试) - \think\facade\Log::info('域名访问通过: ' . $domain . ', 路径: ' . $path); + // \think\facade\Log::info('域名访问通过: ' . $domain . ', 路径: ' . $path); // 域名允许,继续处理请求 return $next($request); diff --git a/app/api/route/app.php b/app/api/route/app.php index c5f4013..3a656f9 100755 --- a/app/api/route/app.php +++ b/app/api/route/app.php @@ -39,7 +39,7 @@ Route::any('user_yaoqing', 'Index/get_user_yaoqing'); Route::any('yushourili', 'Index/yushourili'); Route::any('danye', 'Index/danye'); - +Route::any('getDanye', 'Index/getDanye'); #============================ #User.php个人中心 @@ -92,6 +92,7 @@ Route::any('ordermoney', 'Goods/ordermoney'); Route::any('orderbuy', 'Goods/orderbuy'); Route::any('prizeorderlog', 'Goods/prizeorderlog'); Route::any('luck_draw_log', 'Goods/luck_draw_log'); +Route::any('getGoodExtend', 'Goods/getGoodExtend'); //首页弹出优惠券 Route::any('coupon', 'Coupon/index'); @@ -113,6 +114,7 @@ Route::any('infinite_give_goods', 'Infinite/infinite_give_goods'); Route::any('item_card_chou', 'Infinite/item_card_chou'); Route::any('do_draw', 'Infinite/do_draw'); #抽奖券抽奖 Route::any('ling_zhu_king', 'Infinite/ling_zhu_king'); #领主 +Route::any('infinite_prizerecords', 'Infinite/infinite_prizerecords'); #中奖记录 #============================ @@ -165,7 +167,7 @@ Route::any('mall_ordermoney', 'Mall/mall_ordermoney'); Route::any('mall_orderbuy', 'Mall/mall_orderbuy'); // 添加API路由 -Route::rule('goods/receive_sync', 'Goods/receive_sync', 'POST'); +Route::rule('goods_receive_sync', 'Goods/receive_sync', 'POST'); // 配置信息接口 Route::rule('config', 'Config/index', 'GET'); diff --git a/app/command/AutoGoodsOffshelf.php b/app/command/AutoGoodsOffshelf.php old mode 100644 new mode 100755 diff --git a/app/command/CreateOffshelfLogTable.php b/app/command/CreateOffshelfLogTable.php old mode 100644 new mode 100755 diff --git a/app/command/FlwOpen.php b/app/command/FlwOpen.php index 4946070..a74b871 100755 --- a/app/command/FlwOpen.php +++ b/app/command/FlwOpen.php @@ -17,7 +17,6 @@ use app\common\model\UserLevelCoupon; use app\common\model\UserRecharge; use app\common\model\Ads; use app\common\model\CouponReceive as CouponReceiveModel; -use app\common\model\GoodsExtendList as GoodsExtendListModel; use think\facade\Log; use app\common\model\GoodsList; use app\common\model\Order; @@ -75,10 +74,7 @@ class FlwOpen extends Command { $res = []; - $num = 0; #第几箱 - - print_r('$goods_id' . $goods_id); //获取所有的奖品 $goods_list = GoodsList::where('goods_id', '=', $goods_id) @@ -105,7 +101,7 @@ class FlwOpen extends Command ->toArray(); // 如果没有参与用户,直接返回 if (empty($all_order_list)) { - Goods::where(['id' => $goods_id])->update(['is_open' => 1]); + Goods::where(['id' => $goods_id])->update(['is_open' => 1, 'status' => 3]); return $res; } @@ -191,8 +187,10 @@ class FlwOpen extends Command // 更新福利屋状态为已开奖 echo ('福利屋开奖完成 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) ; } return $res; diff --git a/app/common/helper/ConfigHelper.php b/app/common/helper/ConfigHelper.php old mode 100644 new mode 100755 diff --git a/app/common/helper/MiniprogramHelper.php b/app/common/helper/MiniprogramHelper.php old mode 100644 new mode 100755 diff --git a/app/common/helper/WxPayHelper.php b/app/common/helper/WxPayHelper.php old mode 100644 new mode 100755 diff --git a/app/common/model/AdvertType.php b/app/common/model/AdvertType.php old mode 100644 new mode 100755 diff --git a/app/common/model/GoodsExtend.php b/app/common/model/GoodsExtend.php new file mode 100644 index 0000000..813fb0c --- /dev/null +++ b/app/common/model/GoodsExtend.php @@ -0,0 +1,68 @@ +find(); + } + + /** + * 删除盒子扩展配置 + * @param int $goodsId 盒子ID + * @return bool 删除结果 + */ + public static function deleteByGoodsId($goodsId) + { + return self::where('goods_id', $goodsId)->delete(); + } + /** + * 根据盒子ID获取扩展配置 + * @param int $goodsId 盒子ID + * @param int $goods_type 盒子类型 + * @return array|null 盒子扩展配置信息 + */ + public static function getGoodsExtendByGoodsId($goodsId, $goods_type) + { + $goods_extend = self::where('goods_id', $goodsId)->find(); + if (!$goods_extend) { + // 从goods_type表获取默认值 + $goodsType = Db::name('goods_type') + ->field('pay_wechat, pay_balance, pay_currency, pay_currency2, pay_coupon, is_deduction') + ->where('value', $goods_type) + ->find(); + + if ($goodsType) { + // 如果找到了盒子类型的默认配置 + $goods_extend = [ + 'goods_id' => $goodsId, + 'pay_wechat' => $goodsType['pay_wechat'], + 'pay_balance' => $goodsType['pay_balance'], + 'pay_currency' => $goodsType['pay_currency'], + 'pay_currency2' => $goodsType['pay_currency2'], + 'pay_coupon' => $goodsType['pay_coupon'], + 'is_deduction' => $goodsType['is_deduction'] + ]; + } + } + return $goods_extend; + } +} \ No newline at end of file diff --git a/app/common/model/GoodsExtendList.php b/app/common/model/GoodsExtendList.php deleted file mode 100755 index b5a3be9..0000000 --- a/app/common/model/GoodsExtendList.php +++ /dev/null @@ -1,72 +0,0 @@ -field($field) - ->order($order) - ->paginate(['list_rows' => $pageSize, 'query' => request()->param()]); - $page = $list->render(); - $data['list'] = $list->toArray()['data']; - $data['count'] = $list->total(); - $data['last_page'] = $list->toArray()['last_page']; - $data['page'] = $page; - return $data; - } - - /** - * 获取列表 不分页 - */ - public static function getAllList($where = [], $field = '*', $order = '', $limit = '0') - { - $data = self::where($where) - ->field($field) - ->order($order) - ->limit($limit) - ->select(); - return $data; - } - - /** - * 获取单条数据 - */ - public static function getInfo($where = [], $field = '*') - { - $data = self::where($where) - ->field($field) - ->find(); - return $data; - } - - /** - * 获取奖品扩展集合 - */ - public static function getGoodsExtendList($goods_id) - { - $data = self::where('goods_id', '=', $goods_id)->select(); - return $data; - } - - /** - * 获取奖品扩展集合 - */ - public static function getGoodsIdExtendList($goods_list_id) - { - $data = self::where('goods_list_id', '=', $goods_list_id)->find(); - return $data; - } -} \ No newline at end of file diff --git a/app/common/model/GoodsType.php b/app/common/model/GoodsType.php old mode 100644 new mode 100755 diff --git a/app/common/model/Reward.php b/app/common/model/Reward.php old mode 100644 new mode 100755 diff --git a/app/common/model/SignConfig.php b/app/common/model/SignConfig.php old mode 100644 new mode 100755 diff --git a/app/common/model/SignConfigReward.php b/app/common/model/SignConfigReward.php old mode 100644 new mode 100755 diff --git a/app/common/model/UserLoginLog.php b/app/common/model/UserLoginLog.php old mode 100644 new mode 100755 diff --git a/app/common/model/WelfareHouse.php b/app/common/model/WelfareHouse.php old mode 100644 new mode 100755 diff --git a/app/common/service/CommonService.php b/app/common/service/CommonService.php old mode 100644 new mode 100755 diff --git a/app/common/service/RewardService.php b/app/common/service/RewardService.php old mode 100644 new mode 100755 diff --git a/config/api.php b/config/api.php old mode 100644 new mode 100755 index 6ab0b80..0dd3cb8 --- a/config/api.php +++ b/config/api.php @@ -6,20 +6,15 @@ return [ 'localhost', '127.0.0.1', '192.168.1.56', - 'manghe.zpc-xy.com' - // 添加其他允许的域名 - // 'example.com', - // '*.example.com', + 'test.zfunbox.cn', + 'testapi.zfunbox.cn' ], # 后台允许访问的域名 'admin_domains' => [ 'localhost', '127.0.0.1', '192.168.1.56', - 'manghe.zpc-xy.com' - // 添加其他允许的域名 - // 'example.com', - // '*.example.com', + 'test.zfunbox.cn', ], // 不需要验证域名的白名单路径 'whitelist_paths' => [ diff --git a/config/menu.php b/config/menu.php index d842010..da5f2fb 100755 --- a/config/menu.php +++ b/config/menu.php @@ -224,15 +224,7 @@ return [ ], [ 'url' => '/admin/weixinpay', - 'name' => '微信支付', - ], - [ - 'url' => '/admin/uploadsFile', - 'name' => '图片设置', - ], - [ - 'url' => '/admin/wechatofficialaccount', - 'name' => '公众号设置', + 'name' => '微信商户设置', ], [ 'url' => '/admin/miniprogram', @@ -240,8 +232,17 @@ return [ ], [ 'url' => '/admin/systemconfig', - 'name' => '系统设置', + 'name' => '系统配置', ], + [ + 'url' => '/admin/uploadsFile', + 'name' => '图片上传设置', + ], + // [ + // 'url' => '/admin/wechatofficialaccount', + // 'name' => '公众号设置', + // ], + ], ], diff --git a/goods.json b/goods.json new file mode 100755 index 0000000..c5bfbb8 --- /dev/null +++ b/goods.json @@ -0,0 +1,345 @@ +{ + "goods": { + "id": 1023, + "category_id": 0, + "title": "3A\u6e38\u620f\u624b\u67c4", + "imgurl": "https:\/\/mh.shhuanmeng.com\/topic\/20250401\/725d2804734f963d63ec11ab2164e0b6.png", + "imgurl_detail": "https:\/\/mh.shhuanmeng.com\/topic\/20250401\/1709d195b74bad663c10cf0ea5e269cb.png", + "price": "10.00", + "stock": 0, + "sale_stock": 0, + "lock_is": 0, + "lock_time": 0, + "coupon_is": 0, + "coupon_pro": 0, + "integral_is": 0, + "prize_num": 0, + "status": 1, + "sort": 100, + "type": 2, + "show_is": 0, + "show_price": null, + "prize_imgurl": null, + "card_banner": null, + "card_set": null, + "card_notice": null, + "sale_time": 0, + "addtime": 1743496758, + "update_time": 1743497150, + "delete_time": null, + "card_num": 1, + "rage_is": 0, + "rage": 0, + "item_card_id": 0, + "lingzhu_is": 0, + "lingzhu_fan": 0, + "lingzhu_shang_id": 0, + "king_user_id": 0, + "lian_ji_num": 0, + "lian_ji_shang_id": 0, + "is_shou_zhe": 0, + "new_is": 0, + "goods_describe": "", + "quanju_xiangou": 0, + "day_price": "0.00", + "mouth_price": "0.00", + "mouth_pay_price": "0.00", + "day_pay_price": "0.00", + "user_lv": -1, + "is_flw": 0, + "flw_start_time": 0, + "flw_end_time": 0, + "open_time": 0, + "is_open": 0, + "choujiang_xianzhi": 0, + "async_code": "cb29b9c3-5854-4036-a135-9c44fa20994a", + "async_date": "2025-04-08 18:53:48", + "is_auto_xiajia": 1, + "xiajia_lirun": -50, + "xiajia_auto_coushu": 0, + "unlock_amount": "0.00", + "daily_xiangou": 0 + }, + "goodsList": [{ + "id": 122517, + "goods_id": 1023, + "num": 0, + "title": "Sony\/\u7d22\u5c3c Dualsense \u65e0\u7ebf\u624b\u67c4", + "imgurl": "https:\/\/mh.shhuanmeng.com\/topic\/20250401\/aa375bfc9a1777e6d546469b4b1f9593.png", + "stock": 0, + "surplus_stock": 0, + "price": "528.00", + "money": "528.00", + "sc_money": "528.00", + "real_pro": "0.10000", + "goods_type": 1, + "sale_time": 0, + "sort": 0, + "shang_id": 34, + "reward_num": 0, + "rank": 0, + "give_money": 0, + "special_stock": -100, + "card_no": null, + "prize_code": "9PpN60rert_1743496908", + "addtime": 1743496908, + "update_time": 0, + "prize_num": 0, + "type": 0, + "lian_ji_type": 0, + "reward_id": null, + "imgurl_detail": null, + "doubling": 0, + "goods_list_id": 0 + }, { + "id": 122518, + "goods_id": 1023, + "num": 0, + "title": "Razer\u96f7\u86c7 \u5e7b\u5f71\u6218\u72fcV2 \u9ed1\u8272", + "imgurl": "https:\/\/mh.shhuanmeng.com\/topic\/20250401\/182ed0fd18d6a31ad7e9d9c9a408a30d.png", + "stock": 0, + "surplus_stock": 0, + "price": "519.00", + "money": "519.00", + "sc_money": "519.00", + "real_pro": "0.10800", + "goods_type": 1, + "sale_time": 0, + "sort": 0, + "shang_id": 34, + "reward_num": 0, + "rank": 0, + "give_money": 0, + "special_stock": -100, + "card_no": null, + "prize_code": "mnHNVtFnHL_1743496943", + "addtime": 1743496943, + "update_time": 0, + "prize_num": 0, + "type": 0, + "lian_ji_type": 0, + "reward_id": null, + "imgurl_detail": null, + "doubling": 0, + "goods_list_id": 0 + }, { + "id": 122519, + "goods_id": 1023, + "num": 0, + "title": "Nintendo switch \u4e13\u4e1a\u624b\u67c4pro", + "imgurl": "https:\/\/mh.shhuanmeng.com\/topic\/20250401\/87571bb9329de4e84d9ee6f2641d5881.png", + "stock": 0, + "surplus_stock": 0, + "price": "499.00", + "money": "499.00", + "sc_money": "499.00", + "real_pro": "0.11000", + "goods_type": 1, + "sale_time": 0, + "sort": 0, + "shang_id": 34, + "reward_num": 0, + "rank": 0, + "give_money": 0, + "special_stock": -100, + "card_no": null, + "prize_code": "6gHY4NIeVd_1743496969", + "addtime": 1743496969, + "update_time": 0, + "prize_num": 0, + "type": 0, + "lian_ji_type": 0, + "reward_id": null, + "imgurl_detail": null, + "doubling": 0, + "goods_list_id": 0 + }, { + "id": 122520, + "goods_id": 1023, + "num": 0, + "title": "\u9ed1\u9ca8 \u7eff\u5e7d\u7075\u7cbe\u82f1\u624b\u67c4", + "imgurl": "https:\/\/mh.shhuanmeng.com\/topic\/20250401\/083688eda86351c82acd2f6f7db96f5a.png", + "stock": 0, + "surplus_stock": 0, + "price": "449.00", + "money": "449.00", + "sc_money": "449.00", + "real_pro": "0.13200", + "goods_type": 1, + "sale_time": 0, + "sort": 0, + "shang_id": 34, + "reward_num": 0, + "rank": 0, + "give_money": 0, + "special_stock": -100, + "card_no": null, + "prize_code": "HtBPUZjF2E_1743497015", + "addtime": 1743497015, + "update_time": 0, + "prize_num": 0, + "type": 0, + "lian_ji_type": 0, + "reward_id": null, + "imgurl_detail": null, + "doubling": 0, + "goods_list_id": 0 + }, { + "id": 122521, + "goods_id": 1023, + "num": 0, + "title": "EGOGO \u80d6\u8fbe\u7845\u80f6\u5c0f\u591c\u706fx1\u4e2a(\u62cd\u62cd\u6b3e-\u4e09\u6321\u8c03\u8282)", + "imgurl": "https:\/\/mh.shhuanmeng.com\/topic\/20250401\/c6e71d8535e9a3636637c23eed483496.png", + "stock": 0, + "surplus_stock": 0, + "price": "55.00", + "money": "55.00", + "sc_money": "55.00", + "real_pro": "1.64000", + "goods_type": 1, + "sale_time": 0, + "sort": 0, + "shang_id": 35, + "reward_num": 0, + "rank": 0, + "give_money": 0, + "special_stock": -100, + "card_no": null, + "prize_code": "SdTQCffI9e_1743497038", + "addtime": 1743497038, + "update_time": 0, + "prize_num": 0, + "type": 0, + "lian_ji_type": 0, + "reward_id": null, + "imgurl_detail": null, + "doubling": 0, + "goods_list_id": 0 + }, { + "id": 122522, + "goods_id": 1023, + "num": 0, + "title": "\u53c8\u6e34\u4e50\u56ed \u690d\u7269\u529f\u80fd\u996e\u6599 400mlx5\u74f6 \u968f\u673a5\u74f6", + "imgurl": "https:\/\/mh.shhuanmeng.com\/topic\/20250401\/525e4dc566d8fae2044800a07b0fa212.png", + "stock": 0, + "surplus_stock": 0, + "price": "45.00", + "money": "45.00", + "sc_money": "45.00", + "real_pro": "7.91000", + "goods_type": 4, + "sale_time": 0, + "sort": 0, + "shang_id": 35, + "reward_num": 0, + "rank": 0, + "give_money": 0, + "special_stock": -100, + "card_no": null, + "prize_code": "RAjKZjGSIy_1743497061", + "addtime": 1743497061, + "update_time": 1743955618, + "prize_num": 0, + "type": 0, + "lian_ji_type": 0, + "reward_id": "", + "imgurl_detail": "", + "doubling": 0, + "goods_list_id": 0 + }, { + "id": 122523, + "goods_id": 1023, + "num": 0, + "title": "\u83ab\u6bd4\u4e4c\u65af\u73af\u6212\u6307 x1(\u5f00\u53e3\u53ef\u8c03\u8282\u5c3a\u5bf8)", + "imgurl": "https:\/\/mh.shhuanmeng.com\/topic\/20250401\/e08168bece3aa962838c8f6a0cc6e5d4.png", + "stock": 0, + "surplus_stock": 0, + "price": "10.00", + "money": "2.50", + "sc_money": "10.00", + "real_pro": "90.00000", + "goods_type": 1, + "sale_time": 0, + "sort": 0, + "shang_id": 38, + "reward_num": 0, + "rank": 0, + "give_money": 0, + "special_stock": -100, + "card_no": null, + "prize_code": "PFv8RT8sHB_1743497090", + "addtime": 1743497090, + "update_time": 0, + "prize_num": 0, + "type": 0, + "lian_ji_type": 0, + "reward_id": null, + "imgurl_detail": null, + "doubling": 0, + "goods_list_id": 0 + }, { + "id": 122584, + "goods_id": 1023, + "num": 0, + "title": "\u73ab\u7470\u8354\u679d", + "imgurl": "https:\/\/mh.shhuanmeng.com\/topic\/20250407\/7f511d54276150136179f06148c9a22e.png", + "stock": 0, + "surplus_stock": 0, + "price": "20.00", + "money": "20.00", + "sc_money": "20.00", + "real_pro": "20.00000", + "goods_type": 1, + "sale_time": 0, + "sort": 0, + "shang_id": 35, + "reward_num": 0, + "rank": 0, + "give_money": 0, + "special_stock": -100, + "card_no": null, + "prize_code": "gPXh7GEuuk_1743955689", + "addtime": 1743955689, + "update_time": 0, + "prize_num": 0, + "type": 0, + "lian_ji_type": 0, + "reward_id": "", + "imgurl_detail": "", + "doubling": 0, + "goods_list_id": 122522 + }, { + "id": 122585, + "goods_id": 1023, + "num": 0, + "title": "\u5c71\u68a8\u8377\u53f6", + "imgurl": "https:\/\/mh.shhuanmeng.com\/topic\/20250407\/c677e8c872a2790674c13bda6ce8d847.png", + "stock": 0, + "surplus_stock": 0, + "price": "20.00", + "money": "20.00", + "sc_money": "20.00", + "real_pro": "80.00000", + "goods_type": 1, + "sale_time": 0, + "sort": 0, + "shang_id": 35, + "reward_num": 0, + "rank": 0, + "give_money": 0, + "special_stock": -100, + "card_no": null, + "prize_code": "JLsAtDQB4P_1743955746", + "addtime": 1743955746, + "update_time": 0, + "prize_num": 0, + "type": 0, + "lian_ji_type": 0, + "reward_id": "", + "imgurl_detail": "", + "doubling": 0, + "goods_list_id": 122522 + }], + "async_code": "cb29b9c3-5854-4036-a135-9c44fa20994a", + "sync_time": 1744110248 +} \ No newline at end of file diff --git a/public/js/reward-component.js b/public/js/reward-component.js old mode 100644 new mode 100755 diff --git a/public/js/v2.10.3/layui/css/layui.css b/public/js/v2.10.3/layui/css/layui.css old mode 100644 new mode 100755 diff --git a/public/js/v2.10.3/layui/font/iconfont.eot b/public/js/v2.10.3/layui/font/iconfont.eot old mode 100644 new mode 100755 diff --git a/public/js/v2.10.3/layui/font/iconfont.svg b/public/js/v2.10.3/layui/font/iconfont.svg old mode 100644 new mode 100755 diff --git a/public/js/v2.10.3/layui/font/iconfont.ttf b/public/js/v2.10.3/layui/font/iconfont.ttf old mode 100644 new mode 100755 diff --git a/public/js/v2.10.3/layui/font/iconfont.woff b/public/js/v2.10.3/layui/font/iconfont.woff old mode 100644 new mode 100755 diff --git a/public/js/v2.10.3/layui/font/iconfont.woff2 b/public/js/v2.10.3/layui/font/iconfont.woff2 old mode 100644 new mode 100755 diff --git a/public/js/v2.10.3/layui/layui.js b/public/js/v2.10.3/layui/layui.js old mode 100644 new mode 100755 diff --git a/public/static/admin/reward-component.js b/public/static/admin/reward-component.js old mode 100644 new mode 100755 diff --git a/public/storage/poster/share/5.png b/public/storage/poster/share/5.png new file mode 100755 index 0000000000000000000000000000000000000000..8aece86f3dd18d81676db9ced9e1b4607a53f818 GIT binary patch literal 16899 zcmb5VV{|4#*Did=wryi#+qP}nwl%SniEU48XJXqnCp?+wJm)>%`T14%>eZ{T_f=Tc zb?v?TYvpSPfG8y`WiHU)Vj*g8-Mu3e&f{Tt$NJ~gUPC-RYg+)NeKu5_yMoC5aPY4hM z1OzlBGzv5{3MDo=Hs$~C^wkeQf&?N2A_M^<1^^=gfgk~W4FYfh0AP^st^xu6CxL^2 zL4X1QLw=WHf9L-z{hu-b00aQWZFxrL60^ab%x~`)X zokIqa9HRGBirboe7v%22uA}G&d|~qftl_+joXj{|$D$0i`pw-_eF@f#l2ib2p$4w+ zFL1wY;XAf`SuFd6-{g2)TIPDf!qjaJdmn;wJ$5eSol;BH76pGtA{xW|=uQh)>)pFV zrYru4H>EjXdB+|rW}Y~QkF22m#@|5G%pDjP#&9v$$FN!%B0zvjS(-q6*~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vK1G8r7{|4{8X9q~O-hGA@c= czpk179~aNBK_oz%jQ{`u07*qoM6N<$f^$ee_W%F@ literal 0 HcmV?d00001 diff --git a/table.sql b/table.sql old mode 100644 new mode 100755 index 326dae7..83bdc7a --- a/table.sql +++ b/table.sql @@ -1,1908 +1,1939 @@ --- MySQL dump 10.13 Distrib 8.0.33, for Win64 (x86_64) --- --- Host: 192.168.1.56 Database: xinglanmh_shequt --- ------------------------------------------------------ --- Server version 5.7.44-log - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!50503 SET NAMES utf8mb4 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; - --- --- Table structure for table `admin` --- - -DROP TABLE IF EXISTS `admin`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `admin` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `username` varchar(20) CHARACTER SET gbk DEFAULT NULL COMMENT '账号', - `nickname` varchar(20) COLLATE utf8_unicode_ci NOT NULL COMMENT '姓名', - `password` varchar(40) CHARACTER SET gbk DEFAULT NULL COMMENT '登录密码', - `qid` int(10) unsigned DEFAULT NULL COMMENT '权限ID', - `status` int(11) unsigned DEFAULT '0' COMMENT '0正常 1禁用', - `get_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '登录刷新时间', - `random` varchar(20) CHARACTER SET utf8 NOT NULL COMMENT 'token随机数', - `token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'token', - `admin_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '操作人', - `addtime` int(11) unsigned NOT NULL DEFAULT '0', - `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改时间', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='管理员'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `admin_goods_log` --- - -DROP TABLE IF EXISTS `admin_goods_log`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `admin_goods_log` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `a_id` int(11) NOT NULL COMMENT '管理员ID', - `goods_id` int(11) DEFAULT '0', - `goods_list_id` int(11) DEFAULT '0', - `original_data` text COLLATE utf8_unicode_ci, - `new_data` text COLLATE utf8_unicode_ci, - `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=14400 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='管理员登录日志'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `admin_login_log` --- - -DROP TABLE IF EXISTS `admin_login_log`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `admin_login_log` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `a_id` int(11) NOT NULL COMMENT '管理员ID', - `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=3605 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='管理员登录日志'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `admin_operation_log` --- - -DROP TABLE IF EXISTS `admin_operation_log`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `admin_operation_log` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `a_id` int(11) NOT NULL COMMENT '管理员ID', - `ip` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT '操作ip', - `operation` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '操作控制器', - `content` text COLLATE utf8_unicode_ci, - `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '操作时间', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=260338 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='管理员操作日志'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `admin_quanxian` --- - -DROP TABLE IF EXISTS `admin_quanxian`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `admin_quanxian` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` varchar(100) DEFAULT NULL, - `describe` longtext, - `quanxian` text, - `addtime` int(11) DEFAULT NULL, - `update_time` int(11) DEFAULT NULL, - `admin_id` int(11) DEFAULT NULL COMMENT '操作人', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=gbk COMMENT='权限'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `ads` --- - -DROP TABLE IF EXISTS `ads`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `ads` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `ads` int(11) DEFAULT NULL COMMENT '序号', - `title` varchar(255) DEFAULT NULL, - `account_id` varchar(255) DEFAULT NULL, - `access_token` varchar(255) DEFAULT NULL, - `user_action_set_id` varchar(255) DEFAULT NULL, - `status` int(11) DEFAULT '1' COMMENT '1.正常 2.已禁用', - `create_time` varchar(255) DEFAULT NULL, - `update_time` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `advert` --- - -DROP TABLE IF EXISTS `advert`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `advert` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `imgurl` varchar(100) NOT NULL COMMENT '图片', - `url` varchar(100) DEFAULT NULL COMMENT '跳转路径', - `sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序', - `type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '类型 1首页轮播图 2抽卡机轮播图', - `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', - `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改时间', - `ttype` tinyint(1) unsigned DEFAULT '0' COMMENT '跳转类型 0不跳转 1优惠券 2一番赏 3无限赏', - `coupon_id` int(11) unsigned DEFAULT '0' COMMENT '优惠券id', - `goods_id` int(11) unsigned DEFAULT '0' COMMENT '盒子id', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=157 DEFAULT CHARSET=gbk; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `advert_type` --- - -DROP TABLE IF EXISTS `advert_type`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `advert_type` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(50) NOT NULL, - `sort` int(10) DEFAULT '0', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `card_level` --- - -DROP TABLE IF EXISTS `card_level`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `card_level` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `title` varchar(255) CHARACTER SET utf8mb4 NOT NULL COMMENT '卡名称', - `imgurl` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '等级图片', - `sort` int(11) DEFAULT NULL COMMENT '排序', - `addtime` int(11) DEFAULT NULL COMMENT '添加时间', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `category` --- - -DROP TABLE IF EXISTS `category`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `category` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `title` varchar(255) NOT NULL COMMENT '商品名称', - `sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序', - `addtime` int(10) unsigned NOT NULL COMMENT '添加时间', - `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改时间', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='盒子分类'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `code` --- - -DROP TABLE IF EXISTS `code`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `code` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '验证码id', - `phone` varchar(11) NOT NULL COMMENT '手机号', - `code` varchar(6) NOT NULL COMMENT '验证码', - `addtime` int(11) NOT NULL COMMENT '添加时间', - `type` tinyint(1) NOT NULL COMMENT '类型,1 登录注册', - `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态 0正常,-1失效', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='短信记录'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `collect` --- - -DROP TABLE IF EXISTS `collect`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `collect` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id', - `goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '盒子ID', - `num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '箱号', - `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=1321 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `config` --- - -DROP TABLE IF EXISTS `config`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `config` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `key` varchar(255) NOT NULL, - `value` text, - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `coupon` --- - -DROP TABLE IF EXISTS `coupon`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `coupon` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `type` tinyint(1) unsigned DEFAULT '0' COMMENT '1新人优惠券 2权益优惠卷', - `title` varchar(255) NOT NULL COMMENT '商品名称', - `sort` int(10) unsigned DEFAULT '1' COMMENT '排序值', - `price` decimal(10,2) unsigned DEFAULT NULL COMMENT '减多少', - `man_price` decimal(10,2) DEFAULT NULL COMMENT '满多少减多少', - `effective_day` int(11) DEFAULT NULL COMMENT '有效时间(天)', - `addtime` int(10) unsigned NOT NULL COMMENT '添加时间', - `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0上架 2下架 4已删除', - `ttype` tinyint(1) unsigned DEFAULT '0' COMMENT '是否限制使用 0不限制 1一番赏 2无限赏 3擂台赏 6全局赏 9领主赏 9连击赏', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=302 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='优惠券表'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `coupon_receive` --- - -DROP TABLE IF EXISTS `coupon_receive`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `coupon_receive` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `title` varchar(255) NOT NULL COMMENT '商品名称', - `price` decimal(10,2) unsigned DEFAULT NULL COMMENT '商品价格', - `man_price` decimal(10,2) DEFAULT NULL COMMENT '满多少减多少', - `end_time` int(11) DEFAULT NULL COMMENT '过期时间', - `addtime` int(10) unsigned NOT NULL COMMENT '添加时间', - `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0未使用1已使用2已过期', - `user_id` int(11) DEFAULT NULL COMMENT '会员id', - `coupon_id` int(11) DEFAULT NULL, - `state` tinyint(1) unsigned DEFAULT '0' COMMENT '是否限制使用 0不限制 1一番赏 2无限赏 3擂台赏 6全局赏 9领主赏 9连击赏', - `ttype` int(2) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=27792 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户优惠券表'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `danye` --- - -DROP TABLE IF EXISTS `danye`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `danye` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '类型,1服务协议,2隐私政策', - `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '标题', - `content` text COLLATE utf8_unicode_ci NOT NULL COMMENT '内容', - `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改时间', - `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0正常 1隐藏', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `delivery` --- - -DROP TABLE IF EXISTS `delivery`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `delivery` ( - `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, - `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT '快递公司', - `code` varchar(30) COLLATE utf8_unicode_ci NOT NULL COMMENT '快递编码', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='快递公司'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `error_log` --- - -DROP TABLE IF EXISTS `error_log`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `error_log` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `goods_id` int(11) NOT NULL, - `addtime` int(11) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `give` --- - -DROP TABLE IF EXISTS `give`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `give` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '会员id', - `time_int` varchar(100) DEFAULT NULL, - `time_date` varchar(100) DEFAULT NULL, - `money` decimal(10,2) unsigned NOT NULL COMMENT '消费金额', - `addtime` int(11) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='无限令领取记录'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `goods` --- - -DROP TABLE IF EXISTS `goods`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `goods` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `category_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '分类ID', - `title` varchar(255) NOT NULL COMMENT '盒子名称', - `imgurl` varchar(255) NOT NULL COMMENT '盒子封面图', - `imgurl_detail` varchar(255) NOT NULL COMMENT '盒子详情图', - `price` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '商品价格', - `stock` int(10) unsigned DEFAULT '0' COMMENT '套数', - `sale_stock` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '销量库存', - `lock_is` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '锁箱 0否 1是', - `lock_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '锁箱时间', - `coupon_is` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '发券开关0关闭 1开启', - `coupon_pro` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '发券概率', - `integral_is` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '发积分开关0关闭 1开启', - `prize_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '擂台赏抽全局赏数量', - `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '1上架 2下架 3售罄', - `sort` int(10) unsigned DEFAULT '1' COMMENT '排序值', - `type` tinyint(1) unsigned DEFAULT '0' COMMENT '1一番赏 2无限赏 3擂台赏 4抽卡机 5积分赏 6全局赏 7福利盲盒 8领主赏 9连击赏', - `show_is` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '首页显示 0是 1否', - `show_price` varchar(100) DEFAULT NULL COMMENT '卡册显示价格', - `prize_imgurl` varchar(255) DEFAULT NULL COMMENT '抽卡机卡牌背面图', - `card_banner` varchar(255) DEFAULT NULL COMMENT '卡册banner', - `card_set` text COMMENT '抽卡机抽奖设置', - `card_notice` varchar(255) DEFAULT NULL COMMENT '抽卡机描述', - `sale_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '预售时间', - `addtime` int(10) unsigned NOT NULL COMMENT '添加时间', - `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改时间', - `delete_time` int(11) DEFAULT NULL, - `card_num` int(11) DEFAULT '1' COMMENT '一包几张', - `rage_is` tinyint(1) unsigned DEFAULT '0' COMMENT '怒气值开关 0关 1开', - `rage` int(11) unsigned DEFAULT '0' COMMENT '怒气值', - `item_card_id` int(11) unsigned DEFAULT '0' COMMENT '道具卡ID', - `lingzhu_is` tinyint(1) DEFAULT '0' COMMENT '领主开关 0关 1开', - `lingzhu_fan` int(11) DEFAULT '0' COMMENT '领主每发返', - `lingzhu_shang_id` int(11) DEFAULT '0' COMMENT '请选择抽中领主', - `king_user_id` int(11) DEFAULT '0' COMMENT '当前领主', - `lian_ji_num` int(11) DEFAULT '0' COMMENT '连击赏连击次数', - `lian_ji_shang_id` int(11) DEFAULT '0' COMMENT '连击赏赏id', - `is_shou_zhe` tinyint(1) unsigned DEFAULT '0' COMMENT '是否首抽五折 1是 0否', - `new_is` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '最新开关0关闭 1开启', - `goods_describe` varchar(300) DEFAULT NULL COMMENT '描述', - `quanju_xiangou` int(11) DEFAULT '0' COMMENT '全局赏限购次数', - `day_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '需要的流水', - `mouth_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '月总流水', - `mouth_pay_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '月实付', - `day_pay_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '日实付', - `user_lv` int(11) NOT NULL DEFAULT '-1' COMMENT '多少级之下能买', - `is_flw` int(1) NOT NULL DEFAULT '0' COMMENT '是否福利屋', - `flw_start_time` int(10) NOT NULL DEFAULT '0' COMMENT '福利屋开始时间', - `flw_end_time` int(10) NOT NULL DEFAULT '0' COMMENT '福利屋结束时间', - `open_time` int(10) NOT NULL DEFAULT '0' COMMENT '开奖时间', - `is_open` int(2) NOT NULL DEFAULT '0' COMMENT '0未开奖 1已开奖', - `choujiang_xianzhi` int(11) NOT NULL DEFAULT '0' COMMENT '抽奖门槛', - `async_code` varchar(64) DEFAULT NULL COMMENT '同步编码,guid', - `async_date` datetime DEFAULT NULL COMMENT '最后一次同步时间', - `is_auto_xiajia` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否自动下架', - `xiajia_lirun` int(11) NOT NULL DEFAULT '0' COMMENT '下架利润率', - `xiajia_auto_coushu` int(11) NOT NULL DEFAULT '0' COMMENT '下架生效抽数', - `unlock_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '消费多少额度解锁盒子', - `daily_xiangou` int(11) NOT NULL DEFAULT '0' COMMENT '每日限购次数', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE, - KEY `status` (`status`) USING BTREE, - KEY `type` (`type`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=1039 DEFAULT CHARSET=utf8 COMMENT='盒子'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `goods_extend_list` --- - -DROP TABLE IF EXISTS `goods_extend_list`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `goods_extend_list` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', - `goods_id` int(11) NOT NULL COMMENT '奖品Id', - `goods_list_id` int(11) NOT NULL COMMENT '盲盒id', - `reward_num` int(11) NOT NULL COMMENT '最低抽奖次数', - `prize_code` varchar(30) NOT NULL COMMENT '奖品编号', - `rawrd_type` int(11) NOT NULL COMMENT '1,默认最低抽奖次数,2指定多少抽出,3指定范围内必出,4:指定用户', - `reward_num_1` int(11) DEFAULT NULL COMMENT '最低抽奖次数', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=4546 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `goods_king_rank` --- - -DROP TABLE IF EXISTS `goods_king_rank`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `goods_king_rank` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(11) unsigned NOT NULL DEFAULT '0', - `goods_id` int(11) NOT NULL, - `count` int(11) DEFAULT '0' COMMENT '多少发升级为领主', - `z_nums` int(11) unsigned DEFAULT '0' COMMENT '占领了多少发', - `money` decimal(10,2) unsigned DEFAULT '0.00', - `order_list_id` int(11) DEFAULT '0' COMMENT '奖品ID', - `addtime` int(11) DEFAULT NULL COMMENT '开始时间', - `end_time` int(11) DEFAULT NULL COMMENT '结束时间', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='无限赏领主'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `goods_list` --- - -DROP TABLE IF EXISTS `goods_list`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `goods_list` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '盲盒id 0无限令 -1周榜 -2月榜', - `num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '第几套', - `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '奖品名称', - `imgurl` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '奖品图片', - `stock` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '库存', - `surplus_stock` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '剩余库存', - `price` decimal(10,2) unsigned NOT NULL COMMENT '奖品价值', - `money` decimal(10,2) unsigned NOT NULL COMMENT '奖品兑换价', - `sc_money` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '市场参考价', - `real_pro` decimal(10,5) unsigned NOT NULL DEFAULT '0.00000' COMMENT '真实概率', - `goods_type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '1现货 2预售', - `sale_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '预售时间', - `sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序', - `shang_id` int(255) DEFAULT NULL COMMENT '赏ID', - `reward_num` int(11) unsigned NOT NULL DEFAULT '0', - `rank` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '榜单排名', - `give_money` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '消费阀值', - `special_stock` int(10) NOT NULL DEFAULT '-100' COMMENT '抽卡机特殊库存', - `card_no` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '奖品赠送编号', - `prize_code` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '奖品编号', - `addtime` int(10) DEFAULT NULL COMMENT '添加时间', - `update_time` int(11) unsigned NOT NULL DEFAULT '0', - `prize_num` int(11) DEFAULT '0' COMMENT '擂台赏抽全局赏数量', - `type` tinyint(1) DEFAULT '0' COMMENT '7抽奖券的奖品', - `lian_ji_type` tinyint(1) DEFAULT '0' COMMENT '连击赏奖池分类 1秘宝池 0否', - `reward_id` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '发放奖励id', - `imgurl_detail` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '商品详情图', - `doubling` int(11) NOT NULL DEFAULT '0' COMMENT '倍率', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE, - KEY `num` (`num`) USING BTREE, - KEY `goods_id` (`num`) USING BTREE, - KEY `shang_id` (`shang_id`) USING BTREE, - KEY `real_pro` (`real_pro`) USING BTREE, - KEY `stock` (`stock`) USING BTREE, - 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=122565 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='盒子奖品'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `goods_lock` --- - -DROP TABLE IF EXISTS `goods_lock`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `goods_lock` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID', - `goods_id_num` varchar(20) NOT NULL COMMENT '盒子id_num', - `endtime` int(11) unsigned NOT NULL COMMENT '过期时间', - `update_time` int(11) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=10405 DEFAULT CHARSET=utf8 COMMENT='盒子锁箱信息'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `goods_offshelf_log` --- - -DROP TABLE IF EXISTS `goods_offshelf_log`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `goods_offshelf_log` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `goods_id` int(11) NOT NULL COMMENT '盒子ID', - `profit_rate` decimal(10,2) NOT NULL COMMENT '当前利润率', - `xiajia_lirun` decimal(10,2) NOT NULL COMMENT '配置的下架利润阈值', - `order_total` decimal(10,2) NOT NULL COMMENT '订单总价值', - `goods_total` decimal(10,2) NOT NULL COMMENT '出货总价值', - `create_time` int(11) NOT NULL COMMENT '下架时间', - PRIMARY KEY (`id`), - KEY `idx_goods_id` (`goods_id`), - KEY `idx_create_time` (`create_time`) -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COMMENT='盒子自动下架日志表'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `goods_type` --- - -DROP TABLE IF EXISTS `goods_type`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `goods_type` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', - `name` varchar(30) NOT NULL COMMENT '名称', - `value` int(11) NOT NULL COMMENT 'key', - `sort_order` int(11) NOT NULL COMMENT '排序字段', - `is_show` tinyint(1) NOT NULL COMMENT '是否首页显示', - `remark` varchar(255) DEFAULT NULL COMMENT '备注', - `pay_wechat` tinyint(1) NOT NULL DEFAULT '1' COMMENT '微信支付', - `pay_balance` tinyint(1) NOT NULL DEFAULT '1' COMMENT '余额支付', - `pay_currency` tinyint(1) NOT NULL DEFAULT '1' COMMENT '货币支付', - `pay_currency2` tinyint(1) NOT NULL DEFAULT '1' COMMENT '货币2支付', - `pay_coupon` tinyint(1) NOT NULL DEFAULT '1' COMMENT '优惠券支付', - `is_deduction` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否抵扣 1:抵扣 0:支付', - `is_fenlei` tinyint(4) NOT NULL COMMENT '是否显示在分类中', - `fl_name` varchar(30) NOT NULL COMMENT '分类名称', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `item_card` --- - -DROP TABLE IF EXISTS `item_card`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `item_card` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `type` tinyint(1) unsigned DEFAULT '0' COMMENT '1重抽卡', - `title` varchar(255) NOT NULL COMMENT '名称', - `sort` int(10) unsigned DEFAULT '1' COMMENT '排序值', - `status` tinyint(1) DEFAULT '0' COMMENT '1正常 2下架 3删除', - `addtime` int(10) unsigned NOT NULL COMMENT '添加时间', - `updatetime` int(11) NOT NULL, - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='道具卡'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `kk_order` --- - -DROP TABLE IF EXISTS `kk_order`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `kk_order` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(10) unsigned NOT NULL COMMENT '会员id', - `order_no` varchar(100) NOT NULL COMMENT '订单号', - `total_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品总金额', - `price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '实付金额', - `money` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '余额抵扣', - `integral` decimal(10,2) unsigned DEFAULT '0.00' COMMENT 'Woo币抵扣', - `freight_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '运费金额', - `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0待付款 1待发货 2待收货 3确认收货', - `content` varchar(200) NOT NULL COMMENT '留言', - `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间', - `pay_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '支付时间', - `deliver_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '发货时间', - `confirm_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '收货时间', - `update_time` int(11) DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE, - UNIQUE KEY `order_no` (`order_no`) USING BTREE, - KEY `user_id` (`user_id`) USING BTREE, - KEY `status` (`status`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='发货订单表'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `kk_order_good` --- - -DROP TABLE IF EXISTS `kk_order_good`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `kk_order_good` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(10) unsigned NOT NULL COMMENT '会员id', - `order_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单id', - `goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品id', - `goods_name` varchar(255) NOT NULL COMMENT '商品名称', - `goods_image` varchar(255) NOT NULL COMMENT '商品主图', - `goods_spec_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品规格id', - `goods_spec` varchar(255) NOT NULL COMMENT '商品规格', - `goods_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品售价', - `goods_seckill_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品秒杀价', - `goods_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '数量', - `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='订单商品'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `kk_order_send` --- - -DROP TABLE IF EXISTS `kk_order_send`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `kk_order_send` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '会员id', - `order_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单ID', - `shou_name` varchar(255) DEFAULT NULL COMMENT '收货人姓名', - `shou_mobile` varchar(255) DEFAULT NULL COMMENT '收货人手机号', - `shou_region` varchar(255) DEFAULT NULL COMMENT '所在地区 省/市/区(名称)', - `address` varchar(255) DEFAULT NULL COMMENT '详细地址', - `delivery_name` varchar(255) DEFAULT NULL COMMENT '物流名称', - `delivery_no` varchar(255) DEFAULT NULL COMMENT '物流单号', - `update_time` int(11) DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE, - UNIQUE KEY `order_id` (`order_id`) USING BTREE, - KEY `user_id` (`user_id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='发货订单地址物流信息'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `kk_product` --- - -DROP TABLE IF EXISTS `kk_product`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `kk_product` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `seckill_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '秒杀时间段id', - `cate_id1` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '分类父级id', - `cate_id2` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '分类子级id', - `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '商品名称', - `image` varchar(200) COLLATE utf8_unicode_ci NOT NULL COMMENT '商品主图', - `detail_image` text COLLATE utf8_unicode_ci NOT NULL COMMENT '详情图', - `content` longtext COLLATE utf8_unicode_ci COMMENT '商品详情', - `freight` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '运费', - `sale_num` int(9) unsigned NOT NULL DEFAULT '0' COMMENT '销量', - `sort` int(7) unsigned NOT NULL DEFAULT '0' COMMENT '商品排序', - `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0上架 1下架', - `spec_data` longtext COLLATE utf8_unicode_ci COMMENT '规格信息', - `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', - `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改时间', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE, - KEY `title` (`title`) USING BTREE, - KEY `status` (`status`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='商品表'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `kk_product_cate` --- - -DROP TABLE IF EXISTS `kk_product_cate`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `kk_product_cate` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '分类标题', - `imgurl` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '分类图片', - `sort` int(5) unsigned DEFAULT '1' COMMENT '排序值', - `status` tinyint(1) unsigned DEFAULT '1' COMMENT '1 正常 2 删除', - `pid` int(11) DEFAULT '0' COMMENT '上级id', - `addtime` int(10) unsigned NOT NULL COMMENT '添加时间', - `title2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '英文标题', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='商品分类'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `kk_product_category` --- - -DROP TABLE IF EXISTS `kk_product_category`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `kk_product_category` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `pid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '父级id', - `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '商品名称', - `imgurl` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '分类图片', - `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '1显示 0隐藏', - `sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '0', - `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', - `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改时间', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='普通商城商品分类'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `kk_product_spec` --- - -DROP TABLE IF EXISTS `kk_product_spec`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `kk_product_spec` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `pro_id` int(11) NOT NULL COMMENT '商品id', - `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '名称', - `price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '售价', - `seckill_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '秒杀价', - `stock` int(9) unsigned NOT NULL DEFAULT '0' COMMENT '库存', - `pic` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '图片', - `ks` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '标识', - `time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE, - KEY `pro_id` (`pro_id`) USING BTREE, - KEY `ks` (`ks`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='商品规格'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `kk_seckill` --- - -DROP TABLE IF EXISTS `kk_seckill`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `kk_seckill` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `seckill_time` varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT '秒杀时间段', - `goods_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品限购数量', - `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', - `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改时间', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='秒杀设置'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `kk_share` --- - -DROP TABLE IF EXISTS `kk_share`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `kk_share` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '点击人ID', - `goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品id', - `share_user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '分享用户id', - `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='商品分享记录表'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `market` --- - -DROP TABLE IF EXISTS `market`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `market` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `order_num` varchar(255) NOT NULL COMMENT '挂售单号', - `price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '价格', - `order_list_ids` longtext NOT NULL COMMENT 'id字符串', - `status` tinyint(1) unsigned DEFAULT '0' COMMENT '0在售 1已售 2已撤回', - `stock` tinyint(1) unsigned NOT NULL DEFAULT '1', - `addtime` int(11) NOT NULL, - `update_time` int(11) NOT NULL, - `deltime` int(11) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='集市'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `market_order` --- - -DROP TABLE IF EXISTS `market_order`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `market_order` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `market_id` int(11) NOT NULL, - `user_id` int(11) NOT NULL, - `order_num` varchar(255) NOT NULL COMMENT '挂售单号', - `price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '价格', - `order_list_ids` longtext NOT NULL COMMENT 'id字符串', - `status` tinyint(1) unsigned DEFAULT '0' COMMENT '1未支付 2已支付 3卡单', - `pay_time` int(11) DEFAULT NULL, - `total` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '总价', - `total_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '实际支付', - `money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '支付了多少市集余额', - `addtime` int(11) NOT NULL, - `update_time` int(11) NOT NULL, - `deltime` int(11) DEFAULT NULL, - `zdfh_is` tinyint(1) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='集市订单'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `migrations` --- - -DROP TABLE IF EXISTS `migrations`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `migrations` ( - `version` bigint(20) NOT NULL, - `migration_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `start_time` timestamp NULL DEFAULT NULL, - `end_time` timestamp NULL DEFAULT NULL, - `breakpoint` tinyint(1) NOT NULL DEFAULT '0', - PRIMARY KEY (`version`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `notify_log` --- - -DROP TABLE IF EXISTS `notify_log`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `notify_log` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `order_no` varchar(40) NOT NULL, - `addtime` int(11) NOT NULL, - `xml` text, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=555 DEFAULT CHARSET=utf8mb4; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `order` --- - -DROP TABLE IF EXISTS `order`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `order` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID', - `order_num` varchar(60) NOT NULL COMMENT '订单号', - `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_draw` int(11) DEFAULT '0' COMMENT '抽奖券抵扣', - `use_item_card` int(11) DEFAULT '0' COMMENT '道具卡抵扣 (使用的数量)', - `zhe` decimal(10,2) unsigned NOT NULL COMMENT '折扣', - `goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '盒子id', - `num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '第几套', - `goods_price` decimal(10,2) unsigned NOT NULL COMMENT '盒子单价', - `goods_title` varchar(100) DEFAULT NULL COMMENT '盒子标题', - `goods_imgurl` varchar(200) DEFAULT NULL COMMENT '盒子图片', - `prize_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '抽奖数量', - `prize_card_set` text COMMENT '抽卡机必出设置', - `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0未支付 1支付', - `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连击赏', - `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 '优惠券抵扣', - `is_mibao` tinyint(1) DEFAULT '0' COMMENT '连击赏下 是否是抽的秘宝池 1是 0否', - `is_shou_zhe` tinyint(1) DEFAULT '0' COMMENT '是否首抽五折', - `zdfh_is` tinyint(1) unsigned NOT NULL DEFAULT '0', - `ad_id` int(11) DEFAULT '0' COMMENT '广告id', - `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抵扣金额', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE, - UNIQUE KEY `order_num` (`order_num`) USING BTREE, - KEY `user_id` (`user_id`) USING BTREE, - KEY `goods_id` (`goods_id`) USING BTREE, - KEY `num` (`num`) USING BTREE, - KEY `status` (`status`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=135603 DEFAULT CHARSET=utf8 COMMENT='订单表'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `order_list` --- - -DROP TABLE IF EXISTS `order_list`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `order_list` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `order_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单id', - `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id', - `recovery_num` varchar(100) DEFAULT NULL COMMENT '回收订单', - `send_num` varchar(100) DEFAULT NULL COMMENT '发货订单号', - `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0待选择 1回收 2选择发货 3发布集市', - `goods_id` int(11) DEFAULT '0' COMMENT '盒子ID', - `num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '第几箱', - `shang_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '赏ID', - `goodslist_id` int(10) unsigned NOT NULL COMMENT '奖品id', - `goodslist_title` varchar(100) DEFAULT NULL COMMENT '奖品名称', - `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_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_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', - `is_chong` tinyint(1) DEFAULT '0' COMMENT '是否使用重抽卡 0否 1是', - `deltime` int(11) DEFAULT NULL, - `source` tinyint(1) unsigned DEFAULT '1' COMMENT '1抽奖 2集市购买', - `fh_status` int(11) NOT NULL DEFAULT '0' COMMENT '发货状态,1已发货,2未发货', - `fh_remarks` varchar(255) DEFAULT NULL COMMENT '发货备注', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE, - KEY `user_id` (`user_id`) USING BTREE, - KEY `order_id` (`order_id`) USING BTREE, - KEY `num` (`num`) USING BTREE, - KEY `goods_id` (`goods_id`) USING BTREE, - KEY `recovery_num` (`recovery_num`) USING BTREE, - KEY `send_num` (`send_num`) USING BTREE, - KEY `prize_code` (`prize_code`) USING BTREE, - KEY `order_type` (`order_type`) USING BTREE, - KEY `status` (`status`) USING BTREE, - KEY `insurance_is` (`insurance_is`) USING BTREE, - 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=439686 DEFAULT CHARSET=utf8 COMMENT='订单明细'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `order_list_recovery` --- - -DROP TABLE IF EXISTS `order_list_recovery`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `order_list_recovery` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(11) unsigned NOT NULL DEFAULT '0', - `recovery_num` varchar(100) NOT NULL COMMENT '打包订单号', - `money` decimal(10,2) unsigned NOT NULL COMMENT '打包金额', - `count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '打包数量', - `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '打包时间', - PRIMARY KEY (`id`) USING BTREE, - 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=34759 DEFAULT CHARSET=utf8 COMMENT='打包记录'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `order_list_send` --- - -DROP TABLE IF EXISTS `order_list_send`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `order_list_send` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id', - `send_num` varchar(100) NOT NULL COMMENT '发货订单号', - `freight` decimal(10,2) unsigned NOT NULL COMMENT '运费', - `status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '0待支付 1待发货 2待收货 3已完成 4后台取消', - `count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '发货数量', - `name` varchar(255) DEFAULT NULL COMMENT '收货人姓名', - `mobile` varchar(255) DEFAULT NULL COMMENT '收货人电话', - `address` varchar(255) DEFAULT NULL COMMENT '收货地址', - `message` varchar(255) DEFAULT NULL COMMENT '备注', - `courier_number` varchar(50) DEFAULT NULL COMMENT '快递单号', - `courier_name` varchar(255) DEFAULT NULL COMMENT '快递名称', - `courier_code` varchar(50) DEFAULT NULL COMMENT '快递code', - `delivery_list` text COMMENT '物流轨迹信息', - `delivery_status` tinyint(1) NOT NULL DEFAULT '-1' COMMENT '物流状态', - `delivery_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '物流请求时间', - `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '下单时间', - `pay_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '支付时间', - `send_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '发货时间', - `shou_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '收货时间', - `cancel_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '取消时间', - `admin_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '管理员id', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE, - UNIQUE KEY `send_num` (`send_num`) USING BTREE, - KEY `user_id` (`user_id`) USING BTREE, - KEY `status` (`status`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=2370 DEFAULT CHARSET=utf8 COMMENT='发货记录'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `picture` --- - -DROP TABLE IF EXISTS `picture`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `picture` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `imgurl` varchar(255) COLLATE utf8_unicode_ci NOT NULL, - `token` varchar(255) COLLATE utf8_unicode_ci NOT NULL, - `addtime` int(10) unsigned NOT NULL, - `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=8157 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `profit_draw` --- - -DROP TABLE IF EXISTS `profit_draw`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `profit_draw` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id', - `change_money` decimal(10,2) NOT NULL COMMENT '变化的金额', - `money` decimal(10,2) unsigned NOT NULL COMMENT '变化后的金额', - `type` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '1后台充值 2在线充值 3抽赏消费 4背包回收 5推荐奖励', - `content` varchar(255) NOT NULL COMMENT '描述', - `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', - `share_uid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '来源ID', - `other` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE, - KEY `user_id` (`user_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=2088 DEFAULT CHARSET=utf8 COMMENT='财务明细'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `profit_expenses` --- - -DROP TABLE IF EXISTS `profit_expenses`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `profit_expenses` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', - `expense_type` int(10) NOT NULL COMMENT '支出类型', - `amount` decimal(10,2) NOT NULL COMMENT '支出金额', - `description` varchar(255) DEFAULT NULL COMMENT '说明', - `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - `profit_date` date NOT NULL COMMENT '账单日期', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='利润支出表'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `profit_integral` --- - -DROP TABLE IF EXISTS `profit_integral`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `profit_integral` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id', - `change_money` decimal(10,2) NOT NULL COMMENT '变化的金额', - `money` decimal(10,2) unsigned NOT NULL COMMENT '变化后的金额', - `type` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '1后台充值 2抽赏消费 3开券获得 4领主返币 5分享欧气券', - `content` varchar(255) NOT NULL COMMENT '描述', - `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', - `share_uid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '来源ID', - `other` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE, - KEY `user_id` (`user_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=92931 DEFAULT CHARSET=utf8 COMMENT='财务明细'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `profit_money` --- - -DROP TABLE IF EXISTS `profit_money`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `profit_money` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id', - `change_money` decimal(10,2) NOT NULL COMMENT '变化的金额', - `money` decimal(10,2) unsigned NOT NULL COMMENT '变化后的金额', - `type` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '1后台充值 2在线充值 3抽赏消费 4背包回收 5推荐奖励', - `content` varchar(255) NOT NULL COMMENT '描述', - `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', - `share_uid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '来源ID', - `other` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE, - KEY `user_id` (`user_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=139507 DEFAULT CHARSET=utf8 COMMENT='财务明细'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `profit_money2` --- - -DROP TABLE IF EXISTS `profit_money2`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `profit_money2` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id', - `change_money` decimal(10,2) NOT NULL COMMENT '变化的金额', - `money` decimal(10,2) unsigned NOT NULL COMMENT '变化后的金额', - `type` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '1后台充值 2在线充值 3市集消费 4市集售卖 5提现 6提现驳回 7提现手续费', - `content` varchar(255) NOT NULL COMMENT '描述', - `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', - `share_uid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '来源ID', - `other` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE, - KEY `user_id` (`user_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 COMMENT='财务明细'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `profit_ou_qi` --- - -DROP TABLE IF EXISTS `profit_ou_qi`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `profit_ou_qi` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id', - `change_money` decimal(10,2) NOT NULL COMMENT '变化的金额', - `money` decimal(10,2) unsigned NOT NULL COMMENT '变化后的金额', - `type` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '1完成任务 2消费赠送 3升级清空 4升级后多出', - `content` varchar(255) NOT NULL COMMENT '描述', - `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', - `other` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE, - KEY `user_id` (`user_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=58155 DEFAULT CHARSET=utf8 COMMENT='欧气值明细'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `profit_pay` --- - -DROP TABLE IF EXISTS `profit_pay`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `profit_pay` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id', - `order_num` varchar(100) NOT NULL COMMENT '订单号', - `change_money` decimal(10,2) NOT NULL COMMENT '变化的金额', - `content` varchar(255) NOT NULL COMMENT '描述', - `pay_type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '1微信 2支付宝', - `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE, - KEY `user_id` (`user_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=42348 DEFAULT CHARSET=utf8 COMMENT='(微信/支付宝)支付'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `profit_revenue` --- - -DROP TABLE IF EXISTS `profit_revenue`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `profit_revenue` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', - `expense_type` int(10) NOT NULL COMMENT '收入类型', - `price` decimal(10,2) NOT NULL COMMENT '收入金额', - `user_id` int(10) NOT NULL COMMENT '用户id', - `amount` decimal(10,2) NOT NULL COMMENT '发放货币', - `description` varchar(255) DEFAULT NULL COMMENT '说明', - `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - `profit_date` date NOT NULL COMMENT '账单日期', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='利润收入表'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `profit_score` --- - -DROP TABLE IF EXISTS `profit_score`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `profit_score` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id', - `change_money` decimal(10,2) NOT NULL COMMENT '变化的金额', - `money` decimal(10,2) unsigned NOT NULL COMMENT '变化后的金额', - `type` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '1后台充值 2抽赏消费 3升级获得 4抽赏奖励', - `content` varchar(255) NOT NULL COMMENT '描述', - `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', - `share_uid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '来源ID', - `other` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE, - KEY `user_id` (`user_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=21362 DEFAULT CHARSET=utf8 COMMENT='财务明细'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `quan_yi_level` --- - -DROP TABLE IF EXISTS `quan_yi_level`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `quan_yi_level` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `level` int(11) NOT NULL, - `title` varchar(255) NOT NULL, - `number` int(11) NOT NULL COMMENT '需要多少欧气值', - `addtime` int(11) NOT NULL, - `updatetime` int(11) NOT NULL, - `deltime` int(11) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=76 DEFAULT CHARSET=utf8mb4 COMMENT='权益等级表'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `quan_yi_level_jiang` --- - -DROP TABLE IF EXISTS `quan_yi_level_jiang`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `quan_yi_level_jiang` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `qy_level_id` int(11) NOT NULL, - `qy_level` int(11) DEFAULT NULL, - `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1普通降临(优惠券) 2高级奖励(奖品)', - `title` varchar(255) NOT NULL, - `jian_price` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '减多少', - `coupon_id` int(11) unsigned DEFAULT '0', - `man_price` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '满多少', - `probability` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '概率', - `effective_day` int(11) DEFAULT NULL COMMENT '有效时间(天)', - `z_num` int(11) unsigned DEFAULT '0' COMMENT '优惠券赠送多少', - `imgurl` varchar(255) DEFAULT NULL COMMENT '奖品图片', - `shang_id` int(11) DEFAULT NULL, - `jiang_price` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '奖品价值', - `money` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '奖品兑换价', - `sc_money` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '市场参考价', - `prize_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '奖品编号', - `addtime` int(11) NOT NULL, - `updatetime` int(11) NOT NULL, - `deltime` int(11) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=226 DEFAULT CHARSET=utf8mb4 COMMENT='权益中心等级奖品'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `rank_month` --- - -DROP TABLE IF EXISTS `rank_month`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `rank_month` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID', - `rank` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排名', - `money` decimal(10,2) unsigned NOT NULL COMMENT '消费金额', - `month_time` varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT '统计范围', - `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', - `order_list_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '奖品ID', - `prize_title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `prize_imgurl` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE, - KEY `user_id` (`user_id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='排行榜月榜'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `rank_week` --- - -DROP TABLE IF EXISTS `rank_week`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `rank_week` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID', - `rank` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排名', - `money` decimal(10,2) unsigned NOT NULL COMMENT '消费金额', - `week_time` varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT '统计范围', - `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', - `order_list_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '奖品ID', - `prize_title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `prize_imgurl` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE, - KEY `user_id` (`user_id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='排行榜周榜'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `reward` --- - -DROP TABLE IF EXISTS `reward`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `reward` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `reward_type` int(11) NOT NULL COMMENT '奖励类型(1:钻石,2:货币1,3:货币2,4:优惠券)', - `reward_extend` int(11) DEFAULT NULL COMMENT '奖励ID(当reward_type=1时为优惠券ID)', - `reward_value` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '奖励值', - `description` varchar(255) DEFAULT NULL COMMENT '奖励描述', - `create_time` int(11) DEFAULT NULL, - `update_time` int(11) DEFAULT NULL, - `reward_id` varchar(64) NOT NULL COMMENT '关联表id', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=118 DEFAULT CHARSET=utf8mb4 COMMENT='奖励表'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `shang` --- - -DROP TABLE IF EXISTS `shang`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `shang` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, - `pro` decimal(10,2) unsigned NOT NULL, - `imgurl` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, - `color` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, - `goods_id` int(11) unsigned NOT NULL DEFAULT '0', - `special_imgurl` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `sort` int(11) unsigned NOT NULL DEFAULT '0', - `update_time` int(11) unsigned DEFAULT '0', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=116 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `sign_config` --- - -DROP TABLE IF EXISTS `sign_config`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `sign_config` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `type` tinyint(1) NOT NULL COMMENT '配置类型(1:累计签到配置,2:每日签到配置)', - `day` tinyint(1) DEFAULT NULL COMMENT '指定星期几(type=2时有效,1-7代表周一到周日)', - `title` varchar(100) DEFAULT NULL COMMENT '配置标题', - `icon` varchar(255) DEFAULT NULL COMMENT '图标', - `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态(0禁用,1启用)', - `sort` int(11) DEFAULT '0' COMMENT '排序', - `create_time` int(11) DEFAULT NULL, - `update_time` int(11) DEFAULT NULL, - `reward_id` varchar(64) NOT NULL COMMENT '奖励id', - `description` varchar(255) DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8mb4 COMMENT='签到配置表'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `task_list` --- - -DROP TABLE IF EXISTS `task_list`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `task_list` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `title` varchar(255) NOT NULL COMMENT '任务名称', - `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1每日任务 2每周任务', - `cate` tinyint(1) NOT NULL DEFAULT '0' COMMENT '任务分类 1邀请好友注册 2抽赏任务 ', - `is_important` tinyint(1) DEFAULT '0' COMMENT '是否是重要任务 1是 0否', - `number` int(11) DEFAULT '0' COMMENT '需要完成任务几次', - `z_number` int(11) unsigned DEFAULT '0' COMMENT '赠送多少欧气值', - `sort` int(11) unsigned DEFAULT '0' COMMENT '排序', - `addtime` int(11) NOT NULL, - `updatetime` int(11) NOT NULL, - `deltime` int(11) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COMMENT='任务表'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `user` --- - -DROP TABLE IF EXISTS `user`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `user` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `openid` varchar(50) NOT NULL DEFAULT '' COMMENT '微信openid', - `mobile` varchar(11) DEFAULT NULL COMMENT '手机号', - `nickname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '昵称', - `headimg` varchar(255) NOT NULL COMMENT '头像', - `pid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '父级id', - `money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '余额', - `money2` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '集市余额', - `integral` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '幸运币', - `score` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '积分', - `ou_qi` int(11) unsigned DEFAULT '0' COMMENT '欧气值', - `ou_qi_level` int(11) unsigned DEFAULT '0' COMMENT '欧气值等级', - `vip` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT 'vip等级', - `share_image` varchar(255) DEFAULT NULL COMMENT '分享海报', - `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态:1正常,2禁用', - `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', - `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改时间', - `last_login_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '最后操作时间', - `draw_num` int(11) DEFAULT '0' COMMENT '优惠券的数量', - `is_use_coupon` tinyint(3) DEFAULT '0' COMMENT '0未领取1已领取', - `mb_number` int(11) unsigned DEFAULT '0' COMMENT '连击赏秘宝池抽奖次数', - `click_id` int(11) DEFAULT '0', - `unionid` varchar(255) DEFAULT NULL COMMENT '用户唯一id', - `gzh_openid` varchar(255) DEFAULT NULL COMMENT '公众号openid', - `password` varchar(40) DEFAULT NULL, - `istest` int(11) NOT NULL DEFAULT '0' COMMENT '是否测试账号', - `uid` varchar(16) NOT NULL COMMENT '唯一编号', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=6164 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `user_account` --- - -DROP TABLE IF EXISTS `user_account`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `user_account` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(11) unsigned NOT NULL DEFAULT '0', - `account_token` varchar(255) NOT NULL COMMENT '登陆秘钥', - `token_num` varchar(50) NOT NULL COMMENT '秘钥随机数', - `token_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '秘钥时间戳', - `last_login_time` int(11) unsigned NOT NULL DEFAULT '0', - `last_login_ip` varchar(50) NOT NULL, - `last_login_ip1` varchar(255) DEFAULT NULL COMMENT 'ip', - `ip_adcode` varchar(255) DEFAULT NULL COMMENT 'ip邮编', - `ip_province` varchar(50) DEFAULT NULL, - `ip_city` varchar(50) DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE -) ENGINE=MyISAM AUTO_INCREMENT=6209 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `user_coupon` --- - -DROP TABLE IF EXISTS `user_coupon`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `user_coupon` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户的id', - `level` int(11) unsigned DEFAULT '0' COMMENT '1特级赏券 2终极赏券 3高级赏券 4普通赏券', - `num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '开奖总金额', - `l_num` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '领取多少', - `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '1未分享 2已分享 3已领取 4被消耗融合', - `type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '1下单赠送 2领取 3融合得到', - `title` varchar(255) NOT NULL COMMENT '劵名称', - `from_id` varchar(50) NOT NULL DEFAULT '0' COMMENT '来源id (订单、领取)', - `share_time` int(11) DEFAULT NULL COMMENT '分享时间', - `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '获取时间', - `updatetime` int(11) DEFAULT NULL, - `own` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '自己可以获得多少', - `own2` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '自己可以获得多少', - `other` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '其他人可以获得多少', - `other2` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '其他人可以获得多少', - `kl_num` int(11) unsigned DEFAULT '0' COMMENT '最多可参与人数', - `kl_num2` int(11) unsigned DEFAULT '0' COMMENT '最多可参与人数', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE, - KEY `user_id` (`user_id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='欧气劵'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `user_goods_lian_ji` --- - -DROP TABLE IF EXISTS `user_goods_lian_ji`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `user_goods_lian_ji` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `goods_id` int(11) NOT NULL, - `number` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '连击次数', - `addtime` int(11) NOT NULL, - `updatetime` int(11) NOT NULL, - `deltime` int(11) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='用户连击赏连击次数'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `user_item_card` --- - -DROP TABLE IF EXISTS `user_item_card`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `user_item_card` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `type` tinyint(1) unsigned DEFAULT '0' COMMENT '类型', - `item_card_id` int(11) NOT NULL, - `title` varchar(255) NOT NULL COMMENT '名称', - `status` tinyint(1) DEFAULT '0' COMMENT '1未使用 2已使用', - `order_id` int(11) DEFAULT '0' COMMENT '抵扣的订单ID', - `addtime` int(11) unsigned NOT NULL, - `updatetime` int(11) NOT NULL, - `deltime` int(11) DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户的道具卡'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `user_login_ip` --- - -DROP TABLE IF EXISTS `user_login_ip`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `user_login_ip` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(11) unsigned NOT NULL DEFAULT '0', - `last_login_time` int(11) unsigned NOT NULL DEFAULT '0', - `last_login_ip` varchar(50) NOT NULL, - `last_login_ip1` varchar(255) DEFAULT NULL COMMENT 'ip', - `ip_adcode` varchar(255) DEFAULT NULL COMMENT 'ip邮编', - `ip_province` varchar(50) DEFAULT NULL, - `ip_city` varchar(50) DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `user_quan_yi_level_jiang` --- - -DROP TABLE IF EXISTS `user_quan_yi_level_jiang`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `user_quan_yi_level_jiang` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(11) DEFAULT NULL, - `qy_level_id` int(11) NOT NULL, - `qy_level` int(11) DEFAULT '0', - `coupon_id` int(11) unsigned DEFAULT '0', - `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1普通降临(优惠券) 2高级奖励(奖品)', - `title` varchar(255) NOT NULL, - `jian_price` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '减多少', - `man_price` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '满多少', - `effective_day` int(11) DEFAULT NULL COMMENT '有效时间(天)', - `end_time` int(11) DEFAULT NULL, - `z_num` int(11) unsigned DEFAULT '0' COMMENT '优惠券赠送多少', - `imgurl` varchar(255) DEFAULT NULL COMMENT '奖品图片', - `shang_id` int(11) DEFAULT NULL, - `jiang_price` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '奖品价值', - `money` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '奖品兑换价', - `sc_money` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '市场参考价', - `prize_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '奖品编号', - `probability` decimal(10,2) unsigned DEFAULT NULL COMMENT '概率', - `addtime` int(11) NOT NULL, - `updatetime` int(11) NOT NULL, - `deltime` int(11) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=3146 DEFAULT CHARSET=utf8mb4 COMMENT='用户领取的权益中心等级奖品'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `user_rage` --- - -DROP TABLE IF EXISTS `user_rage`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `user_rage` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `goods_id` int(11) NOT NULL, - `rage` int(11) NOT NULL DEFAULT '0' COMMENT '怒气值', - `addtime` int(11) NOT NULL, - `updatetime` int(11) NOT NULL, - `deltime` int(11) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户的怒气值'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `user_recharge` --- - -DROP TABLE IF EXISTS `user_recharge`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `user_recharge` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID', - `order_num` varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT '订单号', - `money` decimal(10,2) unsigned NOT NULL COMMENT '充值金额', - `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '1待支付 2已完成', - `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建订单时间', - `pay_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '支付时间', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `order_num` (`order_num`) USING BTREE, - KEY `user_id` (`user_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=196 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='用户充值表'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `user_sign` --- - -DROP TABLE IF EXISTS `user_sign`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `user_sign` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id', - `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户id', - `sign_date` varchar(24) NOT NULL DEFAULT '' COMMENT '签到日期', - `sign_day` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '签到当月天数', - `days` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '连续签到天数', - `month` int(11) DEFAULT NULL COMMENT '签到月份', - `year` int(11) DEFAULT NULL COMMENT '签到年份', - `num` int(128) NOT NULL DEFAULT '0' COMMENT '签到数量', - `create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '签到时间', - `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=34325 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户签到表'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `user_statistics` --- - -DROP TABLE IF EXISTS `user_statistics`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `user_statistics` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', - `login_count` int(11) DEFAULT '0' COMMENT '登录人数', - `register_count` int(11) DEFAULT '0' COMMENT '注册人数', - `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - `record_date` date NOT NULL COMMENT '记录日期', - `recharge_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '充值金额', - `consume_user_count` int(11) NOT NULL DEFAULT '0' COMMENT '记录当天消费的用户人数(去重)', - `balance_consume` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '记录当天用户使用余额消费的总金额(单位:元)。', - `balance_issue` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '记录当天系统发放给用户的余额总金额', - `consume_order_count` int(11) NOT NULL DEFAULT '0' COMMENT '支付的订单笔数', - `consume_rmb_count` int(11) NOT NULL DEFAULT '0' COMMENT '消费rmb人数', - `recharge_sum` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '今日总收入', - `shipment_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '出货价值', - `send_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '发货价值', - `recycle_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '回收价值', - `profit_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '利润率', - `all_shipment_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '总支出', - `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`) -) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COMMENT='用户统计表'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `user_task_list` --- - -DROP TABLE IF EXISTS `user_task_list`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `user_task_list` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `task_list_id` int(11) NOT NULL, - `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1每日任务 2每周任务', - `cate` tinyint(1) NOT NULL DEFAULT '0' COMMENT '任务分类 1邀请好友注册 2抽赏任务 ', - `is_important` tinyint(1) DEFAULT '0' COMMENT '是否是重要任务 1是 0否', - `number` int(11) DEFAULT '0' COMMENT '需要完成任务几次', - `z_number` int(11) unsigned DEFAULT '0' COMMENT '赠送多少欧气值', - `addtime` int(11) NOT NULL, - `updatetime` int(11) NOT NULL, - `deltime` int(11) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=13746 DEFAULT CHARSET=utf8mb4 COMMENT='用户完成任务记录表'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `user_vip` --- - -DROP TABLE IF EXISTS `user_vip`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `user_vip` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `title` varchar(50) NOT NULL DEFAULT '0' COMMENT '等级名称', - `imgurl` varchar(200) NOT NULL COMMENT '图标', - `condition` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '升级消费', - `discount` decimal(10,2) unsigned NOT NULL COMMENT '享受折扣', - `notice` varchar(255) NOT NULL COMMENT '权益说明', - `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='会员vip'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `welfare_house` --- - -DROP TABLE IF EXISTS `welfare_house`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `welfare_house` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(100) NOT NULL COMMENT '名称', - `image` varchar(255) NOT NULL COMMENT '图片路径', - `url` varchar(255) NOT NULL COMMENT '跳转路径', - `sort` int(11) DEFAULT '0' COMMENT '排序(数字越小越靠前)', - `status` tinyint(1) DEFAULT '1' COMMENT '状态:0=禁用,1=启用', - `create_time` int(11) DEFAULT NULL COMMENT '创建时间', - `update_time` int(11) DEFAULT NULL COMMENT '更新时间', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COMMENT='福利屋管理'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `withdraw` --- - -DROP TABLE IF EXISTS `withdraw`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `withdraw` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(10) unsigned DEFAULT NULL COMMENT '提现人', - `status` tinyint(2) unsigned DEFAULT '0' COMMENT '提现:1=未审核,2=已通过3=未通过', - `addtime` int(11) unsigned DEFAULT NULL COMMENT '提现时间', - `end_time` int(10) unsigned DEFAULT NULL COMMENT '审核时间', - `reason` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '原因', - `tal_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '提现金额', - `money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '到账金额', - `sxf` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '手续费', - `type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '提现方式:1=微信,2=银行卡 3支付宝', - `imgurl` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '收款二维码', - `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '提现姓名/银行户名', - `number` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '支付宝账号/银行卡号', - `bank` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '开户行', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `wxpay_log` --- - -DROP TABLE IF EXISTS `wxpay_log`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `wxpay_log` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(10) unsigned NOT NULL DEFAULT '0', - `order_no` varchar(100) DEFAULT NULL COMMENT '订单号', - `content` text COMMENT '说明', - `type` tinyint(1) unsigned DEFAULT '1', - `channel` int(1) NOT NULL DEFAULT '1' COMMENT '1微信 2支付宝 ', - `addtime` int(14) unsigned DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `order_no` (`order_no`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=36394 DEFAULT CHARSET=utf8 COMMENT='微信/支付宝支付信息'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `yushou` --- - -DROP TABLE IF EXISTS `yushou`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `yushou` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `title` varchar(255) NOT NULL COMMENT '标题', - `imgurl` varchar(255) NOT NULL COMMENT '图片', - `goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品id', - `sale_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '预售日期', - `sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序', - `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', - `update_time` int(11) NOT NULL, - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预售日历'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping routines for database 'xinglanmh_shequt' --- -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - --- Dump completed on 2025-04-04 15:10:36 +-- MySQL dump 10.13 Distrib 5.7.44, for Linux (x86_64) +-- +-- Host: 127.0.0.1 Database: youda_test +-- ------------------------------------------------------ +-- Server version 5.7.44-log + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `admin` +-- + +DROP TABLE IF EXISTS `admin`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `admin` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `username` varchar(20) CHARACTER SET gbk DEFAULT NULL COMMENT '账号', + `nickname` varchar(20) COLLATE utf8_unicode_ci NOT NULL COMMENT '姓名', + `password` varchar(40) CHARACTER SET gbk DEFAULT NULL COMMENT '登录密码', + `qid` int(10) unsigned DEFAULT NULL COMMENT '权限ID', + `status` int(11) unsigned DEFAULT '0' COMMENT '0正常 1禁用', + `get_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '登录刷新时间', + `random` varchar(20) CHARACTER SET utf8 NOT NULL COMMENT 'token随机数', + `token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'token', + `admin_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '操作人', + `addtime` int(11) unsigned NOT NULL DEFAULT '0', + `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='管理员'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `admin_goods_log` +-- + +DROP TABLE IF EXISTS `admin_goods_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `admin_goods_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `a_id` int(11) NOT NULL COMMENT '管理员ID', + `goods_id` int(11) DEFAULT '0', + `goods_list_id` int(11) DEFAULT '0', + `original_data` text COLLATE utf8_unicode_ci, + `new_data` text COLLATE utf8_unicode_ci, + `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='管理员登录日志'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `admin_login_log` +-- + +DROP TABLE IF EXISTS `admin_login_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `admin_login_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `a_id` int(11) NOT NULL COMMENT '管理员ID', + `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='管理员登录日志'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `admin_operation_log` +-- + +DROP TABLE IF EXISTS `admin_operation_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `admin_operation_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `a_id` int(11) NOT NULL COMMENT '管理员ID', + `ip` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT '操作ip', + `operation` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '操作控制器', + `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='管理员操作日志'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `admin_quanxian` +-- + +DROP TABLE IF EXISTS `admin_quanxian`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `admin_quanxian` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(100) DEFAULT NULL, + `describe` longtext, + `quanxian` text, + `addtime` int(11) DEFAULT NULL, + `update_time` int(11) DEFAULT NULL, + `admin_id` int(11) DEFAULT NULL COMMENT '操作人', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=gbk COMMENT='权限'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `ads` +-- + +DROP TABLE IF EXISTS `ads`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ads` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `ads` int(11) DEFAULT NULL COMMENT '序号', + `title` varchar(255) DEFAULT NULL, + `account_id` varchar(255) DEFAULT NULL, + `access_token` varchar(255) DEFAULT NULL, + `user_action_set_id` varchar(255) DEFAULT NULL, + `status` int(11) DEFAULT '1' COMMENT '1.正常 2.已禁用', + `create_time` varchar(255) DEFAULT NULL, + `update_time` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `advert` +-- + +DROP TABLE IF EXISTS `advert`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `advert` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `imgurl` varchar(100) NOT NULL COMMENT '图片', + `url` varchar(225) DEFAULT NULL COMMENT '跳转路径', + `sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序', + `type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '类型 1首页轮播图 2抽卡机轮播图', + `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', + `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改时间', + `ttype` tinyint(1) unsigned DEFAULT '0' COMMENT '跳转类型 0不跳转 1优惠券 2一番赏 3无限赏', + `coupon_id` int(11) unsigned DEFAULT '0' COMMENT '优惠券id', + `goods_id` int(11) unsigned DEFAULT '0' COMMENT '盒子id', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=161 DEFAULT CHARSET=gbk; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `advert_type` +-- + +DROP TABLE IF EXISTS `advert_type`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `advert_type` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(50) NOT NULL, + `sort` int(10) DEFAULT '0', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `card_level` +-- + +DROP TABLE IF EXISTS `card_level`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `card_level` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) CHARACTER SET utf8mb4 NOT NULL COMMENT '卡名称', + `imgurl` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '等级图片', + `sort` int(11) DEFAULT NULL COMMENT '排序', + `addtime` int(11) DEFAULT NULL COMMENT '添加时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `category` +-- + +DROP TABLE IF EXISTS `category`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `category` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) NOT NULL COMMENT '商品名称', + `sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序', + `addtime` int(10) unsigned NOT NULL COMMENT '添加时间', + `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='盒子分类'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `code` +-- + +DROP TABLE IF EXISTS `code`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `code` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '验证码id', + `phone` varchar(11) NOT NULL COMMENT '手机号', + `code` varchar(6) NOT NULL COMMENT '验证码', + `addtime` int(11) NOT NULL COMMENT '添加时间', + `type` tinyint(1) NOT NULL COMMENT '类型,1 登录注册', + `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态 0正常,-1失效', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='短信记录'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `collect` +-- + +DROP TABLE IF EXISTS `collect`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `collect` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id', + `goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '盒子ID', + `num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '箱号', + `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; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `config` +-- + +DROP TABLE IF EXISTS `config`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `config` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `key` varchar(255) NOT NULL, + `value` text, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `coupon` +-- + +DROP TABLE IF EXISTS `coupon`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `coupon` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `type` tinyint(1) unsigned DEFAULT '0' COMMENT '1新人优惠券 2权益优惠卷', + `title` varchar(255) NOT NULL COMMENT '商品名称', + `sort` int(10) unsigned DEFAULT '1' COMMENT '排序值', + `price` decimal(10,2) unsigned DEFAULT NULL COMMENT '减多少', + `man_price` decimal(10,2) DEFAULT NULL COMMENT '满多少减多少', + `effective_day` int(11) DEFAULT NULL COMMENT '有效时间(天)', + `addtime` int(10) unsigned NOT NULL COMMENT '添加时间', + `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0上架 2下架 4已删除', + `ttype` tinyint(1) unsigned DEFAULT '0' COMMENT '是否限制使用 0不限制 1一番赏 2无限赏 3擂台赏 6全局赏 9领主赏 9连击赏', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=302 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='优惠券表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `coupon_receive` +-- + +DROP TABLE IF EXISTS `coupon_receive`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `coupon_receive` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) NOT NULL COMMENT '商品名称', + `price` decimal(10,2) unsigned DEFAULT NULL COMMENT '商品价格', + `man_price` decimal(10,2) DEFAULT NULL COMMENT '满多少减多少', + `end_time` int(11) DEFAULT NULL COMMENT '过期时间', + `addtime` int(10) unsigned NOT NULL COMMENT '添加时间', + `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0未使用1已使用2已过期', + `user_id` int(11) DEFAULT NULL COMMENT '会员id', + `coupon_id` int(11) DEFAULT NULL, + `state` tinyint(1) unsigned DEFAULT '0' COMMENT '是否限制使用 0不限制 1一番赏 2无限赏 3擂台赏 6全局赏 9领主赏 9连击赏', + `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='用户优惠券表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `danye` +-- + +DROP TABLE IF EXISTS `danye`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `danye` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '类型,1服务协议,2隐私政策', + `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '标题', + `content` text COLLATE utf8_unicode_ci NOT NULL COMMENT '内容', + `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改时间', + `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0正常 1隐藏', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `delivery` +-- + +DROP TABLE IF EXISTS `delivery`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `delivery` ( + `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT '快递公司', + `code` varchar(30) COLLATE utf8_unicode_ci NOT NULL COMMENT '快递编码', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='快递公司'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `error_log` +-- + +DROP TABLE IF EXISTS `error_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `error_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `goods_id` int(11) NOT NULL, + `addtime` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `give` +-- + +DROP TABLE IF EXISTS `give`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `give` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '会员id', + `time_int` varchar(100) DEFAULT NULL, + `time_date` varchar(100) DEFAULT NULL, + `money` decimal(10,2) unsigned NOT NULL COMMENT '消费金额', + `addtime` int(11) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='无限令领取记录'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `goods` +-- + +DROP TABLE IF EXISTS `goods`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `goods` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `category_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '分类ID', + `title` varchar(255) NOT NULL COMMENT '盒子名称', + `imgurl` varchar(255) NOT NULL COMMENT '盒子封面图', + `imgurl_detail` varchar(255) NOT NULL COMMENT '盒子详情图', + `price` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '商品价格', + `stock` int(10) unsigned DEFAULT '0' COMMENT '套数', + `sale_stock` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '销量库存', + `lock_is` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '锁箱 0否 1是', + `lock_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '锁箱时间', + `coupon_is` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '发券开关0关闭 1开启', + `coupon_pro` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '发券概率', + `integral_is` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '发积分开关0关闭 1开启', + `prize_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '擂台赏抽全局赏数量', + `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '1上架 2下架 3售罄', + `sort` int(10) unsigned DEFAULT '1' COMMENT '排序值', + `type` tinyint(1) unsigned DEFAULT '0' COMMENT '1一番赏 2无限赏 3擂台赏 4抽卡机 5积分赏 6全局赏 7福利盲盒 8领主赏 9连击赏', + `show_is` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '首页显示 0是 1否', + `show_price` varchar(100) DEFAULT NULL COMMENT '卡册显示价格', + `prize_imgurl` varchar(255) DEFAULT NULL COMMENT '抽卡机卡牌背面图', + `card_banner` varchar(255) DEFAULT NULL COMMENT '卡册banner', + `card_set` text COMMENT '抽卡机抽奖设置', + `card_notice` varchar(255) DEFAULT NULL COMMENT '抽卡机描述', + `sale_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '预售时间', + `addtime` int(10) unsigned NOT NULL COMMENT '添加时间', + `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改时间', + `delete_time` int(11) DEFAULT NULL, + `card_num` int(11) DEFAULT '1' COMMENT '一包几张', + `rage_is` tinyint(1) unsigned DEFAULT '0' COMMENT '怒气值开关 0关 1开', + `rage` int(11) unsigned DEFAULT '0' COMMENT '怒气值', + `item_card_id` int(11) unsigned DEFAULT '0' COMMENT '道具卡ID', + `lingzhu_is` tinyint(1) DEFAULT '0' COMMENT '领主开关 0关 1开', + `lingzhu_fan` int(11) DEFAULT '0' COMMENT '领主每发返', + `lingzhu_shang_id` int(11) DEFAULT '0' COMMENT '请选择抽中领主', + `king_user_id` int(11) DEFAULT '0' COMMENT '当前领主', + `lian_ji_num` int(11) DEFAULT '0' COMMENT '连击赏连击次数', + `lian_ji_shang_id` int(11) DEFAULT '0' COMMENT '连击赏赏id', + `is_shou_zhe` tinyint(1) unsigned DEFAULT '0' COMMENT '是否首抽五折 1是 0否', + `new_is` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '最新开关0关闭 1开启', + `goods_describe` varchar(300) DEFAULT NULL COMMENT '描述', + `quanju_xiangou` int(11) DEFAULT '0' COMMENT '全局赏限购次数', + `day_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '需要的流水', + `mouth_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '月总流水', + `mouth_pay_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '月实付', + `day_pay_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '日实付', + `user_lv` int(11) NOT NULL DEFAULT '-1' COMMENT '多少级之下能买', + `is_flw` int(1) NOT NULL DEFAULT '0' COMMENT '是否福利屋', + `flw_start_time` int(10) NOT NULL DEFAULT '0' COMMENT '福利屋开始时间', + `flw_end_time` int(10) NOT NULL DEFAULT '0' COMMENT '福利屋结束时间', + `open_time` int(10) NOT NULL DEFAULT '0' COMMENT '开奖时间', + `is_open` int(2) NOT NULL DEFAULT '0' COMMENT '0未开奖 1已开奖', + `choujiang_xianzhi` int(11) NOT NULL DEFAULT '0' COMMENT '抽奖门槛', + `async_code` varchar(64) DEFAULT NULL COMMENT '同步编码,guid', + `async_date` datetime DEFAULT NULL COMMENT '最后一次同步时间', + `is_auto_xiajia` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否自动下架', + `xiajia_lirun` int(11) NOT NULL DEFAULT '0' COMMENT '下架利润率', + `xiajia_auto_coushu` int(11) NOT NULL DEFAULT '0' COMMENT '下架生效抽数', + `unlock_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '消费多少额度解锁盒子', + `daily_xiangou` int(11) NOT NULL DEFAULT '0' COMMENT '每日限购次数', + PRIMARY KEY (`id`) USING BTREE, + 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='盒子'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `goods_extend` +-- + +DROP TABLE IF EXISTS `goods_extend`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `goods_extend` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', + `goods_id` int(11) NOT NULL COMMENT '奖品Id', + `pay_wechat` tinyint(1) NOT NULL DEFAULT '1' COMMENT '微信支付', + `pay_balance` tinyint(1) NOT NULL DEFAULT '1' COMMENT '余额支付', + `pay_currency` tinyint(1) NOT NULL DEFAULT '1' COMMENT '货币支付', + `pay_currency2` tinyint(1) NOT NULL DEFAULT '1' COMMENT '货币2支付', + `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='盒子扩展表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `goods_king_rank` +-- + +DROP TABLE IF EXISTS `goods_king_rank`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `goods_king_rank` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) unsigned NOT NULL DEFAULT '0', + `goods_id` int(11) NOT NULL, + `count` int(11) DEFAULT '0' COMMENT '多少发升级为领主', + `z_nums` int(11) unsigned DEFAULT '0' COMMENT '占领了多少发', + `money` decimal(10,2) unsigned DEFAULT '0.00', + `order_list_id` int(11) DEFAULT '0' COMMENT '奖品ID', + `addtime` int(11) DEFAULT NULL COMMENT '开始时间', + `end_time` int(11) DEFAULT NULL COMMENT '结束时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='无限赏领主'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `goods_list` +-- + +DROP TABLE IF EXISTS `goods_list`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `goods_list` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '盲盒id 0无限令 -1周榜 -2月榜', + `num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '第几套', + `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '奖品名称', + `imgurl` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '奖品图片', + `stock` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '库存', + `surplus_stock` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '剩余库存', + `price` decimal(10,2) unsigned NOT NULL COMMENT '奖品价值', + `money` decimal(10,2) unsigned NOT NULL COMMENT '奖品兑换价', + `sc_money` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '市场参考价', + `real_pro` decimal(10,5) unsigned NOT NULL DEFAULT '0.00000' COMMENT '真实概率', + `goods_type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '1现货 2预售', + `sale_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '预售时间', + `sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序', + `shang_id` int(255) DEFAULT NULL COMMENT '赏ID', + `reward_num` int(11) unsigned NOT NULL DEFAULT '0', + `rank` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '榜单排名', + `give_money` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '消费阀值', + `special_stock` int(10) NOT NULL DEFAULT '-100' COMMENT '抽卡机特殊库存', + `card_no` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '奖品赠送编号', + `prize_code` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '奖品编号', + `addtime` int(10) DEFAULT NULL COMMENT '添加时间', + `update_time` int(11) unsigned NOT NULL DEFAULT '0', + `prize_num` int(11) DEFAULT '0' COMMENT '擂台赏抽全局赏数量', + `type` tinyint(1) DEFAULT '0' COMMENT '7抽奖券的奖品', + `lian_ji_type` tinyint(1) DEFAULT '0' COMMENT '连击赏奖池分类 1秘宝池 0否', + `reward_id` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '发放奖励id', + `imgurl_detail` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '商品详情图', + `doubling` int(11) NOT NULL DEFAULT '0' COMMENT '倍率', + `goods_list_id` int(11) NOT NULL DEFAULT '0' COMMENT '父节点id', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE, + KEY `num` (`num`) USING BTREE, + KEY `goods_id` (`num`) USING BTREE, + KEY `shang_id` (`shang_id`) USING BTREE, + KEY `real_pro` (`real_pro`) USING BTREE, + KEY `stock` (`stock`) USING BTREE, + 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='盒子奖品'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `goods_lock` +-- + +DROP TABLE IF EXISTS `goods_lock`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `goods_lock` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID', + `goods_id_num` varchar(20) NOT NULL COMMENT '盒子id_num', + `endtime` int(11) unsigned NOT NULL COMMENT '过期时间', + `update_time` int(11) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='盒子锁箱信息'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `goods_offshelf_log` +-- + +DROP TABLE IF EXISTS `goods_offshelf_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `goods_offshelf_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `goods_id` int(11) NOT NULL COMMENT '盒子ID', + `profit_rate` decimal(10,2) NOT NULL COMMENT '当前利润率', + `xiajia_lirun` decimal(10,2) NOT NULL COMMENT '配置的下架利润阈值', + `order_total` decimal(10,2) NOT NULL COMMENT '订单总价值', + `goods_total` decimal(10,2) NOT NULL COMMENT '出货总价值', + `create_time` int(11) NOT NULL COMMENT '下架时间', + PRIMARY KEY (`id`), + KEY `idx_goods_id` (`goods_id`), + KEY `idx_create_time` (`create_time`) +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COMMENT='盒子自动下架日志表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `goods_type` +-- + +DROP TABLE IF EXISTS `goods_type`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `goods_type` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', + `name` varchar(30) NOT NULL COMMENT '名称', + `value` int(11) NOT NULL COMMENT 'key', + `sort_order` int(11) NOT NULL COMMENT '排序字段', + `is_show` tinyint(1) NOT NULL COMMENT '是否首页显示', + `remark` varchar(255) DEFAULT NULL COMMENT '备注', + `pay_wechat` tinyint(1) NOT NULL DEFAULT '1' COMMENT '微信支付', + `pay_balance` tinyint(1) NOT NULL DEFAULT '1' COMMENT '余额支付', + `pay_currency` tinyint(1) NOT NULL DEFAULT '1' COMMENT '货币支付', + `pay_currency2` tinyint(1) NOT NULL DEFAULT '1' COMMENT '货币2支付', + `pay_coupon` tinyint(1) NOT NULL DEFAULT '1' COMMENT '优惠券支付', + `is_deduction` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否抵扣 1:抵扣 0:支付', + `is_fenlei` tinyint(4) NOT NULL COMMENT '是否显示在分类中', + `fl_name` varchar(30) NOT NULL COMMENT '分类名称', + `corner_text` varchar(255) DEFAULT NULL COMMENT '角标文字', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `item_card` +-- + +DROP TABLE IF EXISTS `item_card`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `item_card` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `type` tinyint(1) unsigned DEFAULT '0' COMMENT '1重抽卡', + `title` varchar(255) NOT NULL COMMENT '名称', + `sort` int(10) unsigned DEFAULT '1' COMMENT '排序值', + `status` tinyint(1) DEFAULT '0' COMMENT '1正常 2下架 3删除', + `addtime` int(10) unsigned NOT NULL COMMENT '添加时间', + `updatetime` int(11) NOT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='道具卡'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `kk_order` +-- + +DROP TABLE IF EXISTS `kk_order`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `kk_order` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(10) unsigned NOT NULL COMMENT '会员id', + `order_no` varchar(100) NOT NULL COMMENT '订单号', + `total_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品总金额', + `price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '实付金额', + `money` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '余额抵扣', + `integral` decimal(10,2) unsigned DEFAULT '0.00' COMMENT 'Woo币抵扣', + `freight_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '运费金额', + `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0待付款 1待发货 2待收货 3确认收货', + `content` varchar(200) NOT NULL COMMENT '留言', + `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间', + `pay_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '支付时间', + `deliver_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '发货时间', + `confirm_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '收货时间', + `update_time` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE, + UNIQUE KEY `order_no` (`order_no`) USING BTREE, + KEY `user_id` (`user_id`) USING BTREE, + KEY `status` (`status`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='发货订单表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `kk_order_good` +-- + +DROP TABLE IF EXISTS `kk_order_good`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `kk_order_good` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(10) unsigned NOT NULL COMMENT '会员id', + `order_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单id', + `goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品id', + `goods_name` varchar(255) NOT NULL COMMENT '商品名称', + `goods_image` varchar(255) NOT NULL COMMENT '商品主图', + `goods_spec_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品规格id', + `goods_spec` varchar(255) NOT NULL COMMENT '商品规格', + `goods_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品售价', + `goods_seckill_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品秒杀价', + `goods_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '数量', + `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='订单商品'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `kk_order_send` +-- + +DROP TABLE IF EXISTS `kk_order_send`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `kk_order_send` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '会员id', + `order_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单ID', + `shou_name` varchar(255) DEFAULT NULL COMMENT '收货人姓名', + `shou_mobile` varchar(255) DEFAULT NULL COMMENT '收货人手机号', + `shou_region` varchar(255) DEFAULT NULL COMMENT '所在地区 省/市/区(名称)', + `address` varchar(255) DEFAULT NULL COMMENT '详细地址', + `delivery_name` varchar(255) DEFAULT NULL COMMENT '物流名称', + `delivery_no` varchar(255) DEFAULT NULL COMMENT '物流单号', + `update_time` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE, + UNIQUE KEY `order_id` (`order_id`) USING BTREE, + KEY `user_id` (`user_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='发货订单地址物流信息'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `kk_product` +-- + +DROP TABLE IF EXISTS `kk_product`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `kk_product` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `seckill_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '秒杀时间段id', + `cate_id1` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '分类父级id', + `cate_id2` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '分类子级id', + `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '商品名称', + `image` varchar(200) COLLATE utf8_unicode_ci NOT NULL COMMENT '商品主图', + `detail_image` text COLLATE utf8_unicode_ci NOT NULL COMMENT '详情图', + `content` longtext COLLATE utf8_unicode_ci COMMENT '商品详情', + `freight` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '运费', + `sale_num` int(9) unsigned NOT NULL DEFAULT '0' COMMENT '销量', + `sort` int(7) unsigned NOT NULL DEFAULT '0' COMMENT '商品排序', + `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0上架 1下架', + `spec_data` longtext COLLATE utf8_unicode_ci COMMENT '规格信息', + `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', + `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE, + KEY `title` (`title`) USING BTREE, + KEY `status` (`status`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='商品表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `kk_product_cate` +-- + +DROP TABLE IF EXISTS `kk_product_cate`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `kk_product_cate` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '分类标题', + `imgurl` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '分类图片', + `sort` int(5) unsigned DEFAULT '1' COMMENT '排序值', + `status` tinyint(1) unsigned DEFAULT '1' COMMENT '1 正常 2 删除', + `pid` int(11) DEFAULT '0' COMMENT '上级id', + `addtime` int(10) unsigned NOT NULL COMMENT '添加时间', + `title2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '英文标题', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='商品分类'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `kk_product_category` +-- + +DROP TABLE IF EXISTS `kk_product_category`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `kk_product_category` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `pid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '父级id', + `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '商品名称', + `imgurl` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '分类图片', + `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '1显示 0隐藏', + `sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '0', + `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', + `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='普通商城商品分类'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `kk_product_spec` +-- + +DROP TABLE IF EXISTS `kk_product_spec`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `kk_product_spec` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `pro_id` int(11) NOT NULL COMMENT '商品id', + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '名称', + `price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '售价', + `seckill_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '秒杀价', + `stock` int(9) unsigned NOT NULL DEFAULT '0' COMMENT '库存', + `pic` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '图片', + `ks` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '标识', + `time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE, + KEY `pro_id` (`pro_id`) USING BTREE, + KEY `ks` (`ks`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='商品规格'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `kk_seckill` +-- + +DROP TABLE IF EXISTS `kk_seckill`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `kk_seckill` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `seckill_time` varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT '秒杀时间段', + `goods_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品限购数量', + `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', + `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='秒杀设置'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `kk_share` +-- + +DROP TABLE IF EXISTS `kk_share`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `kk_share` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '点击人ID', + `goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品id', + `share_user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '分享用户id', + `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='商品分享记录表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `market` +-- + +DROP TABLE IF EXISTS `market`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `market` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `order_num` varchar(255) NOT NULL COMMENT '挂售单号', + `price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '价格', + `order_list_ids` longtext NOT NULL COMMENT 'id字符串', + `status` tinyint(1) unsigned DEFAULT '0' COMMENT '0在售 1已售 2已撤回', + `stock` tinyint(1) unsigned NOT NULL DEFAULT '1', + `addtime` int(11) NOT NULL, + `update_time` int(11) NOT NULL, + `deltime` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='集市'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `market_order` +-- + +DROP TABLE IF EXISTS `market_order`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `market_order` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `market_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `order_num` varchar(255) NOT NULL COMMENT '挂售单号', + `price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '价格', + `order_list_ids` longtext NOT NULL COMMENT 'id字符串', + `status` tinyint(1) unsigned DEFAULT '0' COMMENT '1未支付 2已支付 3卡单', + `pay_time` int(11) DEFAULT NULL, + `total` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '总价', + `total_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '实际支付', + `money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '支付了多少市集余额', + `addtime` int(11) NOT NULL, + `update_time` int(11) NOT NULL, + `deltime` int(11) DEFAULT NULL, + `zdfh_is` tinyint(1) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='集市订单'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `migrations` +-- + +DROP TABLE IF EXISTS `migrations`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `migrations` ( + `version` bigint(20) NOT NULL, + `migration_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `start_time` timestamp NULL DEFAULT NULL, + `end_time` timestamp NULL DEFAULT NULL, + `breakpoint` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`version`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `notify_log` +-- + +DROP TABLE IF EXISTS `notify_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `notify_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `order_no` varchar(40) NOT NULL, + `addtime` int(11) NOT NULL, + `xml` text, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `order` +-- + +DROP TABLE IF EXISTS `order`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `order` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID', + `order_num` varchar(60) NOT NULL COMMENT '订单号', + `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_draw` int(11) DEFAULT '0' COMMENT '抽奖券抵扣', + `use_item_card` int(11) DEFAULT '0' COMMENT '道具卡抵扣 (使用的数量)', + `zhe` decimal(10,2) unsigned NOT NULL COMMENT '折扣', + `goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '盒子id', + `num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '第几套', + `goods_price` decimal(10,2) unsigned NOT NULL COMMENT '盒子单价', + `goods_title` varchar(100) DEFAULT NULL COMMENT '盒子标题', + `goods_imgurl` varchar(200) DEFAULT NULL COMMENT '盒子图片', + `prize_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '抽奖数量', + `prize_card_set` text COMMENT '抽卡机必出设置', + `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0未支付 1支付', + `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连击赏', + `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 '优惠券抵扣', + `is_mibao` tinyint(1) DEFAULT '0' COMMENT '连击赏下 是否是抽的秘宝池 1是 0否', + `is_shou_zhe` tinyint(1) DEFAULT '0' COMMENT '是否首抽五折', + `zdfh_is` tinyint(1) unsigned NOT NULL DEFAULT '0', + `ad_id` int(11) DEFAULT '0' COMMENT '广告id', + `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抵扣金额', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE, + UNIQUE KEY `order_num` (`order_num`) USING BTREE, + KEY `user_id` (`user_id`) USING BTREE, + 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='订单表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `order_list` +-- + +DROP TABLE IF EXISTS `order_list`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `order_list` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `order_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单id', + `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id', + `recovery_num` varchar(100) DEFAULT NULL COMMENT '回收订单', + `send_num` varchar(100) DEFAULT NULL COMMENT '发货订单号', + `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0待选择 1回收 2选择发货 3发布集市', + `goods_id` int(11) DEFAULT '0' COMMENT '盒子ID', + `num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '第几箱', + `shang_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '赏ID', + `goodslist_id` int(10) unsigned NOT NULL COMMENT '奖品id', + `goodslist_title` varchar(100) DEFAULT NULL COMMENT '奖品名称', + `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_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_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', + `is_chong` tinyint(1) DEFAULT '0' COMMENT '是否使用重抽卡 0否 1是', + `deltime` int(11) DEFAULT NULL, + `source` tinyint(1) unsigned DEFAULT '1' COMMENT '1抽奖 2集市购买', + `fh_status` int(11) NOT NULL DEFAULT '0' COMMENT '发货状态,1已发货,2未发货', + `fh_remarks` varchar(255) DEFAULT NULL COMMENT '发货备注', + `doubling` int(11) NOT NULL DEFAULT '0' COMMENT '抽奖倍率', + `parent_goods_list_id` int(11) NOT NULL DEFAULT '0' COMMENT '所属宝箱id', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE, + KEY `user_id` (`user_id`) USING BTREE, + KEY `order_id` (`order_id`) USING BTREE, + KEY `num` (`num`) USING BTREE, + KEY `goods_id` (`goods_id`) USING BTREE, + KEY `recovery_num` (`recovery_num`) USING BTREE, + KEY `send_num` (`send_num`) USING BTREE, + KEY `prize_code` (`prize_code`) USING BTREE, + KEY `order_type` (`order_type`) USING BTREE, + KEY `status` (`status`) USING BTREE, + KEY `insurance_is` (`insurance_is`) USING BTREE, + 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='订单明细'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `order_list_recovery` +-- + +DROP TABLE IF EXISTS `order_list_recovery`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `order_list_recovery` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) unsigned NOT NULL DEFAULT '0', + `recovery_num` varchar(100) NOT NULL COMMENT '打包订单号', + `money` decimal(10,2) unsigned NOT NULL COMMENT '打包金额', + `count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '打包数量', + `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '打包时间', + PRIMARY KEY (`id`) USING BTREE, + 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='打包记录'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `order_list_send` +-- + +DROP TABLE IF EXISTS `order_list_send`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `order_list_send` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id', + `send_num` varchar(100) NOT NULL COMMENT '发货订单号', + `freight` decimal(10,2) unsigned NOT NULL COMMENT '运费', + `status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '0待支付 1待发货 2待收货 3已完成 4后台取消', + `count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '发货数量', + `name` varchar(255) DEFAULT NULL COMMENT '收货人姓名', + `mobile` varchar(255) DEFAULT NULL COMMENT '收货人电话', + `address` varchar(255) DEFAULT NULL COMMENT '收货地址', + `message` varchar(255) DEFAULT NULL COMMENT '备注', + `courier_number` varchar(50) DEFAULT NULL COMMENT '快递单号', + `courier_name` varchar(255) DEFAULT NULL COMMENT '快递名称', + `courier_code` varchar(50) DEFAULT NULL COMMENT '快递code', + `delivery_list` text COMMENT '物流轨迹信息', + `delivery_status` tinyint(1) NOT NULL DEFAULT '-1' COMMENT '物流状态', + `delivery_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '物流请求时间', + `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '下单时间', + `pay_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '支付时间', + `send_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '发货时间', + `shou_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '收货时间', + `cancel_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '取消时间', + `admin_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '管理员id', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE, + UNIQUE KEY `send_num` (`send_num`) USING BTREE, + KEY `user_id` (`user_id`) USING BTREE, + KEY `status` (`status`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='发货记录'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `picture` +-- + +DROP TABLE IF EXISTS `picture`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `picture` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `imgurl` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `token` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `addtime` int(10) unsigned NOT NULL, + `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; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `profit_draw` +-- + +DROP TABLE IF EXISTS `profit_draw`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `profit_draw` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id', + `change_money` decimal(10,2) NOT NULL COMMENT '变化的金额', + `money` decimal(10,2) unsigned NOT NULL COMMENT '变化后的金额', + `type` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '1后台充值 2在线充值 3抽赏消费 4背包回收 5推荐奖励', + `content` varchar(255) NOT NULL COMMENT '描述', + `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', + `share_uid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '来源ID', + `other` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE, + KEY `user_id` (`user_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='财务明细'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `profit_expenses` +-- + +DROP TABLE IF EXISTS `profit_expenses`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `profit_expenses` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', + `expense_type` int(10) NOT NULL COMMENT '支出类型', + `amount` decimal(10,2) NOT NULL COMMENT '支出金额', + `description` varchar(255) DEFAULT NULL COMMENT '说明', + `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + `profit_date` date NOT NULL COMMENT '账单日期', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='利润支出表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `profit_integral` +-- + +DROP TABLE IF EXISTS `profit_integral`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `profit_integral` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id', + `change_money` decimal(10,2) NOT NULL COMMENT '变化的金额', + `money` decimal(10,2) unsigned NOT NULL COMMENT '变化后的金额', + `type` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '1后台充值 2抽赏消费 3开券获得 4领主返币 5分享欧气券', + `content` varchar(255) NOT NULL COMMENT '描述', + `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', + `share_uid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '来源ID', + `other` varchar(255) DEFAULT NULL, + 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='财务明细'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `profit_money` +-- + +DROP TABLE IF EXISTS `profit_money`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `profit_money` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id', + `change_money` decimal(10,2) NOT NULL COMMENT '变化的金额', + `money` decimal(10,2) unsigned NOT NULL COMMENT '变化后的金额', + `type` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '1后台充值 2在线充值 3抽赏消费 4背包回收 5推荐奖励', + `content` varchar(255) NOT NULL COMMENT '描述', + `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', + `share_uid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '来源ID', + `other` varchar(255) DEFAULT NULL, + 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='财务明细'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `profit_money2` +-- + +DROP TABLE IF EXISTS `profit_money2`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `profit_money2` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id', + `change_money` decimal(10,2) NOT NULL COMMENT '变化的金额', + `money` decimal(10,2) unsigned NOT NULL COMMENT '变化后的金额', + `type` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '1后台充值 2在线充值 3市集消费 4市集售卖 5提现 6提现驳回 7提现手续费', + `content` varchar(255) NOT NULL COMMENT '描述', + `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', + `share_uid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '来源ID', + `other` varchar(255) DEFAULT NULL, + 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='财务明细'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `profit_ou_qi` +-- + +DROP TABLE IF EXISTS `profit_ou_qi`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `profit_ou_qi` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id', + `change_money` decimal(10,2) NOT NULL COMMENT '变化的金额', + `money` decimal(10,2) unsigned NOT NULL COMMENT '变化后的金额', + `type` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '1完成任务 2消费赠送 3升级清空 4升级后多出', + `content` varchar(255) NOT NULL COMMENT '描述', + `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', + `other` varchar(255) DEFAULT NULL, + 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='欧气值明细'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `profit_pay` +-- + +DROP TABLE IF EXISTS `profit_pay`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `profit_pay` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id', + `order_num` varchar(100) NOT NULL COMMENT '订单号', + `change_money` decimal(10,2) NOT NULL COMMENT '变化的金额', + `content` varchar(255) NOT NULL COMMENT '描述', + `pay_type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '1微信 2支付宝', + `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE, + KEY `user_id` (`user_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='(微信/支付宝)支付'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `profit_revenue` +-- + +DROP TABLE IF EXISTS `profit_revenue`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `profit_revenue` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', + `expense_type` int(10) NOT NULL COMMENT '收入类型', + `price` decimal(10,2) NOT NULL COMMENT '收入金额', + `user_id` int(10) NOT NULL COMMENT '用户id', + `amount` decimal(10,2) NOT NULL COMMENT '发放货币', + `description` varchar(255) DEFAULT NULL COMMENT '说明', + `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + `profit_date` date NOT NULL COMMENT '账单日期', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='利润收入表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `profit_score` +-- + +DROP TABLE IF EXISTS `profit_score`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `profit_score` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id', + `change_money` decimal(10,2) NOT NULL COMMENT '变化的金额', + `money` decimal(10,2) unsigned NOT NULL COMMENT '变化后的金额', + `type` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '1后台充值 2抽赏消费 3升级获得 4抽赏奖励', + `content` varchar(255) NOT NULL COMMENT '描述', + `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', + `share_uid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '来源ID', + `other` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE, + KEY `user_id` (`user_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='财务明细'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `quan_yi_level` +-- + +DROP TABLE IF EXISTS `quan_yi_level`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `quan_yi_level` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `level` int(11) NOT NULL, + `title` varchar(255) NOT NULL, + `number` int(11) NOT NULL COMMENT '需要多少欧气值', + `addtime` int(11) NOT NULL, + `updatetime` int(11) NOT NULL, + `deltime` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=76 DEFAULT CHARSET=utf8mb4 COMMENT='权益等级表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `quan_yi_level_jiang` +-- + +DROP TABLE IF EXISTS `quan_yi_level_jiang`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `quan_yi_level_jiang` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `qy_level_id` int(11) NOT NULL, + `qy_level` int(11) DEFAULT NULL, + `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1普通降临(优惠券) 2高级奖励(奖品)', + `title` varchar(255) NOT NULL, + `jian_price` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '减多少', + `coupon_id` int(11) unsigned DEFAULT '0', + `man_price` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '满多少', + `probability` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '概率', + `effective_day` int(11) DEFAULT NULL COMMENT '有效时间(天)', + `z_num` int(11) unsigned DEFAULT '0' COMMENT '优惠券赠送多少', + `imgurl` varchar(255) DEFAULT NULL COMMENT '奖品图片', + `shang_id` int(11) DEFAULT NULL, + `jiang_price` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '奖品价值', + `money` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '奖品兑换价', + `sc_money` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '市场参考价', + `prize_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '奖品编号', + `addtime` int(11) NOT NULL, + `updatetime` int(11) NOT NULL, + `deltime` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=226 DEFAULT CHARSET=utf8mb4 COMMENT='权益中心等级奖品'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `rank_month` +-- + +DROP TABLE IF EXISTS `rank_month`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rank_month` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID', + `rank` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排名', + `money` decimal(10,2) unsigned NOT NULL COMMENT '消费金额', + `month_time` varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT '统计范围', + `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', + `order_list_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '奖品ID', + `prize_title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `prize_imgurl` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `user_id` (`user_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='排行榜月榜'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `rank_week` +-- + +DROP TABLE IF EXISTS `rank_week`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rank_week` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID', + `rank` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排名', + `money` decimal(10,2) unsigned NOT NULL COMMENT '消费金额', + `week_time` varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT '统计范围', + `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', + `order_list_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '奖品ID', + `prize_title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `prize_imgurl` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `user_id` (`user_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='排行榜周榜'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `reward` +-- + +DROP TABLE IF EXISTS `reward`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `reward` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `reward_type` int(11) NOT NULL COMMENT '奖励类型(1:钻石,2:货币1,3:货币2,4:优惠券)', + `reward_extend` int(11) DEFAULT NULL COMMENT '奖励ID(当reward_type=1时为优惠券ID)', + `reward_value` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '奖励值', + `description` varchar(255) DEFAULT NULL COMMENT '奖励描述', + `create_time` int(11) DEFAULT NULL, + `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='奖励表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `shang` +-- + +DROP TABLE IF EXISTS `shang`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shang` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `pro` decimal(10,2) unsigned NOT NULL, + `imgurl` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, + `color` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, + `goods_id` int(11) unsigned NOT NULL DEFAULT '0', + `special_imgurl` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `sort` int(11) unsigned NOT NULL DEFAULT '0', + `update_time` int(11) unsigned DEFAULT '0', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=116 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `sign_config` +-- + +DROP TABLE IF EXISTS `sign_config`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `sign_config` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `type` tinyint(1) NOT NULL COMMENT '配置类型(1:累计签到配置,2:每日签到配置)', + `day` tinyint(1) DEFAULT NULL COMMENT '指定星期几(type=2时有效,1-7代表周一到周日)', + `title` varchar(100) DEFAULT NULL COMMENT '配置标题', + `icon` varchar(255) DEFAULT NULL COMMENT '图标', + `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态(0禁用,1启用)', + `sort` int(11) DEFAULT '0' COMMENT '排序', + `create_time` int(11) DEFAULT NULL, + `update_time` int(11) DEFAULT NULL, + `reward_id` varchar(64) NOT NULL COMMENT '奖励id', + `description` varchar(255) DEFAULT NULL COMMENT '备注', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8mb4 COMMENT='签到配置表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `task_list` +-- + +DROP TABLE IF EXISTS `task_list`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `task_list` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) NOT NULL COMMENT '任务名称', + `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1每日任务 2每周任务', + `cate` tinyint(1) NOT NULL DEFAULT '0' COMMENT '任务分类 1邀请好友注册 2抽赏任务 ', + `is_important` tinyint(1) DEFAULT '0' COMMENT '是否是重要任务 1是 0否', + `number` int(11) DEFAULT '0' COMMENT '需要完成任务几次', + `z_number` int(11) unsigned DEFAULT '0' COMMENT '赠送多少欧气值', + `sort` int(11) unsigned DEFAULT '0' COMMENT '排序', + `addtime` int(11) NOT NULL, + `updatetime` int(11) NOT NULL, + `deltime` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COMMENT='任务表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `user` +-- + +DROP TABLE IF EXISTS `user`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `openid` varchar(50) NOT NULL DEFAULT '' COMMENT '微信openid', + `mobile` varchar(11) DEFAULT NULL COMMENT '手机号', + `nickname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '昵称', + `headimg` varchar(255) NOT NULL COMMENT '头像', + `pid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '父级id', + `money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '余额', + `money2` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '集市余额', + `integral` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '幸运币', + `score` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '积分', + `ou_qi` int(11) unsigned DEFAULT '0' COMMENT '欧气值', + `ou_qi_level` int(11) unsigned DEFAULT '0' COMMENT '欧气值等级', + `vip` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT 'vip等级', + `share_image` varchar(255) DEFAULT NULL COMMENT '分享海报', + `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态:1正常,2禁用', + `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', + `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改时间', + `last_login_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '最后操作时间', + `draw_num` int(11) DEFAULT '0' COMMENT '优惠券的数量', + `is_use_coupon` tinyint(3) DEFAULT '0' COMMENT '0未领取1已领取', + `mb_number` int(11) unsigned DEFAULT '0' COMMENT '连击赏秘宝池抽奖次数', + `click_id` int(11) DEFAULT '0', + `unionid` varchar(255) DEFAULT NULL COMMENT '用户唯一id', + `gzh_openid` varchar(255) DEFAULT NULL COMMENT '公众号openid', + `password` varchar(40) DEFAULT NULL, + `istest` int(11) NOT NULL DEFAULT '0' COMMENT '是否测试账号', + `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; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `user_account` +-- + +DROP TABLE IF EXISTS `user_account`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_account` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) unsigned NOT NULL DEFAULT '0', + `account_token` varchar(255) NOT NULL COMMENT '登陆秘钥', + `token_num` varchar(50) NOT NULL COMMENT '秘钥随机数', + `token_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '秘钥时间戳', + `last_login_time` int(11) unsigned NOT NULL DEFAULT '0', + `last_login_ip` varchar(50) NOT NULL, + `last_login_ip1` varchar(255) DEFAULT NULL COMMENT 'ip', + `ip_adcode` varchar(255) DEFAULT NULL COMMENT 'ip邮编', + `ip_province` varchar(50) DEFAULT NULL, + `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; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `user_coupon` +-- + +DROP TABLE IF EXISTS `user_coupon`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_coupon` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户的id', + `level` int(11) unsigned DEFAULT '0' COMMENT '1特级赏券 2终极赏券 3高级赏券 4普通赏券', + `num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '开奖总金额', + `l_num` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '领取多少', + `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '1未分享 2已分享 3已领取 4被消耗融合', + `type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '1下单赠送 2领取 3融合得到', + `title` varchar(255) NOT NULL COMMENT '劵名称', + `from_id` varchar(50) NOT NULL DEFAULT '0' COMMENT '来源id (订单、领取)', + `share_time` int(11) DEFAULT NULL COMMENT '分享时间', + `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '获取时间', + `updatetime` int(11) DEFAULT NULL, + `own` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '自己可以获得多少', + `own2` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '自己可以获得多少', + `other` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '其他人可以获得多少', + `other2` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '其他人可以获得多少', + `kl_num` int(11) unsigned DEFAULT '0' COMMENT '最多可参与人数', + `kl_num2` int(11) unsigned DEFAULT '0' COMMENT '最多可参与人数', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE, + KEY `user_id` (`user_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='欧气劵'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `user_goods_lian_ji` +-- + +DROP TABLE IF EXISTS `user_goods_lian_ji`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_goods_lian_ji` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `goods_id` int(11) NOT NULL, + `number` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '连击次数', + `addtime` int(11) NOT NULL, + `updatetime` int(11) NOT NULL, + `deltime` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='用户连击赏连击次数'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `user_item_card` +-- + +DROP TABLE IF EXISTS `user_item_card`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_item_card` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `type` tinyint(1) unsigned DEFAULT '0' COMMENT '类型', + `item_card_id` int(11) NOT NULL, + `title` varchar(255) NOT NULL COMMENT '名称', + `status` tinyint(1) DEFAULT '0' COMMENT '1未使用 2已使用', + `order_id` int(11) DEFAULT '0' COMMENT '抵扣的订单ID', + `addtime` int(11) unsigned NOT NULL, + `updatetime` int(11) NOT NULL, + `deltime` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户的道具卡'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `user_login_ip` +-- + +DROP TABLE IF EXISTS `user_login_ip`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_login_ip` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) unsigned NOT NULL DEFAULT '0', + `last_login_time` int(11) unsigned NOT NULL DEFAULT '0', + `last_login_ip` varchar(50) NOT NULL, + `last_login_ip1` varchar(255) DEFAULT NULL COMMENT 'ip', + `ip_adcode` varchar(255) DEFAULT NULL COMMENT 'ip邮编', + `ip_province` varchar(50) DEFAULT NULL, + `ip_city` varchar(50) DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `user_login_log` +-- + +DROP TABLE IF EXISTS `user_login_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_login_log` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID', + `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID', + `login_date` date NOT NULL COMMENT '登录日期', + `login_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '登录时间戳', + `device` varchar(50) DEFAULT '' COMMENT '登录设备', + `ip` varchar(50) DEFAULT '' COMMENT '登录IP', + `location` varchar(100) DEFAULT '' COMMENT '登录地点', + `year` int(4) unsigned NOT NULL DEFAULT '0' COMMENT '年份', + `month` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '月份', + `week` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '周数', + PRIMARY KEY (`id`) USING BTREE, + KEY `idx_user_date` (`user_id`,`login_date`) USING BTREE, + 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='用户登录记录表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `user_quan_yi_level_jiang` +-- + +DROP TABLE IF EXISTS `user_quan_yi_level_jiang`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_quan_yi_level_jiang` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) DEFAULT NULL, + `qy_level_id` int(11) NOT NULL, + `qy_level` int(11) DEFAULT '0', + `coupon_id` int(11) unsigned DEFAULT '0', + `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1普通降临(优惠券) 2高级奖励(奖品)', + `title` varchar(255) NOT NULL, + `jian_price` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '减多少', + `man_price` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '满多少', + `effective_day` int(11) DEFAULT NULL COMMENT '有效时间(天)', + `end_time` int(11) DEFAULT NULL, + `z_num` int(11) unsigned DEFAULT '0' COMMENT '优惠券赠送多少', + `imgurl` varchar(255) DEFAULT NULL COMMENT '奖品图片', + `shang_id` int(11) DEFAULT NULL, + `jiang_price` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '奖品价值', + `money` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '奖品兑换价', + `sc_money` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '市场参考价', + `prize_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '奖品编号', + `probability` decimal(10,2) unsigned DEFAULT NULL COMMENT '概率', + `addtime` int(11) NOT NULL, + `updatetime` int(11) NOT NULL, + `deltime` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='用户领取的权益中心等级奖品'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `user_rage` +-- + +DROP TABLE IF EXISTS `user_rage`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_rage` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `goods_id` int(11) NOT NULL, + `rage` int(11) NOT NULL DEFAULT '0' COMMENT '怒气值', + `addtime` int(11) NOT NULL, + `updatetime` int(11) NOT NULL, + `deltime` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户的怒气值'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `user_recharge` +-- + +DROP TABLE IF EXISTS `user_recharge`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_recharge` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID', + `order_num` varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT '订单号', + `money` decimal(10,2) unsigned NOT NULL COMMENT '充值金额', + `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '1待支付 2已完成', + `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建订单时间', + `pay_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '支付时间', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `order_num` (`order_num`) USING BTREE, + KEY `user_id` (`user_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='用户充值表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `user_sign` +-- + +DROP TABLE IF EXISTS `user_sign`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_sign` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id', + `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户id', + `sign_date` varchar(24) NOT NULL DEFAULT '' COMMENT '签到日期', + `sign_day` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '签到当月天数', + `days` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '连续签到天数', + `month` int(11) DEFAULT NULL COMMENT '签到月份', + `year` int(11) DEFAULT NULL COMMENT '签到年份', + `num` int(128) NOT NULL DEFAULT '0' COMMENT '签到数量', + `create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '签到时间', + `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='用户签到表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `user_statistics` +-- + +DROP TABLE IF EXISTS `user_statistics`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_statistics` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', + `login_count` int(11) DEFAULT '0' COMMENT '登录人数', + `register_count` int(11) DEFAULT '0' COMMENT '注册人数', + `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + `record_date` date NOT NULL COMMENT '记录日期', + `recharge_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '充值金额', + `consume_user_count` int(11) NOT NULL DEFAULT '0' COMMENT '记录当天消费的用户人数(去重)', + `balance_consume` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '记录当天用户使用余额消费的总金额(单位:元)。', + `balance_issue` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '记录当天系统发放给用户的余额总金额', + `consume_order_count` int(11) NOT NULL DEFAULT '0' COMMENT '支付的订单笔数', + `consume_rmb_count` int(11) NOT NULL DEFAULT '0' COMMENT '消费rmb人数', + `recharge_sum` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '今日总收入', + `shipment_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '出货价值', + `send_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '发货价值', + `recycle_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '回收价值', + `profit_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '利润率', + `all_shipment_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '总支出', + `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='用户统计表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `user_task_list` +-- + +DROP TABLE IF EXISTS `user_task_list`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_task_list` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `task_list_id` int(11) NOT NULL, + `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1每日任务 2每周任务', + `cate` tinyint(1) NOT NULL DEFAULT '0' COMMENT '任务分类 1邀请好友注册 2抽赏任务 ', + `is_important` tinyint(1) DEFAULT '0' COMMENT '是否是重要任务 1是 0否', + `number` int(11) DEFAULT '0' COMMENT '需要完成任务几次', + `z_number` int(11) unsigned DEFAULT '0' COMMENT '赠送多少欧气值', + `addtime` int(11) NOT NULL, + `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='用户完成任务记录表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `user_vip` +-- + +DROP TABLE IF EXISTS `user_vip`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_vip` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(50) NOT NULL DEFAULT '0' COMMENT '等级名称', + `imgurl` varchar(200) NOT NULL COMMENT '图标', + `condition` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '升级消费', + `discount` decimal(10,2) unsigned NOT NULL COMMENT '享受折扣', + `notice` varchar(255) NOT NULL COMMENT '权益说明', + `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='会员vip'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `welfare_house` +-- + +DROP TABLE IF EXISTS `welfare_house`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `welfare_house` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL COMMENT '名称', + `image` varchar(255) NOT NULL COMMENT '图片路径', + `url` varchar(255) NOT NULL COMMENT '跳转路径', + `sort` int(11) DEFAULT '0' COMMENT '排序(数字越小越靠前)', + `status` tinyint(1) DEFAULT '1' COMMENT '状态:0=禁用,1=启用', + `create_time` int(11) DEFAULT NULL COMMENT '创建时间', + `update_time` int(11) DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COMMENT='福利屋管理'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `withdraw` +-- + +DROP TABLE IF EXISTS `withdraw`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `withdraw` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(10) unsigned DEFAULT NULL COMMENT '提现人', + `status` tinyint(2) unsigned DEFAULT '0' COMMENT '提现:1=未审核,2=已通过3=未通过', + `addtime` int(11) unsigned DEFAULT NULL COMMENT '提现时间', + `end_time` int(10) unsigned DEFAULT NULL COMMENT '审核时间', + `reason` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '原因', + `tal_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '提现金额', + `money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '到账金额', + `sxf` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '手续费', + `type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '提现方式:1=微信,2=银行卡 3支付宝', + `imgurl` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '收款二维码', + `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '提现姓名/银行户名', + `number` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '支付宝账号/银行卡号', + `bank` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '开户行', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `wxpay_log` +-- + +DROP TABLE IF EXISTS `wxpay_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wxpay_log` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(10) unsigned NOT NULL DEFAULT '0', + `order_no` varchar(100) DEFAULT NULL COMMENT '订单号', + `content` text COMMENT '说明', + `type` tinyint(1) unsigned DEFAULT '1', + `channel` int(1) NOT NULL DEFAULT '1' COMMENT '1微信 2支付宝 ', + `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='微信/支付宝支付信息'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `yushou` +-- + +DROP TABLE IF EXISTS `yushou`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `yushou` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) NOT NULL COMMENT '标题', + `imgurl` varchar(255) NOT NULL COMMENT '图片', + `goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品id', + `sale_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '预售日期', + `sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序', + `addtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间', + `update_time` int(11) NOT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预售日历'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping routines for database 'youda_test' +-- +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2025-04-09 22:54:10 diff --git a/抽奖算法优化说明.md b/抽奖算法优化说明.md old mode 100644 new mode 100755