mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
同步数据表
This commit is contained in:
parent
9fdb584b9d
commit
644188231e
@ -11,7 +11,7 @@
|
||||
Target Server Version : 50562
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 26/03/2021 17:48:18
|
||||
Date: 26/03/2021 18:05:56
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
@ -36,10 +36,10 @@ CREATE TABLE `data_base_discount` (
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-基础-折扣' ROW_FORMAT = Compact;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_base_notify
|
||||
-- Table structure for data_base_message
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `data_base_notify`;
|
||||
CREATE TABLE `data_base_notify` (
|
||||
DROP TABLE IF EXISTS `data_base_message`;
|
||||
CREATE TABLE `data_base_message` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '消息类型',
|
||||
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '消息名称',
|
||||
@ -50,11 +50,34 @@ CREATE TABLE `data_base_notify` (
|
||||
`deleted` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '删除状态',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_data_base_notify_type`(`type`) USING BTREE,
|
||||
INDEX `idx_data_base_notify_status`(`status`) USING BTREE,
|
||||
INDEX `idx_data_base_notify_deleted`(`deleted`) USING BTREE
|
||||
INDEX `idx_data_base_message_type`(`type`) USING BTREE,
|
||||
INDEX `idx_data_base_message_status`(`status`) USING BTREE,
|
||||
INDEX `idx_data_base_message_deleted`(`deleted`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-基础-通知' ROW_FORMAT = COMPACT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_base_payment
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `data_base_payment`;
|
||||
CREATE TABLE `data_base_payment` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付类型',
|
||||
`code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '通道编号',
|
||||
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付名称',
|
||||
`cover` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付图标',
|
||||
`content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '支付参数',
|
||||
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付说明',
|
||||
`sort` bigint(20) NULL DEFAULT 0 COMMENT '排序权重',
|
||||
`status` tinyint(1) NULL DEFAULT 1 COMMENT '支付状态(1使用,0禁用)',
|
||||
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除状态',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_data_base_payment_type`(`type`) USING BTREE,
|
||||
INDEX `idx_data_base_payment_code`(`code`) USING BTREE,
|
||||
INDEX `idx_data_base_payment_status`(`status`) USING BTREE,
|
||||
INDEX `idx_data_base_payment_deleted`(`deleted`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-基础-支付' ROW_FORMAT = COMPACT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_base_upgrade
|
||||
-- ----------------------------
|
||||
@ -622,29 +645,6 @@ CREATE TABLE `shop_order_send` (
|
||||
INDEX `idx_shop_order_send_order_no`(`order_no`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 28 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商城-订单-配送' ROW_FORMAT = COMPACT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for shop_payment
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `shop_payment`;
|
||||
CREATE TABLE `shop_payment` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付类型',
|
||||
`code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '通道编号',
|
||||
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付名称',
|
||||
`cover` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付图标',
|
||||
`content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '支付参数',
|
||||
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付说明',
|
||||
`sort` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '排序权重',
|
||||
`status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '支付状态(1使用,0禁用)',
|
||||
`deleted` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '删除状态',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_shop_payment_type`(`type`) USING BTREE,
|
||||
INDEX `idx_shop_payment_code`(`code`) USING BTREE,
|
||||
INDEX `idx_shop_payment_status`(`status`) USING BTREE,
|
||||
INDEX `idx_shop_payment_deleted`(`deleted`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商城-支付-方式' ROW_FORMAT = COMPACT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for shop_payment_item
|
||||
-- ----------------------------
|
||||
@ -818,7 +818,7 @@ CREATE TABLE `system_oplog` (
|
||||
`username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '操作人用户名',
|
||||
`create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 153 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-日志' ROW_FORMAT = COMPACT;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 155 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-日志' ROW_FORMAT = COMPACT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for system_queue
|
||||
|
@ -9,16 +9,16 @@ use think\admin\extend\CodeExtend;
|
||||
|
||||
/**
|
||||
* 支付参数支付
|
||||
* Class ShopPayment
|
||||
* Class BasePayment
|
||||
* @package app\data\controller
|
||||
*/
|
||||
class ShopPayment extends Controller
|
||||
class BasePayment extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
private $table = 'ShopPayment';
|
||||
private $table = 'DataBasePayment';
|
||||
|
||||
/**
|
||||
* 支付参数类型
|
@ -159,7 +159,7 @@ class ShopGoods extends Controller
|
||||
$this->cates = GoodsService::instance()->getCateData();
|
||||
$this->trucks = ExpressService::instance()->templates();
|
||||
$this->upgrades = UserUpgradeService::instance()->levels();
|
||||
$this->payments = $this->app->db->name('ShopPayment')->where(['status' => 1, 'deleted' => 0])->order('sort desc,id desc')->column('type,code,name', 'code');
|
||||
$this->payments = $this->app->db->name('DataBasePayment')->where(['status' => 1, 'deleted' => 0])->order('sort desc,id desc')->column('type,code,name', 'code');
|
||||
$this->discounts = $this->app->db->name('DataBaseDiscount')->where(['status' => 1, 'deleted' => 0])->order('sort desc,id desc')->column('id,name,items', 'id');
|
||||
// 商品规格处理
|
||||
$fields = 'goods_sku `sku`,goods_code,goods_spec `key`,price_selling `selling`,price_market `market`,number_virtual `virtual`,number_express `express`,reward_balance `balance`,reward_integral `integral`,status';
|
||||
|
@ -306,7 +306,7 @@ class Order extends Auth
|
||||
if (empty($payments)) $this->error('获取订单支付参数失败');
|
||||
[$map, $types] = [['status' => 1, 'deleted' => 0], []];
|
||||
foreach (PaymentService::TYPES as $type => $arr) if (in_array($this->type, $arr['bind'])) $types[] = $type;
|
||||
$query = $this->app->db->name('ShopPayment')->where($map)->whereIn('type', $types)->whereIn('code', str2arr($payments));
|
||||
$query = $this->app->db->name('DataBasePayment')->where($map)->whereIn('type', $types)->whereIn('code', str2arr($payments));
|
||||
$this->success('获取支付参数数据', $query->order('sort desc,id desc')->field('type,code,name,cover')->select()->toArray());
|
||||
}
|
||||
|
||||
|
@ -202,7 +202,7 @@ abstract class PaymentService
|
||||
try {
|
||||
if (empty($payment)) {
|
||||
$map = ['code' => $code, 'status' => 1, 'deleted' => 0];
|
||||
$payment = app()->db->name('ShopPayment')->where($map)->find();
|
||||
$payment = app()->db->name('DataBasePayment')->where($map)->find();
|
||||
}
|
||||
if (empty($payment)) {
|
||||
throw new Exception("支付参数[#{$code}]禁用关闭");
|
||||
|
@ -47,9 +47,9 @@
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-hide" data-payment-type="wechat">{include file='shop_payment/form_wechat'}</div>
|
||||
<div class="layui-hide" data-payment-type="alipay">{include file='shop_payment/form_alipay'}</div>
|
||||
<div class="layui-hide" data-payment-type="joinpay">{include file='shop_payment/form_joinpay'}</div>
|
||||
<div class="layui-hide" data-payment-type="wechat">{include file='base_payment/form_wechat'}</div>
|
||||
<div class="layui-hide" data-payment-type="alipay">{include file='base_payment/form_alipay'}</div>
|
||||
<div class="layui-hide" data-payment-type="joinpay">{include file='base_payment/form_joinpay'}</div>
|
||||
|
||||
<div class="layui-form-item relative layui-hide">
|
||||
<span class="color-green font-w7">支付描述</span>
|
@ -12,7 +12,7 @@
|
||||
|
||||
{block name='content'}
|
||||
<div class="think-box-shadow">
|
||||
{include file='shop_payment/index_search'}
|
||||
{include file='base_payment/index_search'}
|
||||
<table class="layui-table margin-top-10" lay-skin="line">
|
||||
{notempty name='list'}
|
||||
<thead>
|
2
vendor/composer/autoload_classmap.php
vendored
2
vendor/composer/autoload_classmap.php
vendored
@ -206,6 +206,7 @@ return array(
|
||||
'app\\data\\controller\\BaseConfig' => $baseDir . '/app/data/controller/BaseConfig.php',
|
||||
'app\\data\\controller\\BaseDiscount' => $baseDir . '/app/data/controller/BaseDiscount.php',
|
||||
'app\\data\\controller\\BaseMessage' => $baseDir . '/app/data/controller/BaseMessage.php',
|
||||
'app\\data\\controller\\BasePayment' => $baseDir . '/app/data/controller/BasePayment.php',
|
||||
'app\\data\\controller\\BaseUpgrade' => $baseDir . '/app/data/controller/BaseUpgrade.php',
|
||||
'app\\data\\controller\\NewsItem' => $baseDir . '/app/data/controller/NewsItem.php',
|
||||
'app\\data\\controller\\NewsMark' => $baseDir . '/app/data/controller/NewsMark.php',
|
||||
@ -215,7 +216,6 @@ return array(
|
||||
'app\\data\\controller\\ShopOrder' => $baseDir . '/app/data/controller/ShopOrder.php',
|
||||
'app\\data\\controller\\ShopOrderSend' => $baseDir . '/app/data/controller/ShopOrderSend.php',
|
||||
'app\\data\\controller\\ShopOrderService' => $baseDir . '/app/data/controller/ShopOrderService.php',
|
||||
'app\\data\\controller\\ShopPayment' => $baseDir . '/app/data/controller/ShopPayment.php',
|
||||
'app\\data\\controller\\ShopPaymentItem' => $baseDir . '/app/data/controller/ShopPaymentItem.php',
|
||||
'app\\data\\controller\\ShopTruckCompany' => $baseDir . '/app/data/controller/ShopTruckCompany.php',
|
||||
'app\\data\\controller\\ShopTruckTemplate' => $baseDir . '/app/data/controller/ShopTruckTemplate.php',
|
||||
|
2
vendor/composer/autoload_static.php
vendored
2
vendor/composer/autoload_static.php
vendored
@ -335,6 +335,7 @@ class ComposerStaticInit6dcb8a18f830adceacf76408fbd14a53
|
||||
'app\\data\\controller\\BaseConfig' => __DIR__ . '/../..' . '/app/data/controller/BaseConfig.php',
|
||||
'app\\data\\controller\\BaseDiscount' => __DIR__ . '/../..' . '/app/data/controller/BaseDiscount.php',
|
||||
'app\\data\\controller\\BaseMessage' => __DIR__ . '/../..' . '/app/data/controller/BaseMessage.php',
|
||||
'app\\data\\controller\\BasePayment' => __DIR__ . '/../..' . '/app/data/controller/BasePayment.php',
|
||||
'app\\data\\controller\\BaseUpgrade' => __DIR__ . '/../..' . '/app/data/controller/BaseUpgrade.php',
|
||||
'app\\data\\controller\\NewsItem' => __DIR__ . '/../..' . '/app/data/controller/NewsItem.php',
|
||||
'app\\data\\controller\\NewsMark' => __DIR__ . '/../..' . '/app/data/controller/NewsMark.php',
|
||||
@ -344,7 +345,6 @@ class ComposerStaticInit6dcb8a18f830adceacf76408fbd14a53
|
||||
'app\\data\\controller\\ShopOrder' => __DIR__ . '/../..' . '/app/data/controller/ShopOrder.php',
|
||||
'app\\data\\controller\\ShopOrderSend' => __DIR__ . '/../..' . '/app/data/controller/ShopOrderSend.php',
|
||||
'app\\data\\controller\\ShopOrderService' => __DIR__ . '/../..' . '/app/data/controller/ShopOrderService.php',
|
||||
'app\\data\\controller\\ShopPayment' => __DIR__ . '/../..' . '/app/data/controller/ShopPayment.php',
|
||||
'app\\data\\controller\\ShopPaymentItem' => __DIR__ . '/../..' . '/app/data/controller/ShopPaymentItem.php',
|
||||
'app\\data\\controller\\ShopTruckCompany' => __DIR__ . '/../..' . '/app/data/controller/ShopTruckCompany.php',
|
||||
'app\\data\\controller\\ShopTruckTemplate' => __DIR__ . '/../..' . '/app/data/controller/ShopTruckTemplate.php',
|
||||
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// This file is automatically generated at:2021-03-26 17:54:42
|
||||
// This file is automatically generated at:2021-03-26 18:05:04
|
||||
declare (strict_types = 1);
|
||||
return array (
|
||||
0 => 'think\\admin\\Library',
|
||||
|
Loading…
x
Reference in New Issue
Block a user