Pārlūkot izejas kodu

Merge branch 'test' of 39.97.239.116:gyfl/apisongcan into test

stanley-king 4 gadi atpakaļ
vecāks
revīzija
4a0419371a

+ 36 - 0
application/index/controller/Cabinet.php

@@ -0,0 +1,36 @@
+<?php
+
+namespace app\index\controller;
+
+use think\Controller;
+
+class Cabinet extends Controller{
+
+    /**
+     * 检查取件码
+     */
+    public function check_fcode(){
+        $code = input('param.code');
+    }
+    /**
+     * 自提柜向服务器上报
+     */
+    public function record_store(){
+        $order_sn   = input('param.order_sn');
+        $trunk      = input('param.trunk');
+        $cabinet    = input('param.cabinet');
+
+        $state      = input('param.state');
+    }
+    /**
+     * 自提柜向服务器上报用户取走商品。
+    */
+    public function record_fetch(){
+        $trunk      = input('param.trunk');
+        $cabinet    = input('param.cabinet');
+        $state      = input('param.state');
+
+
+
+    }
+}

+ 16 - 0
application/index/controller/Order.php

@@ -0,0 +1,16 @@
+<?php
+
+namespace app\index\controller;
+
+use think\Controller;
+
+class Order extends Controller{
+
+    /**
+     * 验证订单是否存在
+    */
+    public function check_rcode(){
+        $order_sn = input('param.order_sn');
+
+    }
+}

+ 15 - 0
conf/crontab/debug-root

@@ -0,0 +1,15 @@
+# do daily/weekly/monthly maintenance
+# min	hour	day	month	weekday	command
+*/15	*	*	*	*	run-parts /etc/periodic/15min
+0	*	*	*	*	run-parts /etc/periodic/hourly
+0	2	*	*	*	run-parts /etc/periodic/daily
+0	3	*	*	6	run-parts /etc/periodic/weekly
+0	5	1	*	*	run-parts /etc/periodic/monthly
+0   3   *   *   *   php /var/www/html/crontab/index.php date index
+0   9   *   *   *   php /var/www/html/crontab/index.php date nine_clock
+0   10  *   *   *   php /var/www/html/crontab/index.php date ten_clock
+#*    *   *   *   *   php /var/www/html/crontab/index.php minutes index
+0   10-20/1 *   *   *   php /var/www/html/crontab/index.php hour index
+0   3   1   */1 *   php /var/www/html/crontab/index.php month index
+*    *   *   *   *   echo "test" >> /var/test.log
+

+ 10 - 0
conf/crontab/docker-start

@@ -0,0 +1,10 @@
+#!/bin/sh
+
+crond
+
+time=$(date "+%Y%m%d")
+if [ ! -f "/var/www/html/data/log/${time}-crontab.log" ]; then
+    touch "/var/www/html/data/log/${time}-crontab.log"
+fi
+
+tail -f "/var/www/html/data/log/${time}-crontab.log"

+ 15 - 0
conf/crontab/root

@@ -0,0 +1,15 @@
+# do daily/weekly/monthly maintenance
+# min	hour	day	month	weekday	command
+*/15	*	*	*	*	run-parts /etc/periodic/15min
+0	*	*	*	*	run-parts /etc/periodic/hourly
+0	2	*	*	*	run-parts /etc/periodic/daily
+0	3	*	*	6	run-parts /etc/periodic/weekly
+0	5	1	*	*	run-parts /etc/periodic/monthly
+0   3   *   *   *   php /var/www/html/crontab/index.php date index
+0   9   *   *   *   php /var/www/html/crontab/index.php date nine_clock
+0   10  *   *   *   php /var/www/html/crontab/index.php date ten_clock
+*    *   *   *   *   php /var/www/html/crontab/index.php minutes index
+0   10-20/1 *   *   *   php /var/www/html/crontab/index.php hour index
+0   3   1   */1 *   php /var/www/html/crontab/index.php month index
+*    *   *   *   *   echo "test" >> /var/test.log
+

+ 0 - 0
conf/nginx/lrlzssl/214455844540210.key


+ 0 - 0
conf/nginx/lrlzssl/214455844540210.pem


+ 12 - 9
conf/nginx/nginx-debug-http.conf

@@ -29,19 +29,19 @@ http
     {
     	listen       80;
         set  $folder_name /var/www/html/public;
-        server_name 192.168.1.200;
+        server_name 127.0.0.1;
         root $folder_name;
-        index index.html index.php; 
+        index index.html index.php;
     	client_max_body_size 100m;
     	proxy_connect_timeout 500s;
         proxy_read_timeout 500s;
         proxy_send_timeout 500s;
         fastcgi_connect_timeout 75;
-        fastcgi_read_timeout 600;   
-        fastcgi_send_timeout 600;   
+        fastcgi_read_timeout 600;
+        fastcgi_send_timeout 600;
 
         charset utf-8;
-        
+
         location /logs {
             deny all;
             return 403;
@@ -54,19 +54,22 @@ http
         location / {
             index  index.html index.htm index.php;
         }
-        
+
         location /mshop {
             root $folder_name;
-            autoindex on;        
+            autoindex on;
             index  index.html index.htm index.php;
 	        try_files $uri $uri/ /mshop/index.html;
         }
 
-        location ~ \.php$ {
-	        add_header Cache-Control no-store;
+        location ~ \.php {
+         add_header Cache-Control no-store;
+            set  $folder_name /var/www/html/public;
             root           $folder_name;
             fastcgi_pass   devfpm:9000;
             fastcgi_index  index.php;
+            fastcgi_split_path_info ^(.+\.php)(.*)$;
+            fastcgi_param PATH_INFO $fastcgi_path_info;
             fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
             include        fastcgi_params;
         }

+ 0 - 0
conf/php-fpm/docker-php-fpm-start


+ 0 - 0
conf/php/docker-php-spwan-start


+ 0 - 0
conf/php/docker-php-start


+ 1 - 1
conf/php/php.ini

@@ -1325,7 +1325,7 @@ bcmath.scale = 0
 ; http://php.net/session.save-handler
 ;session.save_handler = file
 session.save_handler = redis
-session.save_path = tcp://redisrv:6379
+session.save_path = tcp://devredis:6380
 
 ; Argument passed to save_handler.  In the case of files, this is the path
 ; where data files are stored. Note: Windows users have to change this

+ 13 - 1
conf/queue/docker-queue-start

@@ -1,6 +1,17 @@
 #!/bin/sh
 set -e
 
+<<<<<<< HEAD
+php /var/www/html/xyzshop/queue/index.php queue index
+
+time=$(date "+%Y%m%d")
+
+if [ ! -f "/var/www/html/xyzshop/data/log/${time}-queue.log" ]; then
+    touch "/var/www/html/xyzshop/data/log/${time}-queue.log"
+fi
+
+tail -f "/var/www/html/xyzshop/data/log/${time}-queue.log"
+=======
 php /var/www/html/queue/index.php queue index
 
 time=$(date "+%Y%m%d")
@@ -9,4 +20,5 @@ if [ ! -f "/var/www/html/data/log/${time}-queue.log" ]; then
     touch "/var/www/html/data/log/${time}-queue.log"
 fi
 
-tail -f "/var/www/html/data/log/${time}-queue.log"
+tail -f "/var/www/html/data/log/${time}-queue.log"
+>>>>>>> 228203e29f1a9f93eda3c1d8badd5fc640808e8c

+ 1 - 0
conf/redis/6380.conf

@@ -40,6 +40,7 @@
 
 # By default Redis does not run as a daemon. Use 'yes' if you need it.
 # Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
+
 daemonize no
 
 # When running daemonized, Redis writes a pid file in /var/run/redis.pid by

+ 13 - 0
conf/searcher/docker-search-start

@@ -0,0 +1,13 @@
+#!/bin/sh
+set -e
+
+php /var/www/html/xyzshop/searcher.php
+
+time=$(date "+%Y%m%d")
+appid='search'
+
+if [ ! -f "/var/www/html/xyzshop/data/log/${time}-${appid}.log" ]; then
+    touch "/var/www/html/xyzshop/data/log/${time}-${appid}.log"
+fi
+
+tail -f "/var/www/html/xyzshop/data/log/${time}-${appid}.log"

+ 28 - 13
docker-compose-mac.yml

@@ -17,24 +17,24 @@ services:
   devredis:
     image: redis:alpine
     ports:
-      - "6380:6379"
+      - "6380:6380"
     volumes:
       - $PWD/conf/etc/localtime:/etc/localtime:ro
     container_name: "dev-redis"
     command: [ "redis-server"]
 
   devfpm:
-      image: php-fpm:alpine
-      volumes:
-        - $PWD/conf/etc/localtime:/etc/localtime:ro
-        - $PWD:/var/www/html
-        - $PWD/conf/php-fpm/php-debug.ini:/usr/local/etc/php/php.ini
-        - $PWD/conf/php-fpm/php-fpm.conf:/usr/local/etc/php-fpm.conf
-        - $PWD/conf/php-fpm/docker-php-fpm-start:/usr/local/bin/docker-php-fpm-start
-      container_name: "dev-web"
-      command: [docker-php-fpm-start]
-      depends_on:
-        - devredis
+    image: php-fpm:alpine
+    volumes:
+      - $PWD/conf/etc/localtime:/etc/localtime:ro
+      - $PWD:/var/www/html
+      - $PWD/conf/php-fpm/php-debug.ini:/usr/local/etc/php/php.ini
+      - $PWD/conf/php-fpm/php-fpm.conf:/usr/local/etc/php-fpm.conf
+      - $PWD/conf/php-fpm/docker-php-fpm-start:/usr/local/bin/docker-php-fpm-start
+    container_name: "dev-web"
+    command: [docker-php-fpm-start]
+    depends_on:
+      - devredis
 
   devphp:
     image: php-zts-debug:7.3.18
@@ -46,5 +46,20 @@ services:
       - devredis
     container_name: "dev-php"
     depends_on:
+      - "devredis"
+
+  crontabsrv:
+    image: php-zts-debug:7.3.18
+    volumes:
+      - $PWD/conf/etc/localtime:/etc/localtime:ro
+      - $PWD:/var/www/html
+      - /Volumes/Transcend/upload:/var/www/html/data/upload
+      - $PWD/conf/php/php-debug.ini:/usr/local/etc/php/php.ini
+      - $PWD/conf/crontab/debug-root:/var/spool/cron/crontabs/root
+      - $PWD/conf/crontab/docker-start:/usr/local/bin/docker-start
+    links:
       - devredis
-      - devfpm
+    container_name: "dev-crontab"
+    command: [docker-start]
+    depends_on:
+      - "devredis"

+ 65 - 0
docker-compose-windows.yml

@@ -0,0 +1,65 @@
+version: "3.7"
+
+services:
+  devnginx:
+    image: nginx:alpine
+    ports:
+      - "8080:8080"
+    volumes:
+      - /d/phpstudy_pro/WWW/tp51/conf/etc/localtime:/etc/localtime:ro
+      - /d/phpstudy_pro/WWW/tp51/conf/nginx/nginx-debug-http.conf:/etc/nginx/nginx.conf:ro
+      - /d/phpstudy_pro/WWW/tp51:/var/www/html
+    links:
+      - devfpm
+    container_name: "dev-nginx"
+    command: [nginx,'-g','daemon off;']
+
+  devredis:
+    image: redis:alpine
+    ports:
+      - "6380:6380"
+    volumes:
+      - /d/phpstudy_pro/WWW/tp51/conf/etc/localtime:/etc/localtime:ro
+    container_name: "dev-redis"
+    command: [ "redis-server"]
+
+  devfpm:
+      image: php-fpm:alpine
+      volumes:
+        - /d/phpstudy_pro/WWW/tp51/conf/etc/localtime:/etc/localtime:ro
+        - /d/phpstudy_pro/WWW/tp51:/var/www/html
+        - /d/phpstudy_pro/WWW/tp51/conf/php-fpm/php-debug.ini:/usr/local/etc/php/php.ini
+        - /d/phpstudy_pro/WWW/tp51/conf/php-fpm/php-fpm.conf:/usr/local/etc/php-fpm.conf
+        - /d/phpstudy_pro/WWW/tp51/conf/php-fpm/docker-php-fpm-start:/usr/local/bin/docker-php-fpm-start
+      container_name: "dev-web"
+      command: [docker-php-fpm-start]
+      depends_on:
+        - devredis
+
+  devphp:
+    image: php-zts-debug:7.3.18
+    volumes:
+      - /d/phpstudy_pro/WWW/tp51/conf/etc/localtime:/etc/localtime:ro
+      - /d/phpstudy_pro/WWW/tp51/conf/php/php-debug.ini:/usr/local/etc/php/php.ini
+      - /d/phpstudy_pro/WWW/tp51:/var/www/html
+    links:
+      - devredis
+    container_name: "dev-php"
+    depends_on:
+      - "devredis"
+
+  crontabsrv:
+      image: php-zts-debug:7.3.18
+      volumes:
+        - /d/phpstudy_pro/WWW/tp51/conf/etc/localtime:/etc/localtime:ro
+        - /d/phpstudy_pro/WWW/tp51:/var/www/html
+        - /Volumes/Transcend/upload:/var/www/html/data/upload
+        - /d/phpstudy_pro/WWW/tp51/conf/php/php-debug.ini:/usr/local/etc/php/php.ini
+        - /d/phpstudy_pro/WWW/tp51/conf/crontab/debug-root:/var/spool/cron/crontabs/root
+        - /d/phpstudy_pro/WWW/tp51/conf/crontab/docker-start:/usr/local/bin/docker-start
+      links:
+        - devredis
+      container_name: "dev-crontab"
+      command: [docker-start]
+      depends_on:
+        - "devredis"