Parcourir la source

Merge branch 'feature/1511-goods-type-filter' into dev

theojeng il y a 3 ans
Parent
commit
e126d7d8f4

+ 3 - 3
backendApi/modules/v1/models/lists/bonus/BalanceList.php

@@ -133,7 +133,7 @@ class BalanceList extends \common\libs\dataList\DataList implements DataListInte
 //                    'headerOther' => ['width' => '150'],
 //                    'headerOther' => ['width' => '150'],
 //                ],
 //                ],
                 'BONUS' => [
                 'BONUS' => [
-                    'header' => '会员奖金余额',
+                    'header' => '奖金账户',
                     'value' => function($row) {
                     'value' => function($row) {
                         return (new Price([
                         return (new Price([
                             'value' => $row['BONUS'],
                             'value' => $row['BONUS'],
@@ -148,7 +148,7 @@ class BalanceList extends \common\libs\dataList\DataList implements DataListInte
                     ],
                     ],
                 ],
                 ],
                 'RECONSUME_POINTS' => [
                 'RECONSUME_POINTS' => [
-                    'header' => '会员复销点数',
+                    'header' => '复消积分',
                     'value' => function($row) {
                     'value' => function($row) {
                         return (new Price([
                         return (new Price([
                             'value' => $row['RECONSUME_POINTS'],
                             'value' => $row['RECONSUME_POINTS'],
@@ -178,7 +178,7 @@ class BalanceList extends \common\libs\dataList\DataList implements DataListInte
                     ],
                     ],
                 ],
                 ],
                 'CASH' => [
                 'CASH' => [
-                    'header' => '会员余额',
+                    'header' => '充值账户',
                     'value' => function($row) {
                     'value' => function($row) {
                         return (new Price([
                         return (new Price([
                             'value' => $row['CASH'],
                             'value' => $row['CASH'],

+ 5 - 5
backendApi/modules/v1/models/lists/shop/OrderList.php

@@ -167,7 +167,7 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                     'headerOther' => ['width' => '120'],
                     'headerOther' => ['width' => '120'],
                     'value' => function ($row) {
                     'value' => function ($row) {
                             if($row['ORDER_TYPE']=='ZC'){
                             if($row['ORDER_TYPE']=='ZC'){
-                                $orderType = '单';
+                                $orderType = '单';
                             }else{
                             }else{
 //                                $orderType = ($row['PAY_TYPE']=='cash') ? '重消' : '积分';
 //                                $orderType = ($row['PAY_TYPE']=='cash') ? '重消' : '积分';
                                 $orderType = '复消';
                                 $orderType = '复消';
@@ -180,14 +180,14 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                     'value' => function ($row) {
                     'value' => function ($row) {
                         switch ($row['PAY_TYPE']) {
                         switch ($row['PAY_TYPE']) {
                             case 'cash':
                             case 'cash':
-                                return '充值账户支付';
+                                return '充值账户';
                             case 'exchange':
                             case 'exchange':
-                                return '复消积分支付';
+                                return '复消积分';
                             default:
                             default:
-                                return '无业绩兑换点数支付';
+                                return '兑换点数';
                         }
                         }
                     },
                     },
-                    'headerOther' => ['width' => '190'],
+                    'headerOther' => ['width' => '120'],
                 ],
                 ],
                 'IS_AUTO' => [
                 'IS_AUTO' => [
                     'header' => 'Is Auto', // 是否自动
                     'header' => 'Is Auto', // 是否自动

+ 1 - 1
backendApi/modules/v1/models/lists/shop/OrderShopList.php

@@ -61,7 +61,7 @@ class OrderShopList extends \common\libs\dataList\DataList implements DataListIn
                     'header' => '订单类型',
                     'header' => '订单类型',
                     'headerOther' => ['width' => '120'],
                     'headerOther' => ['width' => '120'],
                     'value' => function ($row) {
                     'value' => function ($row) {
-                        return $row['PAY_TYPE']=='cash' ? '重消订单' : '积分订单';
+                        return $row['PAY_TYPE']=='cash' ? '复消' : '积分';
                     },
                     },
                 ],
                 ],
                 'CONSIGNEE' => [
                 'CONSIGNEE' => [

+ 2 - 2
backendEle/src/views/config/transfer.vue

@@ -96,7 +96,7 @@
         },
         },
         loading: true,
         loading: true,
         submitButtonStat: false,
         submitButtonStat: false,
-        allWallet:{'bonus':'会员账户','cash':'现金钱包','point':'复销点数'}
+        allWallet:{'bonus':'奖金账户','cash':'充值账户','point':'复消积分'}
       }
       }
     },
     },
     methods: {
     methods: {
@@ -133,4 +133,4 @@
 
 
 <style scoped>
 <style scoped>
 
 
-</style>
+</style>

+ 3 - 1
common/components/SwooleAsyncTimer.php

@@ -72,7 +72,9 @@ class SwooleAsyncTimer extends SwooleAsyncTimerComponent implements SocketInterf
             // 初始化备份历史奖金数据表
             // 初始化备份历史奖金数据表
 //            TaskFunc::initAutoBakBalance();
 //            TaskFunc::initAutoBakBalance();
             // 初始化自动发送钉钉推送消息
             // 初始化自动发送钉钉推送消息
-            TaskFunc::initAutoSendDingTalk();
+            if (YII_ENV == YII_ENV_PROD) {
+                TaskFunc::initAutoSendDingTalk();
+            }
         }
         }
     }
     }
 
 

+ 11 - 6
common/helpers/DingTalk.php

@@ -26,6 +26,7 @@ class DingTalk
 
 
     public static function sendNotice($message)
     public static function sendNotice($message)
     {
     {
+        $message['serverIP'] = $_SERVER['HTTP_HOST'];
         $data = [
         $data = [
             'msgtype' => 'text',
             'msgtype' => 'text',
             'text' => ['content' => $message],
             'text' => ['content' => $message],
@@ -36,13 +37,17 @@ class DingTalk
             ]
             ]
         ];
         ];
 
 
-        $result = self::request_by_curl(json_encode($data));
-
-        if ($result['errcode'] > 0) {
-            // 重新推送一次,如果失败,写错误日志
+        // 正式环境才发送
+        if (YII_ENV == YII_ENV_PROD) {
+            $data['serverAddr'] = $_SERVER['SERVER_ADDR'];
+            $data['serverName'] = $_SERVER['SERVER_NAME'];
             $result = self::request_by_curl(json_encode($data));
             $result = self::request_by_curl(json_encode($data));
-            if (!$result['errcode']) {
-                LoggerTool::error([$result, $message]);
+            if ($result['errcode'] > 0) {
+                // 重新推送一次,如果失败,写错误日志
+                $result = self::request_by_curl(json_encode($data));
+                if (!$result['errcode']) {
+                    LoggerTool::error([$result, $message]);
+                }
             }
             }
         }
         }
     }
     }

+ 3 - 1
common/libs/taskQueue/TaskFunc.php

@@ -62,8 +62,10 @@ class TaskFunc
      * 自动送钉钉提醒
      * 自动送钉钉提醒
      */
      */
     public static function autoSendDingTalkTable() {
     public static function autoSendDingTalkTable() {
+        $ip = 'https://fapi.ekhkad.com';
+//        $ip = 'http://16.163.228.151:8013';
         $curl = curl_init();
         $curl = curl_init();
-        curl_setopt($curl, CURLOPT_URL, 'http://16.163.228.151:8013/v1/site/send-notice');
+        curl_setopt($curl, CURLOPT_URL, $ip . '/v1/site/send-notice');
         curl_setopt($curl, CURLOPT_TIMEOUT, 5000);
         curl_setopt($curl, CURLOPT_TIMEOUT, 5000);
         curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
         curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
         curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
         curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);

+ 3 - 3
common/models/BalanceAudit.php

@@ -32,11 +32,11 @@ class BalanceAudit extends \common\components\ActiveRecord
     const TYPE = [
     const TYPE = [
         'bonus' => [
         'bonus' => [
             'name' => 'bonus',
             'name' => 'bonus',
-            'label' => '会员账户奖金',
+            'label' => '奖金账户',
         ],
         ],
         'reconsume_points' => [
         'reconsume_points' => [
             'name' => 'reconsume_points',
             'name' => 'reconsume_points',
-            'label' => '复销点数',
+            'label' => '复消积分',
         ],
         ],
         'exchange_points' => [
         'exchange_points' => [
             'name' => 'exchange_points',
             'name' => 'exchange_points',
@@ -44,7 +44,7 @@ class BalanceAudit extends \common\components\ActiveRecord
         ],
         ],
         'cash' => [
         'cash' => [
             'name' => 'cash',
             'name' => 'cash',
-            'label' => '会员账户余额',
+            'label' => '充值账户',
         ],
         ],
 //        'cf' => [
 //        'cf' => [
 //            'name' => 'cf',
 //            'name' => 'cf',

+ 1 - 0
common/models/Config.php

@@ -83,6 +83,7 @@ class Config extends \common\components\ActiveRecord
      * @return array|mixed|\yii\db\ActiveRecord[]
      * @return array|mixed|\yii\db\ActiveRecord[]
      */
      */
     public static function getFromCache(){
     public static function getFromCache(){
+//        Yii::$app->cache->delete(Cache::SYSTEM_CONFIG_KEY);
         $config = Yii::$app->cache->get(Cache::SYSTEM_CONFIG_KEY);
         $config = Yii::$app->cache->get(Cache::SYSTEM_CONFIG_KEY);
         if(!$config){
         if(!$config){
             // 获取配置
             // 获取配置

+ 10 - 1
console/controllers/ToolController.php

@@ -126,6 +126,13 @@ class ToolController extends BaseController
         echo '清空成功'.PHP_EOL;
         echo '清空成功'.PHP_EOL;
     }
     }
 
 
+    /**
+     * 清空缓存
+     */
+    public function actionClearConfigCache() {
+        \Yii::$app->cache->delete(Cache::SYSTEM_CONFIG_KEY);
+        echo '清空成功: ' . Cache::SYSTEM_CONFIG_KEY . PHP_EOL;
+    }
 
 
     /**
     /**
      * 重置接点和推荐数量
      * 重置接点和推荐数量
@@ -172,8 +179,10 @@ class ToolController extends BaseController
      * 自动送钉钉提醒
      * 自动送钉钉提醒
      */
      */
     public function actionAutoSendDingTalkTable() {
     public function actionAutoSendDingTalkTable() {
+//        $ip = 'http://16.163.228.151:8013';
+        $ip = 'https://fapi.ekhkad.com';
         $curl = curl_init();
         $curl = curl_init();
-        curl_setopt($curl, CURLOPT_URL, 'http://16.163.228.151:8013/v1/site/send-notice');
+        curl_setopt($curl, CURLOPT_URL, $ip . '/v1/site/send-notice');
         curl_setopt($curl, CURLOPT_TIMEOUT, 5000);
         curl_setopt($curl, CURLOPT_TIMEOUT, 5000);
         curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
         curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
         curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
         curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);

+ 5 - 5
frontendApi/modules/v1/controllers/ShopController.php

@@ -166,7 +166,7 @@ class ShopController extends BaseController {
         ]);
         ]);
         foreach ($data['list'] as $key => $value) {
         foreach ($data['list'] as $key => $value) {
             if($value['ORDER_TYPE']=='ZC'){
             if($value['ORDER_TYPE']=='ZC'){
-                $data['list'][$key]['ORDER_TYPE'] = '单';
+                $data['list'][$key]['ORDER_TYPE'] = '单';
             }else{
             }else{
 //                $data['list'][$key]['ORDER_TYPE'] = in_array($value['PAY_TYPE'], ['cash', 'paystack']) ? '复消': '积分';
 //                $data['list'][$key]['ORDER_TYPE'] = in_array($value['PAY_TYPE'], ['cash', 'paystack']) ? '复消': '积分';
                 $data['list'][$key]['ORDER_TYPE'] = '复消';
                 $data['list'][$key]['ORDER_TYPE'] = '复消';
@@ -175,7 +175,7 @@ class ShopController extends BaseController {
            //$data['list'][$key]['CITY_NAME'] = $value['CITY'] ? Region::getCnName($value['CITY']) : '';
            //$data['list'][$key]['CITY_NAME'] = $value['CITY'] ? Region::getCnName($value['CITY']) : '';
             //$data['list'][$key]['COUNTY_NAME'] = $value['COUNTY'] ? Region::getCnName($value['COUNTY']) : '';
             //$data['list'][$key]['COUNTY_NAME'] = $value['COUNTY'] ? Region::getCnName($value['COUNTY']) : '';
             $data['list'][$key]['PAY_AT'] = Date::convert($value['PAY_AT'],'Y-m-d H:i:s');
             $data['list'][$key]['PAY_AT'] = Date::convert($value['PAY_AT'],'Y-m-d H:i:s');
-            $data['list'][$key]['PAY_TYPE'] = $value['PAY_TYPE'] == 'cash' ? '消费点数支付' : ($value['PAY_TYPE'] == 'exchange' ? '复消点数支付' : '业绩兑换点数支付');
+            $data['list'][$key]['PAY_TYPE'] = $value['PAY_TYPE'] == 'cash' ? '消费点数' : ($value['PAY_TYPE'] == 'exchange' ? '复消点数' : '兑换点数');
         }
         }
         return static::notice($data);
         return static::notice($data);
     }
     }
@@ -187,7 +187,7 @@ class ShopController extends BaseController {
         $isStudio = User::getEnCodeInfo(\Yii::$app->user->id)['IS_STUDIO'];
         $isStudio = User::getEnCodeInfo(\Yii::$app->user->id)['IS_STUDIO'];
         $condition = " AND STATUS=1";
         $condition = " AND STATUS=1";
         if($isStudio==1){
         if($isStudio==1){
-            $condition .= " AND (FIND_IN_SET(2,GIFT_TYPE)>0 OR (FIND_IN_SET(4,GIFT_TYPE)>0)";
+            $condition .= " AND  (FIND_IN_SET(4,GIFT_TYPE)>0";
         }
         }
         $condition.= ")";
         $condition.= ")";
 
 
@@ -196,7 +196,7 @@ class ShopController extends BaseController {
             'from' => ShopGoods::tableName(),
             'from' => ShopGoods::tableName(),
         ]);
         ]);
         foreach ($data['list'] as $key => $value) {
         foreach ($data['list'] as $key => $value) {
-            $data['list'][$key]['DISCOUNT'] = $value['SELL_DISCOUNT']*100;  
+            $data['list'][$key]['DISCOUNT'] = $value['SELL_DISCOUNT']*100;
         }
         }
         return static::notice($data);
         return static::notice($data);
     }
     }
@@ -239,4 +239,4 @@ class ShopController extends BaseController {
         }
         }
     }
     }
 
 
-}
+}

+ 1 - 9
frontendEle/src/views/shop/order-list.vue

@@ -69,15 +69,7 @@
   //
   //
       objectSpanMethod(obj) {
       objectSpanMethod(obj) {
 
 
-        if (
-          obj.columnIndex === 5 ||
-          obj.columnIndex === 6 ||
-          obj.columnIndex === 7 ||
-          obj.columnIndex === 8 ||
-          obj.columnIndex === 9 ||
-          obj.columnIndex === 10 ||
-          obj.columnIndex === 11
-        ) {
+        if (obj.columnIndex >= 5) {
           // ⼆维数组存储的数据取出
           // ⼆维数组存储的数据取出
           var _row = this.spanArr[obj.rowIndex];
           var _row = this.spanArr[obj.rowIndex];
           var _col = _row > 0 ? 1 : 0;
           var _col = _row > 0 ? 1 : 0;