CRMEB_PRO_M_v3.0.0(20240605)

This commit is contained in:
yexuejc 2024-06-13 19:57:44 +08:00
parent fc889e58c3
commit 8ea92ab801
22 changed files with 53626 additions and 0 deletions

3
.constant Normal file
View File

@ -0,0 +1,3 @@
<?php
define('INSTALL_DATE',1602747961);
define('SERIALNUMBER','zQIGdI');

1
.example.env Normal file
View File

@ -0,0 +1 @@
APP_DEBUG = true [APP] DEFAULT_TIMEZONE = Asia/Shanghai [DATABASE] TYPE = mysql HOSTNAME = 127.0.0.1 DATABASE = test USERNAME = username PASSWORD = password HOSTPORT = 3306 CHARSET = utf8 DEBUG = true [LANG] default_lang = zh-cn [REDIS] REDIS_HOSTNAME = 127.0.0.1 PORT = 6379 REDIS_PASSWORD = SELECT = 0

14
.gitignore vendored Normal file
View File

@ -0,0 +1,14 @@
/.git
/.idea
/runtime
/backup
*.log
/public/install/install.lock
public/admin/
/.env
/swoole.pid
public/pages/
public/static/
help/docker-compose/mysql/data/
help/docker-compose/redis/data/
/__MACOSX

22
.phpstorm.meta.php Normal file
View File

@ -0,0 +1,22 @@
<?php
namespace PHPSTORM_META {
use think\Container;
use function \app;
override(
\app(),
map([
'json' => \crmeb\utils\Json::class
])
);
override(
\think\Container::make(),
map([
'' => '@'
])
);
}

42
.travis.yml Normal file
View File

@ -0,0 +1,42 @@
sudo: false
language: php
branches:
only:
- stable
cache:
directories:
- $HOME/.composer/cache
before_install:
- composer self-update
install:
- composer install --no-dev --no-interaction --ignore-platform-reqs
- zip -r --exclude='*.git*' --exclude='*.zip' --exclude='*.travis.yml' ThinkPHP_Core.zip .
- composer require --update-no-dev --no-interaction "topthink/think-image:^1.0"
- composer require --update-no-dev --no-interaction "topthink/think-migration:^1.0"
- composer require --update-no-dev --no-interaction "topthink/think-captcha:^1.0"
- composer require --update-no-dev --no-interaction "topthink/think-mongo:^1.0"
- composer require --update-no-dev --no-interaction "topthink/think-worker:^1.0"
- composer require --update-no-dev --no-interaction "topthink/think-helper:^1.0"
- composer require --update-no-dev --no-interaction "topthink/think-queue:^1.0"
- composer require --update-no-dev --no-interaction "topthink/think-angular:^1.0"
- composer require --dev --update-no-dev --no-interaction "topthink/think-testing:^1.0"
- zip -r --exclude='*.git*' --exclude='*.zip' --exclude='*.travis.yml' ThinkPHP_Full.zip .
script:
- php think unit
deploy:
provider: releases
api_key:
secure: TSF6bnl2JYN72UQOORAJYL+CqIryP2gHVKt6grfveQ7d9rleAEoxlq6PWxbvTI4jZ5nrPpUcBUpWIJHNgVcs+bzLFtyh5THaLqm39uCgBbrW7M8rI26L8sBh/6nsdtGgdeQrO/cLu31QoTzbwuz1WfAVoCdCkOSZeXyT/CclH99qV6RYyQYqaD2wpRjrhA5O4fSsEkiPVuk0GaOogFlrQHx+C+lHnf6pa1KxEoN1A0UxxVfGX6K4y5g4WQDO5zT4bLeubkWOXK0G51XSvACDOZVIyLdjApaOFTwamPcD3S1tfvuxRWWvsCD5ljFvb2kSmx5BIBNwN80MzuBmrGIC27XLGOxyMerwKxB6DskNUO9PflKHDPI61DRq0FTy1fv70SFMSiAtUv9aJRT41NQh9iJJ0vC8dl+xcxrWIjU1GG6+l/ZcRqVx9V1VuGQsLKndGhja7SQ+X1slHl76fRq223sMOql7MFCd0vvvxVQ2V39CcFKao/LB1aPH3VhODDEyxwx6aXoTznvC/QPepgWsHOWQzKj9ftsgDbsNiyFlXL4cu8DWUty6rQy8zT2b4O8b1xjcwSUCsy+auEjBamzQkMJFNlZAIUrukL/NbUhQU37TAbwsFyz7X0E/u/VMle/nBCNAzgkMwAUjiHM6FqrKKBRWFbPrSIixjfjkCnrMEPw=
file:
- ThinkPHP_Core.zip
- ThinkPHP_Full.zip
skip_cleanup: true
on:
tags: true

0
.upgrade Normal file
View File

2
.version Normal file
View File

@ -0,0 +1,2 @@
version=CRMEB-PRO-M v3.0.0
version_code=300

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM leekay0218/crmeb-pro
## 复制代码
## 在本地调试注释掉,使用映射把文件映射进去
#ADD ./ /var/www
# 设置容器启动后的默认运行目录
WORKDIR /var/www
# 默认入口命令
ENTRYPOINT ["/entrypoint.sh"]
# 本地调试进入容器后手动执行命令,如果是部署项目的话可以打开注释
#CMD ["php", "think", "swoole"]

33
LICENSE.txt Normal file
View File

@ -0,0 +1,33 @@
版权所有 (c)2017-2027西安众邦网络科技有限公司 保留所有权利。
感谢您选择CrmEb开源客户管理+电商系统简称CRMEBCRMEB是国内最稳定、最强大、最先进的互联网电商平台解决方案之一CRMEB基于 PHP + MySQL 的技术采用ThinkPHP5.0框架开发。
为了使你正确并合法的使用本软件,请你在使用前务必阅读清楚下面的协议条款:
本授权协议适用且仅适用于CRMEB任何版本CRMEB官方对本授权协议的最终解释权和修改权。
一、协议许可的权利
1、您可以在完全遵守本最终用户授权协议的基础上将本软件应用于非商业用途而不必支付软件版权授权费用。
2、您可以在协议规定的约束和限制范围内修改 CRMEB 源代码或界面风格以适应您的网站要求。
3、您拥有使用本软件构建的网站全部内容所有权并独立承担与这些内容的相关法律义务。
4、获得商业授权之后您可以将本软件应用于商业用途同时依据所购买的授权类型中确定的技术支持内容。商业授权用户享有反映和提出意见的权力相关意见将被作为首要考虑但没有一定被采纳的承诺或保证。
二、协议许可的权利和限制
1、未获商业授权之前不得删除网站底部及相应的官方版权信息和链接。购买商业授权请联系西安众邦网络科技有限公司了解最新说明。CRMEB著作权已在中华人民共和国国家版权局注册(中国国家版权局著作权登记号 2018SR024463),著作权受到法律和国际公约保护。
2、未经官方许可不得对本软件或与之关联的商业授权进行出租、出售、抵押或发放子许可证。
3、不管你的网站是否整体使用 CRMEB ,还是部份栏目使用 CRMEB在你使用了 CRMEB 的网站主页上必须加上 CRMEB 官方网址(www.crmeb.com)的链接。
4、未经官方许可禁止在 CRMEB 的整体或任何部分基础上以发展任何派生版本、修改版本或第三方版本用于重新分发。
5、如果您未能遵守本协议的条款您的授权将被终止所被许可的权利将被收回并承担相应法律责任。
三、有限担保和免责声明
1、本软件及所附带的文件是作为不提供任何明确的或隐含的赔偿或担保的形式提供的。
2、用户出于自愿而使用本软件您必须了解使用本软件的风险在尚未购买产品技术服务之前我们不承诺对免费用户提供任何形式的技术支持、使用担保也不承担任何因使用本软件而产生问题的相关责任。
3、电子文本形式的授权协议如同双方书面签署的协议一样具有完全的和等同的法律效力。您一旦开始确认本协议并安装 CRMEB即被视为完全理解并接受本协议的各项条款在享有上述条款授予的权力的同时受到相关的约束和限制。协议许可范围以外的行为将直接违反本授权协议并构成侵权我们有权随时终止授权责令停止损害并保留追究相关责任的权力。
协议发布时间: 2017年8月01日
版本最新更新: 2019年8月15日 By CRMEB
CRMEB官方网站http://www.crmeb.com
CRMEB演示站http://demo.crmeb.com
-----------------------------------------------------
运营团队: 众邦科技
电 话: 400-8888-794
邮 箱: admin@xazbkj.com
网 址: http://www.xazbkj.com

349
README.md Normal file
View File

@ -0,0 +1,349 @@
CRMEB PRO TP6+Swoole4
===============
> 运行环境要求PHP7.4其他版本暂不推荐。不支持windows环境运行
## 开发规范
#### 命名规范
ThinkPHP6.0遵循PSR-2命名规范和PSR-4自动加载规范并且注意如下规范:
1. 目录和文件
2. 目录使用小写+下划线;
3. 类库、函数文件统一以.php为后缀
4. 类的文件名均以命名空间定义,并且命名空间的路径和类库文件所在路径一致;
5. 类包含接口和Trait文件采用驼峰法命名首字母大写其它文件采用小写+下划线命名;
6. 类名包括接口和Trait和文件名保持一致统一采用驼峰法命名首字母大写
#### 函数和类、属性命名
1. 类的命名采用驼峰法(首字母大写),例如 User、UserType
2. common函数的命名使用小写字母和下划线小写字母开头的方式例如 get_client_ip
3. 控制器里面的方法使用小写字母和下划线(小写字母开头)的方式,例如 get_client_ip
4. 方法的命名使用驼峰法(首字母小写),例如 getUserName
5. 属性的命名使用驼峰法(首字母小写),例如 tableName、instance
6. 特例以双下划线__打头的函数或方法作为魔术方法例如 __call 和 __autoload
#### 常量和配置
1. 常量以大写字母和下划线命名,例如 APP_PATH
2. 配置参数以小写字母和下划线命名,例如 url_route_on 和url_convert
3. 环境变量定义使用大写字母和下划线命名例如APP_DEBUG
#### 数据表和字段
1. 数据表和字段采用小写加下划线方式命名,并注意字段名不要以下划线开头,例如 think_user 表和 user_name字段不建议使用驼峰和中文作为数据表及字段命名
注意:请理解并尽量遵循以上命名规范,可以减少在开发过程中出现不必要的错误
#### 语法规范
1. 尽量使用php7新语法
2. 每个 namespace 命名空间声明语句和 use 声明语句块后面,必须 插入一个空白行
3. 类的开始花括号({ 必须 写在类声明后自成一行,结束花括号(})也 必须 写在类主体后自成一行
4. 方法的开始花括号({ 必须 写在函数声明后自成一行,结束花括号(})也 必须 写在函数主体后自成一行。
5. 类的属性和方法 必须 添加访问修饰符private、protected 以及 publicabstract 以及 final 必须 声明在访问修饰符之前,而 static 必须 声明在访问修饰符之后
6. 控制结构的关键字后 必须 要有一个空格符,而调用方法或函数时则 一定不可 有
7. 控制结构的开始花括号({ 必须 写在声明的同一行,而结束花括号(} 必须 写在主体后自成一行
8. 纯 PHP 代码文件 必须 省略最后的 ?> 结束标签
9. 所有方法,类,控制器类,都 必须 添加访问修饰符
~~~
/**
* 中文注释
* @param string $str 声明类型
* @param array $arr
* @return bool
*/
public function action(string $str, array $arr)
{
return true;
}
~~~
10. 参数列表中,每个逗号后面 必须 要有一个空格,而逗号前面 一定不可 有空格
~~~
function foo($arg1, &$arg2, $arg3 = [])
{
// method body
}
~~~
11. 参数 可以 分列成多行,此时包括第一个参数在内的每个参数都 尽量 单独成行。
~~~
<?php
$foo->bar(
$longArgument,
$longerArgument,
$muchLongerArgument
);
~~~
12. 标准的 if 结构如下代码所示,请留意「括号」、「空格」以及「花括号」的位置,
注意 else 和 elseif 都与前面的结束花括号在同一行
~~~
<?php
if ($expr1) {
// if body
} elseif ($expr2) {
// elseif body
} else {
// else body;
}
~~~
13. 赋值等号前后必须加空格符
~~~
<?php
$arr = [];
~~~
#### PHP 7.1+ 常用新语法
1. 三元运算符
~~~
<?php
$arr = ['crmeb'=>true];
之前
echo isset($arr['crmeb']) ? $arr['crmeb'] : '';
之后
echo $arr['crmeb'] ?? '';
~~~
2. define() 定义常量数组
~~~
<?php
define('ARR',['a','b']);
~~~
3. 命名空间优化
~~~
<?php
//PHP7之前语法
use FooLibrary\Bar\Baz\ClassA;
use FooLibrary\Bar\Baz\ClassB;
// PHP7新语法写法
use FooLibrary\Bar\Baz\{ ClassA, ClassB};
~~~
#### CRMEB PRO规范
1. 所有数据验证放在模块下的 validates 目录下
2. JSON返回使用父级 AuthController类中的success 和 fail
3. 错误判断抛出异常,由一个错误类统一控制输出
~~~
<?php
throw new AuthException('错误信息',400);
~~~
4. 错误码和错误提示语应该统一管理,方便切换多语言
5. 数据库操作使用模型类不能使用Db::table()
6. 获取表单数据使用 app\Request
~~~
<?php
use app\Request;
public function index(Request $request) {
//获取提交的数据,并以二维数组形式返回
$arr = $request->getMore([
'name',
'nickname'
]);
//获取提交的数据,并以二维数组形式返回并附加默认值
$arr = $request->getMore([
['name','123'],
['nickname','0']
]);
//获取提交的数据,并以一维数组形式返回并附加默认值
[$name, $nickname] = $request->getMore([
['name','123'],
['nickname','0']
],true);
}
~~~
7. 所有控制器类命令和表名对应,按照大驼峰命名规范
8. 所有文件夹命名按照小写字母加下划线定义
9. 所有属性名,变量名尽量遵守小驼峰命名规范
10. 复杂逻辑,多状态应适当添加行内注释
11. 模型里只能写关于搜索条件语句,查出数据得组合书写在services层进行处理,services创建命令:php make:services api@user/User
## 主要特性
有详细的代码注释,有完整系统手册
### TP6框架
使用最新的 ThinkPHP 6.0 + Swoole4框架开发
### 前端采用Vue CLI框架
前端使用Vue CLI框架nodejs打包页面加载更流畅用户体验更好
### 标准接口
标准接口、前后端分离,二次开发更方便
### 支持队列
降低流量高峰,解除耦合,高可用
### 长连接
减少CPU及内存使用及网络堵塞减少请求响应时长
### 无缝事件机制
行为扩展更方便,方便二次开发
### 后台快速生成表单
后台应用form-builder 无需写页面快速增删改查
### 数据表格导出
PHPExcel数据导出,导出表格更加美观可视;
### 数据统计分析
后台使用ECharts图表统计实现用户、产品、订单、资金等统计分析
### 强大的后台权限管理
后台多种角色、多重身份权限管理,权限可以控制到每一步操作
### 一键安装
自动检查系统环境一键安装
# 安装
本安装教程针对的是宝塔面板安装 环境为 nginx1.18 mysql5.7 php7.3
## 站点配置
1. 创建站点 创建站点注意php版本选择纯静态
2. 上传你的代码到站点根目录下
3. 点开站点设置,网站目录标签下,配置运行目录为 /public
4. ssl标签中配置https证书
5. 反向代理标签下配置站点反向代理目标URL填写为 http://127.0.0.1:20699 ,点击提交,在列表中点击配置文件,将下方代码复制替换全部。
~~~
#PROXY-START/
location ~* \.(php|jsp|cgi|asp|aspx)$
{
proxy_pass http://127.0.0.1:20699;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
}
location /
{
if (!-e $request_filename) {
proxy_pass http://127.0.0.1:20699;
}
proxy_http_version 1.1;
proxy_read_timeout 360s;
proxy_redirect off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
add_header X-Cache $upstream_cache_status;
#Set Nginx Cache
add_header Cache-Control no-cache;
expires 12h;
}
#PROXY-END/
~~~
## 环境配置
### php配置进入宝塔的软件商店进入php的设置
1. 将项目中 /help/swoole-loader/swoole_loader73.so 复制到 /www/server/php/73/lib/php/extensions/no-debug-non-zts-20180731 目录下 (注:根据你安装的 php 版本选择扩展)
2. 点击安装扩展标签,安装 fileinforedisSwoole4 这三个扩展
3. 点击配置修改标签,将 memory_limit 脚本内存控制改为 256M
4. 点击配置文件标签,将 extension = swoole_loader73.so 代码添加在最下方,然后保存。
5. 点击服务标签,重启 php 服务。
### mysql配置进入宝塔的软件商店进入mysql的设置
1. 点击配置修改标签,找到 sql-mode ,将后面的值修改为 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
2. 点击服务标签,重启 mysql 服务。
## 启动swoole
1. 打开命令行执行命令: `php -v` 查看命令行版本是否为配置的 PHP 版本
2. 命令行切换到站点目录下执行启动命令: `php think swoole`
3. 在浏览器中输入你的域名例如www.yourdomain.com安装程序会自动执行安装。期间系统会提醒你输入数据库信息以完成安装。
4. 再次打开命令行换到站点目录下执行重启命令: `php think swoole`
5. 利用Supervisor进行守护进程`php think swoole`
## 访问地址
### 后台访问地址:
域名/admin
### 公众号和H5首页访问地址
域名/
### 安装过程中请牢记您的账号密码!
## 重新安装
1. 清除数据库
2. 删除/public/install/install.lock 文件
3. 执行重启命令: `php think swoole`
4. 执行完安装后再次执行重启命令: `php think swoole`
## 手动安装
1. 创建数据库,倒入数据库文件
数据库文件目录/public/install/crmeb.sql
2. 修改数据库连接文件
配置文件路径/.env
~~~
APP_DEBUG = true
[APP]
DEFAULT_TIMEZONE = Asia/Shanghai
[DATABASE]
TYPE = mysql
HOSTNAME = 127.0.0.1 #数据库连接地址
DATABASE = test #数据库名称
USERNAME = username #数据库登录账号
PASSWORD = password #数据库登录密码
HOSTPORT = 3306 #数据库端口
CHARSET = utf8
DEBUG = true
[REDIS]
REDIS_HOSTNAME = 127.0.0.1 #redis地址
PORT = 6379 #redis端口
REDIS_PASSWORD = '' #redis密码
SELECT = 0 #redis数据库
[CACHE]
PREFIX =
TAG_PREFIX =
[LANG]
default_lang = zh-cn
~~~
3. 修改目录权限linux系统777
/public
/runtime
4. 启动swoole,需要使用Supervisor进行守护进程
~~~
php think swoole
~~~
5. 后台登录:
http://域名/admin
默认账号admin 密码crmeb.com
## 启动命令
开启
```sh
php think swoole
```
## 文档
[使用手册](https://doc.crmeb.com/)
||
[TP6开发手册](https://www.kancloud.cn/manual/thinkphp6_0/content)
||
[Swoole开发手册](https://wiki.swoole.com/#/)
## 参与开发
请参阅 [CRMEB](https://github.com/crmeb/CRMEB)
## 版权信息
本项目包含的第三方源码和二进制文件之版权信息另行标注。
版权所有Copyright © 2017-2022 by [CRMEB](http://www.crmeb.com)
All rights reserved。
CRMEB® 商标和著作权所有者为西安众邦网络科技有限公司。
###开发团队
##### 技术:等风来、最后一片叶、吴汐、旺仔、小小、娜娜、归来仍是少年
##### 产品:木子刀客
##### 设计xy-yyds
##### 测试夏天、绵绵羊、。ws
注:排名不分前后

26
build.example.php Normal file
View File

@ -0,0 +1,26 @@
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
/**
* php think build 自动生成应用的目录结构的定义示例
*/
return [
// 需要自动创建的文件
'__file__' => [],
// 需要自动创建的目录
'__dir__' => ['controller', 'model', 'view'],
// 需要自动创建的控制器
'controller' => ['Index'],
// 需要自动创建的模型
'model' => ['User'],
// 需要自动创建的模板
'view' => ['index/index'],
];

3
ceshi.md Normal file
View File

@ -0,0 +1,3 @@
修改后需要测试
1、购买VIP会员添加事件
2、订单支付添加事件

91
composer.json Normal file
View File

@ -0,0 +1,91 @@
{
"name": "topthink/think",
"description": "the new thinkphp framework",
"type": "project",
"keywords": [
"framework",
"thinkphp",
"ORM"
],
"homepage": "http://thinkphp.cn/",
"license": "Apache-2.0",
"authors": [
{
"name": "liu21st",
"email": "liu21st@gmail.com"
}
],
"require": {
"php": ">=7.1.0",
"ext-json": "*",
"ext-curl": "*",
"ext-bcmath": "*",
"ext-mbstring": "*",
"topthink/think-view": "^1.0",
"symfony/var-dumper":"^4.2",
"topthink/think-captcha": "~v3.0",
"topthink/think-image": "^1.0",
"xaboy/form-builder": "^2.0",
"firebase/php-jwt": "^5.0",
"aliyuncs/oss-sdk-php": "~v2.4.3",
"qcloud/cos-sdk-v5": "~V2.0",
"qiniu/php-sdk": "^7.2",
"topthink/think-queue": "^3.0",
"spatie/macroable": "^1.0",
"dh2y/think-qrcode": "^2.0",
"topthink/think-template": "^2.0",
"phpoffice/phpspreadsheet": "^1.12",
"godruoyi/php-snowflake": "^1.0",
"qcloud_sts/qcloud-sts-sdk": "^3.0",
"guzzlehttp/psr7": "^1.7",
"guzzlehttp/guzzle": "6.5.5",
"alipaysdk/easysdk": "2.0",
"topthink/think-migration": "^3.0",
"topthink/think-swoole": "~v4.0",
"endroid/qr-code": "^4.0",
"topthink/framework": "6.0.9",
"joypack/tencent-map": "^1.0",
"reasno/swoole-aliyunoss-addon": "^1.0",
"xiaodi/think-pullword": "^1.2",
"symfony/http-foundation": "~v5.4.3",
"overtrue/socialite": "~v3.5.0",
"overtrue/wechat": "~5.0",
"league/flysystem": "~v1.1.9",
"yurunsoft/guzzle-swoole": "^2.2",
"fastknife/ajcaptcha": "^1.1",
"alibabacloud/client": "^1.5",
"async-aws/s3": "^1.14"
},
"autoload": {
"psr-4": {
"app\\": "app",
"crmeb\\": "crmeb"
},
"psr-0": {
"": "extend/"
},
"files": [
"app/helpers.php"
]
},
"config": {
"preferred-install": "dist",
"allow-plugins": {
"easywechat-composer/easywechat-composer": false,
"yurunsoft/composer-include-files": false,
"yurunsoft/guzzle-swoole": false
}
},
"scripts": {
"post-autoload-dump": [
"@php think service:discover",
"@php think vendor:publish"
]
},
"repositories": {
"packagist": {
"type": "composer",
"url": "https://mirrors.aliyun.com/composer/"
}
}
}

7253
composer.lock generated Normal file

File diff suppressed because it is too large Load Diff

159
das Normal file
View File

@ -0,0 +1,159 @@
See 'git help <command>' to read about a specific subcommand
Main Porcelain Commands
add Add file contents to the index
am Apply a series of patches from a mailbox
archive Create an archive of files from a named tree
bisect Use binary search to find the commit that introduced a bug
branch List, create, or delete branches
bundle Move objects and refs by archive
checkout Switch branches or restore working tree files
cherry-pick Apply the changes introduced by some existing commits
citool Graphical alternative to git-commit
clean Remove untracked files from the working tree
clone Clone a repository into a new directory
commit Record changes to the repository
describe Give an object a human readable name based on an available ref
diff Show changes between commits, commit and working tree, etc
fetch Download objects and refs from another repository
format-patch Prepare patches for e-mail submission
gc Cleanup unnecessary files and optimize the local repository
gitk The Git repository browser
grep Print lines matching a pattern
gui A portable graphical interface to Git
init Create an empty Git repository or reinitialize an existing one
log Show commit logs
merge Join two or more development histories together
mv Move or rename a file, a directory, or a symlink
notes Add or inspect object notes
pull Fetch from and integrate with another repository or a local branch
push Update remote refs along with associated objects
range-diff Compare two commit ranges (e.g. two versions of a branch)
rebase Reapply commits on top of another base tip
reset Reset current HEAD to the specified state
restore Restore working tree files
revert Revert some existing commits
rm Remove files from the working tree and from the index
shortlog Summarize 'git log' output
show Show various types of objects
stash Stash the changes in a dirty working directory away
status Show the working tree status
submodule Initialize, update or inspect submodules
switch Switch branches
tag Create, list, delete or verify a tag object signed with GPG
worktree Manage multiple working trees
Ancillary Commands / Manipulators
config Get and set repository or global options
fast-export Git data exporter
fast-import Backend for fast Git data importers
filter-branch Rewrite branches
mergetool Run merge conflict resolution tools to resolve merge conflicts
pack-refs Pack heads and tags for efficient repository access
prune Prune all unreachable objects from the object database
reflog Manage reflog information
remote Manage set of tracked repositories
repack Pack unpacked objects in a repository
replace Create, list, delete refs to replace objects
Ancillary Commands / Interrogators
annotate Annotate file lines with commit information
blame Show what revision and author last modified each line of a file
count-objects Count unpacked number of objects and their disk consumption
difftool Show changes using common diff tools
fsck Verifies the connectivity and validity of the objects in the database
gitweb Git web interface (web frontend to Git repositories)
help Display help information about Git
instaweb Instantly browse your working repository in gitweb
merge-tree Show three-way merge without touching index
rerere Reuse recorded resolution of conflicted merges
show-branch Show branches and their commits
verify-commit Check the GPG signature of commits
verify-tag Check the GPG signature of tags
whatchanged Show logs with difference each commit introduces
Interacting with Others
archimport Import a GNU Arch repository into Git
cvsexportcommit Export a single commit to a CVS checkout
cvsimport Salvage your data out of another SCM people love to hate
cvsserver A CVS server emulator for Git
imap-send Send a collection of patches from stdin to an IMAP folder
p4 Import from and submit to Perforce repositories
quiltimport Applies a quilt patchset onto the current branch
request-pull Generates a summary of pending changes
send-email Send a collection of patches as emails
svn Bidirectional operation between a Subversion repository and Git
Low-level Commands / Manipulators
apply Apply a patch to files and/or to the index
checkout-index Copy files from the index to the working tree
commit-graph Write and verify Git commit-graph files
commit-tree Create a new commit object
hash-object Compute object ID and optionally creates a blob from a file
index-pack Build pack index file for an existing packed archive
merge-file Run a three-way file merge
merge-index Run a merge for files needing merging
mktag Creates a tag object
mktree Build a tree-object from ls-tree formatted text
multi-pack-index Write and verify multi-pack-indexes
pack-objects Create a packed archive of objects
prune-packed Remove extra objects that are already in pack files
read-tree Reads tree information into the index
symbolic-ref Read, modify and delete symbolic refs
unpack-objects Unpack objects from a packed archive
update-index Register file contents in the working tree to the index
update-ref Update the object name stored in a ref safely
write-tree Create a tree object from the current index
Low-level Commands / Interrogators
cat-file Provide content or type and size information for repository objects
cherry Find commits yet to be applied to upstream
diff-files Compares files in the working tree and the index
diff-index Compare a tree to the working tree or index
diff-tree Compares the content and mode of blobs found via two tree objects
for-each-ref Output information on each ref
get-tar-commit-id Extract commit ID from an archive created using git-archive
ls-files Show information about files in the index and the working tree
ls-remote List references in a remote repository
ls-tree List the contents of a tree object
merge-base Find as good common ancestors as possible for a merge
name-rev Find symbolic names for given revs
pack-redundant Find redundant pack files
rev-list Lists commit objects in reverse chronological order
rev-parse Pick out and massage parameters
show-index Show packed archive index
show-ref List references in a local repository
unpack-file Creates a temporary file with a blob's contents
var Show a Git logical variable
verify-pack Validate packed Git archive files
Low-level Commands / Synching Repositories
daemon A really simple server for Git repositories
fetch-pack Receive missing objects from another repository
http-backend Server side implementation of Git over HTTP
send-pack Push objects over Git protocol to another repository
update-server-info Update auxiliary info file to help dumb servers
Low-level Commands / Internal Helpers
check-attr Display gitattributes information
check-ignore Debug gitignore / exclude files
check-mailmap Show canonical names and email addresses of contacts
check-ref-format Ensures that a reference name is well formed
column Display data in columns
credential Retrieve and store user credentials
credential-store Helper to store credentials on disk
fmt-merge-msg Produce a merge commit message
interpret-trailers Add or parse structured information in commit messages
mailinfo Extracts patch and authorship from a single e-mail message
mailsplit Simple UNIX mbox splitter program
merge-one-file The standard helper program to use with git-merge-index
patch-id Compute unique ID for a patch
sh-i18n Git's i18n setup code for shell scripts
sh-setup Common Git shell script setup code
stripspace Remove unnecessary whitespace
External commands
askyesno
credential-helper-selector
flow
lfs

44863
eb_city_area.sql Normal file

File diff suppressed because it is too large Load Diff

13
eb_diy.sql Normal file

File diff suppressed because one or more lines are too long

18
pc.sql Normal file
View File

@ -0,0 +1,18 @@
INSERT INTO `eb_system_config_tab` (`id`, `pid`, `title`, `eng_title`, `status`, `info`, `icon`, `type`, `sort`) VALUES (null, 22, 'PC配置', 'system_pc', 1, 0, '', 0, 0);
INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config_tab_id`, `parameter`, `upload_type`, `required`, `width`, `high`, `value`, `info`, `desc`, `sort`, `status`) VALUES
(null, 'wechat_open_app_id', 'text', 'input', 71, NULL, NULL, '', 100, NULL, '', '开放平台appid', '开放平台appid', 0, 1),
(null, 'wechat_open_app_secret', 'text', 'input', 71, NULL, NULL, '', 100, NULL, '', '开放平台secret', '开放平台secret', 0, 1),
(null, 'contact_number', 'text', 'input', 71, NULL, NULL, '', 100, NULL, '', '联系电话', '联系电话', 0, 1),
(null, 'company_address', 'text', 'input', 71, NULL, NULL, '', 100, NULL, '', '公司地址', '公司地址', 0, 1),
(null, 'copyright', 'text', 'input', 71, NULL, NULL, '', 100, NULL, '', '版权信息', '版权信息', 0, 1),
(null, 'record_No', 'text', 'input', 71, NULL, NULL, '', 100, NULL, '', '备案号', '备案号', 0, 1),
(null, 'site_keywords', 'text', 'input', 71, NULL, NULL, NULL, 100, NULL, '', '关键词', '网站关键词', 0, 1),
(null, 'site_description', 'textarea', NULL, 71, NULL, NULL, NULL, 100, 5, '', '网站描述', '网站描述', 0, 1),
(null, 'product_phone_buy_url', 'radio', NULL, 71, '1=>公众号\n2=>小程序', NULL, NULL, NULL, NULL, '\"1\"', '商品手机购买跳转地址', '商品手机购买跳转地址(小程序|公众号)', 0, 1),
(null, 'pc_logo', 'upload', NULL, 71, NULL, 1, NULL, NULL, NULL, '', 'PC端LOGO', 'PC端LOGO', 0, 1),
(null, 'bast_number', 'text', 'number', 71, NULL, NULL, 'required:true,digits:true,min:1', 100, NULL, '4', '精品推荐个数', '首页配置精品推荐个数', 0, 1),
(null, 'first_number', 'text', 'number', 71, NULL, NULL, 'required:true,digits:true,min:1', 100, NULL, '4', '首发新品个数', '首页配置首发新品个数', 0, 1);

33
system.sql Normal file
View File

@ -0,0 +1,33 @@
--
-- 转存表中的数据 `eb_system_notification`
--
INSERT INTO `eb_system_notification` (`id`, `mark`, `name`, `title`, `is_system`, `is_app`, `is_wechat`, `is_routine`, `is_sms`, `is_ent_wechat`, `system_title`, `system_text`, `app_id`, `sms_id`, `ent_wechat_text`, `variable`, `url`, `type`, `add_time`) VALUES
(1, 'bind_spread_uid', '绑定推广关系', '注册完成给上级发送', 1, 1, 1, 1, 0, 0, '绑定下级通知', '恭喜,又一员猛将将永久绑定到您的团队,用户{nickname}加入您的队伍!', 0, 0, '0', '{nikename}用户名', '', 1, 0),
(2, 'order_pay_success', '支付成功给用户发送', '支付成功给用户发送', 1, 1, 1, 1, 1, 0, '购买成功通知', '您购买的商品已支付成功,支付金额{pay_price}元,订单号{order_id},感谢您的光临!', 0, 440396, '0', '{order_id}订单号,{total_num}商品总数,{pay_price}支付金额', '', 1, 0),
(3, 'order_takever', '确认收货提醒发送', '确认收货用户提醒发送', 1, 1, 1, 1, 1, 0, '确认收货通知', '亲,您的订单{order_id},商品{store_name}已确认收货,感谢您的光临!', 0, 440402, '0', '{order_id}订单号,{store_name}商品名称', '', 1, 0),
(4, 'price_revision', '改价提醒发送', '改价给用户提醒发送', 1, 1, 1, 0, 1, 0, '改价通知', '您的订单{order_id},实际支付金额已被修改为{pay_price}', 0, 440410, '0', '{order_id}订单号,{pay_price}订单金额', '', 1, 0),
(5, 'order_refund', '退款成功提醒发送', '退款给用户提醒发送', 1, 1, 1, 1, 0, 0, '退款成功通知', '您的订单{order_id}已同意退款,退款金额{refund_price}元。', 0, 0, '0', '{order_id}订单号,{refund_price}退款金额,{pay_price}订单金额', '', 1, 0),
(7, 'recharge_success', '充值成功提醒发送', '充值成功给用户提醒发送', 1, 1, 1, 1, 1, 0, '充值成功通知', '您成功充值¥{price},现剩余余额¥{now_money}元', 0, 811355, '0', '{order_id}充值订单,{price}充值金额,{now_money}现有余额', '', 1, 0),
(8, 'integral_accout', '积分到账提醒发送', '积分到账给用户提醒发送', 1, 1, 1, 1, 0, 0, '积分到账通知', '亲,您成功获得积分{gain_integral},现有积分{integral}', 0, 0, '0', '{order_id}订单号,{store_name}商品名称,{pay_price}支付金额,{gain_integral}获取积分,{integral}现有积分', '', 1, 0),
(9, 'order_brokerage', '佣金到账提醒发送', '佣金到账给用户提醒发送', 1, 1, 1, 1, 0, 0, '佣金到账通知', '亲,恭喜您成功获得佣金{brokerage_price}元', 0, 0, '0', '{goods_name}商品名称,{goods_price}商品金额,{brokerage_price}分佣金额', '', 1, 0),
(10, 'bargain_success', '砍价成功提醒发送', '砍价成功给用户提醒发送', 1, 1, 1, 1, 0, 0, '砍价成功通知', '亲,好腻害!你的朋友们已经帮你砍到底价了,商品名称{title},底价{min_price}', 0, 0, '0', '{title}活动名称{min_price}最低价', '', 1, 0),
(11, 'order_user_groups_success', '拼团成功提醒发送', '拼团成功给用户提醒发送', 1, 1, 1, 1, 0, 0, '拼团成功通知', '亲,您的拼团已经完成了,拼团名称{title},团长{nickname}', 0, 0, '0', '{title}活动名称,{nickname}团长,{count}拼团人数,{pink_time}开团时间', '', 1, 0),
(12, 'send_order_pink_fial', '拼团失败提醒发送', '拼团失败给用户提醒发送', 1, 1, 1, 1, 0, 0, '拼团失败通知', '亲,您的拼团失败,活动名称{title}', 0, 0, '0', '{title}活动名称{count}拼团人数', '', 1, 0),
(13, 'open_pink_success', '开团成功提醒发送', '开团成功给用户提醒发送', 1, 1, 1, 1, 0, 0, '开团成功通知', '亲,您已成功参与拼团,活动名称{title}', 0, 0, '0', '{title}活动名称,{nickname}团长,{count}拼团人数,{pink_time}开团时间', '', 1, 0),
(14, 'user_extract', '提现成功提醒发送', '提现成功给用户提醒发送', 1, 1, 1, 1, 0, 0, '提现成功通知', '亲,您成功提现佣金{extract_number}元', 0, 0, '0', '{extract_number}提现金额,{nickname}用户昵称,{date}提现时间', '', 1, 0),
(15, 'user_balance_change', '提现失败提醒发送', '提现失败给用户提醒发送', 1, 1, 1, 1, 0, 0, '提现失败通知', '亲,您发起的提现被驳回,返回佣金{extract_number}元', 0, 0, '0', '{extract_number}提现金额,{nickname}用户昵称,{date}提现时间,{message}失败原因', '', 1, 0),
(16, 'recharge_order_refund_status', '充值退款提醒发送', '充值退款给用户提醒发送', 1, 1, 1, 1, 1, 0, '充值退款通知', '亲,您充值的金额已退款,本次退款{refund_price}元', 0, 811356, '0', '{refund_price}退款金额,{order_id}充值订单,{price}充值金额', '', 1, 0),
(17, 'send_order_refund_no_status', '退款申请未通过提醒发送', '退款申请未通过给用户提醒发送', 1, 1, 1, 1, 0, 0, '退款申请拒绝通知', '您好!您的订单{order_id}已拒绝退款。', 0, 0, '0', '{order_id}订单号,{store_name}商品名称,{pay_price}订单金额', '', 1, 0),
(18, 'send_order_apply_refund', '申请退款给客服发消息', '申请退款给客服发消息', 1, 1, 1, 0, 2, 2, '您有新的退款待处理', '您有一笔退款订单待处理,订单号{order_id}!', 0, 440407, '您有个订单退款请注意查收\\n订单号{order_id}', '{admin_name}管理员,{order_id}订单号', '', 2, 0),
(19, 'admin_pay_success_code', '下单给客服发消息', '下单支付给客服发消息', 1, 1, 1, 0, 2, 1, '您有新的订单待处理', '您有一笔支付成功的订单待处理,订单号{order_id}!', 0, 440405, '您有个新订单请注意查收\\n订单号{order_id}', '{admin_name}管理员,{order_id}订单号', '', 2, 0),
(20, 'order_deliver_success', '发货提醒发送', '发货用户提醒发送', 1, 1, 1, 1, 1, 0, '发货通知', '亲爱的用户{nickname}您的商品{store_name},订单号{order_id}已发货,请注意查收', 0, 441596, '0', '{nickname}用户昵称,{store_name}商品名称,{order_id}订单号,{delivery_name}配送员姓名,{delivery_id}配送员电话,{user_address}收货地址', '', 1, 0),
(21, 'order_postage_success', '发货快递提醒发送', '发货快递用户提醒发送', 1, 1, 1, 1, 1, 0, '发货通知', '亲爱的用户{nickname}您的商品{store_name},订单号{order_id}已发货,请注意查收', 0, 441596, '0', '{nickname}用户昵称,{store_name}商品名称,{order_id}订单号,{delivery_name}快递名称,{delivery_id}快递单号,{user_address}收货地址', '', 1, 0),
(22, 'send_order_pink_clone', '取消拼团提醒发送', '取消拼团给用户提醒发送', 1, 1, 1, 1, 0, 0, '取消拼团通知', '亲,您的拼团取消,活动名称{title}', 0, 0, '0', '{title}活动名称{count}拼团人数', '', 1, 0),
(23, 'can_pink_success', '参团成功提醒发送', '参团成功给用户提醒发送', 1, 1, 1, 1, 0, 0, '参团成功通知', '亲,您已成功参与拼团,活动名称{title}', 0, 0, '0', '{title}活动名称,{nickname}团长,{count}拼团人数,{pink_time}开团时间', '', 1, 0),
(24, 'kefu_send_extract_application', '提现申请给客服发消息', '提现申请给客服发消息', 1, 0, 1, 0, 0, 1, '你有个新的提现申请待处理', '您有一笔提现申请待处理,提现金额{money}!', 0, 0, '您有个提现申请请注意查收\\n>提现金额{money}', '{nickname}用户昵称,{money}提现金额', '', 2, 0),
(25, 'send_admin_confirm_take_over', '收货给客服发消息', '收货给客服发消息', 1, 0, 1, 0, 2, 1, '你有个新的用户收货待处理', '您有一笔订单已经确认收货,订单号{order_id}!', 0, 440408, '您有个订单确认收货\\n>订单号{order_id}', '{storeTitle}商品名称,{order_id}订单号', '', 2, 0),
(26, 'order_pay_false', '提醒付款通知', '提醒付款通知用户提醒发送', 1, 1, 1, 0, 1, 0, '提醒付款通知', '您有未付款订单,订单号为:{order_id},商品数量有限,请及时付款。', 0, 440409, '0', '', '', 1, 0),
(27, 'kami_deliver_goods_code', '虚拟商品发货通知', '购买虚拟商品给用户发送提醒', 1, 0, 1, 0, 1, 0, '虚拟商品发货通知', '您购买的卡密商品已支付成功,支付{$price},订单号:{$order_id},卡号:{$card_no},密码:{$card_pwd},感谢您的光临!', 0, 849210, '', '', '', 1, 0),
(28, 'login_city_error', '异地登录通知', '账号异地登录给用户发送提醒', 0, 0, 0, 0, 1, 0, '', '您的账号于{time}在{city}登录,上次登录地址为{login_city},非本人登录请联系管理员或及时修改密码!', 0, 0, '', '', '', 1, 0),
(29, 'order_fictitious_success', '虚拟发货通知', '订单虚拟发货给用户发送提醒', 1, 0, 0, 0, 1, 0, '', '亲爱的用户{nickname}您的商品{store_name},订单号{order_id}已发货,请注意查收', 0, 0, '', '', '', 1, 0);

19
think Normal file
View File

@ -0,0 +1,19 @@
#!/usr/bin/env php
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: yunwuxin <448901948@qq.com>
// +----------------------------------------------------------------------
namespace think;
// 加载基础文件
require __DIR__ . '/vendor/autoload.php';
// 应用初始化
(new App())->console->run();

399
tree3.md Normal file
View File

@ -0,0 +1,399 @@
├── LICENSE.txt //开源协议
├── README.md //说明文档
├── app //应用目录
│   ├── AppService.php //服务类(加载容器)
│   ├── ExceptionHandle.php //应用异常处理类
│   ├── Request.php //请求类
│   ├── Route.php //路由
│   ├── build.php //创建模块配置
│   ├── provider.php //容器Provider定义文件
│   ├── service.php //服务配置
│   ├── event.php //事件
│   ├── middleware.php //中间件容器
│   ├── common.php //通用函数
│   ├── common //通用模块
│   │   └── controller
│   ├── controller //控制器
│   │   ├── Install.php //安装控制器
│   │   ├── Upgrade.php //升级控制器
│   │   ├── admin //后台控制器
│   │   ├── api //用户端控制器
│   │   ├── kefu //客服模块控制器
│   │   ├── out //对外接口控制器
│   │   └── store //门店控制器
│   ├── services //SERVICES层业务逻辑层
│   │   ├── BaseServices.php //SERVICES务逻辑基类
│   │   ├── activity //营销模块
│   │   ├── agent //分销模块
│   │   ├── article //文章模块
│   │   ├── coupon //优惠券模块
│   │   ├── diy //DIY模块
│   │   ├── export //表格导出模块
│   │   ├── kefu //客服模块
│   │   ├── live //直播模块
│   │   ├── message //消息模块
│   │   ├── order //订单模块
│   │   ├── other //其它模块
│   │   ├── out //对外接口
│   │   ├── pay //支付模块
│   │   ├── pc //PC端模块
│   │   ├── product //产品模块
│   │   ├── queue //队列模块
│   │   ├── serve //一号通模块
│   │   ├── shipping //运费模版模块
│   │   ├── statistic //统计模块
│   │   ├── store //门店模块
│   │   ├── system //系统配置模块
│   │   ├── user //用户模块
│   │   └── wechat //应用模块公众号、小程序
│   ├── dao //DAO层 数据持久层
│   │   ├── BaseDao.php //DAO基类
│   │   ├── activity //营销模块
│   │   ├── agent //分销模块
│   │   ├── article //文章模块
│   │   ├── coupon //优惠券模块
│   │   ├── diy //DIY模块
│   │   ├── live //直播模块
│   │   ├── order //订单模块
│   │   ├── other //其它模块 缓存、分类、城市数据、二维码、模版消息、隐私协议
│   │   ├── out //对外接口模块
│   │   ├── product //产品模块
│   │   ├── queue //队列模块和缓存模块
│   │   ├── service //客服模块
│   │   ├── shipping //运费模块模块
│   │   ├── sms //短信模块
│   │   ├── store //门店模块
│   │   ├── system //系统设置模块
│   │   ├── user //用户模块
│   │   └── wechat //应用模块公众号、小程序
│   ├── model //MODEL层数据访问层
│   │   ├── activity //营销模块
│   │   ├── agent //分销模块
│   │   ├── article //文章模块
│   │   ├── coupon //优惠券模块
│   │   ├── diy //DIY模块
│   │   ├── live //直播模块
│   │   ├── order //订单模块
│   │   ├── other //其它模块
│   │   ├── out //对外接口模块
│   │   ├── product //产品模块
│   │   ├── queue //队列模块
│   │   ├── service //客服模块
│   │   ├── shipping //运费模版模块
│   │   ├── sms //短信模块
│   │   ├── store //门店模块
│   │   ├── system //系统设置模块
│   │   ├── user //用户模块
│   │   └── wechat //应用模块
│   ├── http //中间件
│   │   └── middleware
│   │   ├── AllowOriginMiddleware.php //跨域中间件
│   │   ├── InstallMiddleware.php //安装中间件
│   │   ├── StationOpenMiddleware.php //升级中间件
│   │   ├── admin //后台中间件
│   │   ├── api //用户端中间件
│   │   ├── kefu //客服中间件
│   │   ├── out //对外接口中间件
│   │   └── store //门店中间件
│   ├── jobs //jobs层队列执行
│   │   ├── BatchHandleJob.php //批量添加job
│   │   ├── agent
│   │   │   ├── AgentJob.php //分销员检测
│   │   │   ├── AutoAgentJob.php //分销员自动解除上下级
│   │   │   └── SystemJob.php //重置分销有效期
│   │   ├── live
│   │   │   └── AutoUpdateLiveJob.php //直播自动更新
│   │   ├── notice
│   │   │   ├── EnterpriseWechatJob.php //企业微信群通知
│   │   │   ├── PrintJob.php //打印机job
│   │   │   ├── SmsAdminJob.php //管理员短信通知队列
│   │   │   └── SmsJob.php //短信发送队列
│   │   ├── order
│   │   │   ├── AutoOrderUnpaidCancelJob.php //自动取消未支付订单
│   │   │   ├── AutoTakeOrderJob.php //自动执行确认收货
│   │   │   ├── OrderCreateAfterJob.php //订单创建后
│   │   │   ├── OrderDeliveryJob.php //订单发货
│   │   │   ├── OrderJob.php //订单消息队列
│   │   │   ├── OrderTakeJob.php //订单收货任务
│   │   │   ├── OtherOrderJob.php //其它支付订单消息队列
│   │   │   ├── SpliteStoreOrderJob.php //拆分门店订单
│   │   │   ├── TakeOrderJob.php //自动收货消息队列 //TODO弃用
│   │   │   ├── UnpaidOrderCancelJob.php //未支付根据系统设置事件取消订单
│   │   │   └── UnpaidOrderSend.php //未支付10分钟后发送短信
│   │   ├── pink
│   │   │   ├── AuthPinkFail.php //分页处理拼团
│   │   │   └── PinkJob.php //拼团失败
│   │   ├── product
│   │   │   ├── ProductCopyJob.php //采集商品
│   │   │   └── ProductLogJob.php //商品日志
│   │   ├── store
│   │   │   └── StoreFinanceJob.php //门店资金流水记录
│   │   ├── system
│   │   │   ├── AutoClearPosterJob.php //自动清除过期海报
│   │   │   ├── AutoSmsCodeJob.php //自动更新短信状态
│   │   │   └── ExportExcelJob.php //导出数据队列
│   │   ├── template
│   │   │   ├── RoutineTemplateJob.php //小程序模版消息队列
│   │   │   ├── TemplateJob.php //模版消息队列
│   │   │   └── WechatTemplateJob.php //公众号模版消息队列
│   │   └── user
│   │   ├── AutoClearIntegralJob.php //自动清除用户积分分批加入队列
│   │   ├── UserIntegralJob.php //清除到期积分
│   │   └── UserJob.php //同步微信用户
│   ├── lang //语言配置
│   │   └── zh-cn.php
│   ├── listener //事件
│   │   ├── admin
│   │   │   ├── LoginSuccess.php //管理员登录
│   │   │   └── LogoutSuccess.php //管理员退出
│   │   ├── config
│   │   │   ├── CreateSuccess.php //添加配置
│   │   │   ├── DeleteSuccess.php //删除配置
│   │   │   └── StatusSuccess.php //修改配置
│   │   ├── live
│   │   │   └── AutoUpdateLive.php //直播数据同步
│   │   ├── notice
│   │   │   └── Notice.php //系统通知事件
│   │   ├── order
│   │   │   ├── AutoCancel.php //订单到期自动取消
│   │   │   ├── AutoTake.php //自动取消订单
│   │   │   ├── Comment.php //订单评价事件
│   │   │   ├── Create.php //创建订单
│   │   │   ├── Delivery.php //订单发货
│   │   │   ├── Pay.php //订单支付成功
│   │   │   ├── PriceRevision.php //订单改价格事件
│   │   │   ├── Refund.php //订单退款事件
│   │   │   ├── RefuseRefund.php //订单拒绝退款
│   │   │   ├── SubmitRefund.php //订单申请退款
│   │   │   └── Take.php //订单收货
│   │   ├── pink
│   │   │   └── AutoPink.php
│   │   ├── product
│   │   │   ├── CreateSuccess.php //添加商品成功
│   │   │   ├── DeleteSuccess.php //删除商品
│   │   │   └── StatusSuccess.php //商品状态变动
│   │   ├── sms
│   │   │   └── SendAfterSuccess.php //短信发送成功
│   │   ├── store
│   │   │   ├── DeleteSuccess.php //删除门店
│   │   │   ├── StatusSuccess.php //门店状态变更
│   │   │   └── StoreSuccess.php //添加门店
│   │   ├── system
│   │   │   ├── AutoClearPoster.php //定时清除海报
│   │   │   ├── AutoConfig.php //定时检测config
│   │   │   └── AutoSmsCode.php //定时检测短信状态
│   │   └── user
│   │   ├── AutoAgent.php //定时检测分销员
│   │   ├── AutoClearIntegral.php //定时清除用户积分
│   │   ├── CreateSuccess.php //创建用户
│   │   ├── Extract.php //用户申请提现
│   │   ├── Login.php //用户登录
│   │   ├── Recharge.php //用户充值支付成功
│   │   ├── Register.php //用户注册
│   │   └── VipUser.php //用户购买vip
│   ├── validate //表单验证
│   │   ├── admin //后台
│   │   ├── api //用户端
│   │   ├── kefu //客服端
│   │   ├── out //对外接口
│   │   └── store //门店
│   └── webscoket //长链接
│   ├── BaseHandler.php //处理基类
│   ├── Manager.php //websocket处理
│   ├── Ping.php //心跳ping
│   ├── Response.php //返回数据
│   ├── Room.php //聊天
│   ├── SwooleWorkerStart.php //swoole启动
│   └── handler //具体处理类
├── build.example.php //默认生成文件配置
├── composer.json //composer 配置文件
├── composer.lock //composer 文件
├── config //系统配置文件
│   ├── app.php //系统配置
│   ├── auth.php //授权文件配置
│   ├── cache.php //缓存配置
│   ├── captcha.php //验证码配置
│   ├── console.php //控制台配置
│   ├── cookie.php //cookie配置
│   ├── database.php //数据库连接配置
│   ├── filesystem.php //系统文件目录配置
│   ├── lang.php //语言配置
│   ├── log.php //日志配置
│   ├── pay.php //支付配置
│   ├── plat.php //一号通短信配置
│   ├── printer.php //小票打印配置
│   ├── qrcode.php //二维码配置
│   ├── queue.php //队列配置
│   ├── route.php //路由配置
│   ├── session.php //session
│   ├── sms.php //短信配置
│   ├── swoole.php //swoole配置
│   ├── template.php //应用模版消息配置
│   ├── trace.php //调试配置
│   ├── upload.php //上传文件配置
│   └── view.php //模版配置
├── crmeb //CRMEB核心文件
│   ├── basic //系统基类
│   │   ├── BaseAuth.php //系统商业授权类
│   │   ├── BaseController.php //控制器基类
│   │   ├── BaseExpress.php //物流基类
│   │   ├── BaseJobs.php //消息队列基类
│   │   ├── BaseManager.php //驱动基类
│   │   ├── BaseMessage.php //消息基类
│   │   ├── BaseModel.php //model基类
│   │   ├── BasePay.php //支付基类
│   │   ├── BasePrinter.php //打印基类
│   │   ├── BaseProduct.php //产品基类
│   │   ├── BaseSms.php //短信基类
│   │   ├── BaseSmss.php //一号通短信基类
│   │   ├── BaseStorage.php //容器基类
│   │   └── BaseUpload.php //上传文件基类
│   ├── command //命令行
│   │   ├── Dao.php //生成dao类文件命令
│   │   ├── Install.php //安装命令
│   │   ├── Service.php //生成Service类文件命令
│   │   └── stubs //生成文件模版
│   ├── exceptions //异常处理类
│   │   ├── AdminException.php //后台异常处理类
│   │   ├── ApiException.php //用户端异常处理类
│   │   ├── AuthException.php //用户授权异常处理类
│   │   ├── PayException.php //支付异常处理类
│   │   ├── SmsException.php //短信异常处理类
│   │   ├── TemplateException.php //模版消息异常处理类
│   │   ├── UploadException.php //文件上传异常处理类
│   │   └── WechatReplyException.php //微信回复消息异常处理类
│   ├── interfaces //接口类
│   │   ├── HandlerInterface.php //长链接接口类
│   │   ├── JobInterface.php //队列接口类
│   │   ├── ListenerInterface.php //事件接口类
│   │   ├── MiddlewareInterface.php //中间件接口类
│   │   └── ProviderInterface.php //容器接口类
│   ├── listeners //事件
│   │   ├── InitSwooleLockListen.php //swoole 初始化事件
│   │   ├── Listener.php
│   │   ├── SwooleShutdownListen.php //swoole 停止事件
│   │   ├── SwooleStartListen.php //swoole 启动事件
│   │   ├── SwooleTaskListen.php //异步任务 事件
│   ├── services //业务处理类 需要读取系统配置或重写vendor内部类
│   │   ├── AccessTokenServeService.php //token
│   │   ├── AliPayService.php //支付宝支付
│   │   ├── CacheService.php //缓存
│   │   ├── CopyProductService.php //采集产品
│   │   ├── DownloadImageService.php //下载图片
│   │   ├── ExpressService.php //物流查询
│   │   ├── FileService.php //文件处理
│   │   ├── FormBuilder.php //自动生成表单
│   │   ├── GroupDataService.php //获取组合数据
│   │   ├── HttpService.php //curl请求
│   │   ├── MiniProgramService.php //小程序封装类
│   │   ├── MysqlBackupService.php //数据库备份
│   │   ├── PaymentService.php //微信支付重写注入request
│   │   ├── QrcodeService.php //二维码处理
│   │   ├── SpreadsheetExcelService.php //excel处理类
│   │   ├── SwooleTaskService.php //swoole异步任务类
│   │   ├── SystemConfigService.php //获取系统配置类
│   │   ├── UpgradeService.php //升级类
│   │   ├── UploadService.php //文件上传
│   │   ├── UtilService.php //工具类
│   │   ├── VicWordService.php //分词类
│   │   ├── WechatOpenService.php //微信开放平台类
│   │   ├── WechatService.php //公众号类
│   │   ├── WechatWorkService.php //企业微信类
│   │   ├── easywechat //微信封装类
│   │   ├── express //物流
│   │   ├── printer //打印机
│   │   ├── product //产品采集
│   │   ├── serve //一号通
│   │   ├── sms //短信
│   │   ├── template //模版消息
│   │   └── upload //文件上传
│   ├── traits //复用类
│   │   ├── ErrorTrait.php //设置错误
│   │   ├── JwtAuthModelTrait.php //无用* 但是重复写函数的挺多
│   │   ├── MacroTrait.php //获取request中属性
│   │   ├── ModelTrait.php //model时间搜索器
│   │   ├── OptionTrait.php //设置参数
│   │   ├── QueueTrait.php //队列
│   │   ├── SearchDaoTrait.php //设置搜索器
│   │   └── ServicesTrait.php //services注解映射baseDao方法
│   └── utils //工具类
│   ├── ApiErrorCode.php //错误码
│   ├── Arr.php //数组处理辅助类
│   ├── Canvas.php //生成图片类
│   ├── Captcha.php //验证码类
│   ├── Hook.php //监听事件
│   ├── Json.php //json处理类
│   ├── JwtAuth.php //Jwt token处理类
│   ├── QRcode.php //二维码类* 好像也是停用的
│   ├── Queue.php //队列工具类
│   └── Cron.php //定时任务处理类
├── help //不同php版本加密文件
│   ├── 7.1
│   │   ├── config
│   │   └── crmeb
│   ├── 7.2
│   │   ├── config
│   │   └── crmeb
│   ├── 7.3
│   │   ├── config
│   │   └── crmeb
│   ├── pro_default
│   │   ├── config
│   │   └── crmeb
│   ├── swoole-compiler.txt
│   ├── swoole-loader //不同环境加密扩展
│   │   ├── php_swoole_loader_php71_nzts_x64.dll //php7.1 非线程安全版 64位windows服务器
│   │   ├── php_swoole_loader_php71_zts_x64.dll //php7.1 非线程安全版 64位windows服务器
│   │   ├── php_swoole_loader_php72_nzts_x64.dll //php7.2 非线程安全版 64位windows服务器
│   │   ├── php_swoole_loader_php72_zts_x64.dll //php7.2 非线程安全版 64位windows服务器
│   │   ├── php_swoole_loader_php73_nzts_x64.dll //php7.3 非线程安全版 64位windows服务器
│   │   ├── php_swoole_loader_php73_zts_x64.dll //php7.3 非线程安全版 64位windows服务器
│   │   ├── swoole_loader71.so //php7.1 Linux服务器
│   │   ├── swoole_loader71_zts.so //php7.1 Linux服务器
│   │   ├── swoole_loader72.so //php7.2 Linux服务器
│   │   ├── swoole_loader72_zts.so //php7.2 Linux服务器
│   │   ├── swoole_loader73.so //php7.3 Linux服务器
│   │   └── swoole_loader73_zts.so //php7.3 Linux服务器
│   └── swoole_loader_mac //MacOS系统加密扩展
│   ├── swoole_loader71_2.2.so //php7.1 MacOS服务器
│   ├── swoole_loader72_2.2.so //php7.1 MacOS服务器
│   ├── swoole_loader73_2.2.so //php7.1 MacOS服务器
│   └── swoole_loader74_2.2.so //php7.1 MacOS服务器
├── public //系统入口目录
│   ├── favicon.ico //网站ico图标
│   ├── index.html //移动端首页
│   ├── index.php //网站入口文件
│   ├── install //安装程序目录
│   │   ├── crmeb.sql //安装程序mysql数据库文件
│   │   ├── css
│   │   ├── images
│   │   ├── js
│   │   └── view //安装程序页面
│   ├── nginx.htaccess //伪静态配置文件
│   ├── public
│   ├── router.php //兼容不同环境路由配置文件
│   └── statics //静态文件目录
│   ├── exception.tpl
│   ├── font
│   ├── poster
│   └── qrcode
├── route //路由配置目录
│   ├── admin.php //后台路由配置
│   ├── api.php //用户端路由配置
│   ├── kefu.php //客服路由配置
│   ├── out.php //对外接口路由配置
│   ├── zroute.php //路由配置
│   └── store.php //门店端路由配置
├── think //thinphp 命令程序
├── tree3.md //目录说明
└── view //html 目录安装和升级页面
├── install //安装页面
│   ├── step1.html //安装页面
│   ├── step2.html //安装页面
│   ├── step3.html //安装页面
│   ├── step4.html //安装页面
│   └── step5.html //安装页面
└── upgrade //升级页面
└── step1.html

269
update_3_0_0.sql Normal file
View File

@ -0,0 +1,269 @@
INSERT INTO `eb_system_config_tab` (`id`, `is_store`, `pid`, `title`, `eng_title`, `status`, `info`, `icon`, `type`, `sort`) VALUES
(NULL, 0, 0, '用户签到配置', 'user_sign_config', 1, 0, '', 0, 0);
SELECT `id` as tab1 FROM `eb_system_config_tab` WHERE `eng_title`='user_sign_config' LIMIT 1 into @tab1;
-- 签到配置
INSERT INTO `eb_system_config` (`id`, `is_store`, `menu_name`, `type`, `input_type`, `config_tab_id`, `parameter`, `upload_type`, `required`, `width`, `high`, `value`, `info`, `desc`, `sort`, `status`) VALUES
(NULL, 0, 'sign_status', 'radio', 'input', @tab1, '1=>开启\n0=>关闭', 1, '', 0, 0, '1', '签到开关', '签到开关,商城是否开启签到功能,关闭后隐藏签到入口', 100, 1),
(NULL, 0, 'sign_mode', 'radio', 'input', @tab1, '-1=>无限制\n1=>周循环\n0=>月循环', 1, '', 0, 0, '\"-1\"', '签到模式', '无限制累积和连续签到不会清零周循环每周一会清理累积和连续的记录为0重新开启计算月循环每月一号会清理累积和连续的记录为0重新开启计算', 95, 1),
(NULL, 0, 'sign_remind', 'radio', 'input', @tab1, '1=>开启\n0=>关闭', 1, '', 0, 0, '0', '签到提醒', '是否开启签到提醒,提醒方式为短信、站内信、小程序订阅消息', 90, 1),
(NULL, 0, 'sign_give_point', 'text', 'number', @tab1, '', 1, '', 0, 0, '10', '签到赠送积分', '签到赠送积分,每日签到赠送的积分值', 75, 1);
SELECT `id` as tab2 FROM `eb_system_config_tab` WHERE `eng_title`='point' LIMIT 1 into @tab2;
-- 积分配置
INSERT INTO `eb_system_config` (`id`, `is_store`, `menu_name`, `type`, `input_type`, `config_tab_id`, `parameter`, `upload_type`, `required`, `width`, `high`, `value`, `info`, `desc`, `sort`, `status`) VALUES
(NULL, 0, 'integral_frozen', 'text', 'input', @tab2, '', 0, '', 100, 0, '\"0\"', '积分冻结(天)', '积分冻结(天)0为不冻结', 0, 1);
-- 商品分类层级配置
INSERT INTO `eb_system_config` (`id`, `is_store`, `menu_name`, `type`, `input_type`, `config_tab_id`, `parameter`, `upload_type`, `required`, `width`, `high`, `value`, `info`, `desc`, `sort`, `status`) VALUES
(null, 0, 'product_category_level', 'radio', 'input', 11, '0=>一级\n1=>二级\n2=>三级', 1, '', 0, 0, '1', '商品分类层级', '商城使用商品分类的层级数量(一级\二级\三级)', 90, 1);
INSERT INTO `eb_system_config` (`id`, `is_store`, `menu_name`, `type`, `input_type`, `config_tab_id`, `parameter`, `upload_type`, `required`, `width`, `high`, `value`, `info`, `desc`, `sort`, `status`) VALUES
(NULL, 0, 'refund_time_available', 'text', 'input', 71, '', 1, '', 100, 0, '0', '售后期限', '订单收货之后在多少天内可以进行退款超出天数前端不显示退款按钮设置0则永远显示', 0, 1);
INSERT INTO `eb_system_config` (`id`, `is_store`, `menu_name`, `type`, `input_type`, `config_tab_id`, `parameter`, `upload_type`, `required`, `width`, `high`, `value`, `info`, `desc`, `sort`, `status`) VALUES
(NULL, 0, 'user_extract_max_price', 'text', 'input', 78, '', 0, 'required:true,number:true,min:0', 100, 0, '\"500\"', '提现最高金额', '用户提现最高金额限制', 0, 1);
INSERT INTO `eb_system_config` (`id`, `is_store`, `menu_name`, `type`, `input_type`, `config_tab_id`, `parameter`, `upload_type`, `required`, `width`, `high`, `value`, `info`, `desc`, `sort`, `status`) VALUES
(null, 0, 'user_extract_balance_status', 'radio', '', 78, '1=>开启\n0=>关闭', 1, '', 0, 0, '\"1\"', '提现至余额', '佣金转入用户余额', 0, 1);
DELETE FROM `eb_system_config` WHERE `menu_name` = 'store_printing_timing';
-- 关闭erp
UPDATE `eb_system_config` set `value` = 0 where `menu_name` = 'erp_open';
UPDATE `eb_system_config` set `info` = 'APPID', `desc` = '一号通->授权管理->应用管理APPID' where `menu_name` = 'sms_account';
UPDATE `eb_system_config` set `info` = 'AppSecret' , `desc` = '一号通->授权管理->应用管理AppSecret' where `menu_name` = 'sms_token';
-- 优惠券使用规则
ALTER TABLE `eb_store_coupon_issue` ADD `category` tinyint(1) NOT NULL DEFAULT '0' COMMENT '优惠券种类1 普通券2会员券' AFTER `cid`;
ALTER TABLE `eb_store_coupon_issue` ADD `rule` text CHARACTER SET utf8mb4 NULL DEFAULT NULL COMMENT '优惠券规则';
-- 定时任务
INSERT INTO `eb_system_timer` (`name`, `mark`, `type`, `title`, `is_open`, `cycle`, `last_execution_time`, `update_execution_time`, `is_del`, `add_time`) VALUES
('用户签到提醒', 'sign_remind_time', 4, '用户签到提醒', 1, '10/25', 0, 1705566366, 0, 1698377002);
INSERT INTO `eb_system_notification` (`id`, `mark`, `name`, `title`, `is_system`, `is_app`, `is_wechat`, `is_routine`, `is_sms`, `is_ent_wechat`, `system_title`, `system_text`, `app_id`, `wechat_id`, `routine_id`, `sms_id`, `ent_wechat_text`, `variable`, `url`, `type`, `add_time`) VALUES
(NULL, 'sign_remind_time', '签到提醒', '签到提醒', 1, 0, 0, 1, 1, 0, '签到提醒', '亲,{site_name}提醒您,今日记得签到并领取奖励哦~', 0, 0, '0', '980181', '', '', '', 1, 0);
-- 商品分类三级
ALTER TABLE `eb_store_product_category` ADD `path` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '路径' AFTER `cate_name`;
ALTER TABLE `eb_store_product_category` ADD `level` TINYINT(1) NOT NULL DEFAULT '0' COMMENT '等级' AFTER `path`;
ALTER TABLE `eb_store_product_category` ADD `adv_pic` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '广告图片' AFTER `big_pic`;
ALTER TABLE `eb_store_product_category` ADD `adv_link` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '广告链接' AFTER `adv_pic`;
-- 修改历史分类level
UPDATE `eb_store_product_category` set `level` = 0 where `pid` = 0;
UPDATE `eb_store_product_category` set `level` = 1 where `pid` > 0;
-- 修改历史分类path
UPDATE `eb_store_product_category` set `path` = `pid` where `pid` > 0;
-- 增加表字段
ALTER TABLE `eb_user` ADD `sign_remind` tinyint(1) NOT NULL DEFAULT '0' COMMENT '签到提醒状态' AFTER `sign_num`;
-- 增加表字段
ALTER TABLE `eb_user_sign` ADD `exp_num` int(11) NOT NULL DEFAULT '0' COMMENT '获得经验' AFTER `balance`;
ALTER TABLE `eb_user_sign` ADD `exp_balance` int(11) NOT NULL DEFAULT '0' COMMENT '剩余经验' AFTER `exp_num`;
-- 增加表字段
ALTER TABLE `eb_user_bill` ADD `frozen_time` int(12) NOT NULL DEFAULT '0' COMMENT '积分冻结时间';
-- 商品评分
ALTER TABLE `eb_store_product` ADD `star` DECIMAL(2,1) NOT NULL DEFAULT '3.0' COMMENT '商品评分' AFTER `sort`;
ALTER TABLE `eb_store_product` ADD `collect` int(10) NOT NULL DEFAULT '0' COMMENT '商品收藏数' AFTER `star`;
-- 售后申请
ALTER TABLE `eb_store_order_refund` ADD `apply_type` TINYINT(1) NOT NULL DEFAULT '1' COMMENT '申请售后类型:1:仅退款2:退货退款(快递退回)3:退货退款(到店退货)4:平台退款' AFTER `supplier_id`;
UPDATE `eb_store_order_refund` set `apply_type` = `refund_type` where `refund_type` in (1,2);
ALTER TABLE `eb_store_order_refund` ADD `apply_price` decimal(12,2) NOT NULL DEFAULT '0.00' COMMENT '申请退款金额' AFTER `apply_type`;
UPDATE `eb_store_order_refund` set `apply_price` = `refund_price`;
ALTER TABLE `eb_store_order_refund` ADD `refund_goods_type` TINYINT(1) NOT NULL DEFAULT '1' COMMENT '退货方式1:不退货2:快递退回3:到店退货' AFTER `refund_reason`;
UPDATE `eb_store_order_refund` set `refund_goods_type` = `apply_type` where `apply_type` in (1,2);
ALTER TABLE `eb_store_order_refund` CHANGE `refund_type` `refund_type` TINYINT(1) NOT NULL DEFAULT '0' COMMENT '退款处理类型0:未处理3拒绝4同意退货5已退货6已退款';
-- 订单表增加积分字段
ALTER TABLE `eb_store_order` ADD `pay_integral` INT(10) NOT NULL DEFAULT '0' COMMENT '实际支付积分' AFTER `pay_postage`;
ALTER TABLE `eb_store_order` ADD `change_price` DECIMAL(8,2) NOT NULL DEFAULT '0.00' COMMENT '改价优惠金额' AFTER `first_order_price`;
ALTER TABLE `eb_store_order` ADD `kuaidi_task_id` VARCHAR(128) NOT NULL DEFAULT '' COMMENT '商家寄件任务ID' AFTER `erp_order_id`;
ALTER TABLE `eb_store_order` ADD `kuaidi_order_id` INT(10) NOT NULL DEFAULT '0' COMMENT '商家寄件订单编号' AFTER `kuaidi_task_id`;
ALTER TABLE `eb_store_order` ADD `is_stock_up` TINYINT(1) NOT NULL DEFAULT '0' COMMENT '是否商家寄件 10 否' AFTER `kuaidi_order_id`;
ALTER TABLE `eb_store_order` CHANGE `virtual_info` `virtual_info` LONGTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '虚拟商品信息';
ALTER TABLE `eb_store_order` MODIFY column `clerk_id` int(11) NOT NULL DEFAULT '0' COMMENT '店员/管理员uid';
ALTER TABLE `eb_system_user_level` ADD `color` varchar(32) NOT NULL DEFAULT '' COMMENT ' 字体颜色' AFTER `image`;
-- 增加评价分数标签
ALTER TABLE `eb_store_product_reply` ADD `reply_score` TINYINT(1) NOT NULL DEFAULT '3' COMMENT '评价分数:3赞2中1差' AFTER `reply_type`;
-- 增加物流评分
ALTER TABLE `eb_store_product_reply` ADD `delivery_score` TINYINT(1) NOT NULL DEFAULT '0' COMMENT '物流评分' AFTER `service_score`;
UPDATE `eb_store_product_reply` set `delivery_score` = 5;
-- 用户开票表
ALTER TABLE `eb_store_order_invoice` CHANGE `is_invoice` `is_invoice` TINYINT(1) NOT NULL DEFAULT '0' COMMENT '0未开票 1:已开票 -1:已拒绝';
-- 分销员等级表
ALTER TABLE `eb_agent_level` ADD `color` varchar(32) NOT NULL DEFAULT '' COMMENT ' 字体颜色' AFTER `image`;
DELETE FROM `eb_page_link` where `url` LIKE '/pages/columnGoods/HotNewGoods/index%';
UPDATE `eb_page_link` set `url` = '/pages/activity/points_mall/index', `param` = '/pages/activity/points_mall/index' where `url` = '/pages/points_mall/index';
UPDATE `eb_page_link` set `url` = '/pages/activity/coupon/index', `param` = '/pages/activity/coupon/index' where `url` = '/pages/users/user_get_coupon/index';
UPDATE `eb_page_link` set `url` = '/pages/activity/new_customer/index', `param` = '/pages/activity/new_customer/index' where `url` = '/pages/store/newcomers/index';
UPDATE `eb_page_link` set `url` = '/pages/goods/order_list/index?type=4', `param` = '/pages/goods/order_list/index?type=4' where `url` = '/pages/points_mall/exchange_record';
UPDATE `eb_page_link` set `url` = '/pages/users/user_vip/index', `param` = '/pages/users/user_vip/index' where `url` = '/pages/annex/vip_grade/index';
UPDATE `eb_page_link` set `url` = '/pages/goods/goods_list/index?promotions_type=1', `param` = '/pages/goods/goods_list/index?promotions_type=1' where `url` = '/pages/activity/discount/index?promotions_type=1';
UPDATE `eb_page_link` set `url` = '/pages/goods/goods_list/index?promotions_type=2', `param` = '/pages/goods/goods_list/index?promotions_type=2' where `url` = '/pages/activity/discount/index?promotions_type=2';
UPDATE `eb_page_link` set `url` = '/pages/goods/goods_list/index?promotions_type=3', `param` = '/pages/goods/goods_list/index?promotions_type=3' where `url` = '/pages/activity/discount/index?promotions_type=3';
UPDATE `eb_page_link` set `url` = '/pages/goods/goods_list/index?promotions_type=4', `param` = '/pages/goods/goods_list/index?promotions_type=4' where `url` = '/pages/activity/discount/index?promotions_type=4';
UPDATE `eb_page_link` set `url` = '/pages/store_list/index', `param` = '/pages/store_list/index' where `url` = '/pages/store_cate/store_cate';
INSERT INTO `eb_page_link` (`id`, `cate_id`, `type`, `name`, `url`, `param`, `example`, `status`, `sort`, `add_time`) VALUES
(NULL, 6, 8, '搭配套餐列表', '/pages/goods/match_pay/index', ' ', '/pages/goods/match_pay/index', 1, 0, 1626837579);
-- 会员权益
ALTER TABLE `eb_member_right` ADD `content` LONGTEXT NULL DEFAULT NULL COMMENT '权益内容' AFTER `explain`;
-- 文章管理表
ALTER TABLE `eb_article` ADD `likes` INT(10) NOT NULL DEFAULT '0' COMMENT '点赞量' AFTER `visit`;
-- 商品点赞和收藏表
ALTER TABLE `eb_user_relation` CHANGE `category` `category` VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '某种类型的商品(普通商品、秒杀商品、文章)';
ALTER TABLE `eb_store_product_label` ADD `style_type` TINYINT(1) NOT NULL DEFAULT 1 COMMENT '样式类型1自定义2图片' AFTER `label_name`;
ALTER TABLE `eb_store_product_label` ADD `color` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '颜色' AFTER `style_type`;
ALTER TABLE `eb_store_product_label` ADD `bg_color` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '背景颜色' AFTER `color`;
ALTER TABLE `eb_store_product_label` ADD `border_color` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '边框颜色' AFTER `bg_color`;
ALTER TABLE `eb_store_product_label` ADD `icon` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '图标' AFTER `border_color`;
ALTER TABLE `eb_store_product_label` ADD `is_show` TINYINT(1) NOT NULL DEFAULT 1 COMMENT '移动端是否展示' AFTER `icon`;
ALTER TABLE `eb_store_product_label` ADD `status` TINYINT(1) NOT NULL DEFAULT 1 COMMENT '状态是否开启' AFTER `is_show`;
-- 付费会员表
ALTER TABLE `eb_member_ship` ADD `is_label` TINYINT(1) NOT NULL DEFAULT '0' COMMENT '特惠标签' AFTER `pre_price`;
-- 模板/订阅消息
SELECT `id` as sn1 FROM `eb_system_notification` WHERE `mark`='sign_remind_time' LIMIT 1 into @sn1;
INSERT INTO `eb_template_message` (`id`, `notification_id`, `type`, `tempkey`, `name`, `kid`, `content`, `example`, `tempid`, `add_time`, `status`) VALUES
(null, @sn1, 0, '25599', '签到提醒', '', '活动名称{{thing3.DATA}}\r\n温馨提示{{thing2.DATA}}', '', '', '1705458018', 1);
-- 分类
ALTER TABLE `eb_category` ADD `integral_min` int(10) NOT NULL DEFAULT '0' COMMENT '积分分类最低';
ALTER TABLE `eb_category` ADD `integral_max` int(10) NOT NULL DEFAULT '0' COMMENT '积分分类最高';
UPDATE `eb_system_config` set `desc` = '一号通的登录账号' WHERE `menu_name` = 'sms_account';
-- 门店
ALTER TABLE `eb_system_store` ADD `background_image` varchar(255) NOT NULL DEFAULT '' COMMENT '门店背景图' AFTER `image`;
ALTER TABLE `eb_system_store` COMMENT='门店';
ALTER TABLE `eb_store_integral` ADD `postage` DECIMAL(10,2) NOT NULL DEFAULT '0.00' COMMENT '邮费' AFTER `freight`;
ALTER TABLE `eb_store_integral` ADD `temp_id` INT(10) NOT NULL DEFAULT '0' COMMENT '运费模板ID' AFTER `postage`;
--
-- 表的结构 `eb_system_sign_reward`
--
CREATE TABLE IF NOT EXISTS `eb_system_sign_reward` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号',
`type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '类型0连续签到奖励1累计签到奖励',
`days` int(11) NOT NULL DEFAULT '0' COMMENT '天数',
`point` int(11) NOT NULL DEFAULT '0' COMMENT '赠送积分',
`exp` int(11) NOT NULL DEFAULT '0' COMMENT '赠送经验',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='系统签到奖励表';
--
-- 表的结构 `eb_store_product_words`
--
CREATE TABLE IF NOT EXISTS `eb_store_product_words` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
`type` TINYINT(1) NOT NULL DEFAULT '0' COMMENT '类型0平台2:供应商',
`relation_id` INT(11) NOT NULL DEFAULT '0' COMMENT '门店、供应商id',
`name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '',
`color` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '颜色',
`bg_color` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '背景颜色',
`border_color` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '边框颜色',
`icon` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '图标',
`is_show` tinyint(1) NULL DEFAULT 0 COMMENT '是否显示',
`sort` smallint(11) NULL DEFAULT 0 COMMENT '排序',
`is_search` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '大家都在搜',
`is_hot` tinyint(1) NULL DEFAULT 0 COMMENT '热词',
`is_del` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
`add_time` int(11) NOT NULL DEFAULT '0' COMMENT '添加时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT='商品搜索热词';
-- 对外接口账号表
ALTER TABLE eb_out_account
ADD COLUMN `rules` text NULL DEFAULT NULL COMMENT '权限' AFTER `status`,
ADD COLUMN `push_open` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否推送',
ADD COLUMN `push_account` varchar(255) NOT NULL COMMENT '推送账号',
ADD COLUMN `push_password` varchar(255) NOT NULL COMMENT '推送密码',
ADD COLUMN `push_token_url` varchar(255) NOT NULL COMMENT '获取推送token接口',
ADD COLUMN `user_update_push` varchar(255) NOT NULL COMMENT '用户推送接口',
ADD COLUMN `order_create_push` varchar(255) NOT NULL DEFAULT '' COMMENT '订单创建推送接口',
ADD COLUMN `order_pay_push` varchar(255) NOT NULL DEFAULT '' COMMENT '订单支付推送接口',
ADD COLUMN `refund_create_push` varchar(255) NOT NULL DEFAULT '' COMMENT '售后订单创建推送接口',
ADD COLUMN `refund_cancel_push` varchar(255) NOT NULL DEFAULT '' COMMENT '售后订单取消推送接口';
--
-- 表的结构 `eb_out_interface`
--
CREATE TABLE IF NOT EXISTS `eb_out_interface` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`pid` int(11) NOT NULL DEFAULT '0' COMMENT '父级pid',
`type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0菜单1接口',
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '接口名称',
`describe` text NULL DEFAULT NULL COMMENT '功能描述',
`method` varchar(255) NOT NULL DEFAULT '' COMMENT '接口类型',
`url` varchar(255) NOT NULL DEFAULT '' COMMENT '接口地址',
`request_params` LONGTEXT NULL DEFAULT NULL COMMENT '请求参数',
`return_params` LONGTEXT NULL DEFAULT NULL COMMENT '返回参数',
`request_example` LONGTEXT NULL DEFAULT NULL COMMENT '请求示例',
`return_example` LONGTEXT NULL DEFAULT NULL COMMENT '返回示例',
`error_code` LONGTEXT NULL DEFAULT NULL COMMENT '错误返回',
`is_del` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='对外接口';
CREATE TABLE IF NOT EXISTS `eb_system_printer` (
`id` INT(10) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`type` TINYINT(1) NOT NULL DEFAULT '0' COMMENT '类型0平台1:门店2:供应商' ,
`relation_id` INT(10) NOT NULL DEFAULT '0' COMMENT '门店、供应商id' ,
`name` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '打印机名称' ,
`plat_type` TINYINT(1) NOT NULL DEFAULT '1' COMMENT '打印机类型1易联运2飞蛾云' ,
`print_event` varchar (255) NOT NULL DEFAULT '2' COMMENT '打印事件1下单后2支付后' ,
`print_num` TINYINT(1) NOT NULL DEFAULT '1' COMMENT '打印联数' ,
`status` TINYINT(1) NOT NULL DEFAULT '1' COMMENT '打印机状态' ,
`add_time` INT(10) NOT NULL DEFAULT '0' COMMENT '创建时间' ,
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='打印机';
-- 关联打印机ID
ALTER TABLE `eb_store_config` ADD `print_id` INT(10) NOT NULL DEFAULT '0' COMMENT '关联打印机ID' AFTER `id`;
ALTER TABLE `eb_store_product_attr_value` CHANGE `suk` `suk` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '商品属性索引值 (attr_value|attr_value[|....])';
DELETE FROM `eb_system_group` where `config_name` = 'routine_my_menus';
INSERT INTO `eb_system_group` (`id`, `cate_id`, `name`, `info`, `config_name`, `fields`) VALUES
(54, 0, '个人中心菜单', '个人中心菜单', 'routine_my_menus', '[{\"name\":\"\\u83dc\\u5355\\u540d\",\"title\":\"name\",\"type\":\"input\",\"param\":\"\"},{\"name\":\"\\u56fe\\u6807(48*48)\",\"title\":\"pic\",\"type\":\"upload\",\"param\":\"\"},{\"name\":\"\\u8df3\\u8f6c\\u8def\\u5f84\",\"title\":\"url\",\"type\":\"input\",\"param\":\"\"},{\"name\":\"\\u83dc\\u5355\",\"title\":\"type\",\"type\":\"radio\",\"param\":\"1=>\\u6211\\u7684\\u670d\\u52a1\\n2=>\\u5e73\\u53f0\\u7ba1\\u7406\\n3=>\\u95e8\\u5e97\\u7ba1\\u7406\"}]');
INSERT INTO `eb_system_group_data` (`id`, `gid`, `value`, `add_time`, `sort`, `status`) VALUES
(null, @tabId, '{\"name\":{\"type\":\"input\",\"value\":\"\\u914d\\u9001\\u5458\"},\"pic\":{\"type\":\"upload\",\"value\":\"\\/uploads\\/system\\/0a73f202109230908134790.png\"},\"url\":{\"type\":\"input\",\"value\":\"\\/pages\\/admin\\/distribution\\/index\"},\"type\":{\"type\":\"radio\",\"value\":\"3\"}}', 1634803318, 3, 1),
(null, @tabId, '{\"name\":{\"type\":\"input\",\"value\":\"\\\\u95e8\\\\u5e97\\\\u4e2d\\\\u5fc3\"},\"pic\":{\"type\":\"upload\",\"value\":\"\\/uploads\\/system\\/5379f202109230908215868.png\"},\"url\":{\"type\":\"input\",\"value\":\"\\/pages\\/admin\\/work\\/store\"},\"type\":{\"type\":\"radio\",\"value\":\"3\"}}', 1634803318, 4, 1),
(null, @tabId, '{\"name\":{\"type\":\"input\",\"value\":\"\\\\u5e97\\\\u5458\\\\u63a8\\\\u5e7f\\\\u7801\"},\"pic\":{\"type\":\"upload\",\"value\":\"\\/uploads\\/system\\/store_spread.png\"},\"url\":{\"type\":\"input\",\"value\":\"\\/pages\\/store_spread\\/index\"},\"type\":{\"type\":\"radio\",\"value\":\"3\"}}', 1631500428, 4, 1);