Browse Source

Merge branch 'raccount' into rchannel

xiaoyu 3 years ago
parent
commit
eb74582054

+ 1 - 1
core/framework/db/mysqli.php

@@ -147,7 +147,7 @@ class Db
                 }
             }
             else {
-                Log::record($sql . " [ RunTime:" . $staer->elapsed(6) . "s ]", Log::SQL);
+                Log::record($sql . " [{$host} RunTime:" . $staer->elapsed(6) . "s]", Log::SQL);
                 return $query;
             }
         } while (true);

+ 14 - 13
core/framework/libraries/model.php

@@ -780,7 +780,7 @@ class ModelDb
         if(is_mobile())
         {
             $sql = $this->buildSelectSql($options);
-            $result = DB::getAll($sql,($options['lock'] === true || $options['master'] === true || defined('TRANS_MASTER')) ? 'master' : 'slave');
+            $result = DB::getAll($sql,($options['lock'] === true || $options['master'] === true) ? 'master' : 'slave');
             return $result;
         }
         else
@@ -794,7 +794,7 @@ class ModelDb
                     return $_cache[$key];
                 }
             }
-            $result = DB::getAll($sql, ($options['lock'] === true || $options['master'] === true || defined('TRANS_MASTER')) ? 'master' : 'slave');
+            $result = DB::getAll($sql, ($options['lock'] === true || $options['master'] === true) ? 'master' : 'slave');
             if ($options['cache'] === true && !isset($_cache[$key])) {
                 $_cache[$key] = $result;
             }
@@ -823,21 +823,21 @@ class ModelDb
             ['%TABLE%','%DISTINCT%','%FIELD%','%JOIN%','%WHERE%','%GROUP%','%HAVING%','%ORDER%','%LIMIT%','%UNION%','%INDEX%'],
             [
                 $this->parseTable($options),
-                $this->parseDistinct(isset($options['distinct'])?$options['distinct']:false),
-                $this->parseField(isset($options['field'])?$options['field']:'*'),
-                $this->parseJoin(isset($options['on'])?$options: []),
-                $this->parseWhere(isset($options['where'])?$options['where']:''),
-                $this->parseGroup(isset($options['group'])?$options['group']:''),
-                $this->parseHaving(isset($options['having'])?$options['having']:''),
-                $this->parseOrder(isset($options['order'])?$options['order']:''),
-                $this->parseLimit(isset($options['limit'])?$options['limit']:''),
-                $this->parseUnion(isset($options['union'])?$options['union']:''),
-                $this->parseIndex(isset($options['index'])?$options['index']:'')
+                $this->parseDistinct(isset($options['distinct']) ? $options['distinct'] : false),
+                $this->parseField(isset($options['field']) ? $options['field'] : '*'),
+                $this->parseJoin(isset($options['on']) ? $options : []),
+                $this->parseWhere(isset($options['where']) ? $options['where'] : ''),
+                $this->parseGroup(isset($options['group']) ? $options['group'] : ''),
+                $this->parseHaving(isset($options['having']) ? $options['having'] : ''),
+                $this->parseOrder(isset($options['order']) ? $options['order'] : ''),
+                $this->parseLimit(isset($options['limit']) ? $options['limit'] : ''),
+                $this->parseUnion(isset($options['union']) ? $options['union'] : ''),
+                $this->parseIndex(isset($options['index']) ? $options['index'] : '')
             ],$sql);
         return $sql;
     }
 
-	protected function parseUnion(){
+	protected function parseUnion($value){
 		return '';
 	}
 
@@ -954,6 +954,7 @@ class ModelDb
                 {
                     // 查询字段的安全过滤
                     if(!preg_match('/^[A-Z_\|\&\-.a-z0-9]+$/',trim($key))){
+                        $error = "";
                         throw_exception($error);
                     }
                     // 多条件支持

+ 2 - 2
core/framework/libraries/uploadfile.php

@@ -387,7 +387,7 @@ class UploadFile
 			foreach ($dir_array as $k => $v){
 				$tmp_base_path = $tmp_base_path.DS.$v;
 				if(!is_dir($tmp_base_path)){
-					if (!@mkdir($tmp_base_path,0755,true)){
+					if (!@mkdir($tmp_base_path,0777,true)){
 						$this->setError('创建目录失败,请检查是否有写入权限');
 						return false;
 					}
@@ -397,7 +397,7 @@ class UploadFile
 		}
 
 		//设置权限
-		@chmod(BASE_UPLOAD_PATH.DS.$this->default_dir,0755);
+		@chmod(BASE_UPLOAD_PATH.DS.$this->default_dir,0777);
 
 		//判断文件夹是否可写
         if(!is_writable(BASE_UPLOAD_PATH.DS.$this->default_dir)) {

+ 0 - 2
crontab/index.php

@@ -15,8 +15,6 @@ require_once(BASE_ROOT_PATH . '/helper/img_helper.php');
 require_once(BASE_ROOT_PATH . '/helper/exceptionex.php');
 require_once(BASE_ROOT_PATH . '/helper/notify_helper.php');
 
-define('TRANS_MASTER',true);
-
 if (php_sapi_name() == 'cli') {
     $_GET['act'] = $_SERVER['argv'][1];
     $_GET['op'] = empty($_SERVER['argv'][2]) ? 'index' : $_SERVER['argv'][2];

+ 3 - 3
data/config/win/refill.ini.php

@@ -636,7 +636,7 @@ $zhongst_phone = ['name' => 'zhongst', 'store_id' => 39, 'qualitys' => '2',
 
         50 => [
             ['goods_id' => 6467, 'price' => 50.1, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6467, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6467, 'price' => 49.6, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6467, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
@@ -2519,8 +2519,8 @@ $jinfeng_phone = ['name' => 'jinfeng', 'store_id' => 125, 'qualitys' => '1',
         50 => [['goods_id' => 7095, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
         100 => [['goods_id' => 7096, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
         200 => [['goods_id' => 7097, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-//        300 => [['goods_id' => 7098, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-//        500 => [['goods_id' => 7099, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+        300 => [['goods_id' => 7098, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 7099, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 

+ 3 - 3
data/config/xyz/refill.ini.php

@@ -636,7 +636,7 @@ $zhongst_phone = ['name' => 'zhongst', 'store_id' => 39, 'qualitys' => '2',
 
         50 => [
             ['goods_id' => 6467, 'price' => 50.1, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6467, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6467, 'price' => 49.6, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6467, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
@@ -2519,8 +2519,8 @@ $jinfeng_phone = ['name' => 'jinfeng', 'store_id' => 125, 'qualitys' => '1',
         50 => [['goods_id' => 7095, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
         100 => [['goods_id' => 7096, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
         200 => [['goods_id' => 7097, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-//        300 => [['goods_id' => 7098, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-//        500 => [['goods_id' => 7099, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+        300 => [['goods_id' => 7098, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 7099, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 

+ 3 - 3
data/config/xyzadm/refill.ini.php

@@ -636,7 +636,7 @@ $zhongst_phone = ['name' => 'zhongst', 'store_id' => 39, 'qualitys' => '2',
 
         50 => [
             ['goods_id' => 6467, 'price' => 50.1, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6467, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6467, 'price' => 49.6, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6467, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
@@ -2519,8 +2519,8 @@ $jinfeng_phone = ['name' => 'jinfeng', 'store_id' => 125, 'qualitys' => '1',
         50 => [['goods_id' => 7095, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
         100 => [['goods_id' => 7096, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
         200 => [['goods_id' => 7097, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-//        300 => [['goods_id' => 7098, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-//        500 => [['goods_id' => 7099, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+        300 => [['goods_id' => 7098, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 7099, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 

+ 5 - 1
docker/compose/xyz/slave-crond/docker-compose.yml

@@ -11,4 +11,8 @@ services:
       - /nfs/upload:/var/www/html/data/upload
       - /mnt/shoplog:/var/www/html/data/log
     container_name: "panda-slavecron"
-    command: [crond,"-f"]
+    command: [crond,"-f"]
+    deploy:
+      resources:
+        limits:
+          cpus: '8'

+ 1 - 0
helper/login/mobile_log.php

@@ -13,6 +13,7 @@ class mobile_log extends ILogin
     private $mMobile;
     public function __construct($mobile)
     {
+        parent::__construct();
         $this->mMobile = $mobile;
     }
 

+ 1 - 0
helper/login/openid_log.php

@@ -13,6 +13,7 @@ class openid_log extends ILogin
     private $mOpenID;
     public function __construct($user_info)
     {
+        parent::__construct();
         $this->mOpenID = $user_info;
     }
 

+ 1 - 0
helper/login/unionid_log.php

@@ -14,6 +14,7 @@ class unionid_log extends ILogin
     private $mUnionID;
     public function __construct($unionid)
     {
+        parent::__construct();
         $this->mUnionID = $unionid;
     }
 

BIN
helper/refill/api/xyz/guochuang/20211120山西电信调价函.jpg


+ 1 - 1
helper/refill/api/xyz/guochuang/config.php

@@ -87,7 +87,7 @@ class config
         "5-10-1" => 9.99, "5-20-1" => 19.98, "5-30-1" => 29.97, "5-50-1" => 49.95, "5-100-1" => 99.9, "5-200-1" => 199.8, "5-300-1" => 299.7, "5-500-1" => 499.5,//北京 1
         "5-10-22" => 10.04, "5-20-22" => 20.08, "5-30-22" => 30.12, "5-50-22" => 50.2, "5-100-22" => 100.4, "5-200-22" => 200.8, "5-300-22" => 301.2, "5-500-22" => 502,//重庆 22
         //电信
-        "6-10-27" => 9.955, "6-20-27" => 19.91, "6-30-27" => 29.865, "6-50-27" => 49.775, "6-100-27" => 99.55, "6-200-27" => 199.1, "6-300-27" => 298.65, "6-500-27" => 497.75,//陕西 27
+        "6-10-27" => 9.928, "6-20-27" => 19.856, "6-30-27" => 29.784, "6-50-27" => 49.65, "6-100-27" => 99.28, "6-200-27" => 198.56, "6-300-27" => 297.84, "6-500-27" => 496.4,//陕西 27
         "6-10-4" => 9.935, "6-20-4" => 19.87, "6-30-4" => 29.805, "6-50-4" => 49.675, "6-100-4" => 99.35, "6-200-4" => 198.7, "6-300-4" => 298.05, "6-500-4" => 496.75,//山西 4
         "6-10-18" => 10.21, "6-20-18" => 20.22, "6-30-18" => 30.231, "6-50-18" => 50.25, "6-100-18" => 100.3, "6-200-18" => 200.3, "6-300-18" => 300.45, "6-500-18" => 500.75,//湖南 18
         "6-10-15" => 10.21, "6-20-15" => 20.22, "6-30-15" => 30.231, "6-50-15" => 50.25, "6-100-15" => 100.3, "6-200-15" => 200.3, "6-300-15" => 300.45, "6-500-15" => 500.75,//山东 15

+ 4 - 2
helper/refill/api/xyz/jinfeng/config.php

@@ -19,10 +19,12 @@ class config
             30 => 'CMCCALLr30r', 50 => 'CMCCALLr50r', 100 => 'CMCCALLr100r', 200 => 'CMCCALLr200r'
         ],
         mtopcard\ChinaUnicomCard => [
-            30 => 'CUCCALLr30r', 50 => 'CUCCALLr50r', 100 => 'CUCCALLr100r', 200 => 'CUCCALLr200r'
+            30 => 'CUCCALLr30r', 50 => 'CUCCALLr50r', 100 => 'CUCCALLr100r', 200 => 'CUCCALLr200r',
+            300 => 'CUCCALLr300r', 500 => 'CUCCALLr500r'
         ],
         mtopcard\ChinaTelecomCard => [
-            30 => 'CTCCALLr30r', 50 => 'CTCCALLr50r', 100 => 'CTCCALLr100r', 200 => 'CTCCALLr200r'
+            30 => 'CTCCALLr30r', 50 => 'CTCCALLr50r', 100 => 'CTCCALLr100r', 200 => 'CTCCALLr200r',
+            300 => 'CTCCALLr300r', 500 => 'CTCCALLr500r'
         ]
     ];