mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-05 19:41:44 +08:00
修改数据表
This commit is contained in:
parent
64976ebc62
commit
b7ed50ebe0
167
SQL01-数据表结构.sql
167
SQL01-数据表结构.sql
@ -11,7 +11,7 @@
|
||||
Target Server Version : 50562
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 26/03/2021 18:10:56
|
||||
Date: 26/03/2021 18:33:53
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
@ -79,28 +79,68 @@ CREATE TABLE `data_base_payment` (
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-基础-支付' ROW_FORMAT = COMPACT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_base_payment_record
|
||||
-- Table structure for data_base_postage_company
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `data_base_payment_record`;
|
||||
CREATE TABLE `data_base_payment_record` (
|
||||
DROP TABLE IF EXISTS `data_base_postage_company`;
|
||||
CREATE TABLE `data_base_postage_company` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`order_no` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '订单单号',
|
||||
`order_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '订单描述',
|
||||
`order_amount` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '订单金额',
|
||||
`payment_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付编号',
|
||||
`payment_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付通道',
|
||||
`payment_trade` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付单号',
|
||||
`payment_status` tinyint(1) NULL DEFAULT 0 COMMENT '支付状态',
|
||||
`payment_amount` decimal(20, 2) NULL DEFAULT NULL COMMENT '支付金额',
|
||||
`payment_datatime` datetime NULL DEFAULT NULL COMMENT '支付时间',
|
||||
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '快递公司名称',
|
||||
`code_1` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '快递公司代码',
|
||||
`code_2` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '百度快递100代码',
|
||||
`code_3` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '官方快递100代码',
|
||||
`remark` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '快递公司描述',
|
||||
`sort` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '排序权重',
|
||||
`status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '状态(0.无效,1.有效)',
|
||||
`deleted` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '删除状态(1已删除,0未删除)',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_data_base_payment_record_order_no`(`order_no`) USING BTREE,
|
||||
INDEX `idx_data_base_payment_record_payment_code`(`payment_code`) USING BTREE,
|
||||
INDEX `idx_data_base_payment_record_payment_type`(`payment_type`) USING BTREE,
|
||||
INDEX `idx_data_base_payment_record_payment_trade`(`payment_trade`) USING BTREE,
|
||||
INDEX `idx_data_base_payment_record_payment_status`(`payment_status`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 30 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-基础-支付' ROW_FORMAT = COMPACT;
|
||||
INDEX `idx_data_base_postage_company_code1`(`code_1`) USING BTREE,
|
||||
INDEX `idx_data_base_postage_company_code2`(`code_2`) USING BTREE,
|
||||
INDEX `idx_data_base_postage_company_code3`(`code_3`) USING BTREE,
|
||||
INDEX `idx_data_base_postage_company_status`(`status`) USING BTREE,
|
||||
INDEX `idx_data_base_postage_company_deleted`(`deleted`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据-快递-公司' ROW_FORMAT = COMPACT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_base_postage_region
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `data_base_postage_region`;
|
||||
CREATE TABLE `data_base_postage_region` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`pid` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '上级PID',
|
||||
`first` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '首字母',
|
||||
`short` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '区域简称',
|
||||
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '区域名称',
|
||||
`level` tinyint(4) NULL DEFAULT 0 COMMENT '区域层级',
|
||||
`pinyin` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '区域拼音',
|
||||
`code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '区域邮编',
|
||||
`status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '使用状态',
|
||||
`lng` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '所在经度',
|
||||
`lat` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '所在纬度',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_data_base_postage_region_pid`(`pid`) USING BTREE,
|
||||
INDEX `idx_data_base_postage_region_name`(`name`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 4019 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据-快递-区域' ROW_FORMAT = Compact;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_base_postage_template
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `data_base_postage_template`;
|
||||
CREATE TABLE `data_base_postage_template` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '模板编号',
|
||||
`name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '模板名称',
|
||||
`normal` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '默认规则',
|
||||
`content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '模板规则',
|
||||
`sort` bigint(20) NULL DEFAULT 0 COMMENT '排序权重',
|
||||
`status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '模板状态',
|
||||
`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_postage_template_code`(`code`) USING BTREE,
|
||||
INDEX `idx_data_base_postage_template_status`(`status`) USING BTREE,
|
||||
INDEX `idx_data_base_postage_template_deleted`(`deleted`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-快递-模板' ROW_FORMAT = COMPACT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_base_upgrade
|
||||
@ -128,7 +168,7 @@ CREATE TABLE `data_base_upgrade` (
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_data_base_upgrade_status`(`status`) USING BTREE,
|
||||
INDEX `idx_data_base_upgrade_number`(`number`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-基础-等级' ROW_FORMAT = Compact;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-用户-等级' ROW_FORMAT = Compact;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_news_item
|
||||
@ -323,6 +363,30 @@ CREATE TABLE `data_user_message` (
|
||||
INDEX `idx_data_user_message_status`(`status`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-用户-短信' ROW_FORMAT = COMPACT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_user_payment
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `data_user_payment`;
|
||||
CREATE TABLE `data_user_payment` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`order_no` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '订单单号',
|
||||
`order_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '订单描述',
|
||||
`order_amount` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '订单金额',
|
||||
`payment_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付编号',
|
||||
`payment_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付通道',
|
||||
`payment_trade` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付单号',
|
||||
`payment_status` tinyint(1) NULL DEFAULT 0 COMMENT '支付状态',
|
||||
`payment_amount` decimal(20, 2) NULL DEFAULT NULL COMMENT '支付金额',
|
||||
`payment_datatime` datetime NULL DEFAULT NULL COMMENT '支付时间',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_data_base_payment_record_order_no`(`order_no`) USING BTREE,
|
||||
INDEX `idx_data_base_payment_record_payment_code`(`payment_code`) USING BTREE,
|
||||
INDEX `idx_data_base_payment_record_payment_type`(`payment_type`) USING BTREE,
|
||||
INDEX `idx_data_base_payment_record_payment_trade`(`payment_trade`) USING BTREE,
|
||||
INDEX `idx_data_base_payment_record_payment_status`(`payment_status`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 30 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-基础-支付' ROW_FORMAT = COMPACT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data_user_rebate
|
||||
-- ----------------------------
|
||||
@ -669,67 +733,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_truck_company
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `shop_truck_company`;
|
||||
CREATE TABLE `shop_truck_company` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '快递公司名称',
|
||||
`code_1` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '快递公司代码',
|
||||
`code_2` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '百度快递100代码',
|
||||
`code_3` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '官方快递100代码',
|
||||
`remark` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '快递公司描述',
|
||||
`sort` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '排序权重',
|
||||
`status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '状态(0.无效,1.有效)',
|
||||
`deleted` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '删除状态(1已删除,0未删除)',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_shop_truck_company_code1`(`code_1`) USING BTREE,
|
||||
INDEX `idx_shop_truck_company_code2`(`code_2`) USING BTREE,
|
||||
INDEX `idx_shop_truck_company_code3`(`code_3`) USING BTREE,
|
||||
INDEX `idx_shop_truck_company_status`(`status`) USING BTREE,
|
||||
INDEX `idx_shop_truck_company_deleted`(`deleted`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商城-快递-公司' ROW_FORMAT = COMPACT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for shop_truck_region
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `shop_truck_region`;
|
||||
CREATE TABLE `shop_truck_region` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`pid` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '上级PID',
|
||||
`first` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '首字母',
|
||||
`short` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '区域简称',
|
||||
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '区域名称',
|
||||
`level` tinyint(4) NULL DEFAULT 0 COMMENT '区域层级',
|
||||
`pinyin` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '区域拼音',
|
||||
`code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '区域邮编',
|
||||
`status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '使用状态',
|
||||
`lng` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '所在经度',
|
||||
`lat` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '所在纬度',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_shop_truck_region_pid`(`pid`) USING BTREE,
|
||||
INDEX `idx_shop_truck_region_name`(`name`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 4019 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商城-快递-区域' ROW_FORMAT = Compact;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for shop_truck_template
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `shop_truck_template`;
|
||||
CREATE TABLE `shop_truck_template` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '模板编号',
|
||||
`name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '模板名称',
|
||||
`normal` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '默认规则',
|
||||
`content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '模板规则',
|
||||
`sort` bigint(20) NULL DEFAULT 0 COMMENT '排序权重',
|
||||
`status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '模板状态',
|
||||
`deleted` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '删除状态',
|
||||
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商城-快递-模板' ROW_FORMAT = COMPACT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for system_auth
|
||||
-- ----------------------------
|
||||
@ -818,7 +821,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 = 155 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-日志' ROW_FORMAT = COMPACT;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 158 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-日志' ROW_FORMAT = COMPACT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for system_queue
|
||||
|
7528
SQL02-数据初始化.sql
7528
SQL02-数据初始化.sql
File diff suppressed because it is too large
Load Diff
@ -8,17 +8,17 @@ use think\admin\service\SystemService;
|
||||
use think\exception\HttpResponseException;
|
||||
|
||||
/**
|
||||
* 配送快递公司管理
|
||||
* Class ShopTruckCompany
|
||||
* 快递公司管理
|
||||
* Class BasePostageCompany
|
||||
* @package app\data\controller
|
||||
*/
|
||||
class ShopTruckCompany extends Controller
|
||||
class BasePostageCompany extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
private $table = 'ShopTruckCompany';
|
||||
private $table = 'DataBasePostageCompany';
|
||||
|
||||
/**
|
||||
* 快递公司管理
|
@ -8,16 +8,16 @@ use think\admin\extend\CodeExtend;
|
||||
|
||||
/**
|
||||
* 邮费模板管理
|
||||
* Class ShopTruckTemplate
|
||||
* Class BasePostageTemplate
|
||||
* @package app\data\controller
|
||||
*/
|
||||
class ShopTruckTemplate extends Controller
|
||||
class BasePostageTemplate extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
private $table = 'ShopTruckTemplate';
|
||||
private $table = 'DataBasePostageTemplate';
|
||||
|
||||
/**
|
||||
* 快递邮费模板
|
||||
@ -49,8 +49,8 @@ class ShopTruckTemplate extends Controller
|
||||
$this->fetch('form_region');
|
||||
} else {
|
||||
$data = $this->_vali(['nos.default' => '', 'oks.default' => '']);
|
||||
if ($data['nos']) $this->app->db->name('ShopTruckRegion')->whereIn('id', str2arr($data['nos']))->update(['status' => 0]);
|
||||
if ($data['oks']) $this->app->db->name('ShopTruckRegion')->whereIn('id', str2arr($data['oks']))->update(['status' => 1]);
|
||||
if ($data['nos']) $this->app->db->name('DataBasePostageRegion')->whereIn('id', str2arr($data['nos']))->update(['status' => 0]);
|
||||
if ($data['oks']) $this->app->db->name('DataBasePostageRegion')->whereIn('id', str2arr($data['oks']))->update(['status' => 1]);
|
||||
$this->success('修改配送区域成功!');
|
||||
}
|
||||
}
|
@ -102,7 +102,7 @@ class ShopOrder extends Controller
|
||||
{
|
||||
if ($this->request->isGet()) {
|
||||
$map = ['deleted' => 0, 'status' => 1];
|
||||
$query = $this->app->db->name('ShopTruckCompany')->where($map);
|
||||
$query = $this->app->db->name('DataBasePostageCompany')->where($map);
|
||||
$this->items = $query->order('sort desc,id desc')->select()->toArray();
|
||||
}
|
||||
$this->_form('ShopOrderSend', '', 'order_no');
|
||||
@ -123,7 +123,7 @@ class ShopOrder extends Controller
|
||||
if (empty($order)) $this->error('订单查询异常,请稍候再试!');
|
||||
// 配送快递公司填写
|
||||
$map = ['code_1|code_2|code_3' => $vo['company_code']];
|
||||
$company = $this->app->db->name('ShopTruckCompany')->where($map)->find();
|
||||
$company = $this->app->db->name('DataBasePostageCompany')->where($map)->find();
|
||||
if (empty($company)) $this->error('配送快递公司异常,请重新选择快递公司!');
|
||||
$vo['status'] = 2;
|
||||
$vo['company_name'] = $company['name'];
|
||||
|
@ -28,7 +28,7 @@ class ExpressService extends Service
|
||||
{
|
||||
if (empty($codes)) return [0, $truckCount, '', '邮费模板编码为空!'];
|
||||
$map = [['status', '=', 1], ['deleted', '=', 0], ['code', 'in', $codes]];
|
||||
$template = $this->app->db->name('ShopTruckTemplate')->where($map)->order('sort desc,id desc')->find();
|
||||
$template = $this->app->db->name('DataBasePostageTemplate')->where($map)->order('sort desc,id desc')->find();
|
||||
if (empty($template)) return [0, $truckCount, '', '邮费模板编码无效!'];
|
||||
$rule = json_decode($template['normal'] ?: '[]', true) ?: [];
|
||||
foreach (json_decode($template['content'] ?: '[]', true) ?: [] as $item) {
|
||||
@ -57,7 +57,7 @@ class ExpressService extends Service
|
||||
public function templates(): array
|
||||
{
|
||||
$map = ['status' => 1, 'deleted' => 0];
|
||||
$query = $this->app->db->name('ShopTruckTemplate')->where($map);
|
||||
$query = $this->app->db->name('DataBasePostageTemplate')->where($map);
|
||||
return $query->order('sort desc,id desc')->column('code,name,normal,content', 'code');
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@ class ExpressService extends Service
|
||||
*/
|
||||
public function region(int $level = 3, ?int $status = null): array
|
||||
{
|
||||
$query = $this->app->db->name('ShopTruckRegion');
|
||||
$query = $this->app->db->name('DataBasePostageRegion');
|
||||
if (is_numeric($level)) $query->where('level', '<=', $level);
|
||||
if (is_numeric($status)) $query->where(['status' => $status]);
|
||||
$items = DataExtend::arr2tree($query->column('id,pid,name,status', 'id'), 'id', 'pid', 'subs');
|
||||
|
@ -279,7 +279,7 @@ abstract class PaymentService
|
||||
*/
|
||||
protected function createPaymentAction(string $orderNo, string $paymentTitle, string $paymentAmount)
|
||||
{
|
||||
$this->app->db->name('DataBasePaymentRecord')->insert([
|
||||
$this->app->db->name('DataUserPayment')->insert([
|
||||
'payment_code' => $this->code, 'payment_type' => $this->type,
|
||||
'order_amount' => $paymentAmount, 'order_name' => $paymentTitle, 'order_no' => $orderNo,
|
||||
]);
|
||||
@ -299,7 +299,7 @@ abstract class PaymentService
|
||||
protected function updatePaymentAction(string $orderNo, string $paymentTrade, string $paymentAmount, string $paymentRemark = '在线支付'): bool
|
||||
{
|
||||
// 更新支付记录
|
||||
data_save('DataBasePaymentRecord', [
|
||||
data_save('DataUserPayment', [
|
||||
'order_no' => $orderNo,
|
||||
'payment_code' => $this->code,
|
||||
'payment_type' => $this->type,
|
||||
|
@ -33,7 +33,7 @@
|
||||
{/if}{/foreach}
|
||||
</ul>
|
||||
<div class="layui-tab-content">
|
||||
{include file='shop_truck_company/index_search'}
|
||||
{include file='base_postage_company/index_search'}
|
||||
<table class="layui-table" lay-skin="line">
|
||||
{notempty name='list'}
|
||||
<thead>
|
@ -9,7 +9,7 @@
|
||||
{block name="content"}
|
||||
<div class="layui-tab layui-tab-card think-bg-white">
|
||||
<div class="layui-tab-content">
|
||||
{include file='shop_truck_template/index_search'}
|
||||
{include file='base_postage_template/index_search'}
|
||||
<table class="layui-table" lay-skin="line">
|
||||
{notempty name='list'}
|
||||
<thead>
|
@ -46,6 +46,6 @@ class Index extends Controller
|
||||
$this->_query('ShopOrder')->empty();
|
||||
$this->_query('ShopOrderItem')->empty();
|
||||
$this->_query('ShopOrderSend')->empty();
|
||||
$this->_query('DataBasePaymentRecord')->empty();
|
||||
$this->_query('DataUserPayment')->empty();
|
||||
}
|
||||
}
|
4
vendor/composer/autoload_classmap.php
vendored
4
vendor/composer/autoload_classmap.php
vendored
@ -207,6 +207,8 @@ return array(
|
||||
'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\\BasePostageCompany' => $baseDir . '/app/data/controller/BasePostageCompany.php',
|
||||
'app\\data\\controller\\BasePostageTemplate' => $baseDir . '/app/data/controller/BasePostageTemplate.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',
|
||||
@ -216,8 +218,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\\ShopTruckCompany' => $baseDir . '/app/data/controller/ShopTruckCompany.php',
|
||||
'app\\data\\controller\\ShopTruckTemplate' => $baseDir . '/app/data/controller/ShopTruckTemplate.php',
|
||||
'app\\data\\controller\\User' => $baseDir . '/app/data/controller/User.php',
|
||||
'app\\data\\controller\\UserBalance' => $baseDir . '/app/data/controller/UserBalance.php',
|
||||
'app\\data\\controller\\UserMessage' => $baseDir . '/app/data/controller/UserMessage.php',
|
||||
|
4
vendor/composer/autoload_static.php
vendored
4
vendor/composer/autoload_static.php
vendored
@ -336,6 +336,8 @@ class ComposerStaticInit6dcb8a18f830adceacf76408fbd14a53
|
||||
'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\\BasePostageCompany' => __DIR__ . '/../..' . '/app/data/controller/BasePostageCompany.php',
|
||||
'app\\data\\controller\\BasePostageTemplate' => __DIR__ . '/../..' . '/app/data/controller/BasePostageTemplate.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',
|
||||
@ -345,8 +347,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\\ShopTruckCompany' => __DIR__ . '/../..' . '/app/data/controller/ShopTruckCompany.php',
|
||||
'app\\data\\controller\\ShopTruckTemplate' => __DIR__ . '/../..' . '/app/data/controller/ShopTruckTemplate.php',
|
||||
'app\\data\\controller\\User' => __DIR__ . '/../..' . '/app/data/controller/User.php',
|
||||
'app\\data\\controller\\UserBalance' => __DIR__ . '/../..' . '/app/data/controller/UserBalance.php',
|
||||
'app\\data\\controller\\UserMessage' => __DIR__ . '/../..' . '/app/data/controller/UserMessage.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 18:11:02
|
||||
// This file is automatically generated at:2021-03-26 18:34:51
|
||||
declare (strict_types = 1);
|
||||
return array (
|
||||
0 => 'think\\admin\\Library',
|
||||
|
Loading…
x
Reference in New Issue
Block a user