wugg 1 년 전
커밋
8eea68fee3
54개의 변경된 파일3463개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      .gitignore
  2. 42 0
      .travis.yml
  3. 32 0
      LICENSE.txt
  4. 56 0
      README.md
  5. 1 0
      app/.htaccess
  6. 22 0
      app/AppService.php
  7. 94 0
      app/BaseController.php
  8. 58 0
      app/ExceptionHandle.php
  9. 8 0
      app/Request.php
  10. 78 0
      app/common.php
  11. 17 0
      app/event.php
  12. 10 0
      app/middleware.php
  13. 9 0
      app/provider.php
  14. 9 0
      app/service.php
  15. 79 0
      app/txx/common/Sign.php
  16. 187 0
      app/txx/controller/Act.php
  17. 625 0
      app/txx/controller/Good.php
  18. 11 0
      app/txx/controller/Index.php
  19. 10 0
      app/txx/middleware.php
  20. 65 0
      app/txx/middleware/CheckAuth.php
  21. 14 0
      app/txx/model/Act.php
  22. 26 0
      app/txx/model/ActGood.php
  23. 14 0
      app/txx/model/PlatformYouzan.php
  24. 17 0
      app/txx/model/YzGood.php
  25. 19 0
      app/txx/route/app.php
  26. 50 0
      composer.json
  27. 1036 0
      composer.lock
  28. 32 0
      config/app.php
  29. 29 0
      config/cache.php
  30. 9 0
      config/console.php
  31. 20 0
      config/cookie.php
  32. 157 0
      config/database.php
  33. 24 0
      config/filesystem.php
  34. 27 0
      config/lang.php
  35. 45 0
      config/log.php
  36. 8 0
      config/middleware.php
  37. 7 0
      config/noble.php
  38. 189 0
      config/order.php
  39. 136 0
      config/process.php
  40. 45 0
      config/route.php
  41. 19 0
      config/session.php
  42. 10 0
      config/trace.php
  43. 25 0
      config/view.php
  44. 2 0
      extend/.gitignore
  45. 8 0
      public/.htaccess
  46. BIN
      public/favicon.ico
  47. 24 0
      public/index.php
  48. 2 0
      public/robots.txt
  49. 19 0
      public/router.php
  50. 2 0
      public/static/.gitignore
  51. 17 0
      route/app.php
  52. 2 0
      runtime/.gitignore
  53. 10 0
      think
  54. 1 0
      view/README.md

+ 5 - 0
.gitignore

@@ -0,0 +1,5 @@
+/.idea
+/.vscode
+/vendor
+*.log
+.env

+ 42 - 0
.travis.yml

@@ -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

+ 32 - 0
LICENSE.txt

@@ -0,0 +1,32 @@
+
+ThinkPHP遵循Apache2开源协议发布,并提供免费使用。
+版权所有Copyright © 2006-2016 by ThinkPHP (http://thinkphp.cn)
+All rights reserved。
+ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。
+
+Apache Licence是著名的非盈利开源组织Apache采用的协议。
+该协议和BSD类似,鼓励代码共享和尊重原作者的著作权,
+允许代码修改,再作为开源或商业软件发布。需要满足
+的条件: 
+1. 需要给代码的用户一份Apache Licence ;
+2. 如果你修改了代码,需要在被修改的文件中说明;
+3. 在延伸的代码中(修改和有源代码衍生的代码中)需要
+带有原来代码中的协议,商标,专利声明和其他原来作者规
+定需要包含的说明;
+4. 如果再发布的产品中包含一个Notice文件,则在Notice文
+件中需要带有本协议内容。你可以在Notice中增加自己的
+许可,但不可以表现为对Apache Licence构成更改。 
+具体的协议参考:http://www.apache.org/licenses/LICENSE-2.0
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.

+ 56 - 0
README.md

@@ -0,0 +1,56 @@
+ThinkPHP 6.0
+===============
+
+> 运行环境要求PHP7.2+,兼容PHP8.1
+
+[官方应用服务市场](https://market.topthink.com) | [`ThinkAPI`——官方统一API服务](https://docs.topthink.com/think-api)
+
+ThinkPHPV6.0版本由[亿速云](https://www.yisu.com/)独家赞助发布。
+
+## 主要新特性
+
+* 采用`PHP7`强类型(严格模式)
+* 支持更多的`PSR`规范
+* 原生多应用支持
+* 更强大和易用的查询
+* 全新的事件系统
+* 模型事件和数据库事件统一纳入事件系统
+* 模板引擎分离出核心
+* 内部功能中间件化
+* SESSION/Cookie机制改进
+* 对Swoole以及协程支持改进
+* 对IDE更加友好
+* 统一和精简大量用法
+
+## 安装
+
+~~~
+composer create-project topthink/think tp 6.0.*
+~~~
+
+如果需要更新框架使用
+~~~
+composer update topthink/framework
+~~~
+
+## 文档
+
+[完全开发手册](https://www.kancloud.cn/manual/thinkphp6_0/content)
+
+## 参与开发
+
+请参阅 [ThinkPHP 核心框架包](https://github.com/top-think/framework)。
+
+## 版权信息
+
+ThinkPHP遵循Apache2开源协议发布,并提供免费使用。
+
+本项目包含的第三方源码和二进制文件之版权信息另行标注。
+
+版权所有Copyright © 2006-2021 by ThinkPHP (http://thinkphp.cn)
+
+All rights reserved。
+
+ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。
+
+更多细节参阅 [LICENSE.txt](LICENSE.txt)

+ 1 - 0
app/.htaccess

@@ -0,0 +1 @@
+deny from all

+ 22 - 0
app/AppService.php

@@ -0,0 +1,22 @@
+<?php
+declare (strict_types = 1);
+
+namespace app;
+
+use think\Service;
+
+/**
+ * 应用服务类
+ */
+class AppService extends Service
+{
+    public function register()
+    {
+        // 服务注册
+    }
+
+    public function boot()
+    {
+        // 服务启动
+    }
+}

+ 94 - 0
app/BaseController.php

@@ -0,0 +1,94 @@
+<?php
+declare (strict_types = 1);
+
+namespace app;
+
+use think\App;
+use think\exception\ValidateException;
+use think\Validate;
+
+/**
+ * 控制器基础类
+ */
+abstract class BaseController
+{
+    /**
+     * Request实例
+     * @var \think\Request
+     */
+    protected $request;
+
+    /**
+     * 应用实例
+     * @var \think\App
+     */
+    protected $app;
+
+    /**
+     * 是否批量验证
+     * @var bool
+     */
+    protected $batchValidate = false;
+
+    /**
+     * 控制器中间件
+     * @var array
+     */
+    protected $middleware = [];
+
+    /**
+     * 构造方法
+     * @access public
+     * @param  App  $app  应用对象
+     */
+    public function __construct(App $app)
+    {
+        $this->app     = $app;
+        $this->request = $this->app->request;
+
+        // 控制器初始化
+        $this->initialize();
+    }
+
+    // 初始化
+    protected function initialize()
+    {}
+
+    /**
+     * 验证数据
+     * @access protected
+     * @param  array        $data     数据
+     * @param  string|array $validate 验证器名或者验证规则数组
+     * @param  array        $message  提示信息
+     * @param  bool         $batch    是否批量验证
+     * @return array|string|true
+     * @throws ValidateException
+     */
+    protected function validate(array $data, $validate, array $message = [], bool $batch = false)
+    {
+        if (is_array($validate)) {
+            $v = new Validate();
+            $v->rule($validate);
+        } else {
+            if (strpos($validate, '.')) {
+                // 支持场景
+                [$validate, $scene] = explode('.', $validate);
+            }
+            $class = false !== strpos($validate, '\\') ? $validate : $this->app->parseClass('validate', $validate);
+            $v     = new $class();
+            if (!empty($scene)) {
+                $v->scene($scene);
+            }
+        }
+
+        $v->message($message);
+
+        // 是否批量验证
+        if ($batch || $this->batchValidate) {
+            $v->batch(true);
+        }
+
+        return $v->failException(true)->check($data);
+    }
+
+}

+ 58 - 0
app/ExceptionHandle.php

@@ -0,0 +1,58 @@
+<?php
+namespace app;
+
+use think\db\exception\DataNotFoundException;
+use think\db\exception\ModelNotFoundException;
+use think\exception\Handle;
+use think\exception\HttpException;
+use think\exception\HttpResponseException;
+use think\exception\ValidateException;
+use think\Response;
+use Throwable;
+
+/**
+ * 应用异常处理类
+ */
+class ExceptionHandle extends Handle
+{
+    /**
+     * 不需要记录信息(日志)的异常类列表
+     * @var array
+     */
+    protected $ignoreReport = [
+        HttpException::class,
+        HttpResponseException::class,
+        ModelNotFoundException::class,
+        DataNotFoundException::class,
+        ValidateException::class,
+    ];
+
+    /**
+     * 记录异常信息(包括日志或者其它方式记录)
+     *
+     * @access public
+     * @param  Throwable $exception
+     * @return void
+     */
+    public function report(Throwable $exception): void
+    {
+        // 使用内置的方式记录异常日志
+        parent::report($exception);
+    }
+
+    /**
+     * Render an exception into an HTTP response.
+     *
+     * @access public
+     * @param \think\Request   $request
+     * @param Throwable $e
+     * @return Response
+     */
+    public function render($request, Throwable $e): Response
+    {
+        // 添加自定义异常处理机制
+
+        // 其他错误交给系统处理
+        return parent::render($request, $e);
+    }
+}

+ 8 - 0
app/Request.php

@@ -0,0 +1,8 @@
+<?php
+namespace app;
+
+// 应用请求对象类
+class Request extends \think\Request
+{
+
+}

+ 78 - 0
app/common.php

@@ -0,0 +1,78 @@
+<?php
+use think\facade\Db;
+// 应用公共文件
+//返回json格式的响应信息,方便中间件记录,目前在abutmenu应用中有用到
+if (!function_exists('json_show')) {
+	function json_show(int $code = 0, string $message = '请求成功', array $data = [])
+	{
+		return json(['code' => $code, 'message' => $message, 'data' => $data]);
+	}
+}
+
+function made($var,$data=[]){
+	$str = Db::name('cat')->where(['id'=>$var])->find();
+	if($str==false){
+		return [];
+	}
+	$vmn =[];
+	$vmn['id'] =$str['id'];
+	$vmn['name'] =$str['cat_name'];
+	array_unshift($data,$vmn);
+	// $var['id']=made();
+	if($str['pid']==0){
+		// krsort($data);
+		return $data;
+	}else{
+		return made($str['pid'],$data);
+	}
+}
+
+//获取有赞分类信息
+function made_youzan(int $yz_cat_id=0,$data=[]){
+	$rs = get_yz_cat_info($yz_cat_id);
+	if(empty($rs)) return [];
+
+	$vmn =[];
+	$vmn['yz_cat_id'] =$rs['id'];
+	$vmn['yz_cat_name'] =$rs['yz_cat_name'];
+	array_unshift($data,$vmn);
+
+	if($rs['parent_cid']==0) return $data;
+	else return made_youzan($rs['parent_cid'],$data);
+
+}
+
+
+function makeExcluse($var,$data=[]){
+	$str = Db::name('exclusive')->where(['id'=>$var])->find();
+	if($str==false){
+		return [];
+	}
+	$vmn =[];
+	$vmn['id'] =$str['id'];
+	$vmn['name'] =$str['name'];
+	array_unshift($data,$vmn);
+	// $var['id']=made();
+	if($str['pid']==0){
+		// krsort($data);
+		return $data;
+	}else{
+		return makeExcluse($str['pid'],$data);
+	}
+}
+function makeNo($str){
+
+	$date=date("mdHis");
+	$year = date("Y")-2000;
+	$msec=rand(1000,9999);
+	return $str.$year.$date.$msec;
+}
+function randomkeys($length) {
+	$returnStr='';
+	$pattern = '1234567890abcdefghijklmnopqrstuvwxyz';//ABCDEFGHIJKLOMNOPQRSTUVWXYZ
+
+	for($i = 0; $i < $length; $i ++) {
+		$returnStr .= $pattern[mt_rand ( 0, strlen($pattern)-1 )]; //生成php随机数
+	}
+	return $returnStr;
+}

+ 17 - 0
app/event.php

@@ -0,0 +1,17 @@
+<?php
+// 事件定义文件
+return [
+    'bind'      => [
+    ],
+
+    'listen'    => [
+        'AppInit'  => [],
+        'HttpRun'  => [],
+        'HttpEnd'  => [],
+        'LogLevel' => [],
+        'LogWrite' => [],
+    ],
+
+    'subscribe' => [
+    ],
+];

+ 10 - 0
app/middleware.php

@@ -0,0 +1,10 @@
+<?php
+// 全局中间件定义文件
+return [
+    // 全局请求缓存
+    // \think\middleware\CheckRequestCache::class,
+    // 多语言加载
+    // \think\middleware\LoadLangPack::class,
+    // Session初始化
+    // \think\middleware\SessionInit::class
+];

+ 9 - 0
app/provider.php

@@ -0,0 +1,9 @@
+<?php
+use app\ExceptionHandle;
+use app\Request;
+
+// 容器Provider定义文件
+return [
+    'think\Request'          => Request::class,
+    'think\exception\Handle' => ExceptionHandle::class,
+];

+ 9 - 0
app/service.php

@@ -0,0 +1,9 @@
+<?php
+
+use app\AppService;
+
+// 系统服务定义文件
+// 服务在完成全局初始化之后执行
+return [
+    AppService::class,
+];

+ 79 - 0
app/txx/common/Sign.php

@@ -0,0 +1,79 @@
+<?php
+
+
+namespace app\txx\common;
+
+
+class Sign {
+	private $appId = "";
+    private $appKey = "";
+	public function __construct(string $appId,string $appKey) {
+		$this->appId=$appId;
+		$this->appKey=$appKey;
+	}
+    //创建sign
+    public function makeSign($data) {
+        ksort($data);
+        $string = $this->toUrlParams($data);
+        $string = $string . "&key=" . $this->appKey;
+//	    \think\facade\Log::write("string:".$string,"info");
+        $string = md5($string);
+        $result = strtolower($string);
+        return $result;
+    }
+
+    //检验sign是否正确
+    public function verifySign($data) {
+        //check sign
+       if (!isset($data['sign']) || !$data['sign']) {
+          return ['code'=>1,'msg'=>'发送的数据签名不存在'];
+       }
+
+        //check sign
+        if (!isset($data['appid']) || !$data['appid']) {
+            return ['code'=>1,'msg'=>'发送的应用参数不存在'];
+        }
+        if ($data['appid'] != $this->appId) {
+            return ['code'=>1,'msg'=>'发送的应用参数错误'];
+        }
+
+        //check sign
+        if (!isset($data['noce']) || !$data['noce']) {
+            return ['code'=>1,'msg'=>'发送的应用参数不存在'];
+        }
+
+       //check timestamp
+       if (!isset($data['timestamp']) || !$data['timestamp']) {
+          return ['code'=>1,'msg'=>'发送的数据参数不合法'];
+       }
+
+       // 验证请求, 10分钟失效
+       if (time() - $data['timestamp'] > 600) {
+          return ['code'=>1,'msg'=>'验证超时, 请重新发送请求'];
+       }
+
+       $clientSign = $data['sign'];
+        unset($data['sign']);
+       $serverSign = $this->makeSign($data);
+//	    \think\facade\Log::write("string:".$serverSign."----".$clientSign,"info");
+       if ($clientSign == $serverSign) {
+         return ['code'=>0,'msg'=>'验证通过'];
+       } else {
+         return ['code'=>1,'msg'=>'请求不合法'];
+       }
+    }
+
+    //生成url字符串
+    private function toUrlParams($values){
+        $buff = "";
+        foreach ($values as $k => $v)
+        {
+            //&& $v != ""
+            if($k != "sign" && !is_array($v)&& $v != ""){
+                $buff .= $k . "=" .$v . "&";
+            }
+        }
+        $buff = trim($buff, "&");
+        return $buff;
+    }
+}

+ 187 - 0
app/txx/controller/Act.php

@@ -0,0 +1,187 @@
+<?php
+declare (strict_types = 1);
+
+namespace app\txx\controller;
+
+use app\BaseController;
+use think\facade\Validate;
+use app\txx\model\Act as Actm;
+use think\App;
+
+class Act extends BaseController
+{
+	protected $uid=0;
+	protected $uname='';
+		public function __construct(App $app) {
+		parent::__construct($app);
+		if($this->request->isCx==1){
+		    $this->uid=$this->request->uid;
+	        $this->uname=$this->request->uname;
+		}
+
+	}
+    /**
+     * 显示资源列表
+     *
+     * @return \think\Response
+     */
+    public function list()
+    {
+      $param = $this->request->only([
+      	"page"=>1,
+      	"size"=>15,
+      	"act_name"=>'',
+      	"actCode"=>'',
+      	"company_name"=>'',
+       	"contactor"=>'',
+        "act_type"=>'',
+        "start"=>'',
+        "end"=>'',
+        "status"=>'',
+      	],"post",'trim');
+      $condition=[["is_del","=",0]];
+      if($param['act_name']!='') $condition[]=["act_name","like","%{$param['act_name']}%"];
+      if($param['actCode']!='') $condition[]=["actCode","like","%{$param['actCode']}%"];
+      if($param['company_name']!='') $condition[]=["company_name","like","%{$param['company_name']}%"];
+      if($param['contactor']!='') $condition[]=["contactor","like","%{$param['contactor']}%"];
+      if($param['act_type']!='') $condition[]=["act_type","=",$param["act_type"]];
+      if($param['start']!='') $condition[]=["addtime",">=",$param["start"]." 00:00:00"];
+      if($param['end']!='') $condition[]=["addtime","<=",$param["end"]." 23:59:59"];
+      if($param['status']!='') $condition[]=["status","=",$param["status"]];
+      $actm=new Actm();
+      $count =$actm->where($condition)->count();
+      $total =ceil($count/$param['size']);
+      $page = $param['page']>= $total ?intval($total):intval($param['page']);
+      $list=$actm->where($condition)->page($page,intval($param['size']))->order("addtime desc")->select()->toArray();
+      return json_show(0,"获取成功",["list"=>$list,"count"=>$count]);
+    }
+
+    /**
+     * 显示创建资源表单页.
+     *
+     * @return \think\Response
+     */
+    public function create()
+    {
+       $param = $this->request->only([
+       	"act_name"=>"",
+       	"company_name"=>'',
+       	"contactor"=>'',
+       	"mobile"=>'',
+       	"web_url"=>'',
+       	"start"=>'',
+       	"end"=>'',
+       	"act_type"=>1,
+       	],"post","trim");
+
+        $validate = Validate::rule([
+            'act_name|活动名称' => 'require',
+            'company_name|活动公司名称' => 'require',
+            'contactor|联系人' => 'require|max:255',
+            'mobile|联系电话' => 'require',
+        ]);
+        if($validate->check($param)==false)return  json_show(1004,$validate->getError());
+        $actCode=makeNo("ACE");
+        $data=[
+        	"actCode"=>$actCode,
+        	"act_name"=>$param['act_name'],
+        	"company_name"=>$param['company_name'],
+        	"contactor"=>$param['contactor'],
+        	"mobile"=>$param['mobile'],
+        	"act_type"=>$param['act_type'],
+        	"startTime"=>$param['start']==''?null : $param['start'],
+        	"endTime"=>$param['end']==''?null : $param['end'],
+        	"web_url"=>$param['web_url']??"",
+        	"status"=>0,
+        	"apply_id"=>$this->uid,
+        	"apply_name"=>$this->uname,
+        	"addtime"=>date("Y-m-d H:i:s"),
+        	"updatetime"=>date("Y-m-d H:i:s"),
+        ];
+        $add =Actm::create($data);
+        return $add ?json_show(0,"活动新建成功",["actCode"=>$actCode]): json_show(1006,"活动新建失败");
+
+    }
+
+    /**
+     * 保存新建的资源
+     *
+     * @param  \think\Request  $request
+     * @return \think\Response
+     */
+    public function save()
+    {
+       $param = $this->request->only([
+       	"act_name"=>"",
+       	"company_name"=>'',
+       	"contactor"=>'',
+       	"mobile"=>'',
+       	"web_url"=>'',
+       	"start"=>'',
+       	"end"=>'',
+       	"actCode"=>'',
+       	"act_type"=>1,
+       	],"post","trim");
+
+        $validate = Validate::rule([
+            'act_name|活动名称' => 'require',
+            'actCode|活动编号' => 'require',
+            'company_name|活动公司名称' => 'require',
+            'contactor|联系人' => 'require|max:255',
+            'mobile|联系电话' => 'require',
+        ]);
+        if($validate->check($param)==false)return  json_show(1004,$validate->getError());
+         $actm=new Actm();
+        $info = $actm->where(["actCode"=>$param['actCode'],"is_del"=>0])->find();
+        if($info==false) return json_show(1005,"活动不存在");
+        $data=[
+        	"act_name"=>$param['act_name'],
+        	"company_name"=>$param['company_name'],
+        	"contactor"=>$param['contactor'],
+        	"mobile"=>$param['mobile'],
+        	"act_type"=>$param['act_type'],
+        	"startTime"=>$param['start']==''?null : $param['start'],
+        	"endTime"=>$param['end']==''?null : $param['end'],
+        	"web_url"=>$param['web_url']??"",
+        	"updatetime"=>date("Y-m-d H:i:s"),
+        ];
+        $add =$actm->update($data,["actCode"=>$param['actCode'],"is_del"=>0]);
+        return $add ?json_show(0,"活动编辑成功"): json_show(1006,"活动编辑失败");
+    }
+
+    /**
+     * 显示指定的资源
+     *
+     * @param  int  $id
+     * @return \think\Response
+     */
+    public function info()
+    {
+    $param = $this->request->only(["actCode"=>''],"post","trim");
+     $validate = Validate::rule([
+            'actCode|活动编号' => 'require',]);
+      if($validate->check($param)==false)return  json_show(1004,$validate->getError());
+     $actm=new Actm();
+        $info = $actm->where(["actCode"=>$param['actCode'],"is_del"=>0])->find()->toArray();
+      return json_show(0,"获取成功",$info);
+    }
+
+      /**
+     * 删除指定资源
+     *
+     * @param  int  $id
+     * @return \think\Response
+     */
+    public function delete()
+    {
+		$param = $this->request->only(["actCode"=>''],"post","trim");
+     $validate = Validate::rule([
+            'actCode|活动编号' => 'require',]);
+      if($validate->check($param)==false)return  json_show(1004,$validate->getError());
+       $actm=new Actm();
+        $info = $actm->where(["actCode"=>$param['actCode'],"is_del"=>0])->find();
+      if($info==false) return json_show(1005,"活动不存在");
+      $isDel =$actm->update(["is_del"=>1,"updatetime"=>date("Y-m-d H:i:s")],["actCode"=>$param['actCode'],"is_del"=>0]);
+       return $isDel?json_show(0,"活动删除成功"): json_show(1006,"活动删除失败");
+    }
+}

+ 625 - 0
app/txx/controller/Good.php

@@ -0,0 +1,625 @@
+<?php
+declare (strict_types = 1);
+
+namespace app\txx\controller;
+
+use app\BaseController;
+use app\txx\model\Act;
+use app\txx\model\ActGood;
+use app\txx\model\YzGood;
+use app\txx\model\PlatformYouzan;
+use think\App;
+use think\Exception;
+use think\facade\Db;
+use think\facade\Validate;
+use think\Request;
+
+class Good extends BaseController
+{
+	protected $uid=0;
+	protected $uname='';
+	protected $platformid=37;
+	/**@param array snArr 商品编号sn数组
+     * @param string actCode 活动编号
+	* @return \think\response\Json
+	* @throws \think\exception\DbException
+	 */
+    private $acton=[];
+    public $noble=[];
+    public  $origin_img_host ="http://stock.api.wanyuhengtong.com";
+    public  $ssl_img_host ="https://image.wanyuhengtong.com";
+	public function __construct(App $app) {
+		parent::__construct($app);
+		if($this->request->isCx==1){
+			$this->uid=$this->request->uid;
+			$this->uname=$this->request->uname;
+		}
+
+	}
+
+    public function AddGood()
+    {
+    	$post = $this->request->only(["snArr"=>[],"actCode"=>''],"post");
+    	$snArr= $post['snArr'];
+    	if(empty($snArr)) return  json_show(1004,"参数错误 snArr 不能为空");
+    	$platformYouzan =new PlatformYouzan();
+    	$skuCodes = array_column($snArr,"skuCode");
+		$goodArr = $platformYouzan->where(["skuCode"=>$skuCodes,"is_del"=>0])->select()->toArray();
+		if(empty($goodArr)) return json_show(1005,"未找到商品有效数据");
+		$actCode= $post['actCode']!=''? trim($post['actCode']):"";
+		if($actCode=='') return json_show(1004,"参数错误 actCode 不能为空");
+//	    $roundId= $post['roundId']!=''? trim($post['roundId']):"";
+//	    if($roundId=='') return json_show(1004,"参数错误 roundId 不能为空");
+		$act =new Act();
+		$isActExit=$act->where(['actCode'=>$actCode,"is_del"=>0])->find();
+		if($isActExit==false) return json_show(1005,"未找到活动有效数据");
+
+		$actGood=new ActGood();
+		Db::startTrans();
+		try{
+			$data=[];
+			foreach ($snArr as $item){
+				$isExit = $actGood->find(["actCode"=>$actCode,"yz_good_code"=>$item['skuCode'],"roundId"=>$item['roundId']??"","is_del"=>0]);
+				if($isExit) throw new Exception("活动商品已添加",1006);
+				$temp=[
+					"actCode"=>$actCode,
+					"yz_good_code"=>$item['skuCode'],
+					"stock_num"=>$item['stock_num'],
+					"used_num"=>0,
+					"balance_num"=>$item['stock_num'],
+					"apply_id"=>$this->uid,
+					"apply_name"=>$this->uname,
+					"roundId"=>$item['roundId']??"",
+					"status"=>1,
+					"addtime"=>date("Y-m-d H:i:s"),
+					"updatetime"=>date("Y-m-d H:i:s")
+					];
+				$data[]=$temp;
+			}
+			if (empty($data)){
+					throw new Exception("活动商品不能为空",1006);
+			}
+			$isAdd=ActGood::insertAll($data);
+			if ($isAdd==false){
+					throw new Exception("活动商品添加失败",1006);
+			}
+			$up =$act->where($isActExit->toArray())->update(["status"=>2,"updatetime"=>date("Y-m-d H:i:s")]);
+			if ($up==false){
+				throw new Exception("活动商品添加失败",1006);
+			}
+			Db::commit();
+			return json_show(0,"活动商品添加成功");
+		}catch (\Exception $e){
+			Db::rollback();
+			return json_show(1008,$e->getMessage());
+		}
+    }
+
+    /**活动商品列表
+      * @param int page 页数
+      * @param int size 每页显示数量
+      * @param string act_name  活动名称
+      * @param string actCode 活动编号
+      * @param string company_name 活动公司名称
+      * @param string contactor 活动联系人
+      * @param int act_type 活动类型 暂无
+      * @param int cat_id  采销分类
+      * @param string spuCode 商品成本编号
+      * @param string skuCode 商品上线编号
+      * @param int exam_status 商品上线审核状态
+     */
+    public function list()
+    {
+       $param = $this->request->only([
+      	"page"=>1,
+      	"size"=>15,
+      	"act_name"=>'',
+      	"actCode"=>'',
+      	"company_name"=>'',
+       	"contactor"=>'',
+        "act_type"=>'',
+        "good_name"=>'',
+        "cat_id"=>'',
+        "spuCode"=>'',
+        "skuCode"=>'',
+        "status"=>"",
+        "roundId"=>"",
+        "exam_status"=>'',
+      	],"post",'trim');
+      $condition=[["a.is_del","=",0],["b.is_del","=",0]];
+      if($param['act_name']!='') $condition[]=["b.act_name","like","%{$param['act_name']}%"];
+      if($param['actCode']!='') $condition[]=["a.actCode","like","%{$param['actCode']}%"];
+      if($param['company_name']!='') $condition[]=["b.company_name","like","%{$param['company_name']}%"];
+      if($param['contactor']!='') $condition[]=["b.contactor","like","%{$param['contactor']}%"];
+      if($param['good_name']!='') $condition[]=["d.good_name","like","%{$param['good_name']}%"];
+      if($param['skuCode']!='') $condition[]=["c.skuCode","like","%{$param['skuCode']}%"];
+      if($param['act_type']!='') $condition[]=["b.act_type","=",$param["act_type"]];
+      if($param['roundId']!=='') $condition[]=["a.roundId","=",$param["roundId"]];
+      if($param['status']!=='') $condition[]=["a.status","=",$param["status"]];
+       if ($param['exam_status'] !== '') {
+        	if($param['exam_status']==1){
+        		$where[] = ['c.exam_status', "=", 6];
+        	}else{
+        		$where[] = ['c.exam_status', "<>", 6];
+        	}
+        }
+      $actm=new ActGood();
+       if($this->request->isCx==1){
+       	$field="a.id,a.actCode,a.yz_good_code,a.apply_id,a.apply_name,a.stock_num,a.used_num,a.balance_num,a.status,
+      a.addtime,a.updatetime,c.plat_code,b.act_name,b.company_name,b.contactor,b.mobile,b.startTime,b.endTime,
+     c.final_price,c.desc,d.good_name,d.good_unit,c.yz_cat_id,d.cat_id,a.roundId,d.brand_id";
+       }else{
+		$field="a.id,a.actCode,a.yz_good_code,a.stock_num,a.used_num,a.balance_num,a.status,a.addtime,a.updatetime,
+		b.act_name,b.company_name,b.contactor,b.mobile,b.startTime,b.endTime,c.final_price,c.desc,d.good_name,
+		d.good_unit,d.cat_id,d.brand_id,a.roundId";
+       }
+      $count =$actm->alias("a")
+      ->leftJoin("act b","a.actCode=b.actCode")
+      ->leftJoin("platform_youzan c","a.yz_good_code=c.skuCode")
+      ->leftJoin("good d","c.spuCode=d.spuCode")
+      ->where($condition)->count();
+      $total =ceil($count/$param['size']);
+      $page = $param['page']>= $total ?intval($total):intval($param['page']);
+      $list=$actm->alias("a")
+      ->leftJoin("act b","a.actCode=b.actCode")
+      ->leftJoin("platform_youzan c","a.yz_good_code=c.skuCode")
+      ->leftJoin("good d","c.spuCode=d.spuCode")
+	   ->field($field)->where($condition)->page($page,intval($param['size']))
+	   ->order("addtime desc")->select()->toArray();
+       //6.补充数据,照搬list方法
+        $all_brand = Db::name('brand')
+            ->where('is_del', 0)
+            ->whereIn('id', array_column($list, 'brand_id'))
+            ->column('brand_name', 'id');
+         $unit = Db::name("unit")->where(["id" => array_column($list, 'good_unit')])->column('unit', 'id');
+            $value['unit'] = isset($unit['unit']) ? $unit['unit'] : "";
+	 $yzgood =new YzGood();
+      foreach ($list as &$item){
+		$item['unit'] =$unit[$item['good_unit']] ?? "";
+		$item['brand_name'] = $all_brand[$item['brand_id']]?? "";
+		$item['web_url_num'] = Db::name("act_goodurl")->where(["act_good_id"=>$item['id'],"is_del"=>0])->count();
+	    $item['origin_price'] =$yzgood->where(["item_no"=>$item['yz_good_code'],"is_del"=>0])->value("origin",'');
+		if($this->request->isCx==1){
+			$item['cat_info'] = made($item['cat_id'], []);
+		}else{
+			unset($item['cat_id']);
+			unset($item['good_unit']);
+			unset($item['brand_id']);
+		}
+
+      }
+      return json_show(0,"获取成功",["list"=>$list,"count"=>$count]);
+    }
+
+    /**
+     * 保存新建的资源
+     *
+     * @param  \think\Request  $request
+     * @return \think\Response
+     */
+    public function EditGood()
+    {
+    	$post = $this->request->only(["goodArr"=>[]],"post");
+    	$snArr= $post['goodArr'];
+    	if(empty($snArr)) return  json_show(1004,"参数 goodArr 不能为空");
+    	$platformYouzan =new PlatformYouzan();
+    	$goodCode = array_column($snArr,"yz_good_code");
+		$goodArr = $platformYouzan->where(["skuCode"=>$goodCode,"is_del"=>0])->select()->toArray();
+		if(empty($goodArr)) return json_show(1005,"未找到商品有效数据");
+//	    $roundId= $post['roundId']!=''? trim($post['roundId']):"";
+//	    if($roundId=='') return json_show(1004,"参数错误 roundId 不能为空");
+		$actGood=new ActGood();
+		Db::startTrans();
+		try{
+			$data=[];
+			foreach ($snArr as $item){
+				$isExit = $actGood->where(["actCode"=>$item['actCode'],"yz_good_code"=>$item['yz_good_code'],
+				"is_del"=>0])->find();
+				if($isExit==false) throw new Exception("活动商品不存在",1006);
+				$temp=[
+					"id"=>$isExit['id'],
+					"stock_num"=>$item['stock_num'],
+					"balance_num"=>$item['stock_num'],
+					"roundId"=>$item['roundId']??"",
+					"is_del"=>$item['is_del']??0,
+					"updatetime"=>date("Y-m-d H:i:s")
+					];
+				$data[]=$temp;
+
+			}
+			$isAdd=$actGood->saveAll($data);
+			if ($isAdd==false){
+					throw new Exception("活动商品更新失败",1006);
+			}
+			Db::commit();
+			return json_show(0,"活动商品更新成功");
+		}catch (\Exception $e){
+			Db::rollback();
+			return json_show(1008,$e->getMessage());
+		}
+
+    }
+
+    /**
+     * 显示指定的资源
+     *
+     * @param  int  $id 参数详情id
+     * @return \think\Response
+     */
+    public function GoodInfo()
+    {
+    	$param =$this->request->only(["id"=>''],"post","trim");
+    	if($param['id']=='') return json_show(1004,"参数 id 不能为空");
+    	 if($this->request->isCx==1){
+       	    $field="a.id,a.actCode,a.yz_good_code,a.apply_id,a.apply_name,a.stock_num,a.used_num,a.balance_num,a.status,
+            a.addtime,a.updatetime,c.plat_code,b.act_name,b.company_name,b.contactor,b.mobile,b.startTime,b.endTime,
+            c.final_price,c.desc,d.good_name,d.good_unit,c.yz_cat_id,d.cat_id,d.brand_id,a.roundId";
+	       }else{
+			$field="a.id,a.actCode,a.yz_good_code,a.stock_num,a.used_num,a.balance_num,a.status,a.addtime,a.updatetime,
+			b.act_name,b.company_name,b.contactor,b.mobile,b.startTime,b.endTime,c.final_price,c.desc,d.good_name,
+			d.good_unit,d.cat_id,d.brand_id,a.roundId";
+            }
+    	$actm=new ActGood();
+    	$info=$actm->alias("a")
+      ->leftJoin("act b","a.actCode=b.actCode")
+      ->leftJoin("platform_youzan c","a.yz_good_code=c.skuCode")
+      ->leftJoin("good d","c.spuCode=d.spuCode")
+      ->field($field)
+      ->find($param);
+    	if($info==false){
+    	    return json_show(1005,"未找到数据");
+    	}
+    	$info['brand_name'] = Db::name('brand')
+            ->where('is_del', 0)
+            ->where('id',$info['brand_id'])
+            ->value('brand_name', '');
+         $info['unit'] = Db::name("unit")->where("id" ,$info['good_unit'])->value('unit', '');
+          if($this->request->isCx==1){
+          	 $info['cat_info'] =made($info['cat_id']);
+          }else{
+          	unset($info['good_unit']);
+            unset($info['brand_id']);
+          }
+        return json_show(0,"获取成功",$info->toArray());
+    }
+
+    /** 商品链接导入
+     * @param  int  act_good_id 商品活动id
+     * @param  array  web_url 商品链接url
+     * @return \think\Response
+     */
+    public function GoodUrlImport()
+    {
+    	$param = $this->request->only(["web_url"=>[]],"post");
+    	$validate=Validate::rule([
+    		'web_url|商品链接' => 'require|array'
+            ]);
+    	if($validate->check($param)==false) return json_show(1004,$validate->getError());
+    	$actm=new ActGood();
+
+    	$web=[];
+    	foreach ($param['web_url'] as $item){
+    		$actGood =$actm->where(["id"=>$item['act_good_id'],"is_del"=>0])->find();
+    	    if($actGood==false) return json_show(1005,'未找到商品数据');
+				$temp=[
+					"act_good_url"=>$item['act_good_url'],
+					"act_good_id"=>$item['act_good_id'],
+					"status"=>1,
+					"is_del"=>0,
+					"apply_id"=>$this->uid,
+					"apply_name"=>$this->uname,
+					"addtime"=>date("Y-m-d H:i:s"),
+					"updatetime"=>date("Y-m-d H:i:s")
+					];
+				$web[]=$temp;
+    	}
+
+    	Db::startTrans();
+    	try{
+    	$isAdd=Db::name("act_goodurl")->insertAll($web);
+    	if( $isAdd<=0 ){
+    		Db::rollback();
+    		return json_show(1006,"商品链接导入失败");
+    	}
+    	$ids = array_unique(array_column($param['web_url'],"act_good_id"));
+		foreach ($ids as $item){
+			$actGood =$actm->where(["id"=>$item,"is_del"=>0])->find();
+    	    if($actGood==false)throw new Exception("未找到活动商品",1006);
+    	    $num =Db::name("act_goodurl")->where(["act_good_id"=>$item,"is_del"=>0])->count();
+    	    if($num>$actGood['stock_num'])throw new Exception("导入连接数量超过活动数量",1006);
+    	    if($num==$actGood['stock_num']){
+    	    	$up =$actm->where(["id"=>$item,"is_del"=>0])->update(["status"=>1,"updatetime"=>date("Y-m-d H:i:s")]);
+    	    	if($up==false) return json_show(1005,'商品数据更新失败');
+    	    	$upunum = $actm->where(["actCode"=>$actGood["actCode"],"is_del"=>0,"status"=>0])->count();
+    	    	if($upunum==0){
+    	    		$up1 =Db::name("Act")->where(["actCode"=>$actGood["actCode"],"is_del"=>0])->update(["status"=>2,"updatetime"=>date("Y-m-d H:i:s")]);
+			        if ($up1==false){
+				        throw new Exception("活动数据更新失败",1006);
+			        }
+    	    	}
+    	    }
+		}
+    	Db::commit();
+    	return json_show(0,'商品链接导入成功');
+    	}catch (\Exception $e){
+    		Db::rollback();
+    		return json_show(1008,$e->getMessage());
+    	}
+    }
+
+    /**
+     * 保存更新的资源
+     * @param  int  $page
+     * @param  int  $size
+     * @param  string  $act_name
+     * @param  string  $actCode
+     * @param  int  $act_good_id
+     * @return \think\Response
+     */
+    public function GoodUrlList()
+    {
+    	  $param = $this->request->only([
+      	"page"=>1,
+      	"size"=>15,
+      	"act_name"=>'',
+      	"actCode"=>'',
+      	"act_good_id"=>'',
+      	"good_code"=>'',
+      	"roundId"=>'',
+      	],"post","trim");
+		$condition=[["a.is_del","=",0],["b.is_del","=",0],["c.is_del","=",0]];
+		if($param['act_name']!='')$condition[]=["c.act_name","like","%{$param['act_name']}%"];
+		if($param['actCode']!='')$condition[]=["c.actCode","like","%{$param['actCode']}%"];
+		if($param['act_good_id']!='')$condition[]=["a.act_good_id","=",$param['act_good_id']];
+		if($param['good_code']!='')$condition[]=["b.yz_good_code","=",$param['good_code']];
+	    if($param['roundId']!=='') $condition[]=["b.roundId","=",$param["roundId"]];
+		$count = Db::name("act_goodurl")->alias("a")
+		->leftJoin("act_good b","a.act_good_id=b.id  and b.is_del=0")
+		->leftJoin("act c","b.actCode=c.actCode and c.is_del=0")
+		->where($condition)
+		->count();
+		$total =ceil($count/$param['size']);
+		$page =$param['page']>=$total ? intval($total) : intval($param['page']);
+		$list = Db::name("act_goodurl")->alias("a")
+		->leftJoin("act_good b","a.act_good_id=b.id  and b.is_del=0")
+		->leftJoin("act c","b.actCode=c.actCode and c.is_del=0")
+		->where($condition)->page($page,intval($param['size']))
+		->field("a.id,a.act_good_url,b.roundId,a.act_good_id,a.apply_id,a.apply_name,a.addtime,a.updatetime,b.stock_num")
+		->select()->toArray();
+		foreach ($list as &$item){
+			$item['web_url_num'] = Db::name("act_goodurl")->where(["act_good_id"=>$item['act_good_id'],"is_del"=>0])->count();
+		}
+		return json_show(0,"获取成功",["list"=>$list,"count"=>$count]);
+    }
+
+    /**
+     * 删除指定资源
+     *
+     * @param  int  $id
+     * @return \think\Response
+     */
+    public function GoodUrlDel()
+    {
+     $param = $this->request->only(["web_url_ids"=>[]],"post");
+     if(empty($param['web_url_ids'])|| $param["web_url_ids"]=="") return json_show(1004,"参数 web_url_ids 不能为空");
+     $actm=new ActGood();
+     $web=[];
+    	foreach ($param['web_url_ids'] as $item){
+    		$actGood =Db::name("act_goodurl")->where(["id"=>$item,"is_del"=>0])->find();
+    	    if($actGood==false) return json_show(1005,'未找到商品链接数据');
+    	    $web[]=$actGood['act_good_id'];
+    	}
+	    $web =array_unique($web);
+    	Db::startTrans();
+    	try{
+		 $isDel=Db::name("act_goodurl")->where(["id"=>$param['web_url_ids']])->update(["is_del"=>1,"updatetime"=>date("Y-m-d H:i:s")]);
+		 if($isDel==false){
+		 	 throw new Exception("活动商品链接删除失败",1006);
+		 }
+		foreach ($web as $item){
+			$actGood =$actm->where(["id"=>$item,"is_del"=>0])->find();
+    	    if($actGood==false) return json_show(1005,'未找到商品数据');
+    	    $num =Db::name("act_goodurl")->where(["act_good_id"=>$item,"is_del"=>0])->count();
+    	    if($num<$actGood['stock_num']){
+    	    	$up =$actm->where(["id"=>$item,"is_del"=>0])->update(["status"=>0,"updatetime"=>date("Y-m-d H:i:s")]);
+    	    	if($up==false) return json_show(1005,'商品数据更新失败');
+    	    	$upunum = $actm->where(["actCode"=>$actGood["actCode"],"is_del"=>0,"status"=>0])->count();
+    	    	if($upunum!=0){
+    	    		$up1 =Db::name("Act")->where(["actCode"=>$actGood["actCode"],"is_del"=>0])->update(["status"=>1,"updatetime"=>date("Y-m-d H:i:s")]);
+			        if ($up1==false){
+				        throw new Exception("活动数据更新失败",1006);
+			        }
+    	    	}
+
+    	    }
+		}
+    	Db::commit();
+    	return json_show(0,'商品链接导入成功');
+    	}catch (\Exception $e){
+    		Db::rollback();
+    		return json_show(1008,$e->getMessage());
+    	}
+    }
+
+     //获取跟有赞对接的平台所属的商品上线信息
+    public function listByYz()
+    {
+    	 $this->noble=\think\facade\Config::get("noble");
+        $order=\think\facade\Config::get("order");
+        $this->acton=$order['order_type'];
+        $param = $this->request->only([
+            'page' => 1,
+            'size' => 15,
+            'good_name' => '',
+            'skucode' => '',
+            'plat_code' => '',
+            'exam_status' => '',
+        ], 'post', 'trim');
+        $where = [["b.is_del", "=", 0],["b.platform_id","=",$this->platformid]];
+        if ($param['good_name'] !== "") $where[] = ['a.good_name', 'like', '%' . $param['good_name'] . '%'];
+        if ($param['skucode'] !== '') $where [] = ['b.skucode', 'like', '%' . $param['skucode'] . '%'];
+        if ($param['plat_code'] !== '') $where[] = ["b.plat_code", "like", '%' . $param['plat_code'] . '%'];
+        if ($param['exam_status'] !== '') {
+        	if($param['exam_status']==1){
+        		$where[] = ['b.exam_status', "=", 6];
+        	}else{
+        		$where[] = ['b.exam_status', "<>", 6];
+        	}
+        }
+		if($this->request->isCx==1){
+			$field="b.skuCode,b.platform_id platform_code,b.plat_code,b.id as platform_youzan_id,a.cat_id,a.good_name,
+			a.good_img,a.good_info_img,a.good_thumb_img,b.createrid,a.is_exclusive,a.brand_id,a.supplierNo,a.good_unit,
+			a.noble_metal,a.companyNo,a.spuCode,a.good_type,b.creater,b.addtime,b.updatetime,b.exam_status,a.createrid purchase_id,
+			a.creater purchase";
+		}else{
+			$field="b.skuCode,b.plat_code,b.id as platform_youzan_id,
+            a.good_name,a.good_img,a.good_info_img,a.good_thumb_img,a.brand_id,
+            a.good_unit,b.addtime,b.updatetime,b.exam_status,a.spuCode,
+            b.sale_price,b.final_price";
+		}
+
+        $count = Db::name('platform_youzan')
+            ->alias("b")
+            ->leftJoin("good_basic a", "a.spuCode=b.spuCode")
+            ->where($where)
+            ->count();
+
+        $total = ceil($count / $param['size']);
+        $param['page'] = $param['page'] >= $total ? $total : $param['page'];
+        $list = Db::name('platform_youzan')
+            ->alias("b")
+            ->field($field)
+            //成本表里的创建人,也是线上商品的采购人,为了防止混淆,给creater取个别名
+            ->leftJoin("good_basic a", "a.spuCode=b.spuCode")
+            ->where($where)
+            ->page(intval($param['page']),intval($param['size']))
+            ->order("b.addtime desc")
+            ->cursor();
+        $data = [];
+        $yzgood = new YzGood();
+        foreach ($list as $value) {
+            $brand = Db::name("brand")->field('id,brand_name')->where(["id" => $value['brand_id']])->find();
+            $value["brand_name"] = isset($brand['brand_name']) ? $brand['brand_name'] : "";
+
+            $unit = Db::name("unit")->field('id,unit')->where(["id" => $value['good_unit']])->find();
+            $value['unit'] = isset($unit['unit']) ? $unit['unit'] : "";
+		    $value['exam_status'] = $value['exam_status']==6?1:0;
+            $value['origin_price'] =$yzgood->where(["item_no"=>$value['skuCode'],"is_del"=>0])->value("origin",'');
+
+            $spec = Db::name("good_spec")->where(["spuCode" => $value['spuCode'], "is_del" => 0])->select()->toArray();
+            $speclist = [];
+            if (!empty($spec)) {
+                foreach ($spec as $val) {
+                    $temp = [];
+                    $temp['spec_id'] = $val['spec_id'];
+                    $temp['spec_value_id'] = $val['spec_value_id'];
+                    $sp = Db::name("specs")->where(["id" => $val['spec_id']])->find();
+                    $temp['spec_name'] = isset($sp["spec_name"]) ? $sp["spec_name"] : "";
+                    $spv = Db::name("spec_value")->where(["id" => $val['spec_value_id']])->find();
+                    $temp['spec_value'] = isset($spv["spec_value"]) ? $spv["spec_value"] : "";
+                    $speclist[] = $temp;
+                }
+            }
+            $value['good_img']=str_replace($this->origin_img_host,$this->ssl_img_host,$value['good_img']);
+            $value['good_info_img']=str_replace($this->origin_img_host,$this->ssl_img_host,$value['good_img']);
+            $value['good_thumb_img']=str_replace($this->origin_img_host,$this->ssl_img_host,$value['good_img']);
+            if($this->request->isCx==1){
+        	$value['cat_info'] = made($value['cat_id'], []);
+            $platform = Db::name("platform")->field('id,platform_name')->where(["id" => $value['platform_code']])->find();
+            $value['platform_name'] = isset($platform['platform_name']) ? $platform['platform_name'] : "";
+            $value['platform_code_en'] = isset($platform['platform_code_en']) ? $platform['platform_code_en'] : "";
+            $supplier = Db::name("supplier")->field('id,name')->where(["code" => $value['supplierNo']])->find();
+            $value['supplier_name'] = isset($supplier['name']) ? $supplier['name'] : "";
+            $value['company'] = isset($company['company']) ? $company['company'] : "";
+            $value['stock_total'] = Db::name("good_stock")->where(['spuCode' => $value['spuCode'], "is_del" => 0])->sum("usable_stock");
+            $value['exclusive'] = makeExcluse($value['is_exclusive']);
+            $value['noble_name'] = isset($value['noble_metal']) && $value['noble_metal'] != 0 ? $this->noble[$value['noble_metal']] : "";
+            $itemid =Db::name("depart_user")->where(["uid"=>$value["purchase_id"],"is_del"=>0])->value("itemid",'');
+            $value['company_name'] = implode('/', array_column(GetPart($itemid), 'name'));
+        	}else{
+            	unset($value['brand_id']);
+			unset($value['good_unit']);
+			unset($value['spuCode']);
+        	}
+
+            $value['specinfo'] = $speclist;
+            $data[] = $value;
+        }
+        return json_show(0, "获取成功", ['list' => $data, 'count' => $count]);
+    }
+
+	/**
+	 * @return \think\response\Json
+	 * @throws \think\db\exception\DataNotFoundException
+	 * @throws \think\db\exception\DbException
+	 * @throws \think\db\exception\ModelNotFoundException
+	 */
+    public function YzGoodInfo(){
+	    $param =$this->request->only(["skuCode"=>''],"post","trim");
+	    if($param['skuCode']=='') return json_show(1004,"参数 skuCode 不能为空");
+	    if($this->request->isCx==1){
+			$field="b.skuCode,b.platform_id platform_code,b.plat_code,b.id as platform_youzan_id,a.cat_id,a.good_name,
+			a.good_img,a.good_info_img,a.good_thumb_img,b.createrid,a.is_exclusive,a.brand_id,a.supplierNo,a.good_unit,
+			a.noble_metal,a.companyNo,a.spuCode,a.good_type,b.creater,b.addtime,b.updatetime,b.exam_status,a.createrid purchase_id,
+			a.creater purchase";
+		}else{
+			$field="b.skuCode,b.plat_code,b.id as platform_youzan_id,
+            a.good_name,a.good_img,a.good_info_img,a.good_thumb_img,a.brand_id,
+            a.good_unit,b.addtime,b.updatetime,b.exam_status,a.spuCode,
+            b.sale_price,b.final_price";
+		}
+	    $info = Db::name('platform_youzan')
+	              ->alias("b")
+	              ->field($field)
+		    //成本表里的创建人,也是线上商品的采购人,为了防止混淆,给creater取个别名
+		          ->leftJoin("good_basic a", "a.spuCode=b.spuCode")
+	              ->where(["b.skuCode"=>$param['skuCode'],"b.is_del"=>0])->find();
+
+	    if($info==false)  return json_show(1005,"商品数据未找到");
+	    $yzgood = new YzGood();
+	    $brand = Db::name("brand")->field('id,brand_name')->where(["id" => $info['brand_id']])->find();
+	    $info["brand_name"] = isset($brand['brand_name']) ? $brand['brand_name'] : "";
+	    $unit = Db::name("unit")->field('id,unit')->where(["id" => $info['good_unit']])->find();
+	    $info['unit'] = isset($unit['unit']) ? $unit['unit'] : "";
+	    $info['exam_status'] = $info['exam_status']==6?1:0;
+	    $info['origin_price'] =$yzgood->where(["item_no"=>$info['skuCode'],"is_del"=>0])->value("origin",'');
+	    $spec = Db::name("good_spec")->where(["spuCode" => $info['spuCode'], "is_del" => 0])->select()->toArray();
+	    $speclist = [];
+	    if (!empty($spec)) {
+		    foreach ($spec as $val) {
+			    $temp = [];
+			    $temp['spec_id'] = $val['spec_id'];
+			    $temp['spec_value_id'] = $val['spec_value_id'];
+			    $sp = Db::name("specs")->where(["id" => $val['spec_id']])->find();
+			    $temp['spec_name'] = isset($sp["spec_name"]) ? $sp["spec_name"] : "";
+			    $spv = Db::name("spec_value")->where(["id" => $val['spec_value_id']])->find();
+			    $temp['spec_value'] = isset($spv["spec_value"]) ? $spv["spec_value"] : "";
+			    $speclist[] = $temp;
+		    }
+	    }
+	    $info['good_img']=str_replace($this->origin_img_host,$this->ssl_img_host,$info['good_img']);
+	    $info['good_info_img']=str_replace($this->origin_img_host,$this->ssl_img_host,$info['good_img']);
+	    $info['good_thumb_img']=str_replace($this->origin_img_host,$this->ssl_img_host,$info['good_img']);
+	    if($this->request->isCx==1){
+        	$info['cat_info'] = made($info['cat_id'], []);
+            $platform = Db::name("platform")->field('id,platform_name')->where(["id" => $info['platform_code']])->find();
+            $info['platform_name'] = isset($platform['platform_name']) ? $platform['platform_name'] : "";
+            $info['platform_code_en'] = isset($platform['platform_code_en']) ? $platform['platform_code_en'] : "";
+            $supplier = Db::name("supplier")->field('id,name')->where(["code" => $info['supplierNo']])->find();
+            $info['supplier_name'] = isset($supplier['name']) ? $supplier['name'] : "";
+            $info['company'] = isset($company['company']) ? $company['company'] : "";
+            $info['stock_total'] = Db::name("good_stock")->where(['spuCode' => $info['spuCode'], "is_del" => 0])->sum("usable_stock");
+            $info['exclusive'] = makeExcluse($info['is_exclusive']);
+            $info['noble_name'] = isset($info['noble_metal']) && $info['noble_metal'] != 0 ? $this->noble[$info['noble_metal']] : "";
+            $itemid =Db::name("depart_user")->where(["uid"=>$info["purchase_id"],"is_del"=>0])->value("itemid",'');
+            $info['company_name'] = implode('/', array_column(GetPart($itemid), 'name'));
+        	}else{
+	    	unset($info['brand_id']);
+		    unset($info['good_unit']);
+		    unset($info['spuCode']);
+        	}
+
+	    $info['specinfo'] = $speclist;
+	    return json_show(0,"获取成功",$info);
+    }
+}

+ 11 - 0
app/txx/controller/Index.php

@@ -0,0 +1,11 @@
+<?php
+
+
+namespace app\txx\controller;
+
+
+class Index extends \app\BaseController{
+	public function  index(){
+		return "欢迎使用";
+	}
+}

+ 10 - 0
app/txx/middleware.php

@@ -0,0 +1,10 @@
+<?php
+// 全局中间件定义文件
+return [
+    // 全局请求缓存
+    app\txx\middleware\CheckAuth::class
+    // 多语言加载
+    // \think\middleware\LoadLangPack::class,
+    // Session初始化
+    // \think\middleware\SessionInit::class
+];

+ 65 - 0
app/txx/middleware/CheckAuth.php

@@ -0,0 +1,65 @@
+<?php
+declare (strict_types = 1);
+
+namespace app\txx\middleware;
+
+use app\txx\common\Sign;
+use think\facade\Db;
+use think\facade\Log;
+use think\Response;
+
+class CheckAuth
+{
+    /**
+     * 处理请求
+     *
+     * @param \think\Request $request
+     * @param \Closure       $next
+     * @return Response
+     */
+    public function handle($request, \Closure $next)
+    {
+    	$request->isCx=0;
+    	$request->uid=0;
+    	$request->uname='';
+        $param = $request->post();
+	    $header = $request->header();
+	    $check =$this->check($header,$param);
+	    Log::write("IPAddr:".$request->server("REMOTE_ADDR"),"info");
+	    Log::write("Action:".$request->server("REQUEST_URI"),"info");
+	    Log::write("param:".json_encode($param),"info");
+	    Log::write("header:".json_encode($header),"info");
+	    if($check['code']==1){
+	    	return json_show(104,$check['msg']);
+		}
+		$response = $next($request);
+	    return $response;
+
+
+    }
+	//请求结束的回调(如果返回数据用的是app_show/error_show,即直接echo,则不会触发该方法)
+	public function end(Response $response)
+	{
+		Log::info("response:{data}",["data"=>json_encode($response->getContent(),JSON_UNESCAPED_UNICODE)]);
+	}
+	/**数据接口签名验证
+	* @param $data
+	* @param $param
+	 * @return array
+	 */
+    private  function check($data,$param){
+        //check sign
+        if (!isset($data['appid']) || !$data['appid']) {
+            return ['code'=>1,'msg'=>'发送的应用参数不存在'];
+        }
+        $appinf =Db::name("act_company")->where(["app_id"=>$data['appid'],"is_del"=>0,"status"=>1])->findOrEmpty();
+        if(empty($appinf)){
+        	  return ['code'=>1,'msg'=>'发送的应用参数错误'];
+        }
+		$mege=["appid"=>$data['appid'],"noce"=>$data['noce']??'',"sign"=>$data['sign']??'',"timestamp"=>$data['timestamp']??''];
+        $value =array_merge($mege,$param);
+        $Sign=new Sign($appinf['app_id'],$appinf['app_key']);
+        $result =$Sign->verifySign($value);
+        return $result;
+    }
+}

+ 14 - 0
app/txx/model/Act.php

@@ -0,0 +1,14 @@
+<?php
+declare (strict_types = 1);
+
+namespace app\txx\model;
+
+use think\Model;
+
+/**
+ * @mixin \think\Model
+ */
+class Act extends Model
+{
+    //
+}

+ 26 - 0
app/txx/model/ActGood.php

@@ -0,0 +1,26 @@
+<?php
+declare (strict_types = 1);
+
+namespace app\txx\model;
+
+use think\Exception;use think\Model;
+
+/**
+ * @mixin \think\Model
+ */
+class ActGood extends Model
+{
+    //
+    static function ActAdd(array $Good, string $actCode,array $userinfo=[]){
+    	if (empty($Good)) throw new Exception("参与活动商品不能为空",1006);
+    	self::startTrans();
+    	$data=[];
+    	foreach ($Good as $item ){
+			$temp=[
+				"actCode"=>$actCode,
+				"yz_good_id"=>$item['id'],
+
+			];
+    	}
+    }
+}

+ 14 - 0
app/txx/model/PlatformYouzan.php

@@ -0,0 +1,14 @@
+<?php
+declare (strict_types = 1);
+
+namespace app\txx\model;
+
+use think\model;
+
+/**
+ * @mixin \think\Model
+ */
+class PlatformYouzan extends Model
+{
+
+}

+ 17 - 0
app/txx/model/YzGood.php

@@ -0,0 +1,17 @@
+<?php
+declare (strict_types = 1);
+
+namespace app\txx\model;
+
+use think\Model;
+
+/**
+ * @mixin \think\Model
+ */
+class YzGood extends Model
+{
+    protected $connection = 'mysql_yz';//切换连接参数
+    protected $table = 'yz_good';
+    protected $pk = 'id';
+    protected $autoWriteTimestamp = false;
+}

+ 19 - 0
app/txx/route/app.php

@@ -0,0 +1,19 @@
+<?php
+use think\facade\Route;
+
+Route::rule('ActAdd', 'txx/Act/create');
+Route::rule('Actlist', 'txx/Act/list');
+Route::rule('ActEdit', 'txx/Act/save');
+Route::rule('ActInfo', 'txx/Act/info');
+Route::rule('ActDel', 'txx/Act/delete');
+
+
+Route::rule('ActGoodAdd', 'txx/Good/AddGood');
+Route::rule('ActGoodList', 'txx/Good/list');
+Route::rule('ActGoodEdit', 'txx/Good/EditGood');
+Route::rule('ActGoodInfo', 'txx/Good/GoodInfo');
+Route::rule('ActGoodUrlImport', 'txx/Good/GoodUrlImport');
+Route::rule('ActGoodUrlList', 'txx/Good/GoodUrlList');
+Route::rule('ActGoodUrlDel', 'txx/Good/GoodUrlDel');
+Route::rule('yzgoodlist', 'txx/Good/listByYz');
+Route::rule('yzgoodinfo', 'txx/Good/YzGoodInfo');

+ 50 - 0
composer.json

@@ -0,0 +1,50 @@
+{
+    "name": "topthink/think",
+    "description": "the new thinkphp framework",
+    "type": "project",
+    "keywords": [
+        "framework",
+        "thinkphp",
+        "ORM"
+    ],
+    "homepage": "https://www.thinkphp.cn/",
+    "license": "Apache-2.0",
+    "authors": [
+        {
+            "name": "liu21st",
+            "email": "liu21st@gmail.com"
+        },
+        {
+            "name": "yunwuxin",
+            "email": "448901948@qq.com"
+        }
+    ],
+    "require": {
+        "php": ">=7.2.5",
+        "topthink/framework": "^6.1.0",
+        "topthink/think-orm": "^2.0",
+        "topthink/think-filesystem": "^1.0",
+        "topthink/think-multi-app": "^1.0"
+    },
+    "require-dev": {
+        "symfony/var-dumper": "^4.2",
+        "topthink/think-trace": "^1.0"
+    },
+    "autoload": {
+        "psr-4": {
+            "app\\": "app"
+        },
+        "psr-0": {
+            "": "extend/"
+        }
+    },
+    "config": {
+        "preferred-install": "dist"
+    },
+    "scripts": {
+        "post-autoload-dump": [
+            "@php think service:discover",
+            "@php think vendor:publish"
+        ]
+    }
+}

+ 1036 - 0
composer.lock

@@ -0,0 +1,1036 @@
+{
+    "_readme": [
+        "This file locks the dependencies of your project to a known state",
+        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
+        "This file is @generated automatically"
+    ],
+    "content-hash": "dd94061c596fec45ed08426e6d417237",
+    "packages": [
+        {
+            "name": "league/flysystem",
+            "version": "1.1.10",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/thephpleague/flysystem.git",
+                "reference": "3239285c825c152bcc315fe0e87d6b55f5972ed1"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://repo.huaweicloud.com/repository/php/league/flysystem/1.1.10/league-flysystem-1.1.10.zip",
+                "reference": "3239285c825c152bcc315fe0e87d6b55f5972ed1",
+                "shasum": ""
+            },
+            "require": {
+                "ext-fileinfo": "*",
+                "league/mime-type-detection": "^1.3",
+                "php": "^7.2.5 || ^8.0"
+            },
+            "conflict": {
+                "league/flysystem-sftp": "<1.0.6"
+            },
+            "require-dev": {
+                "phpspec/prophecy": "^1.11.1",
+                "phpunit/phpunit": "^8.5.8"
+            },
+            "suggest": {
+                "ext-ftp": "Allows you to use FTP server storage",
+                "ext-openssl": "Allows you to use FTPS server storage",
+                "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2",
+                "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3",
+                "league/flysystem-azure": "Allows you to use Windows Azure Blob storage",
+                "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching",
+                "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem",
+                "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files",
+                "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib",
+                "league/flysystem-webdav": "Allows you to use WebDAV storage",
+                "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter",
+                "spatie/flysystem-dropbox": "Allows you to use Dropbox storage",
+                "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.1-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "League\\Flysystem\\": "src/"
+                }
+            },
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Frank de Jonge",
+                    "email": "info@frenky.net"
+                }
+            ],
+            "description": "Filesystem abstraction: Many filesystems, one API.",
+            "keywords": [
+                "Cloud Files",
+                "WebDAV",
+                "abstraction",
+                "aws",
+                "cloud",
+                "copy.com",
+                "dropbox",
+                "file systems",
+                "files",
+                "filesystem",
+                "filesystems",
+                "ftp",
+                "rackspace",
+                "remote",
+                "s3",
+                "sftp",
+                "storage"
+            ],
+            "funding": [
+                {
+                    "url": "https://offset.earth/frankdejonge",
+                    "type": "other"
+                }
+            ],
+            "time": "2022-10-04T09:16:37+00:00"
+        },
+        {
+            "name": "league/flysystem-cached-adapter",
+            "version": "1.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/thephpleague/flysystem-cached-adapter.git",
+                "reference": "d1925efb2207ac4be3ad0c40b8277175f99ffaff"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://repo.huaweicloud.com/repository/php/league/flysystem-cached-adapter/1.1.0/league-flysystem-cached-adapter-1.1.0.zip",
+                "reference": "d1925efb2207ac4be3ad0c40b8277175f99ffaff",
+                "shasum": ""
+            },
+            "require": {
+                "league/flysystem": "~1.0",
+                "psr/cache": "^1.0.0"
+            },
+            "require-dev": {
+                "mockery/mockery": "~0.9",
+                "phpspec/phpspec": "^3.4",
+                "phpunit/phpunit": "^5.7",
+                "predis/predis": "~1.0",
+                "tedivm/stash": "~0.12"
+            },
+            "suggest": {
+                "ext-phpredis": "Pure C implemented extension for PHP"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "League\\Flysystem\\Cached\\": "src/"
+                }
+            },
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "frankdejonge",
+                    "email": "info@frenky.net"
+                }
+            ],
+            "description": "An adapter decorator to enable meta-data caching.",
+            "time": "2020-07-25T15:56:04+00:00"
+        },
+        {
+            "name": "league/mime-type-detection",
+            "version": "1.11.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/thephpleague/mime-type-detection.git",
+                "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://repo.huaweicloud.com/repository/php/league/mime-type-detection/1.11.0/league-mime-type-detection-1.11.0.zip",
+                "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd",
+                "shasum": ""
+            },
+            "require": {
+                "ext-fileinfo": "*",
+                "php": "^7.2 || ^8.0"
+            },
+            "require-dev": {
+                "friendsofphp/php-cs-fixer": "^3.2",
+                "phpstan/phpstan": "^0.12.68",
+                "phpunit/phpunit": "^8.5.8 || ^9.3"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "League\\MimeTypeDetection\\": "src"
+                }
+            },
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Frank de Jonge",
+                    "email": "info@frankdejonge.nl"
+                }
+            ],
+            "description": "Mime-type detection for Flysystem",
+            "funding": [
+                {
+                    "url": "https://github.com/frankdejonge",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/league/flysystem",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2022-04-17T13:12:02+00:00"
+        },
+        {
+            "name": "psr/cache",
+            "version": "1.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/cache.git",
+                "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://repo.huaweicloud.com/repository/php/psr/cache/1.0.1/psr-cache-1.0.1.zip",
+                "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Psr\\Cache\\": "src/"
+                }
+            },
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "http://www.php-fig.org/"
+                }
+            ],
+            "description": "Common interface for caching libraries",
+            "keywords": [
+                "cache",
+                "psr",
+                "psr-6"
+            ],
+            "time": "2016-08-06T20:24:11+00:00"
+        },
+        {
+            "name": "psr/container",
+            "version": "1.1.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/container.git",
+                "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://repo.huaweicloud.com/repository/php/psr/container/1.1.1/psr-container-1.1.1.zip",
+                "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.2.0"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Psr\\Container\\": "src/"
+                }
+            },
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "https://www.php-fig.org/"
+                }
+            ],
+            "description": "Common Container Interface (PHP FIG PSR-11)",
+            "homepage": "https://github.com/php-fig/container",
+            "keywords": [
+                "PSR-11",
+                "container",
+                "container-interface",
+                "container-interop",
+                "psr"
+            ],
+            "time": "2021-03-05T17:36:06+00:00"
+        },
+        {
+            "name": "psr/http-message",
+            "version": "1.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/http-message.git",
+                "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://repo.huaweicloud.com/repository/php/psr/http-message/1.0.1/psr-http-message-1.0.1.zip",
+                "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Psr\\Http\\Message\\": "src/"
+                }
+            },
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "http://www.php-fig.org/"
+                }
+            ],
+            "description": "Common interface for HTTP messages",
+            "homepage": "https://github.com/php-fig/http-message",
+            "keywords": [
+                "http",
+                "http-message",
+                "psr",
+                "psr-7",
+                "request",
+                "response"
+            ],
+            "time": "2016-08-06T14:39:51+00:00"
+        },
+        {
+            "name": "psr/log",
+            "version": "1.1.4",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/log.git",
+                "reference": "d49695b909c3b7628b6289db5479a1c204601f11"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://repo.huaweicloud.com/repository/php/psr/log/1.1.4/psr-log-1.1.4.zip",
+                "reference": "d49695b909c3b7628b6289db5479a1c204601f11",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.1.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Psr\\Log\\": "Psr/Log/"
+                }
+            },
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "https://www.php-fig.org/"
+                }
+            ],
+            "description": "Common interface for logging libraries",
+            "homepage": "https://github.com/php-fig/log",
+            "keywords": [
+                "log",
+                "psr",
+                "psr-3"
+            ],
+            "time": "2021-05-03T11:20:27+00:00"
+        },
+        {
+            "name": "psr/simple-cache",
+            "version": "1.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/simple-cache.git",
+                "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://repo.huaweicloud.com/repository/php/psr/simple-cache/1.0.1/psr-simple-cache-1.0.1.zip",
+                "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Psr\\SimpleCache\\": "src/"
+                }
+            },
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "http://www.php-fig.org/"
+                }
+            ],
+            "description": "Common interfaces for simple caching",
+            "keywords": [
+                "cache",
+                "caching",
+                "psr",
+                "psr-16",
+                "simple-cache"
+            ],
+            "time": "2017-10-23T01:57:42+00:00"
+        },
+        {
+            "name": "topthink/framework",
+            "version": "v6.1.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/top-think/framework.git",
+                "reference": "2cb56f3e6f3c479fe90ea5f28d38d3b5ef6c4210"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://repo.huaweicloud.com/repository/php/topthink/framework/v6.1.1/topthink-framework-v6.1.1.zip",
+                "reference": "2cb56f3e6f3c479fe90ea5f28d38d3b5ef6c4210",
+                "shasum": ""
+            },
+            "require": {
+                "ext-json": "*",
+                "ext-mbstring": "*",
+                "php": ">=7.2.5",
+                "psr/container": "~1.0",
+                "psr/http-message": "^1.0",
+                "psr/log": "~1.0",
+                "psr/simple-cache": "^1.0",
+                "topthink/think-helper": "^3.1.1",
+                "topthink/think-orm": "^2.0"
+            },
+            "require-dev": {
+                "guzzlehttp/psr7": "^2.1.0",
+                "mikey179/vfsstream": "^1.6",
+                "mockery/mockery": "^1.2",
+                "phpunit/phpunit": "^7.0"
+            },
+            "type": "library",
+            "autoload": {
+                "files": [],
+                "psr-4": {
+                    "think\\": "src/think/"
+                }
+            },
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "liu21st",
+                    "email": "liu21st@gmail.com"
+                },
+                {
+                    "name": "yunwuxin",
+                    "email": "448901948@qq.com"
+                }
+            ],
+            "description": "The ThinkPHP Framework.",
+            "homepage": "http://thinkphp.cn/",
+            "keywords": [
+                "framework",
+                "orm",
+                "thinkphp"
+            ],
+            "time": "2022-10-26T03:48:53+00:00"
+        },
+        {
+            "name": "topthink/think-filesystem",
+            "version": "v1.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/top-think/think-filesystem.git",
+                "reference": "cfc510520db9bcd22d8d80f51d7e415a2f470af6"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://repo.huaweicloud.com/repository/php/topthink/think-filesystem/v1.0.1/topthink-think-filesystem-v1.0.1.zip",
+                "reference": "cfc510520db9bcd22d8d80f51d7e415a2f470af6",
+                "shasum": ""
+            },
+            "require": {
+                "league/flysystem": "^1.1.4",
+                "league/flysystem-cached-adapter": "^1.0",
+                "php": ">=7.2.5",
+                "topthink/framework": "^6.1"
+            },
+            "require-dev": {
+                "mikey179/vfsstream": "^1.6",
+                "mockery/mockery": "^1.2",
+                "phpunit/phpunit": "^8.0"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "think\\": "src"
+                }
+            },
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "yunwuxin",
+                    "email": "448901948@qq.com"
+                }
+            ],
+            "description": "The ThinkPHP6.1 Filesystem Package",
+            "time": "2022-10-26T03:50:24+00:00"
+        },
+        {
+            "name": "topthink/think-helper",
+            "version": "v3.1.6",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/top-think/think-helper.git",
+                "reference": "769acbe50a4274327162f9c68ec2e89a38eb2aff"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://repo.huaweicloud.com/repository/php/topthink/think-helper/v3.1.6/topthink-think-helper-v3.1.6.zip",
+                "reference": "769acbe50a4274327162f9c68ec2e89a38eb2aff",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.1.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^9.5"
+            },
+            "type": "library",
+            "autoload": {
+                "files": [
+                    "src/helper.php"
+                ],
+                "psr-4": {
+                    "think\\": "src"
+                }
+            },
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "yunwuxin",
+                    "email": "448901948@qq.com"
+                }
+            ],
+            "description": "The ThinkPHP6 Helper Package",
+            "time": "2021-12-15T04:27:55+00:00"
+        },
+        {
+            "name": "topthink/think-multi-app",
+            "version": "v1.0.15",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/top-think/think-multi-app.git",
+                "reference": "387e0dac059c20f92cac5da41a871e10829c1c97"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://repo.huaweicloud.com/repository/php/topthink/think-multi-app/v1.0.15/topthink-think-multi-app-v1.0.15.zip",
+                "reference": "387e0dac059c20f92cac5da41a871e10829c1c97",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.1.0",
+                "topthink/framework": "^6.0"
+            },
+            "type": "library",
+            "extra": {
+                "think": {
+                    "services": [
+                        "think\\app\\Service"
+                    ]
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "think\\app\\": "src"
+                }
+            },
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "liu21st",
+                    "email": "liu21st@gmail.com"
+                }
+            ],
+            "description": "thinkphp6 multi app support",
+            "time": "2022-10-26T08:03:06+00:00"
+        },
+        {
+            "name": "topthink/think-orm",
+            "version": "v2.0.55",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/top-think/think-orm.git",
+                "reference": "e1974a4c3b1b4c5b808fcc0863fc254e711dee13"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://repo.huaweicloud.com/repository/php/topthink/think-orm/v2.0.55/topthink-think-orm-v2.0.55.zip",
+                "reference": "e1974a4c3b1b4c5b808fcc0863fc254e711dee13",
+                "shasum": ""
+            },
+            "require": {
+                "ext-json": "*",
+                "ext-pdo": "*",
+                "php": ">=7.1.0",
+                "psr/log": "^1.0|^2.0",
+                "psr/simple-cache": "^1.0|^2.0",
+                "topthink/think-helper": "^3.1"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^7|^8|^9.5"
+            },
+            "type": "library",
+            "autoload": {
+                "files": [
+                    "stubs/load_stubs.php"
+                ],
+                "psr-4": {
+                    "think\\": "src"
+                }
+            },
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "liu21st",
+                    "email": "liu21st@gmail.com"
+                }
+            ],
+            "description": "think orm",
+            "keywords": [
+                "database",
+                "orm"
+            ],
+            "time": "2022-09-27T14:18:43+00:00"
+        }
+    ],
+    "packages-dev": [
+        {
+            "name": "symfony/polyfill-mbstring",
+            "version": "v1.26.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-mbstring.git",
+                "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://repo.huaweicloud.com/repository/php/symfony/polyfill-mbstring/v1.26.0/symfony-polyfill-mbstring-v1.26.0.zip",
+                "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.1"
+            },
+            "provide": {
+                "ext-mbstring": "*"
+            },
+            "suggest": {
+                "ext-mbstring": "For best performance"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-main": "1.26-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "bootstrap.php"
+                ],
+                "psr-4": {
+                    "Symfony\\Polyfill\\Mbstring\\": ""
+                }
+            },
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill for the Mbstring extension",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "mbstring",
+                "polyfill",
+                "portable",
+                "shim"
+            ],
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2022-05-24T11:49:31+00:00"
+        },
+        {
+            "name": "symfony/polyfill-php72",
+            "version": "v1.26.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-php72.git",
+                "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://repo.huaweicloud.com/repository/php/symfony/polyfill-php72/v1.26.0/symfony-polyfill-php72-v1.26.0.zip",
+                "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-main": "1.26-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "bootstrap.php"
+                ],
+                "psr-4": {
+                    "Symfony\\Polyfill\\Php72\\": ""
+                }
+            },
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "polyfill",
+                "portable",
+                "shim"
+            ],
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2022-05-24T11:49:31+00:00"
+        },
+        {
+            "name": "symfony/polyfill-php80",
+            "version": "v1.26.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-php80.git",
+                "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://repo.huaweicloud.com/repository/php/symfony/polyfill-php80/v1.26.0/symfony-polyfill-php80-v1.26.0.zip",
+                "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-main": "1.26-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "bootstrap.php"
+                ],
+                "psr-4": {
+                    "Symfony\\Polyfill\\Php80\\": ""
+                },
+                "classmap": [
+                    "Resources/stubs"
+                ]
+            },
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Ion Bazan",
+                    "email": "ion.bazan@gmail.com"
+                },
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "polyfill",
+                "portable",
+                "shim"
+            ],
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2022-05-10T07:21:04+00:00"
+        },
+        {
+            "name": "symfony/var-dumper",
+            "version": "v4.4.47",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/var-dumper.git",
+                "reference": "1069c7a3fca74578022fab6f81643248d02f8e63"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://repo.huaweicloud.com/repository/php/symfony/var-dumper/v4.4.47/symfony-var-dumper-v4.4.47.zip",
+                "reference": "1069c7a3fca74578022fab6f81643248d02f8e63",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.1.3",
+                "symfony/polyfill-mbstring": "~1.0",
+                "symfony/polyfill-php72": "~1.5",
+                "symfony/polyfill-php80": "^1.16"
+            },
+            "conflict": {
+                "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0",
+                "symfony/console": "<3.4"
+            },
+            "require-dev": {
+                "ext-iconv": "*",
+                "symfony/console": "^3.4|^4.0|^5.0",
+                "symfony/process": "^4.4|^5.0",
+                "twig/twig": "^1.43|^2.13|^3.0.4"
+            },
+            "suggest": {
+                "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).",
+                "ext-intl": "To show region name in time zone dump",
+                "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script"
+            },
+            "bin": [
+                "Resources/bin/var-dump-server"
+            ],
+            "type": "library",
+            "autoload": {
+                "files": [
+                    "Resources/functions/dump.php"
+                ],
+                "psr-4": {
+                    "Symfony\\Component\\VarDumper\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Provides mechanisms for walking through any arbitrary PHP variable",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "debug",
+                "dump"
+            ],
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2022-10-03T15:15:11+00:00"
+        },
+        {
+            "name": "topthink/think-trace",
+            "version": "v1.5",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/top-think/think-trace.git",
+                "reference": "55027fd79abb744f32a3be8d9e1ccf873a3ca9b7"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://repo.huaweicloud.com/repository/php/topthink/think-trace/v1.5/topthink-think-trace-v1.5.zip",
+                "reference": "55027fd79abb744f32a3be8d9e1ccf873a3ca9b7",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.1.0",
+                "topthink/framework": "^6.0"
+            },
+            "type": "library",
+            "extra": {
+                "think": {
+                    "services": [
+                        "think\\trace\\Service"
+                    ],
+                    "config": {
+                        "trace": "src/config.php"
+                    }
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "think\\trace\\": "src"
+                }
+            },
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "liu21st",
+                    "email": "liu21st@gmail.com"
+                }
+            ],
+            "description": "thinkphp debug trace",
+            "time": "2022-10-26T07:56:45+00:00"
+        }
+    ],
+    "aliases": [],
+    "minimum-stability": "stable",
+    "stability-flags": [],
+    "prefer-stable": false,
+    "prefer-lowest": false,
+    "platform": {
+        "php": ">=7.2.5"
+    },
+    "platform-dev": [],
+    "plugin-api-version": "2.3.0"
+}

+ 32 - 0
config/app.php

@@ -0,0 +1,32 @@
+<?php
+// +----------------------------------------------------------------------
+// | 应用设置
+// +----------------------------------------------------------------------
+
+return [
+    // 应用地址
+    'app_host'         => env('app.host', ''),
+    // 应用的命名空间
+    'app_namespace'    => '',
+    // 是否启用路由
+    'with_route'       => true,
+    // 默认应用
+    'default_app'      => 'index',
+    // 默认时区
+    'default_timezone' => 'Asia/Shanghai',
+
+    // 应用映射(自动多应用模式有效)
+    'app_map'          => [],
+    // 域名绑定(自动多应用模式有效)
+    'domain_bind'      => [],
+    // 禁止URL访问的应用列表(自动多应用模式有效)
+    'deny_app_list'    => [],
+
+    // 异常页面的模板文件
+    'exception_tmpl'   => app()->getThinkPath() . 'tpl/think_exception.tpl',
+
+    // 错误显示信息,非调试模式有效
+    'error_message'    => '页面错误!请稍后再试~',
+    // 显示错误信息
+    'show_error_msg'   => false,
+];

+ 29 - 0
config/cache.php

@@ -0,0 +1,29 @@
+<?php
+
+// +----------------------------------------------------------------------
+// | 缓存设置
+// +----------------------------------------------------------------------
+
+return [
+    // 默认缓存驱动
+    'default' => env('cache.driver', 'file'),
+
+    // 缓存连接方式配置
+    'stores'  => [
+        'file' => [
+            // 驱动方式
+            'type'       => 'File',
+            // 缓存保存目录
+            'path'       => '',
+            // 缓存前缀
+            'prefix'     => '',
+            // 缓存有效期 0表示永久缓存
+            'expire'     => 0,
+            // 缓存标签前缀
+            'tag_prefix' => 'tag:',
+            // 序列化机制 例如 ['serialize', 'unserialize']
+            'serialize'  => [],
+        ],
+        // 更多的缓存连接
+    ],
+];

+ 9 - 0
config/console.php

@@ -0,0 +1,9 @@
+<?php
+// +----------------------------------------------------------------------
+// | 控制台配置
+// +----------------------------------------------------------------------
+return [
+    // 指令定义
+    'commands' => [
+    ],
+];

+ 20 - 0
config/cookie.php

@@ -0,0 +1,20 @@
+<?php
+// +----------------------------------------------------------------------
+// | Cookie设置
+// +----------------------------------------------------------------------
+return [
+    // cookie 保存时间
+    'expire'    => 0,
+    // cookie 保存路径
+    'path'      => '/',
+    // cookie 有效域名
+    'domain'    => '',
+    //  cookie 启用安全传输
+    'secure'    => false,
+    // httponly设置
+    'httponly'  => false,
+    // 是否使用 setcookie
+    'setcookie' => true,
+    // samesite 设置,支持 'strict' 'lax'
+    'samesite'  => '',
+];

+ 157 - 0
config/database.php

@@ -0,0 +1,157 @@
+<?php
+
+return [
+	// 默认使用的数据库连接配置
+	'default' => env('database.driver', 'mysql'),
+
+	// 自定义时间查询规则
+	'time_query_rule' => [],
+
+	// 自动写入时间戳字段
+	// true为自动识别类型 false关闭
+	// 字符串则明确指定时间字段类型 支持 int timestamp datetime date
+	'auto_timestamp' => true,
+
+	// 时间字段取出后的默认时间格式
+	'datetime_format' => 'Y-m-d H:i:s',
+
+	// 时间字段配置 配置格式:create_time,update_time
+	'datetime_field' => '',
+
+	// 数据库连接配置信息
+	'connections' => [
+		'mysql' => [
+			// 数据库类型
+			'type' => env('database.type', 'mysql'),
+			// 服务器地址
+			'hostname' => env('database.hostname', ''),
+			// 数据库名
+			'database' => env('database.database', ''),
+			// 用户名
+			'username' => env('database.username', ''),
+			// 密码
+			'password' => env('database.password', ''),
+			// 端口
+			'hostport' => env('database.hostport', '3306'),
+			// 数据库连接参数
+			'params' => [],
+			// 数据库编码默认采用utf8
+			'charset' => env('database.charset', 'utf8'),
+			// 数据库表前缀
+			'prefix' => env('database.prefix', 'wsm_'),
+
+			// 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
+			'deploy' => 0,
+			// 数据库读写是否分离 主从式有效
+			'rw_separate' => false,
+			// 读写分离后 主服务器数量
+			'master_num' => 1,
+			// 指定从服务器序号
+			'slave_no' => '',
+			// 是否严格检查字段是否存在
+			'fields_strict' => true,
+			// 是否需要断线重连
+			'break_reconnect' => false,
+			// 监听SQL
+			'trigger_sql' => env('app_debug', true),
+			// 开启字段缓存
+			'fields_cache' => false,
+		],
+//		"mysql2" => [
+//			'type' => env('database.type', 'mysql'),
+//			// 服务器地址
+//			'hostname' => env('database.hostname', '121.36.90.170'),
+//			// 数据库名
+//			'database' => env('database.database', 'cloudpivot'),
+//			// 用户名
+//			'username' => env('database.username', 'root'),
+//			// 密码
+//			'password' => env('database.password', 'test123456!@#$%'),
+//			// 端口
+//			'hostport' => env('database.hostport', '3306'),
+//			// 数据库连接参数
+//			'params' => [],
+//			// 数据库编码默认采用utf8
+//			'charset' => env('database.charset', 'utf8'),
+//		],
+//		'mysql3' => [
+//			// 数据库类型
+//			'type' => env('database.type', 'mysql'),
+//			// 服务器地址
+//			// 服务器地址
+//			// 服务器地址
+//			'hostname' => env('database.hostname', '192.168.0.205'),
+//			// 数据库名
+//			'database' => env('database.database', 'wyht_invoice'),
+//			// 用户名
+//			'username' => env('database.username', 'caxiao_invoice'),
+//			// 密码
+//			'password' => env('database.password', 'xrok0SgeKR7g'),
+//			// 端口
+//			'hostport' => env('database.hostport', '3306'),
+//			// 数据库连接参数
+//			'params' => [],
+//			// 数据库编码默认采用utf8
+//			'charset' => env('database.charset', 'utf8'),
+//			// 数据库表前缀
+//			'prefix' => env('database.prefix', 'cfp_'),
+//
+//			// 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
+//			'deploy' => 0,
+//			// 数据库读写是否分离 主从式有效
+//			'rw_separate' => false,
+//			// 读写分离后 主服务器数量
+//			'master_num' => 1,
+//			// 指定从服务器序号
+//			'slave_no' => '',
+//			// 是否严格检查字段是否存在
+//			'fields_strict' => true,
+//			// 是否需要断线重连
+//			'break_reconnect' => false,
+//			// 监听SQL
+//			'trigger_sql' => env('app_debug', true),
+//			// 开启字段缓存
+//			'fields_cache' => false,
+//		],
+//		// 更多的数据库配置信息
+		//连接有赞对接项目的数据库
+		"mysql_yz" => [
+			'type' => env('database.type', 'mysql'),
+			// 服务器地址
+			'hostname' => env('database.hostname', ''),
+			// 数据库名
+			'database' => env('database.database1', ''),
+			// 用户名
+			'username' => env('database.username', ''),
+			// 密码
+			'password' => env('database.password', ''),
+			// 端口
+			'hostport' => env('database.hostport', '3306'),
+			// 数据库连接参数
+			'params' => [],
+			// 数据库编码默认采用utf8
+			'charset' => env('database.charset', 'utf8'),
+			'prefix' => 'yz_',
+		],
+
+//		//用户账号数据库
+//		"mysql_sys" => [
+//			'type' => env('database.type', 'mysql'),
+//			// 服务器地址
+//			'hostname' => env('database.hostname', '192.168.0.205'),
+//			// 数据库名
+//			'database' => env('database.database', 'user_account'),
+//			// 用户名
+//			'username' => env('database.username', 'caxiao_invoice'),
+//			// 密码
+//			'password' => env('database.password', 'xrok0SgeKR7g'),
+//			// 端口
+//			'hostport' => env('database.hostport', '3306'),
+//			// 数据库连接参数
+//			'params' => [],
+//			// 数据库编码默认采用utf8
+//			'charset' => env('database.charset', 'utf8'),
+//			'prefix' => 'sys_',
+//		],
+	],
+];

+ 24 - 0
config/filesystem.php

@@ -0,0 +1,24 @@
+<?php
+
+return [
+    // 默认磁盘
+    'default' => env('filesystem.driver', 'local'),
+    // 磁盘列表
+    'disks'   => [
+        'local'  => [
+            'type' => 'local',
+            'root' => app()->getRuntimePath() . 'storage',
+        ],
+        'public' => [
+            // 磁盘类型
+            'type'       => 'local',
+            // 磁盘路径
+            'root'       => app()->getRootPath() . 'public/storage',
+            // 磁盘路径对应的外部URL路径
+            'url'        => '/storage',
+            // 可见性
+            'visibility' => 'public',
+        ],
+        // 更多的磁盘配置信息
+    ],
+];

+ 27 - 0
config/lang.php

@@ -0,0 +1,27 @@
+<?php
+// +----------------------------------------------------------------------
+// | 多语言设置
+// +----------------------------------------------------------------------
+
+return [
+    // 默认语言
+    'default_lang'    => env('lang.default_lang', 'zh-cn'),
+    // 允许的语言列表
+    'allow_lang_list' => [],
+    // 多语言自动侦测变量名
+    'detect_var'      => 'lang',
+    // 是否使用Cookie记录
+    'use_cookie'      => true,
+    // 多语言cookie变量
+    'cookie_var'      => 'think_lang',
+    // 多语言header变量
+    'header_var'      => 'think-lang',
+    // 扩展语言包
+    'extend_list'     => [],
+    // Accept-Language转义为对应语言包名称
+    'accept_language' => [
+        'zh-hans-cn' => 'zh-cn',
+    ],
+    // 是否支持语言分组
+    'allow_group'     => false,
+];

+ 45 - 0
config/log.php

@@ -0,0 +1,45 @@
+<?php
+
+// +----------------------------------------------------------------------
+// | 日志设置
+// +----------------------------------------------------------------------
+return [
+    // 默认日志记录通道
+    'default'      => env('log.channel', 'file'),
+    // 日志记录级别
+    'level'        => [],
+    // 日志类型记录的通道 ['error'=>'email',...]
+    'type_channel' => [],
+    // 关闭全局日志写入
+    'close'        => false,
+    // 全局日志处理 支持闭包
+    'processor'    => null,
+
+    // 日志通道列表
+    'channels'     => [
+        'file' => [
+            // 日志记录方式
+            'type'           => 'File',
+            // 日志保存目录
+            'path'           => '',
+            // 单文件日志写入
+            'single'         => false,
+            // 独立日志级别
+            'apart_level'    => ["info"],
+            // 最大日志文件数量
+            'max_files'      => 100,
+            // 使用JSON格式记录
+            'json'           => false,
+            // 日志处理
+            'processor'      => null,
+            // 关闭通道日志写入
+            'close'          => false,
+            // 日志输出格式化
+            'format'         => '[%s][%s] %s',
+            // 是否实时写入
+            'realtime_write' => false,
+        ],
+        // 其它日志通道配置
+    ],
+
+];

+ 8 - 0
config/middleware.php

@@ -0,0 +1,8 @@
+<?php
+// 中间件配置
+return [
+    // 别名或分组
+    'alias'    => [],
+    // 优先级设置,此数组中的中间件会按照数组中的顺序优先执行
+    'priority' => [],
+];

+ 7 - 0
config/noble.php

@@ -0,0 +1,7 @@
+<?php
+return [
+    "0"=>"",
+    "1"=>"18K",
+    "2"=>"24K",
+    "3"=>"白银",
+];

+ 189 - 0
config/order.php

@@ -0,0 +1,189 @@
+<?php
+/**
+1.商品成本管理	0	新建待审核	是	有审核权限的人	是	数据创建人
+	1	审核通过	否		是	上一步审核人
+	2	基础修改待审核	是	有审核权限的人	是	基础信息修改人
+	3	成本修改待审核	是	有审核权限的人	是	成本信息修改人
+	4	基础修改驳回	是	创建人	是	上一步审核人
+	5	成本修改驳回	是	创建人	是	上一步审核人
+	6	新建审核驳回	是	创建人	是	上一步审核人
+	7	复制商品待编辑	是	创建人	是	数据创建人
+	8	咨询商品待编辑	是	创建人	是	数据创建人
+
+2.商品上线管理	1	待完善成本	是	咨询成交商品池-商品反馈人	是	创建人
+	2	待产品审核	是	有节点提交的人	是	创建人
+	3	待财务定价	是	有节点提交的人	是	创建人,产品节点审批人
+	4	待财务审核定价	是	有节点提交的人	是	创建人,产品节点审批人,财务定价审批人
+	5	待上线	是	有节点提交的人	是	创建人,产品节点审批人,财务定价审批人,财务审批定价审批人
+	6	上线成功	否		是	整个流程,提交的人,包括创建人
+	7	审核失败	是	创建人	是	创建人
+	8	已下线	否		是	创建人, 提交下线的人
+
+3.项目管理	1	待商品反馈	否		是	创建人,财务定价人
+	2	待客户选择商品	是	创建人	是	创建人,财务定价人
+	3	待项目方案制定	是	创建人	是	创建人,财务定价人
+	4	待方案选择	是	创建人	是	创建人,方案制定人,财务定价人
+	5	项目待下单	是	创建人	是	创建人,方案制定人,方案选择人,财务定价人
+	6	项目已结束	否		是	创建人。方案制定人,方案选择人,项目下单人,财务定价人
+
+4.议价单管理	0	待业务主管审核	是	有业务主管审批节点的人	是	创建人
+	1	业务主管通过	否		是	创建人,业务主管审核提交人
+	2	待财务专员审批	是	有财务专员审批节点的人	是	创建人,业务主管审核提交人
+	3	业务主管驳回	否		是	创建人,业务主管审核提交人
+	4	待财务主管审核	是	有财务主管审批节点的人	是	创建人,业务主管审核提交人,财务专员审核提交人
+	5	专员驳回【预留-暂时不用】	否		否
+	6	财务主管通过	否		是	创建人,业务主管审核提交人,财务专员审核提交人,财务主管审核提交人
+	7	待BOSS审批	是	有BOSS审批节点的人	是	创建人,业务主管审核提交人,财务专员审核提交人,财务主管审核提交人
+	8	财务主管驳回	否		是	创建人,业务主管审核提交人,财务专员审核提交人,财务主管审核提交人
+	9	boss通过	否		是	创建人,业务主管审核提交人,财务专员审核提交人,财务主管审核提交人,boss审核提交人
+	10	boss越线通过	否		是	创建人,业务主管审核提交人,财务专员审核提交人,财务主管审核提交人,boss审核提交人
+	11	boss驳回	否		是	创建人,业务主管审核提交人,财务专员审核提交人,财务主管审核提交人,boss审核提交人
+
+5.备库申请管理	1	待采购反馈	是	商品负责人	是	备库单创建人
+	2	已生成采购单	否		是	备库单创建人,商品负责人
+
+6.销售订单管理	0	待发货	是	创建人,(库存品)库管发货人员,(其他商品)商品负责人	是	创建人,(库存品)库管发货人员,(其他商品)商品负责人
+	1	待发货完成	是	创建人	是	创建人,(库存品)库管发货人员,(其他商品)商品负责人
+	2	发货已完成	否		是	创建人,(库存品)库管发货人员,(其他商品)商品负责人
+	3	订单已取消	否		是	创建人,(库存品)库管发货人员,(其他商品)商品负责人
+
+7.发货申请管理	0	待发货	是	创建人	是	创建人
+	1	待库管发货	是	创建人,(库存品)库管人/(非库存品)商品负责人	是	创建人
+	2	已发货待收货	否		是	创建人,(库存品)库管人/(非库存品)商品负责人
+	3	已收货	否		是	创建人,(库存品)库管人/(非库存品)商品负责人
+	4	已全部退货	否		是	创建人,(库存品)库管人/(非库存品)商品负责人,退货申请人
+
+8.售后申请单	1	待业务审核	是	有业务审核的人 	是	售后申请创建人
+	2	待采购审核	是	有采购主管审核权限的人	是	售后申请创建人,业务审核提交人 ,采购主管审核提交人
+	3	待设置仓库/待同意退货	是	有设置仓库权限的人(同时是该商品负责人)	是	售后申请创建人,业务审核提交人 ,采购主管审核提交人
+	4	待客户退货	是	售后申请创建人	是	售后申请创建人,业务审核提交人 ,采购主管审核提交人
+	5	售后已完成	否		是	售后申请创建人,业务审核提交人 ,采购主管审核提交人
+	6	业务已驳回	否		是	售后申请创建人,业务审核提交人 ,
+	7	采购已驳回	否		是	售后申请创建人,业务审核提交人 ,采购主管审核提交人
+	8	申请已取消	否		是	售后申请创建人,业务审核提交人? ,采购主管审核提交人?
+
+9.售后退货单	0	待申请【预留-暂时不用】	否		否
+	1	待验收	是	商品所在仓库负责人	是	售后申请单 退货节点提交人
+	2	待验收审核	是	有验收审核节点权限的人	是	售后申请单 退货节点提交人,
+	3	待业务审核	是	有业务审核节点权限的人	是	售后申请单 退货节点提交人,验收审核提交人
+	4	完成退货	否		是	售后申请单 退货节点提交人,验收审核提交人,业务审核提交人
+
+10.销售退货单	1	待业务审批	是	有业务审批节点的人	是	创建人
+	2	待专员审批	是	有专员审批节点的人	是	创建人,业务审批节点提交人
+	3	待主管审批	是	有主管审批节点的人	是	创建人,业务审批节点提交人,专员审批提交人
+	4	退货完成	否		是	创建人,业务审批节点提交人,专员审批提交人,主管审批提交人
+	5	业务驳回	否		是	创建人,业务审批节点提交人
+	6	采购驳回	否		是	创建人,业务审批节点提交人,专员审批提交人,主管审批提交人
+	7	专员审批不通过	否		是	创建人,业务审批节点提交人,专员审批提交人
+
+11.销售工差单	1	待业务部门审核	是	有业务部门审批节点权限的人	否
+	2	审批已完成	否		是	业务主管提交人
+
+12.采购单管理
+    0	待与供应商确认	是	商品 -采购员	否
+	1	待入库	是	商品 -采购员	是	 待与供应商确认节点提交人
+	2	部分入库	是	商品 -采购员	是	 待与供应商确认节点提交人, 入库操作人
+	3	入库完成	否		是	 待与供应商确认节点提交人, 入库操作人
+	4	已取消订单	否		是	 待与供应商确认节点提交人, 入库操作人?
+
+13.采购入库单管理	0	待发货	是	有待发货节点的人	是	创建人
+	1	待验货	是	有待验货节点的人	是	创建人,入库发货节点提交人
+	2	待审核	是	有待审核节点的人	是	创建人,入库发货节点提交人,入库验收节点提交人
+	3	待入库	是	有待入库节点的人	是	创建人,入库发货节点提交人,入库验收节点提交人,审核节点提交人
+	4	入库完成	否		是	创建人,业务主管审核提交人,财务专员审核提交人,审核节点提交人 ,入库节点提交人,退货待物流节点提交人?
+	5	退货待物流	是	有退货待物流节点的人	是	创建人,业务主管审核提交人,财务专员审核提交人,审核节点提交人 ,入库节点提交人,
+	6	退货完成	否		是	创建人,业务主管审核提交人,财务专员审核提交人,审核节点提交人 ,入库节点提交人,退货待物流节点提交人?
+
+14.采购工差单管理	1	待业务部门审核	是	有业务部门审批节点的人	是	创建人
+	2	工差单审核完成	否		是	创建人
+
+15.离职交接	0	待发起审核流程	是	有发起审核流程的人	是	创建人
+	1	待离职交接审核	是	有审批节点的人	是	创建人,发起审核流程提交的人
+	2	审核不通过	否		是	创建人,发起审核流程提交的人,审批节点提交人
+	3	待系统更新数据	否		是	创建人,发起审核流程提交的人,审批节点提交人
+	4	离职交接已成功	否		是	创建人,发起审核流程提交的人,审批节点提交人
+
+16.调拨	0	待发起流程	是	有发起流程提交权限的人	是	创建人
+	1	待入库方同意入库	是	有待入库方同意入库节点提交的人	是	创建人,发起流程提交人
+	2	待出库方发货	是	有待出库方发货节点提交的人	是	创建人,发起流程提交人,入库方同意入库提交人
+	3	待入库方验货提交	是	有入库方验货提交节点的人	是	创建人,发起流程提交人,入库方同意入库提交人,出库方发货提交人
+	4	待验货审核	是	有验货审核节点提交的人	是	创建人,发起流程提交人,入库方同意入库提交人,出库方发货提交人,入库方验货提交人
+	5	调拨已完成	否		是	创建人,发起流程提交人,入库方同意入库提交人,出库方发货提交人,入库方验货提交人,验货审核提交人
+
+17.盘点	0	待发起流程	是	有发起流程节点的人	是	创建人
+	1	待上传盘点结果	是	有上传盘点结果节点的人	是	创建人,发起流程提交人
+	2	待审核盘点结果	是	有审核盘点节点的人	是	创建人,发起流程提交人,上传盘点结果人
+	3	待系统更新	否		是	创建人,发起流程提交人,上传盘点结果人,审核盘点结果人
+	4	盘点已结束	否		是	创建人,发起流程提交人,上传盘点结果人,审核盘点结果人
+
+18.活动管理	0	待产品部审核	是	有产品部审核权限的人	是
+	1	待采购定价	是	有采购定价权限的人	是
+	2	待财务定售价	是	有财务定售价权限的人	是
+	3	待活动价审核	是	有活动价审核权限的人	是
+	4	审核完成	否		是
+	5	活动未开始	否		是
+	6	活动进行中	否		是
+	7	活动已结束	否		是
+	8	审核未通过	否		是
+ *
+FKD  0待提交1待任务结束 2 待咨询确认 3议价待财务定价4 待主管确认5 待咨询确认定价6 咨询确认
+ * */
+return[
+    "order_type"=>[
+        'CGD'=>'采购单',
+        'BHD'=>'备库单',
+        'RKD'=>'入库单',
+        'XSQRD'=>'销售单',
+        'PDD'=>'盘点单',
+        'DBD'=>'调拨单',
+        'CKD'=>'出库单',
+        'XSTHD'=>'销售退货单',
+        'CGTHD'=>'采购退货单',
+        'CKTHD'=>'入库退货单',
+        'CGGCD'=>'采购工差单',
+        'XSGCD'=>'销售工差单',
+        "SHD"=>"售后单",
+        'PRO' => '项目',
+        'YJD' => '议价单',
+        'SPCB' => '商品成本',
+        'SPSX' => '商品上线',
+        'HD' => '活动流程 ',
+        'ZXD'=>'咨询单',
+        'FKD'=>'咨询反馈单',
+        'PRI'=>'项目商品',
+        'PRT'=>'项目毛利',
+        'PRP'=>'项目方案',
+        'LZJJ'=>'离职交接',
+    ],
+    "order_status" => [
+        "CGD" => ['新建', "已确认", "部分入库", '已完成','取消订单'],
+        'ZXD' => ['新建', '招标进行中', '招标已结束', '待选择商品', '已选商品待下单', '已成功转单', '已取消转单', '招标已暂停'],
+        "BHD" => ['新建','已提交待采购反馈','已生成采购单'],
+        "RKD" => ["新建待发货", "已发货待验货", "已验货待审核", "已审核待入库", "入库成功","待填写物流", "退货成功"],
+        "XSQRD" => ["新建待发货", '部分发货', '发货完成', '订单取消'],
+        "PDD" => ["新建待提交", '已提交待上传盘点结果', '已上传待审核盘点结果', '已审核待系统更新', '盘点结束'],
+        "DBD" => ["新建待提交", '已提交待入库方审核', '待出库方发货', '待入库验货', '待验货审核', '调拨完成'],
+        "CKD" => ["待采购", "待库管发货", '待收货', '已收货', '已退货'],
+        "CGTHD" => ["待发起", "待业务审核", '待告知财务', '完成'],
+        "XSTHD" => ["待提交", '待业务审核', '待专员审核', '待主管审核', '完成退货','业务驳回','采购驳回','专员驳回'],
+        "SHD" => ["待提交", '待业务审核', "待采购审核", "待设置仓库/同意退货", "待客户退货", "售后完成", '业务驳回', '采购驳回', '售后取消'],
+        "CGGCD" => ["待提交", "待业务审核", "工差单审核完成"],
+        "XSGCD" => ["待提交", "待业务审核","工差单审核完成"],
+        'PRO' => ['待提交', '待商品反馈', '待客户选择商品', '待方案制定', '待方案选择', '项目待下单', '项目已结束'],
+        'SPCB' => ['待审核', '审核通过', '基础修改待审核', '成本修改待审核', '基础修改驳回', '成本修改驳回', '审核驳回', '复制商品待编辑', '咨询商品待编辑'],
+        'SPSX' => ['待提交', '待完善成本', '待产品审核', '待财务定价', '待财务审核', '待上线', '上线成功', '审核驳回', '已下线'],
+        'HD' => ['待产品部审核', '待采购定价', '待财务定售价', '待活动价审核', '审核完成', '活动未开始', '活动进行中', '活动已结束', '审核未通过'],
+        'CKTHD' => ['待提交', '待验收', '待验收审核', '待业务审核', '退货完成'],
+        'YJD' => ['待业务主管审核', '业务主管通过', '待财务专员审核', '业务驳回', '财务专员通过','财务专员驳回','财务主管通过','待boss审核','财务主管驳回','boss审核通过','boss越线通过','boss驳回'],
+        'PRT' => ["待提交",'待设置','已设置'],
+        'PRI' => ['待提交','待反馈','待选择商品','已选择商品'],
+        'PRP' => ['待设计方案','待选择方案','待选择商品','已选择商品'],
+        'FKD' => ["待提交" ,"待任务结束" , "待咨询确认" ,"议价待财务定价","待主管确认", "待咨询确认定价","咨询确认"],
+    ],
+    "action_type"=>[
+        'create'=>'新建',
+        'edit'=>'编辑',
+        "status"=>'修改状态',
+        "del"=>"删除"
+    ]
+];

+ 136 - 0
config/process.php

@@ -0,0 +1,136 @@
+<?php
+/**CGD:状态 0 待发货 1发货中 2完成
+ * RKD:状态 0 取消发货 /待发货 1待验货 2 待审核 3入库完成
+ * BHD:更新状态0待申请,1申请备库待反馈,2已反馈 3采用反馈 4未采用
+ * FKD:更新状态0待申请,1采用,2未采用
+ * PDD:0新建 1发起/驳回 2待审核 3待入库 4入库盘点完成
+ * DBD: 审核状态 0取消 1发起 2入库审核 3出库方发货 4入库验货 5验货审核
+ * RKTHD:
+ * CGTHD:状态0待审核 1业务审核 2告知财务部门
+ * XSQRD:订单状态 0取消 1发起 2反馈物流费 3同意下单 4发货中 5已发货
+ * ZXQRD:0待发起 1待发货 2发货中 3部分发货 4已完成
+ * CKD:订单状态1已出库2验收3验收完成
+ * SHD:
+ *CGGCD:状态0取消1待通知采购部门2待通知财务部门3已完成
+ *ZXGCD:状态 0待发起 1待审核 2待业务通知3完成
+ */
+return [
+    'CGD'=>[
+        "0"=>0,
+        "1"=>1,
+        "2"=>2,
+        "3"=>[3,4],
+    ],
+    'SPCB'=>[
+        0=>[7,8],
+        1=>[0,2,3],
+        2=>[1,4,5,6]
+    ],
+    'SPSX'=>[
+        0=>1,
+        1=>2,
+        2=>3,
+        3=>4,
+        4=>5,
+        5=>[6,7,8],
+    ],
+    'PRO'=>[
+        0=>1,
+        1=>2,
+        2=>3,
+        3=>4,
+        4=>5,
+        5=>6,
+    ],
+    'YJD'=>[
+        0=>0,
+        1=>[1,2],
+        2=>[4,5],
+        3=>[6,7],
+        4=>[9,10,11,3,8]
+    ],
+    'BHD'=>[
+        0=>1,
+        1=>2,
+    ],
+    "XSQRD"=>[
+        0=>1,
+        1=>2,
+        2=>3,
+    ],
+    "QRD"=>[
+        0=>1,
+        1=>2,
+        2=>3,
+    ],
+    "CKD"=>[
+      0=>0,
+      1=>1,
+      2=>2,
+      3=>3,
+      4=>4
+    ],
+    "SHD"=>[
+        0=>1,
+        1=>2,
+        2=>3,
+        3=>4,
+        4=>[5,6,7,8]
+    ],
+    "CKTHD"=>[
+        0=>0,
+        1=>1,
+        2=>2,
+        3=>3,
+        4=>4,
+    ],
+    "XSTHD"=>[
+        0=>1,
+        1=>2,
+        2=>3,
+        3=>[4,5,6,7],
+    ],
+    "XSGCD"=>[
+        0=>1,
+        1=>2,
+    ],
+    "RKD"=>[
+        0=>0,
+        1=>1,
+        2=>2,
+        3=>3,
+        4=>5,
+        5=>[6,4]
+    ],
+    "CGGCD"=>[
+        0=>1,
+        1=>2,
+    ],
+    "DBD"=>[
+        0=>0,
+        1=>1,
+        2=>2,
+        3=>3,
+        4=>4,
+        5=>5,
+    ],
+    "PDD"=>[
+        0=>0,
+        1=>1,
+        2=>2,
+        3=>3,
+        4=>4,
+        5=>5,
+    ],
+    "HD"=>[
+        0=>0,
+        1=>1,
+        2=>2,
+        3=>3,
+        4=>[4,5,6,7,8]
+    ],
+    "PRT"=>[
+        0=>0,
+        1=>1
+    ],
+];

+ 45 - 0
config/route.php

@@ -0,0 +1,45 @@
+<?php
+// +----------------------------------------------------------------------
+// | 路由设置
+// +----------------------------------------------------------------------
+
+return [
+    // pathinfo分隔符
+    'pathinfo_depr'         => '/',
+    // URL伪静态后缀
+    'url_html_suffix'       => 'html',
+    // URL普通方式参数 用于自动生成
+    'url_common_param'      => true,
+    // 是否开启路由延迟解析
+    'url_lazy_route'        => false,
+    // 是否强制使用路由
+    'url_route_must'        => false,
+    // 合并路由规则
+    'route_rule_merge'      => false,
+    // 路由是否完全匹配
+    'route_complete_match'  => false,
+    // 访问控制器层名称
+    'controller_layer'      => 'controller',
+    // 空控制器名
+    'empty_controller'      => 'Error',
+    // 是否使用控制器后缀
+    'controller_suffix'     => false,
+    // 默认的路由变量规则
+    'default_route_pattern' => '[\w\.]+',
+    // 是否开启请求缓存 true自动缓存 支持设置请求缓存规则
+    'request_cache_key'     => false,
+    // 请求缓存有效期
+    'request_cache_expire'  => null,
+    // 全局请求缓存排除规则
+    'request_cache_except'  => [],
+    // 默认控制器名
+    'default_controller'    => 'Index',
+    // 默认操作名
+    'default_action'        => 'index',
+    // 操作方法后缀
+    'action_suffix'         => '',
+    // 默认JSONP格式返回的处理方法
+    'default_jsonp_handler' => 'jsonpReturn',
+    // 默认JSONP处理方法
+    'var_jsonp_handler'     => 'callback',
+];

+ 19 - 0
config/session.php

@@ -0,0 +1,19 @@
+<?php
+// +----------------------------------------------------------------------
+// | 会话设置
+// +----------------------------------------------------------------------
+
+return [
+    // session name
+    'name'           => 'PHPSESSID',
+    // SESSION_ID的提交变量,解决flash上传跨域
+    'var_session_id' => '',
+    // 驱动方式 支持file cache
+    'type'           => 'file',
+    // 存储连接标识 当type使用cache的时候有效
+    'store'          => null,
+    // 过期时间
+    'expire'         => 1440,
+    // 前缀
+    'prefix'         => '',
+];

+ 10 - 0
config/trace.php

@@ -0,0 +1,10 @@
+<?php
+// +----------------------------------------------------------------------
+// | Trace设置 开启调试模式后有效
+// +----------------------------------------------------------------------
+return [
+    // 内置Html和Console两种方式 支持扩展
+    'type'    => 'Html',
+    // 读取的日志通道名
+    'channel' => '',
+];

+ 25 - 0
config/view.php

@@ -0,0 +1,25 @@
+<?php
+// +----------------------------------------------------------------------
+// | 模板设置
+// +----------------------------------------------------------------------
+
+return [
+    // 模板引擎类型使用Think
+    'type'          => 'Think',
+    // 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法
+    'auto_rule'     => 1,
+    // 模板目录名
+    'view_dir_name' => 'view',
+    // 模板后缀
+    'view_suffix'   => 'html',
+    // 模板文件名分隔符
+    'view_depr'     => DIRECTORY_SEPARATOR,
+    // 模板引擎普通标签开始标记
+    'tpl_begin'     => '{',
+    // 模板引擎普通标签结束标记
+    'tpl_end'       => '}',
+    // 标签库标签开始标记
+    'taglib_begin'  => '{',
+    // 标签库标签结束标记
+    'taglib_end'    => '}',
+];

+ 2 - 0
extend/.gitignore

@@ -0,0 +1,2 @@
+*
+!.gitignore

+ 8 - 0
public/.htaccess

@@ -0,0 +1,8 @@
+<IfModule mod_rewrite.c>
+  Options +FollowSymlinks -Multiviews
+  RewriteEngine On
+
+  RewriteCond %{REQUEST_FILENAME} !-d
+  RewriteCond %{REQUEST_FILENAME} !-f
+  RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
+</IfModule>

BIN
public/favicon.ico


+ 24 - 0
public/index.php

@@ -0,0 +1,24 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006-2019 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+
+// [ 应用入口文件 ]
+namespace think;
+
+require __DIR__ . '/../vendor/autoload.php';
+
+// 执行HTTP应用并响应
+$http = (new App())->http;
+
+$response = $http->run();
+
+$response->send();
+
+$http->end($response);

+ 2 - 0
public/robots.txt

@@ -0,0 +1,2 @@
+User-agent: *
+Disallow:

+ 19 - 0
public/router.php

@@ -0,0 +1,19 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+// $Id$
+
+if (is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["SCRIPT_NAME"])) {
+    return false;
+} else {
+    $_SERVER["SCRIPT_FILENAME"] = __DIR__ . '/index.php';
+
+    require __DIR__ . "/index.php";
+}

+ 2 - 0
public/static/.gitignore

@@ -0,0 +1,2 @@
+*
+!.gitignore

+ 17 - 0
route/app.php

@@ -0,0 +1,17 @@
+<?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>
+// +----------------------------------------------------------------------
+use think\facade\Route;
+
+Route::get('think', function () {
+    return 'hello,ThinkPHP6!';
+});
+
+Route::get('hello/:name', 'index/hello');

+ 2 - 0
runtime/.gitignore

@@ -0,0 +1,2 @@
+*
+!.gitignore

+ 10 - 0
think

@@ -0,0 +1,10 @@
+#!/usr/bin/env php
+<?php
+namespace think;
+
+// 命令行入口文件
+// 加载基础文件
+require __DIR__ . '/vendor/autoload.php';
+
+// 应用初始化
+(new App())->console->run();

+ 1 - 0
view/README.md

@@ -0,0 +1 @@
+如果不使用模板,可以删除该目录