Browse Source

多语言功能

kevin_zhangl 2 years ago
parent
commit
8f772c04a0
67 changed files with 998 additions and 198 deletions
  1. 73 2
      backendApi/config/params.php
  2. 1 0
      backendApi/config/urlManagerRules.php
  3. 17 0
      backendApi/modules/v1/controllers/AdminController.php
  4. 1 1
      backendApi/modules/v1/controllers/BonusController.php
  5. 28 25
      backendApi/modules/v1/controllers/ConfigController.php
  6. 2 1
      backendApi/modules/v1/controllers/FileController.php
  7. 1 1
      backendApi/modules/v1/controllers/FinanceController.php
  8. 1 1
      backendApi/modules/v1/controllers/ReconsumeController.php
  9. 5 6
      backendApi/modules/v1/controllers/ShopController.php
  10. 13 11
      backendApi/modules/v1/controllers/SiteController.php
  11. 4 8
      backendApi/modules/v1/controllers/UserController.php
  12. 2 0
      backendApi/modules/v1/models/Admin.php
  13. 15 4
      backendApi/modules/v1/models/AdminForm.php
  14. 23 0
      backendApi/modules/v1/models/LoginForm.php
  15. 3 2
      backendApi/modules/v1/models/lists/bonus/FlowBonusList.php
  16. 2 1
      backendApi/modules/v1/models/lists/bonus/FlowExchangePointsList.php
  17. 2 1
      backendApi/modules/v1/models/lists/bonus/FlowReconsumePointsList.php
  18. 2 1
      backendApi/modules/v1/models/lists/bonus/OtherPeriodBonusList.php
  19. 2 1
      backendApi/modules/v1/models/lists/bonus/PeriodBonusList.php
  20. 1 1
      backendApi/modules/v1/models/lists/bonus/TraceDownBdList.php
  21. 1 1
      backendApi/modules/v1/models/lists/bonus/TraceDownGlList.php
  22. 1 1
      backendApi/modules/v1/models/lists/bonus/TraceDownQyList.php
  23. 1 1
      backendApi/modules/v1/models/lists/bonus/TraceDownTgList.php
  24. 1 1
      backendApi/modules/v1/models/lists/bonus/TraceDownXfList.php
  25. 1 1
      backendApi/modules/v1/models/lists/bonus/TraceDownYcList.php
  26. 1 1
      backendApi/modules/v1/models/lists/bonus/TraceDownYjList.php
  27. 1 1
      backendApi/modules/v1/models/lists/bonus/TraceUpBdList.php
  28. 1 1
      backendApi/modules/v1/models/lists/bonus/TraceUpGlList.php
  29. 1 1
      backendApi/modules/v1/models/lists/bonus/TraceUpGxList.php
  30. 1 1
      backendApi/modules/v1/models/lists/bonus/TraceUpQyList.php
  31. 1 1
      backendApi/modules/v1/models/lists/bonus/TraceUpTgList.php
  32. 1 1
      backendApi/modules/v1/models/lists/bonus/TraceUpXfList.php
  33. 1 1
      backendApi/modules/v1/models/lists/bonus/TraceUpYcList.php
  34. 1 1
      backendApi/modules/v1/models/lists/bonus/TraceUpYjList.php
  35. 2 2
      backendApi/modules/v1/models/lists/finance/BalanceAuditList.php
  36. 1 1
      backendApi/modules/v1/models/lists/shop/DecOrderList.php
  37. 2 2
      backendApi/modules/v1/models/lists/user/MoveList.php
  38. 99 34
      common/config/params.php
  39. 53 0
      common/helpers/Cache.php
  40. 46 4
      common/helpers/Tool.php
  41. 3 2
      common/helpers/user/Info.php
  42. 3 1
      common/helpers/user/Status.php
  43. 4 4
      common/libs/export/BaseExport.php
  44. 4 1
      common/libs/logging/operate/valueType/UserStatus.php
  45. 187 6
      common/messages/en-US/ctx.php
  46. 183 2
      common/messages/zh-CN/ctx.php
  47. 2 1
      common/models/BalanceAudit.php
  48. 21 0
      common/models/DealType.php
  49. 19 0
      common/models/DecRole.php
  50. 5 0
      common/models/DeclarationLevel.php
  51. 4 0
      common/models/EmployLevel.php
  52. 5 4
      common/models/PerfAudit.php
  53. 22 10
      common/models/Recharge.php
  54. 30 0
      common/models/RegType.php
  55. 23 0
      common/models/ShopGoods.php
  56. 4 0
      common/models/StarCrownLevel.php
  57. 25 2
      common/models/UserMove.php
  58. 2 2
      common/models/forms/ApproachOrderForm.php
  59. 2 2
      common/models/forms/BaApproachOrderForm.php
  60. 1 1
      common/models/forms/ChangeBalanceForm.php
  61. 3 3
      common/models/forms/OrderForm.php
  62. 1 4
      common/models/forms/ShopGoodsForm.php
  63. 4 4
      frontendApi/modules/v1/controllers/BaController.php
  64. 1 1
      frontendApi/modules/v1/controllers/FinanceController.php
  65. 15 15
      frontendApi/modules/v1/controllers/ShopController.php
  66. 4 3
      frontendApi/modules/v1/controllers/SiteController.php
  67. 6 6
      frontendApi/modules/v1/controllers/UserController.php

+ 73 - 2
backendApi/config/params.php

@@ -1,6 +1,77 @@
 <?php
 return [
     'adminEmail' => 'admin@example.com',
-    'noCheckTokenActions' => ['v1/oauth/login', 'v1/oauth/no-login-modify-password', 'v1/oauth/refresh-access-token', 'v1/oauth/refresh-refresh-token', 'v1/oauth/refresh-token', 'v1/site/days-diff', 'v1/site/page-data', 'v1/site/captcha', 'v1/site/send-notice', 'v1/ad/sort','v1/demo/payments','v1/demo/ipayments', 'v1/article/detail'],
-    'noCheckPermissionActions' => ['oauth/login', 'oauth/no-login-modify-password', 'oauth/refresh-access-token', 'oauth/refresh-refresh-token', 'oauth/refresh-token', 'oauth/info', 'site/base-info', 'site/days-diff', 'site/page-data', 'site/captcha', 'user/full-info', 'user/filter-user', 'user/generate-user-name', 'reconsume/cant-deduct-date', 'user/get-sub-com', 'user/chk-relation', 'user/get-period-num', 'user/company-bank-get', 'user/main-divide', 'user/chk-del-user', 'reconsume/deduct-audit-add', 'finance/perf-apply-get','file/upload-excel', 'user/move-net-type', 'user/move-get', 'user/reg-info-audit-get', 'user/status-audit-get', 'user/status-audit-get-statuses', 'user/close-login-get', 'user/close-dec-get', 'atlas/main-user-info', 'reconsume/change-audit-get', 'reconsume/cant-deduct-month', 'finance/change-balance-type', 'finance/balance-audit-get', 'file/token', 'finance/perf-audit-get', 'finance/invoice-audit-get', 'finance/withdraw-get', 'finance/deal-type-get', 'ad/upload', 'config/reg-type-get', 'config/pact-get', 'user/reg-info-audit-add-opt', 'reconsume/get-flow-deal-type', 'user/status-close-get', 'finance/mult-point', 'shop/upload', 'article/upload', 'site/send-notice', 'ad/sort','demo/payments','demo/ipayments', 'article/detail'],
+    'noCheckTokenActions' => [
+        'v1/oauth/login',
+        'v1/oauth/no-login-modify-password',
+        'v1/oauth/refresh-access-token',
+        'v1/oauth/refresh-refresh-token',
+        'v1/oauth/refresh-token',
+        'v1/site/days-diff',
+        'v1/site/page-data',
+        'v1/site/captcha',
+        'v1/site/send-notice',
+        'v1/ad/sort',
+        'v1/demo/payments',
+        'v1/demo/ipayments',
+        'v1/article/detail',
+        'v1/admin/change-language',
+    ],
+    'noCheckPermissionActions' => [
+        'oauth/login',
+        'oauth/no-login-modify-password',
+        'oauth/refresh-access-token',
+        'oauth/refresh-refresh-token',
+        'oauth/refresh-token',
+        'oauth/info',
+        'site/base-info',
+        'site/days-diff',
+        'site/page-data',
+        'site/captcha',
+        'user/full-info',
+        'user/filter-user',
+        'user/generate-user-name',
+        'reconsume/cant-deduct-date',
+        'user/get-sub-com',
+        'user/chk-relation',
+        'user/get-period-num',
+        'user/company-bank-get',
+        'user/main-divide',
+        'user/chk-del-user',
+        'reconsume/deduct-audit-add',
+        'finance/perf-apply-get',
+        'file/upload-excel',
+        'user/move-net-type',
+        'user/move-get',
+        'user/reg-info-audit-get',
+        'user/status-audit-get',
+        'user/status-audit-get-statuses',
+        'user/close-login-get',
+        'user/close-dec-get',
+        'atlas/main-user-info',
+        'reconsume/change-audit-get',
+        'reconsume/cant-deduct-month',
+        'finance/change-balance-type',
+        'finance/balance-audit-get',
+        'file/token',
+        'finance/perf-audit-get',
+        'finance/invoice-audit-get',
+        'finance/withdraw-get',
+        'finance/deal-type-get',
+        'ad/upload',
+        'config/reg-type-get',
+        'config/pact-get',
+        'user/reg-info-audit-add-opt',
+        'reconsume/get-flow-deal-type',
+        'user/status-close-get',
+        'finance/mult-point',
+        'shop/upload',
+        'article/upload',
+        'site/send-notice',
+        'ad/sort',
+        'demo/payments',
+        'demo/ipayments',
+        'article/detail',
+        'admin/change-language'
+    ],
 ];

+ 1 - 0
backendApi/config/urlManagerRules.php

@@ -263,6 +263,7 @@ return [
             'POST role-delete' => 'role-delete',
             'GET,POST role-permission/<id>' => 'role-permission',
             'GET,POST role-column/<id>' => 'role-column',
+            'POST change-language' => 'change-language'
         ],
     ],
     [

+ 17 - 0
backendApi/modules/v1/controllers/AdminController.php

@@ -334,4 +334,21 @@ class AdminController extends BaseController
 
         return $allRoleColumns;
     }
+
+    /**
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionChangeLanguage() {
+        $form = new AdminForm();
+        $form->scenario = 'changeLanguage';
+        $data = Yii::$app->request->post();
+        $adminName = $data['adminName'] ?? '';
+        if ($adminName && Yii::$app->request->isPost && $form->load($data, '') && $form->edit()){
+            return static::notice(Yii::t('ctx', 'successfully'));
+        } else {
+            return static::notice(Form::formatErrorsForApi($form->getErrors()), 400);
+        }
+    }
 }

+ 1 - 1
backendApi/modules/v1/controllers/BonusController.php

@@ -1936,7 +1936,7 @@ class BonusController extends BaseController {
             $data['REAL_NAME'] = Info::getUserRealNameByUserId($userId);
             $data['LAST_DEC_LV_NAME'] = Cache::getDecLevelConfig()[$data['LAST_DEC_LV']]['LEVEL_NAME']??'';
             $data['LAST_EMP_LV_NAME'] = Cache::getEmpLevelConfig()[$data['LAST_EMP_LV']]['LEVEL_NAME']??'';
-            $data['LAST_STATUS_NAME'] = \Yii::$app->params['userStatus'][$data['LAST_STATUS']]['label']??'';
+            $data['LAST_STATUS_NAME'] = Tool::paramConvert(Yii::$app->params['userStatus'])[$data['LAST_STATUS']]['label']??'';
             $data['AUDIT_STATUS'] = false;
             if ($resendQy = ResendQYAudit::find()->where('USER_ID=:USER_ID AND PERIOD_NUM=:PERIOD_NUM AND (AUDIT_STATUS=:AUDIT_STATUS_UN OR AUDIT_STATUS=:AUDIT_STATUS_TRUE)', [':USER_ID' => $userId, ':PERIOD_NUM' => $periodNum, ':AUDIT_STATUS_UN' => \Yii::$app->params['auditStatus']['un']['value'], ':AUDIT_STATUS_TRUE' => \Yii::$app->params['auditStatus']['true']['value']])->asArray()->one()) {
                 $data['AUDIT_STATUS'] = $resendQy['AUDIT_STATUS'];

+ 28 - 25
backendApi/modules/v1/controllers/ConfigController.php

@@ -88,6 +88,7 @@ class ConfigController extends BaseController {
             if ($config['INPUT_TYPE'] == Config::INPUT_TYPE_SWITCH) {
                 $configs[$key]['VALUE'] = boolval($config['VALUE']);
             }
+            $configs[$key]['TITLE'] = Yii::t('ctx', $config['LANGUAGE_KEY']);
         }
         return static::notice($configs);
     }
@@ -113,13 +114,14 @@ class ConfigController extends BaseController {
             if($config['INPUT_TYPE'] == Config::INPUT_TYPE_TABLE) {
                 $configs[$key]['VALUE'] = Json::decode($config['VALUE']);
             }
+            $configs[$key]['TITLE'] = Yii::t('ctx', $config['LANGUAGE_KEY']);
         }
         // 获取会员报单级别的相关参数
-        $decLevel = DeclarationLevel::find()->orderBy('SORT ASC')->asArray()->all();
+        $decLevel = Cache::getDecLevelConfig();
         // 获取会员聘级相关参数
-        $empLevel = EmployLevel::getAllDataWithNumIndex();
+        $empLevel = Cache::getEmpLevelConfig();
         // 获取会员星级相关参数
-        $crownLevel = StarCrownLevel::getAllDataWithNumIndex();
+        $crownLevel = Cache::getStarCrownLevelConfig();
         $result = [
             'config' => $configs,
             'decLevel' => $decLevel,
@@ -213,7 +215,7 @@ class ConfigController extends BaseController {
             if ($form->update()) {
                 Config::updateToCache();
                 // Log::adminHandle('更新封期参数', 1);
-                return static::notice('期数已开始更新');
+                return static::notice(Yii::t('ctx', 'successfully'));
             } else {
                 return static::notice(Form::formatErrorsForApi($form->getErrors()), 422);
             }
@@ -227,6 +229,7 @@ class ConfigController extends BaseController {
             if ($config['INPUT_TYPE'] == Config::INPUT_TYPE_SWITCH) {
                 $configs[$key]['VALUE'] = boolval($config['VALUE']);
             }
+            $configs[$key]['TITLE'] = Yii::t('ctx', $config['LANGUAGE_KEY']);
         }
         return static::notice($configs);
     }
@@ -270,7 +273,7 @@ class ConfigController extends BaseController {
     public function actionOcrApiEdit() {
         $id = Yii::$app->request->get('id');
         if (Yii::$app->request->isPost) {
-            return static::edit(OcrApiForm::class, 'OcrApi配置成功', null, null, null, function () {
+            return static::edit(OcrApiForm::class, Yii::t('ctx', 'successfully'), null, null, null, function () {
                 OcrApi::updateToCache();
                 // Log::adminHandle('编辑OCRAPI参数配置', 1);
             });
@@ -314,7 +317,7 @@ class ConfigController extends BaseController {
     public function actionSmsApiEdit() {
         $id = Yii::$app->request->get('id');
         if (Yii::$app->request->isPost) {
-            return static::edit(SmsApiForm::class, 'SmsApi配置成功', null, null, null, function () {
+            return static::edit(SmsApiForm::class, Yii::t('ctx', 'successfully'), null, null, null, function () {
                 SmsApi::updateToCache();
                 // Log::adminHandle('编辑SMSAPI参数配置', 1);
             });
@@ -343,7 +346,7 @@ class ConfigController extends BaseController {
         if (Yii::$app->request->post() && $form->load(Yii::$app->request->post(), '')) {
             if ($form->updateSms()) {
                 Config::updateToCache();
-                return static::notice('更新短信配置成功');
+                return static::notice(Yii::t('ctx', 'successfully'));
             } else {
                 return static::notice(Form::formatErrorsForApi($form->getErrors()), 422);
             }
@@ -390,6 +393,7 @@ class ConfigController extends BaseController {
             if ($config['INPUT_TYPE'] == Config::INPUT_TYPE_TABLE) {
                 $configs[$key]['VALUE'] = Json::decode($config['VALUE']);
             }
+            $configs[$key]['TITLE'] = Yii::t('ctx', $config['LANGUAGE_KEY']);
         }
         return static::notice($configs);
     }
@@ -407,7 +411,7 @@ class ConfigController extends BaseController {
         if (Yii::$app->request->post() && $form->load(Yii::$app->request->post(), '')) {
             if ($form->updateScore()) {
                 Config::updateToCache();
-                return static::notice('更新分数配置成功');
+                return static::notice(Yii::t('ctx', 'successfully'));
             } else {
                 return static::notice(Form::formatErrorsForApi($form->getErrors()), 422);
             }
@@ -422,6 +426,7 @@ class ConfigController extends BaseController {
             if ($config['INPUT_TYPE'] == Config::INPUT_TYPE_TABLE) {
                 $configs[$key]['VALUE'] = Json::decode($config['VALUE']);
             }
+            $configs[$key]['TITLE'] = Yii::t('ctx', $config['LANGUAGE_KEY']);
         }
         return static::notice($configs);
     }
@@ -459,10 +464,10 @@ class ConfigController extends BaseController {
                 $transaction->commit();
             } catch (Exception $e) {
                 $transaction->rollBack();
-                return static::notice('配置更新失败,请重试');
+                return static::notice(Yii::t('ctx', 'failed'));
             }
             // Log::adminHandle('更新其他配置参数', 1);
-            return static::notice('配置更新成功');
+            return static::notice(Yii::t('ctx', 'successfully'));
         }
         foreach ($configs as $key => $config) {
             if ($config['OPTIONS']) {
@@ -471,6 +476,7 @@ class ConfigController extends BaseController {
             if ($config['INPUT_TYPE'] == Config::INPUT_TYPE_SWITCH) {
                 $configs[$key]['VALUE'] = boolval($config['VALUE']);
             }
+            $configs[$key]['TITLE'] = Yii::t('ctx', $config['LANGUAGE_KEY']);
         }
         return static::notice($configs);
     }
@@ -481,10 +487,8 @@ class ConfigController extends BaseController {
      * @throws \yii\web\HttpException
      */
     public function actionDecLevel() {
-        $data = DeclarationLevel::lists('', [], [
-            'orderBy' => 'SORT ASC, CREATED_AT ASC'
-        ]);
-        return static::notice($data);
+        $data = Cache::getDecLevelConfig();
+        return static::notice(['list' => $data]);
     }
 
     public function actionMonthLimit() {
@@ -493,9 +497,9 @@ class ConfigController extends BaseController {
             $month = $postData['month'];
             $ret = Config::updateAll(['VALUE' => $month, 'UPDATED_AT' => Date::nowTime()], "CONFIG_NAME=:CONFIG_NAME", [':CONFIG_NAME' => 'observePeriodLimit']);
             if ($ret) {
-                return static::notice('更新观察期成功');
+                return static::notice(Yii::t('ctx', 'successfully'));
             } else {
-                return static::notice('更新观察期失败,请重试');
+                return static::notice(Yii::t('ctx', 'failed'));
             }
         }
         $data = Config::find()
@@ -524,10 +528,10 @@ class ConfigController extends BaseController {
                 [':CONFIG_NAME' => 'isOpenUpgrade']
             );
             if ($ret) {
-                $msg = $isOpen == 1 ? '开启' : '关闭';
-                return static::notice("$msg,操作成功");
+                $msg = $isOpen == 1 ? Yii::t('ctx', 'on') : Yii::t('ctx', 'off');
+                return static::notice(Yii::t('ctx', 'successfully'));
             } else {
-                return static::notice('操作失败,请重试');
+                return static::notice(Yii::t('ctx', 'failed'));
             }
         }
         return static::notice(Yii::t('ctx', 'illegalRequest'), 405);
@@ -539,10 +543,8 @@ class ConfigController extends BaseController {
      * @throws \yii\web\HttpException
      */
     public function actionDecRole() {
-        $data = DecRole::lists('', [], [
-            'orderBy' => 'SORT ASC'
-        ]);
-        return static::notice($data);
+        $data = Cache::getDecRoleConfig();
+        return static::notice(['list' => $data]);
     }
 
     /**
@@ -691,7 +693,7 @@ class ConfigController extends BaseController {
     public function actionSmsTemplateEdit() {
         $id = Yii::$app->request->get('id');
         if (Yii::$app->request->isPost) {
-            return parent::edit(SmsTemplateForm::class, '短信模板编辑成功', null, null, null, function () {
+            return parent::edit(SmsTemplateForm::class, Yii::t('ctx', 'successfully'), null, null, null, function () {
                 SmsTemplate::updateDecToCache();
                 SmsTemplate::updateEmpToCache();
                 // Log::adminHandle('编辑短信模板', 1);
@@ -845,7 +847,7 @@ class ConfigController extends BaseController {
         $content .= var_export($data, true);
         $content .= ";";
         file_put_contents($path, $content, LOCK_EX);
-        return static::notice('更新服务协议成功');
+        return static::notice(Yii::t('ctx', 'successfully'));
     }
 
     /**
@@ -869,6 +871,7 @@ class ConfigController extends BaseController {
         }
 
         $oneData = Config::find()->where('CONFIG_NAME=:CONFIG_NAME', [':CONFIG_NAME' => 'exchangeRate'])->asArray()->one();
+        $oneData['TITLE'] = Yii::t('ctx', $oneData['LANGUAGE_KEY']);
         return static::notice($oneData);
     }
 }

+ 2 - 1
backendApi/modules/v1/controllers/FileController.php

@@ -11,6 +11,7 @@ use backendApi\modules\v1\models\Admin;
 use common\helpers\Cache;
 use common\helpers\Excel;
 use common\helpers\http\RemoteUploadApi;
+use common\helpers\Tool;
 use common\models\ExcelImport;
 use common\models\Export;
 use common\models\ExportFile;
@@ -70,7 +71,7 @@ class FileController extends BaseController
         }
         // 全部模块
         //$data['allModuleName'] = Yii::$app->params['exportModule'];
-        $data['allModuleName'] = $this->returnAllModuleNameTranslate(Yii::$app->params['exportModule']);
+        $data['allModuleName'] = $this->returnAllModuleNameTranslate(Tool::paramConvert(\Yii::$app->params['exportModule']));
         return static::notice($data);
     }
 

+ 1 - 1
backendApi/modules/v1/controllers/FinanceController.php

@@ -575,7 +575,7 @@ class FinanceController extends BaseController {
                 ['LEFT JOIN', Withdraw::tableName() . ' AS W', 'IA.WITHDRAW_ID=W.ID'],
             ],
         ]);
-        $auditStatus = array_column(\Yii::$app->params['auditStatus'], null, 'value');
+        $auditStatus = array_column(Tool::paramConvert(\Yii::$app->params['auditStatus']), null, 'value');
         foreach ($data['list'] as $key => $value) {
             $data['list'][$key]['BASE_INFO'] = Info::baseInfoZh($value['USER_ID']);
             $data['list'][$key]['CREATE_ADMIN_NAME'] = Admin::getAdminNameById($value['CREATE_ADMIN']);

+ 1 - 1
backendApi/modules/v1/controllers/ReconsumeController.php

@@ -254,7 +254,7 @@ class ReconsumeController extends BaseController {
             'from' => ReconsumeAudit::tableName() . ' AS RA',
             'orderBy' => 'RA.CREATED_AT DESC',
         ]);
-        $auditStatus = array_column(\Yii::$app->params['auditStatus'], null, 'value');
+        $auditStatus = array_column(Tool::paramConvert(\Yii::$app->params['auditStatus']), null, 'value');
         foreach ($data['list'] as $key => $value) {
             $data['list'][$key]['BASE_INFO'] = Info::baseInfoZh($value['USER_ID']);
             $data['list'][$key]['CREATE_ADMIN_NAME'] = Admin::getAdminNameById($value['CREATE_ADMIN']);

+ 5 - 6
backendApi/modules/v1/controllers/ShopController.php

@@ -24,7 +24,6 @@ use common\helpers\Cache;
 use common\helpers\Form;
 use common\models\DeclarationPackage;
 use common\models\DecOrder;
-use common\models\forms\BaOrderDeleteForm;
 use common\models\forms\DecPackageForm;
 use common\models\forms\ExcelOrderDecForm;
 use common\models\forms\ExcelOrderShopForm;
@@ -117,8 +116,8 @@ class ShopController extends BaseController {
             }
         }
         return static::notice([
-            'sellType' => ShopGoods::SALE_TYPE,
-            'goodsType' => ShopGoods::GOODS_TYPE,
+            'sellType' => ShopGoods::getSaleType(),
+            'goodsType' => ShopGoods::getGoodType(),
             'giftType' => ShopGoods::getGiftType(),//ShopGoods::GIFT_TYPE,
             'categoryType' => ShopGoods::getCategoryType(),//ShopGoods::CATEGORY_TYPE,
         ]);
@@ -146,13 +145,13 @@ class ShopController extends BaseController {
         $data['SELL_TYPE'] = explode(',',$data['SELL_TYPE']);
         $data['GIFT_TYPE'] = explode(',',$data['GIFT_TYPE']);
         if ($data['TYPE'] == 1 || $data['TYPE'] == 2) {
-            $data['SELL_DISCOUNT'] = ShopGoods::GOODS_TYPE[$data['TYPE']]['discount']/100;
+            $data['SELL_DISCOUNT'] = ShopGoods::getGoodType()[$data['TYPE']]['discount']/100;
         }
         return static::notice(
             [
                 'goodsInfo'=>$data,
-                'sellType' => ShopGoods::SALE_TYPE,
-                'goodsType' => ShopGoods::GOODS_TYPE,
+                'sellType' => ShopGoods::getSaleType(),
+                'goodsType' => ShopGoods::getGoodType(),
                 'giftType' => ShopGoods::getGiftType(),//ShopGoods::GIFT_TYPE,
                 'categoryType' => ShopGoods::getCategoryType(),//ShopGoods::CATEGORY_TYPE,
             ]

+ 13 - 11
backendApi/modules/v1/controllers/SiteController.php

@@ -8,6 +8,7 @@
 namespace backendApi\modules\v1\controllers;
 
 use common\helpers\snowflake\PageSnowFake;
+use common\helpers\Tool;
 use common\models\DealType;
 use common\models\Period;
 use common\models\RegType;
@@ -72,11 +73,12 @@ class SiteController extends BaseController
         // 皇冠星级
         $crownLevels = Cache::getStarCrownLevelConfig();
         // 注册类型
-        $regTypes = RegType::getTypes();
-        // 类型
-        $dealTypes = DealType::getAllTypes();
+        $regTypes = Cache::getRegType();
+        // 交易类型
+        $dealTypes = Cache::getDealType();
         // 体系
-        $systems = UserSystem::getAllSystems();
+        $systems = [];
+//        $systems = UserSystem::getAllSystems();
         // 菜单
         $menu = require Yii::getAlias('@backendApi/config/menu.php');
         $menu = $this->_childMenu($menu);
@@ -87,16 +89,16 @@ class SiteController extends BaseController
         // 时间差
         $daysDiff = Yii::$app->params['daysDiff'];
         // 钱包
-        $shopWalletType = Yii::$app->params['shopWalletType'];
-        // 全部报单中心角色
-        $decRoles = DecRole::find()->where('1=1')->select('ID,ROLE_NAME')->indexBy('ID')->asArray()->all();
-        // 全部子公司
+        $shopWalletType = Tool::paramConvert(Yii::$app->params['shopWalletType']);
+        // 报单中心角色
+        $decRoles = Cache::getDecRoleConfig();
+        // 子公司
         $subCompanies = [];
-        // 全部会员状态
-        $allStatus = Yii::$app->params['userStatus'];
+        // 会员状态
+        $allStatus = Tool::paramConvert(Yii::$app->params['userStatus']);
         // 全部银行
         $allOpenBank = OpenBank::find()->where('1=1 AND STATUS=1')->select('BANK_NAME,BANK_CODE')->indexBy('BANK_CODE')->asArray()->all();
-        // 钱包
+        // 民族
         $allNation = Yii::$app->params['nation'];
         // 期数
         $period = Period::instance();

+ 4 - 8
backendApi/modules/v1/controllers/UserController.php

@@ -27,6 +27,7 @@ use common\helpers\Form;
 use common\helpers\http\BackendToFrontendApi;
 use common\helpers\Log;
 use common\helpers\NetPoint;
+use common\helpers\Tool;
 use common\helpers\user\Balance;
 use common\helpers\user\Cash;
 use common\helpers\user\Info;
@@ -782,12 +783,7 @@ class UserController extends BaseController
      */
     public function actionMoveNetType()
     {
-        $network = UserMove::TYPE_NAME;
-        foreach ($network as &$item) {
-            $item['name'] = Yii::t('ctx', $item['label']);
-        }
-
-        return static::notice(['netType' => $network]);
+        return static::notice(['netType' => UserMove::getNetWork()]);
     }
 
     /**
@@ -1948,7 +1944,7 @@ class UserController extends BaseController
      */
     public function actionStatusAuditGetStatuses()
     {
-        $statuses = Yii::$app->params['userStatus'];
+        $statuses = Tool::paramConvert(Yii::$app->params['userStatus']);
         return static::notice(['statuses' => $statuses]);
     }
 
@@ -1966,7 +1962,7 @@ class UserController extends BaseController
             return static::notice('The data does not exist', 400); // 数据不存在
         }
         $userStatusAudit['BASE_INFO'] = Info::baseInfoZh($userStatusAudit['USER_ID']);
-        $statuses = Yii::$app->params['userStatus'];
+        $statuses = Tool::paramConvert(Yii::$app->params['userStatus']);
         return static::notice([
             'id' => $userStatusAudit['ID'],
             'baseInfo' => $userStatusAudit['BASE_INFO'],

+ 2 - 0
backendApi/modules/v1/models/Admin.php

@@ -30,6 +30,7 @@ use common\libs\logging\operate\valueType\Config as ValueTypeConfig;
  * @property int $UPDATED_AT 更新时间
  * @property int $DELETED_AT 删除时间
  * @property int $IS_MODIFY_PASSWORD 是否修改密码
+ * @property string $LANG 语言标识
  */
 class Admin extends ActiveRecord
 {
@@ -87,6 +88,7 @@ class Admin extends ActiveRecord
             'UPDATED_AT' => '更新时间',
             'DELETED_AT' => '删除时间',
             'IS_MODIFY_PASSWORD' => '是否修改密码',
+            'LANG' => '语言标识',
         ];
     }
 

+ 15 - 4
backendApi/modules/v1/models/AdminForm.php

@@ -21,6 +21,7 @@ class AdminForm extends Model
     public $password;
     public $surePassword;
     public $roleId;
+    public $lang;
 
     public function init() {
         parent::init();
@@ -56,6 +57,7 @@ class AdminForm extends Model
             'edit' => ['id', 'password', 'surePassword', 'roleId', 'realName', 'remark', 'isEnable', 'isModifyPassword', 'bindIp'],
             'changePassword' => ['password', 'surePassword'],
             'noLoginModifyPassword' => ['adminName', 'oldPassword', 'password', 'surePassword'],
+            'changeLanguage' => ['adminName', 'lang'],
         ];
         return array_merge($parentScenarios, $customScenarios);
     }
@@ -112,20 +114,27 @@ class AdminForm extends Model
         } elseif($this->scenario == 'changePassword') {
             $model = Admin::findOne(['ID'=>\Yii::$app->user->id]);
         } elseif($this->scenario == 'noLoginModifyPassword') {
-            $model =  Admin::findOne(["ADMIN_NAME"=>$this->adminName]);
-            if( !$model ) {
+            $model = Admin::findOne(["ADMIN_NAME" => $this->adminName]);
+            if (!$model) {
                 $this->addError('noLoginModifyPassword', \Yii::t('ctx', 'memberNameDoesNotExist')); // 不存在的用户名
                 return null;
             }
-            if( $this->oldPassword === $this->password ) {
+            if ($this->oldPassword === $this->password) {
                 $this->addError('noLoginModifyPassword', \Yii::t('ctx', 'loginPasswordHasNotChanged')); // 登录密码没有发生改变
                 return null;
             }
-            if ( !$model->validatePassword($this->oldPassword) ) {
+            if (!$model->validatePassword($this->oldPassword)) {
                 $this->addError('noLoginModifyPassword', \Yii::t('ctx', 'oldLoginPasswordIncorrect')); // 原登录密码错误
                 return null;
             }
             $model->IS_MODIFY_PASSWORD = 0;
+        } else if ($this->scenario == 'changeLanguage') {
+            $model = Admin::findOne(["ADMIN_NAME" => $this->adminName]);
+            if (!$model) {
+                $this->addError('noLoginModifyPassword', \Yii::t('ctx', 'memberNameDoesNotExist')); // 不存在的用户名
+                return null;
+            }
+            $model->LANG = Tool::langConvert($this->lang);
         }else {
             $this->addError('id', \Yii::t('ctx', 'submissionDoesNotExist')); // 提交场景不存在
             return null;
@@ -177,6 +186,8 @@ class AdminForm extends Model
                 'adminName' => $model->ADMIN_NAME,
                 'remark' => '不登录重置密码',
             ]);
+        } elseif($this->scenario == 'changeLanguage') {
+
         }else{
             $this->adminOperateLogger->clean()->save([
                 'optType' => '重置密码',

+ 23 - 0
backendApi/modules/v1/models/LoginForm.php

@@ -2,6 +2,8 @@
 namespace backendApi\modules\v1\models;
 
 use common\components\Model;
+use common\helpers\LoggerTool;
+use common\helpers\Tool;
 use common\libs\LoginIpChecker;
 use Yii;
 use yii\base\Exception;
@@ -16,6 +18,7 @@ class LoginForm extends Model {
     public $adminName;
     public $password;
     public $verifyCode;
+    public $lang;
     private $_user;
 
     const ERROR_IS_MODIFY_PASSWORD = 'ERROR_IS_MODIFY_PASSWORD';
@@ -29,6 +32,7 @@ class LoginForm extends Model {
             'adminName' => '登录帐号',
             'password' => '登录密码',
             'verifyCode' => '验证码',
+            'lang' => '语言标识',
         ];
     }
     /**
@@ -98,6 +102,19 @@ class LoginForm extends Model {
             'LOGIN_NUMS' => 1,
         ], 'ADMIN_NAME=:ADMIN_NAME', ['ADMIN_NAME' => $this->adminName]);
     }
+
+    /**
+     * 更新系统语言类型
+     * @param $lang
+     * @return void
+     */
+    private function _updateLang($lang) {
+        $lang = Tool::langConvert($lang);
+        Admin::updateAll([
+            'LANG' => $lang,
+        ], 'ADMIN_NAME=:ADMIN_NAME', ['ADMIN_NAME' => $this->adminName]);
+    }
+
     /**
      * 登录
      * @return array|bool
@@ -135,6 +152,12 @@ class LoginForm extends Model {
             }
 
             $this->_updateSuccessTimes();
+
+            // 如果用户没有设置语言类型,则选择前端传递的语言类型,并存储到表中
+            if (!$this->_user['LANG']) {
+                $this->_updateLang($this->lang);
+            }
+
             $transaction->commit();
             AdminLoginLogger::success($this->_user);
 

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

@@ -3,6 +3,7 @@
 namespace backendApi\modules\v1\models\lists\bonus;
 
 use common\helpers\Cache;
+use common\helpers\Tool;
 use common\helpers\user\Info;
 use common\libs\dataList\column\Price;
 use common\libs\dataList\column\YesNo;
@@ -42,7 +43,7 @@ class FlowBonusList extends \common\libs\dataList\DataList implements DataListIn
             $this->listData['list'][$key]['DEAL_TYPE_NAME'] = DealType::getAllTypesForShow()[$value['DEAL_TYPE_ID']]['TYPE_NAME'] ?? '';
             $this->listData['list'][$key]['LAST_DEC_LV_NAME'] = Cache::getDecLevelConfig()[$value['LAST_DEC_LV']]['LEVEL_NAME'] ?? '';
             $this->listData['list'][$key]['LAST_EMP_LV_NAME'] = Cache::getEmpLevelConfig()[$value['LAST_EMP_LV']]['LEVEL_NAME'] ?? '';
-            $this->listData['list'][$key]['LAST_STATUS_NAME'] = \Yii::$app->params['userStatus'][$value['LAST_STATUS']]['label'] ?? '';
+            $this->listData['list'][$key]['LAST_STATUS_NAME'] = Tool::paramConvert(Yii::$app->params['userStatus'])[$value['LAST_STATUS']]['label'] ?? '';
         }
 
     }
@@ -210,7 +211,7 @@ class FlowBonusList extends \common\libs\dataList\DataList implements DataListIn
                 'AMOUNT' => ['isUserTable' => false, 'name' => Yii::t('ctx', 'debitCredit')], // 交易额
                 'TOTAL' => ['isUserTable' => false, 'name' => Yii::t('ctx', 'newBalance')], // 交易后余额
                 'ADMIN_NAME' => ['isUserTable' => false, 'name' => Yii::t('ctx', 'operator')], // 操作人
-                'REMARK' => ['isUserTable' => false, 'name' => Yii::t('ctx', 'remark')], // 备注
+                'REMARK' => ['isUserTable' => false, 'name' => Yii::t('ctx', 'remarks')], // 备注
                 'TRANSFER_SN' => ['isUserTable' => false, 'name' => Yii::t('ctx', 'serialNumber')], // 流水号
             ];
         }

+ 2 - 1
backendApi/modules/v1/models/lists/bonus/FlowExchangePointsList.php

@@ -3,6 +3,7 @@
 namespace backendApi\modules\v1\models\lists\bonus;
 
 use common\helpers\Cache;
+use common\helpers\Tool;
 use common\helpers\user\Info;
 use common\libs\dataList\column\Price;
 use common\libs\dataList\column\YesNo;
@@ -37,7 +38,7 @@ class FlowExchangePointsList extends \common\libs\dataList\DataList implements D
             $this->listData['list'][$key]['DEAL_TYPE_NAME'] = DealType::getAllTypesForShow()[$value['DEAL_TYPE_ID']]['TYPE_NAME'] ?? '';
             $this->listData['list'][$key]['LAST_DEC_LV_NAME'] = Cache::getDecLevelConfig()[$value['LAST_DEC_LV']]['LEVEL_NAME'] ?? '';
             $this->listData['list'][$key]['LAST_EMP_LV_NAME'] = Cache::getEmpLevelConfig()[$value['LAST_EMP_LV']]['LEVEL_NAME'] ?? '';
-            $this->listData['list'][$key]['LAST_STATUS_NAME'] = \Yii::$app->params['userStatus'][$value['LAST_STATUS']]['label'] ?? '';
+            $this->listData['list'][$key]['LAST_STATUS_NAME'] = Tool::paramConvert(Yii::$app->params['userStatus'])[$value['LAST_STATUS']]['label'] ?? '';
         }
     }
 

+ 2 - 1
backendApi/modules/v1/models/lists/bonus/FlowReconsumePointsList.php

@@ -3,6 +3,7 @@
 namespace backendApi\modules\v1\models\lists\bonus;
 
 use common\helpers\Cache;
+use common\helpers\Tool;
 use common\helpers\user\Info;
 use common\libs\dataList\column\Price;
 use common\libs\dataList\column\YesNo;
@@ -38,7 +39,7 @@ class FlowReconsumePointsList extends \common\libs\dataList\DataList implements
             $this->listData['list'][$key]['DEAL_TYPE_NAME'] = DealType::getAllTypesForShow()[$value['DEAL_TYPE_ID']]['TYPE_NAME'] ?? '';
             $this->listData['list'][$key]['LAST_DEC_LV_NAME'] = Cache::getDecLevelConfig()[$value['LAST_DEC_LV']]['LEVEL_NAME'] ?? '';
             $this->listData['list'][$key]['LAST_EMP_LV_NAME'] = Cache::getEmpLevelConfig()[$value['LAST_EMP_LV']]['LEVEL_NAME'] ?? '';
-            $this->listData['list'][$key]['LAST_STATUS_NAME'] = \Yii::$app->params['userStatus'][$value['LAST_STATUS']]['label'] ?? '';
+            $this->listData['list'][$key]['LAST_STATUS_NAME'] = Tool::paramConvert(Yii::$app->params['userStatus'])[$value['LAST_STATUS']]['label'] ?? '';
         }
     }
 

+ 2 - 1
backendApi/modules/v1/models/lists/bonus/OtherPeriodBonusList.php

@@ -3,6 +3,7 @@ namespace backendApi\modules\v1\models\lists\bonus;
 
 use backendApi\modules\v1\models\Admin;
 use common\helpers\Cache;
+use common\helpers\Tool;
 use common\helpers\user\Info;
 use common\libs\dataList\column\Price;
 use common\libs\dataList\column\YesNo;
@@ -56,7 +57,7 @@ class OtherPeriodBonusList extends \common\libs\dataList\DataList implements Dat
             foreach ($this->listData['list'] as $key => $value) {
                 $this->listData['list'][$key]['LAST_DEC_LV_NAME'] = Cache::getDecLevelConfig()[$value['LAST_DEC_LV']]['LEVEL_NAME'];
                 $this->listData['list'][$key]['LAST_EMP_LV_NAME'] = Cache::getEmpLevelConfig()[$value['LAST_EMP_LV']]['LEVEL_NAME'];
-                $this->listData['list'][$key]['LAST_STATUS_NAME'] = \Yii::$app->params['userStatus'][$value['LAST_STATUS']]['label'];
+                $this->listData['list'][$key]['LAST_STATUS_NAME'] = Tool::paramConvert(Yii::$app->params['userStatus'])[$value['LAST_STATUS']]['label'];
 
                 $this->listData['list'][$key]['LAST_REC_USER_NAME'] = Info::getUserNameByUserId($value['REC_UID']);
                 $this->listData['list'][$key]['LAST_REC_REAL_NAME'] = Info::getUserRealNameByUserId($value['REC_UID']);

+ 2 - 1
backendApi/modules/v1/models/lists/bonus/PeriodBonusList.php

@@ -3,6 +3,7 @@ namespace backendApi\modules\v1\models\lists\bonus;
 
 use backendApi\modules\v1\models\Admin;
 use common\helpers\Cache;
+use common\helpers\Tool;
 use common\helpers\user\Info;
 use common\libs\dataList\column\Price;
 use common\libs\dataList\column\YesNo;
@@ -57,7 +58,7 @@ class PeriodBonusList extends \common\libs\dataList\DataList implements DataList
                 $this->listData['list'][$key]['LAST_DEC_LV_NAME'] = Cache::getDecLevelConfig()[$value['LAST_DEC_LV']]['LEVEL_NAME'];
                 $this->listData['list'][$key]['LAST_EMP_LV_NAME'] = Cache::getEmpLevelConfig()[$value['LAST_EMP_LV']]['LEVEL_NAME'];
                 $this->listData['list'][$key]['LAST_CROWN_LV_NAME'] = Cache::getStarCrownLevelConfig()[$value['LAST_CROWN_LV']]['LEVEL_NAME'] ?? $value['LAST_CROWN_LV'];
-                $this->listData['list'][$key]['LAST_STATUS_NAME'] = \Yii::$app->params['userStatus'][$value['LAST_STATUS']]['label'];
+                $this->listData['list'][$key]['LAST_STATUS_NAME'] = Tool::paramConvert(Yii::$app->params['userStatus'])[$value['LAST_STATUS']]['label'];
 
                 $this->listData['list'][$key]['LAST_REC_USER_NAME'] = Info::getUserNameByUserId($value['REC_UID']);
                 $this->listData['list'][$key]['LAST_REC_REAL_NAME'] = Info::getUserRealNameByUserId($value['REC_UID']);

+ 1 - 1
backendApi/modules/v1/models/lists/bonus/TraceDownBdList.php

@@ -59,7 +59,7 @@ class TraceDownBdList extends \common\libs\dataList\DataList implements DataList
                 $data['list'][$key] = array_merge($userInfo, $value);
                 $data['list'][$key]['LAST_DEC_LV_NAME'] = Cache::getDecLevelConfig()[$value['LAST_FROM_DEC_LV']]['LEVEL_NAME'] ?? '';
                 $data['list'][$key]['LAST_EMP_LV_NAME'] = Cache::getEmpLevelConfig()[$value['LAST_FROM_EMP_LV']]['LEVEL_NAME'] ?? '';
-                $data['list'][$key]['LAST_STATUS_NAME'] = \Yii::$app->params['userStatus'][$value['LAST_FROM_STATUS']]['label'] ?? '';
+                $data['list'][$key]['LAST_STATUS_NAME'] = Tool::paramConvert(Yii::$app->params['userStatus'])[$value['LAST_FROM_STATUS']]['label'] ?? '';
             }
         }
         $this->listData = $data;

+ 1 - 1
backendApi/modules/v1/models/lists/bonus/TraceDownGlList.php

@@ -58,7 +58,7 @@ class TraceDownGlList extends \common\libs\dataList\DataList implements DataList
                 $data['list'][$key] = array_merge($userInfo, $value);
                 $data['list'][$key]['LAST_DEC_LV_NAME'] = Cache::getDecLevelConfig()[$value['LAST_FROM_DEC_LV']]['LEVEL_NAME'] ?? '';
                 $data['list'][$key]['LAST_EMP_LV_NAME'] = Cache::getEmpLevelConfig()[$value['LAST_FROM_EMP_LV']]['LEVEL_NAME'] ?? '';
-                $data['list'][$key]['LAST_STATUS_NAME'] = \Yii::$app->params['userStatus'][$value['LAST_FROM_STATUS']]['label'] ?? '';
+                $data['list'][$key]['LAST_STATUS_NAME'] = Tool::paramConvert(Yii::$app->params['userStatus'])[$value['LAST_FROM_STATUS']]['label'] ?? '';
             }
         }
         $this->listData = $data;

+ 1 - 1
backendApi/modules/v1/models/lists/bonus/TraceDownQyList.php

@@ -58,7 +58,7 @@ class TraceDownQyList extends \common\libs\dataList\DataList implements DataList
             foreach ($this->listData['list'] as $key => $value) {
                 $this->listData['list'][$key]['LAST_DEC_LV_NAME'] = $decConfig[$value['LAST_DEC_LV']]['LEVEL_NAME'] ?? '';
                 $this->listData['list'][$key]['LAST_EMP_LV_NAME'] = $empConfig[$value['LAST_EMP_LV']]['LEVEL_NAME'] ?? '';
-                $this->listData['list'][$key]['LAST_STATUS_NAME'] = \Yii::$app->params['userStatus'][$value['LAST_STATUS']]['label'] ?? '';
+                $this->listData['list'][$key]['LAST_STATUS_NAME'] = Tool::paramConvert(Yii::$app->params['userStatus'])[$value['LAST_STATUS']]['label'] ?? '';
             }
         }
     }

+ 1 - 1
backendApi/modules/v1/models/lists/bonus/TraceDownTgList.php

@@ -59,7 +59,7 @@ class TraceDownTgList extends \common\libs\dataList\DataList implements DataList
                 $data['list'][$key] = array_merge($userInfo, $value);
                 $data['list'][$key]['LAST_DEC_LV_NAME'] = Cache::getDecLevelConfig()[$value['LAST_FROM_DEC_LV']]['LEVEL_NAME'] ?? '';
                 $data['list'][$key]['LAST_EMP_LV_NAME'] = Cache::getEmpLevelConfig()[$value['LAST_FROM_EMP_LV']]['LEVEL_NAME'] ?? '';
-                $data['list'][$key]['LAST_STATUS_NAME'] = \Yii::$app->params['userStatus'][$value['LAST_FROM_STATUS']]['label'] ?? '';
+                $data['list'][$key]['LAST_STATUS_NAME'] = Tool::paramConvert(Yii::$app->params['userStatus'])[$value['LAST_FROM_STATUS']]['label'] ?? '';
             }
         }
         $this->listData = $data;

+ 1 - 1
backendApi/modules/v1/models/lists/bonus/TraceDownXfList.php

@@ -60,7 +60,7 @@ class TraceDownXfList extends \common\libs\dataList\DataList implements DataList
                 $data['list'][$key] = array_merge($userInfo, $value);
                 $data['list'][$key]['LAST_DEC_LV_NAME'] = Cache::getDecLevelConfig()[$value['LAST_FROM_DEC_LV']]['LEVEL_NAME'] ?? '';
                 $data['list'][$key]['LAST_EMP_LV_NAME'] = Cache::getEmpLevelConfig()[$value['LAST_FROM_EMP_LV']]['LEVEL_NAME'] ?? '';
-                $data['list'][$key]['LAST_STATUS_NAME'] = \Yii::$app->params['userStatus'][$value['LAST_FROM_STATUS']]['label'] ?? '';
+                $data['list'][$key]['LAST_STATUS_NAME'] = Tool::paramConvert(Yii::$app->params['userStatus'])[$value['LAST_FROM_STATUS']]['label'] ?? '';
             }
         }
         $this->listData = $data;

+ 1 - 1
backendApi/modules/v1/models/lists/bonus/TraceDownYcList.php

@@ -58,7 +58,7 @@ class TraceDownYcList extends \common\libs\dataList\DataList implements DataList
                 $data['list'][$key] = array_merge($userInfo, $value);
                 $data['list'][$key]['LAST_DEC_LV_NAME'] = Cache::getDecLevelConfig()[$value['LAST_FROM_DEC_LV']]['LEVEL_NAME'] ?? '';
                 $data['list'][$key]['LAST_EMP_LV_NAME'] = Cache::getEmpLevelConfig()[$value['LAST_FROM_EMP_LV']]['LEVEL_NAME'] ?? '';
-                $data['list'][$key]['LAST_STATUS_NAME'] = \Yii::$app->params['userStatus'][$value['LAST_FROM_STATUS']]['label'] ?? '';
+                $data['list'][$key]['LAST_STATUS_NAME'] = Tool::paramConvert(Yii::$app->params['userStatus'])[$value['LAST_FROM_STATUS']]['label'] ?? '';
             }
         }
         $this->listData = $data;

+ 1 - 1
backendApi/modules/v1/models/lists/bonus/TraceDownYjList.php

@@ -58,7 +58,7 @@ class TraceDownYjList extends \common\libs\dataList\DataList implements DataList
                 $data['list'][$key] = array_merge($userInfo, $value);
                 $data['list'][$key]['LAST_DEC_LV_NAME'] = Cache::getDecLevelConfig()[$value['LAST_FROM_DEC_LV']]['LEVEL_NAME'] ?? '';
                 $data['list'][$key]['LAST_EMP_LV_NAME'] = Cache::getEmpLevelConfig()[$value['LAST_FROM_EMP_LV']]['LEVEL_NAME'] ?? '';
-                $data['list'][$key]['LAST_STATUS_NAME'] = \Yii::$app->params['userStatus'][$value['LAST_FROM_STATUS']]['label'] ?? '';
+                $data['list'][$key]['LAST_STATUS_NAME'] = Tool::paramConvert(Yii::$app->params['userStatus'])[$value['LAST_FROM_STATUS']]['label'] ?? '';
             }
         }
         $this->listData = $data;

+ 1 - 1
backendApi/modules/v1/models/lists/bonus/TraceUpBdList.php

@@ -58,7 +58,7 @@ class TraceUpBdList extends \common\libs\dataList\DataList implements DataListIn
                 $data['list'][$key] = array_merge($userInfo, $value);
                 $data['list'][$key]['LAST_DEC_LV_NAME'] = Cache::getDecLevelConfig()[$value['LAST_DEC_LV']]['LEVEL_NAME'] ?? '';
                 $data['list'][$key]['LAST_EMP_LV_NAME'] = Cache::getEmpLevelConfig()[$value['LAST_EMP_LV']]['LEVEL_NAME'] ?? '';
-                $data['list'][$key]['LAST_STATUS_NAME'] = \Yii::$app->params['userStatus'][$value['LAST_STATUS']]['label'] ?? '';
+                $data['list'][$key]['LAST_STATUS_NAME'] = Tool::paramConvert(Yii::$app->params['userStatus'])[$value['LAST_STATUS']]['label'] ?? '';
             }
         }
         $this->listData = $data;

+ 1 - 1
backendApi/modules/v1/models/lists/bonus/TraceUpGlList.php

@@ -58,7 +58,7 @@ class TraceUpGlList extends \common\libs\dataList\DataList implements DataListIn
                 $data['list'][$key] = array_merge($userInfo, $value);
                 $data['list'][$key]['LAST_DEC_LV_NAME'] = Cache::getDecLevelConfig()[$value['LAST_DEC_LV']]['LEVEL_NAME'] ?? '';
                 $data['list'][$key]['LAST_EMP_LV_NAME'] = Cache::getEmpLevelConfig()[$value['LAST_EMP_LV']]['LEVEL_NAME'] ?? '';
-                $data['list'][$key]['LAST_STATUS_NAME'] = \Yii::$app->params['userStatus'][$value['LAST_STATUS']]['label'] ?? '';
+                $data['list'][$key]['LAST_STATUS_NAME'] = Tool::paramConvert(Yii::$app->params['userStatus'])[$value['LAST_STATUS']]['label'] ?? '';
             }
         }
         $this->listData = $data;

+ 1 - 1
backendApi/modules/v1/models/lists/bonus/TraceUpGxList.php

@@ -58,7 +58,7 @@ class TraceUpGxList extends \common\libs\dataList\DataList implements DataListIn
                 $data['list'][$key] = array_merge($userInfo, $value);
                 $data['list'][$key]['LAST_DEC_LV_NAME'] = Cache::getDecLevelConfig()[$value['LAST_DEC_LV']]['LEVEL_NAME'] ?? '';
                 $data['list'][$key]['LAST_EMP_LV_NAME'] = Cache::getEmpLevelConfig()[$value['LAST_EMP_LV']]['LEVEL_NAME'] ?? '';
-                $data['list'][$key]['LAST_STATUS_NAME'] = \Yii::$app->params['userStatus'][$value['LAST_STATUS']]['label'] ?? '';
+                $data['list'][$key]['LAST_STATUS_NAME'] = Tool::paramConvert(Yii::$app->params['userStatus'])[$value['LAST_STATUS']]['label'] ?? '';
             }
         }
         $this->listData = $data;

+ 1 - 1
backendApi/modules/v1/models/lists/bonus/TraceUpQyList.php

@@ -52,7 +52,7 @@ class TraceUpQyList extends \common\libs\dataList\DataList implements DataListIn
                 $data['list'][$key]['REAL_NAME'] = Info::getUserRealNameByUserId($value['USER_ID']);
                 $data['list'][$key]['LAST_DEC_LV_NAME'] = Cache::getDecLevelConfig()[$perfPeriod['LAST_DEC_LV']]['LEVEL_NAME'] ?? '';
                 $data['list'][$key]['LAST_EMP_LV_NAME'] = Cache::getEmpLevelConfig()[$perfPeriod['LAST_EMP_LV']]['LEVEL_NAME'] ?? '';
-                $data['list'][$key]['LAST_STATUS_NAME'] = \Yii::$app->params['userStatus'][$perfPeriod['LAST_STATUS']]['label'] ?? '';
+                $data['list'][$key]['LAST_STATUS_NAME'] = Tool::paramConvert(Yii::$app->params['userStatus'])[$perfPeriod['LAST_STATUS']]['label'] ?? '';
                 $data['list'][$key]['PV_1L_TOUCH'] = $perfPeriod['PV_1L_TOUCH'];
                 $data['list'][$key]['PV_2L_TOUCH'] = $perfPeriod['PV_2L_TOUCH'];
                 $data['list'][$key]['PV_3L_TOUCH'] = $perfPeriod['PV_3L_TOUCH'];

+ 1 - 1
backendApi/modules/v1/models/lists/bonus/TraceUpTgList.php

@@ -58,7 +58,7 @@ class TraceUpTgList extends \common\libs\dataList\DataList implements DataListIn
                 $data['list'][$key] = array_merge($userInfo, $value);
                 $data['list'][$key]['LAST_DEC_LV_NAME'] = Cache::getDecLevelConfig()[$value['LAST_DEC_LV']]['LEVEL_NAME'] ?? '';
                 $data['list'][$key]['LAST_EMP_LV_NAME'] = Cache::getEmpLevelConfig()[$value['LAST_EMP_LV']]['LEVEL_NAME'] ?? '';
-                $data['list'][$key]['LAST_STATUS_NAME'] = \Yii::$app->params['userStatus'][$value['LAST_STATUS']]['label'] ?? '';
+                $data['list'][$key]['LAST_STATUS_NAME'] = Tool::paramConvert(Yii::$app->params['userStatus'])[$value['LAST_STATUS']]['label'] ?? '';
             }
         }
         $this->listData = $data;

+ 1 - 1
backendApi/modules/v1/models/lists/bonus/TraceUpXfList.php

@@ -58,7 +58,7 @@ class TraceUpXfList extends \common\libs\dataList\DataList implements DataListIn
                 $data['list'][$key] = array_merge($userInfo, $value);
                 $data['list'][$key]['LAST_DEC_LV_NAME'] = Cache::getDecLevelConfig()[$value['LAST_DEC_LV']]['LEVEL_NAME'] ?? '';
                 $data['list'][$key]['LAST_EMP_LV_NAME'] = Cache::getEmpLevelConfig()[$value['LAST_EMP_LV']]['LEVEL_NAME'] ?? '';
-                $data['list'][$key]['LAST_STATUS_NAME'] = \Yii::$app->params['userStatus'][$value['LAST_STATUS']]['label'] ?? '';
+                $data['list'][$key]['LAST_STATUS_NAME'] = Tool::paramConvert(Yii::$app->params['userStatus'])[$value['LAST_STATUS']]['label'] ?? '';
             }
         }
         $this->listData = $data;

+ 1 - 1
backendApi/modules/v1/models/lists/bonus/TraceUpYcList.php

@@ -58,7 +58,7 @@ class TraceUpYcList extends \common\libs\dataList\DataList implements DataListIn
                 $data['list'][$key] = array_merge($userInfo, $value);
                 $data['list'][$key]['LAST_DEC_LV_NAME'] = Cache::getDecLevelConfig()[$value['LAST_DEC_LV']]['LEVEL_NAME'] ?? '';
                 $data['list'][$key]['LAST_EMP_LV_NAME'] = Cache::getEmpLevelConfig()[$value['LAST_EMP_LV']]['LEVEL_NAME'] ?? '';
-                $data['list'][$key]['LAST_STATUS_NAME'] = \Yii::$app->params['userStatus'][$value['LAST_STATUS']]['label'] ?? '';
+                $data['list'][$key]['LAST_STATUS_NAME'] = Tool::paramConvert(Yii::$app->params['userStatus'])[$value['LAST_STATUS']]['label'] ?? '';
             }
         }
         $this->listData = $data;

+ 1 - 1
backendApi/modules/v1/models/lists/bonus/TraceUpYjList.php

@@ -58,7 +58,7 @@ class TraceUpYjList extends \common\libs\dataList\DataList implements DataListIn
                 $data['list'][$key] = array_merge($userInfo, $value);
                 $data['list'][$key]['LAST_DEC_LV_NAME'] = Cache::getDecLevelConfig()[$value['LAST_DEC_LV']]['LEVEL_NAME'] ?? '';
                 $data['list'][$key]['LAST_EMP_LV_NAME'] = Cache::getEmpLevelConfig()[$value['LAST_EMP_LV']]['LEVEL_NAME'] ?? '';
-                $data['list'][$key]['LAST_STATUS_NAME'] = \Yii::$app->params['userStatus'][$value['LAST_STATUS']]['label'] ?? '';
+                $data['list'][$key]['LAST_STATUS_NAME'] = Tool::paramConvert(Yii::$app->params['userStatus'])[$value['LAST_STATUS']]['label'] ?? '';
             }
         }
         $this->listData = $data;

+ 2 - 2
backendApi/modules/v1/models/lists/finance/BalanceAuditList.php

@@ -48,13 +48,13 @@ class BalanceAuditList extends \common\libs\dataList\DataList implements DataLis
             'page' => $this->page,
             'pageSize' => $this->pageSize,
         ]);
-        $auditStatus = array_column(\Yii::$app->params['auditStatus'], null, 'value');
+        $auditStatus = array_column(Tool::paramConvert(\Yii::$app->params['auditStatus']), null, 'value');
         $dealTypes = DealType::getAllTypesForShow();
         foreach ($this->listData['list'] as $key => $value) {
             $this->listData['list'][$key]['LAST_DEC_LV_NAME'] = Cache::getDecLevelConfig()[$value['LAST_DEC_LV']]['LEVEL_NAME'] ?? '';
             $this->listData['list'][$key]['LAST_EMP_LV_NAME'] = Cache::getEmpLevelConfig()[$value['LAST_EMP_LV']]['LEVEL_NAME'] ?? '';
             $this->listData['list'][$key]['LAST_DEC_ROLE_NAME'] = DecRole::getRoleNameId($value['LAST_DEC_ROLE_ID']);
-            $this->listData['list'][$key]['TYPE_NAME'] = BalanceAudit::TYPE[$value['TYPE']]['label'];
+            $this->listData['list'][$key]['TYPE_NAME'] = BalanceAudit::getBalanceAuditType()[$value['TYPE']]['label'];
             $this->listData['list'][$key]['DEAL_TYPE_NAME'] = $dealTypes[$value['DEAL_TYPE']]['TYPE_NAME'];
             $this->listData['list'][$key]['AUDIT_STATUS_NAME'] = $auditStatus[$value['AUDIT_STATUS']]['label'];
         }

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

@@ -135,7 +135,7 @@ class DecOrderList extends \common\libs\dataList\DataList implements DataListInt
                         'width' => '110',
                     ],
                     'value' => function ($row) {
-                        return \Yii::$app->params['shopWalletType'][strtolower($row['PAID_WALLET'])]['title'] ?? '';
+                        return Tool::paramConvert(\Yii::$app->params['shopWalletType'])[strtolower($row['PAID_WALLET'])]['title'] ?? '';
                     },
                 ],
                 'REMARK' => [

+ 2 - 2
backendApi/modules/v1/models/lists/user/MoveList.php

@@ -90,7 +90,7 @@ class MoveList extends \common\libs\dataList\DataList implements DataListInterfa
                     'header' => Yii::t('ctx', 'position'),
                     'headerOther' => ['width' => '100'],
                     'value' => function($row) {
-                        return $row['LOCATION'] == 1 ? Yii::t('ctx', 'I. Market') : Yii::t('ctx', 'II. Market');
+                        return $row['LOCATION'] == 1 ? Yii::t('ctx', 'I.Market') : Yii::t('ctx', 'II.Market');
                     },
                 ],
                 'PERIOD_NUM' => [
@@ -123,7 +123,7 @@ class MoveList extends \common\libs\dataList\DataList implements DataListInterfa
                     'header' => Yii::t('ctx', 'status'),
                     'headerOther' => ['width' => '100'],
                     'value' => function ($row) {
-                        return UserMove::STATUS_NAME[$row['AUDIT_STATUS']];
+                        return UserMove::getStatusName()[$row['AUDIT_STATUS']];
                     },
                 ],
                 'AUDIT_ADMIN_NAME' => [

+ 99 - 34
common/config/params.php

@@ -44,108 +44,134 @@ return [
         'cash' =>[
             'value'=>'cash',
             'title'=>'Cash wallet',//现金钱包
+            'languageKey' => 'cashWallet',
         ],
     ],
     'shopFlowType' => [
         'remit' => [
             'value' => 'remit',
             'label' => 'Remittance recharge',//汇款充值
+            'languageKey' => 'shopFlowTypeRemittanceRecharge',
         ],
         'recharge' => [
             'value' => 'recharge',
-            'label' => 'Rhird-party recharge',//第三方充值
+            'label' => 'Third-party recharge',//第三方充值
+            'languageKey' => 'shopFlowTypeThirdPartyRecharge',
         ],
         'transfer_out' => [
             'value' => 'transfer_out',
             'label' => 'Transfer out',//转出
+            'languageKey' => 'shopFlowTypeTransferOut',
         ],
         'transfer_in' => [
             'value' => 'transfer_in',
-            'label' => 'Rransfer into',//转入
+            'label' => 'Transfer into',//转入
+            'languageKey' => 'shopFlowTypeTransferInto',
         ],
         'pay' => [
             'value' => 'pay',
             'label' => 'Pay',//支付
+            'languageKey' => 'shopFlowTypePay',
         ],
         'decRecharge' => [
             'value' => 'decRecharge',
             'label' => 'Welcome pack recharge',//报单充入
+            'languageKey' => 'shopFlowTypeWelcomePackRecharge',
         ],
         'orderRecharge' => [
             'value' => 'orderRecharge',
             'label' => 'Order recharge',//订货充入
+            'languageKey' => 'shopFlowTypeOrderRecharge',
         ],
         'freight' => [
             'value' => 'freight',
             'label' => 'Freight payment',//支付运费
+            'languageKey' => 'shopFlowTypeFreightPayment',
         ],
         'adjust_recharge' => [
             'value' => 'adjust_recharge',
             'label' => 'Adjusted recharge',//待调整充入
+            'languageKey' => 'shopFlowTypeAdjustedRecharge',
         ],
         'adjust_deduct' => [
             'value' => 'adjust_deduct',
             'label' => 'Adjusted deduct',//待调整扣除
+            'languageKey' => 'shopFlowTypeAdjustedDeduct',
         ],
         'adjust_transfer_out' => [
             'value' => 'adjust_transfer_out',
             'label' => 'Adjusted transfer out',//待调整转出
+            'languageKey' => 'shopFlowTypeAdjustedTransferOut',
         ],
         'adjust_transfer_in' => [
             'value' => 'adjust_transfer_in',
             'label' => 'Adjusted transfer in',//待调整转入
+            'languageKey' => 'shopFlowTypeAdjustedTransferIn',
         ],
         'exchange_recharge' => [
             'value' => 'exchange_recharge',
             'label' => 'Exchange recharge',//换货充入
+            'languageKey' => 'shopFlowTypeExchangeRecharge',
         ],
         'exchange_deduct' => [
             'value' => 'exchange_deduct',
             'label' => 'Exchange deduct',//换货扣除
+            'languageKey' => 'shopFlowTypeExchangeDeduct',
         ],
         'delete_order_deduct' => [
             'value' => 'delete_order_deduct',
             'label' => 'Delete order deduct',//删单自动扣除
+            'languageKey' => 'shopFlowTypeDeleteOrderDeduct',
         ],
         'delete_order_recharge' => [
             'value' => 'delete_order_recharge',
             'label' => 'Delete order recharge',//删单自动充入
+            'languageKey' => 'shopFlowTypeDeleteOrderRecharge',
         ],
         'delete_order_return' => [
             'value' => 'delete_order_return',
             'label' => 'Delete order return',//删单扣回
+            'languageKey' => 'shopFlowTypeDeleteOrderReturn',
         ],
         'repair_pay' => [
             'value' => 'repair_pay',
             'label' => 'Repair payment',//支付维修费
+            'languageKey' => 'shopFlowTypeRepairPayment',
         ],
         'after_sale_exchange_recharge' => [
             'value' => 'after_sale_exchange_recharge',
             'label' => 'After-sale exchange recharge',//售后调货充入
+            'languageKey' => 'shopFlowTypeAfterSaleExchangeRecharge',
         ],
         'after_sale_exchange_deduct' => [
             'value' => 'after_sale_exchange_deduct',
             'label' => 'After-sale exchange deduct',//售后调货扣费
+            'languageKey' => 'shopFlowTypeAfterSaleExchangeDeduct',
         ],
         'oms_deduct' => [
             'value' => 'oms_deduct',
             'label' => 'OMS deduct',//OMS扣款
+            'languageKey' => 'shopFlowTypeOMSDeduct',
         ],
         'deduct' => [
             'value' => 'deduct',
             'label' => 'Deduct',//扣除
+            'languageKey' => 'shopFlowTypeDeduct',
         ],
         'incr' => [
             'value' => 'incr',
             'label' => 'Increase',//增加
+            'languageKey' => 'shopFlowTypeIncrease',
         ],
         'other' => [
             'value' => 'other',
             'label' => 'Other',//其它
+            'languageKey' => 'shopFlowTypeOther',
         ],
         'handle' => [
             'value' => 'handle',
             'label' => 'Administrator manual adjustment',//管理员手动调整
+            'languageKey' => 'shopFlowTypeAdministratorManualAdjustment',
         ],
     ],
     'enableLog' => true,
@@ -162,44 +188,54 @@ return [
         0 => [
             'value' => '0',
             'label' => 'Inactive',//未激活
+            'languageKey' => 'userStatusInactive'
         ],
         1 => [
             'value' => '1',
             'label' => 'Normal',//正常
+            'languageKey' => 'userStatusNormal'
         ],
         2 => [
             'value' => '2',
             'label' => 'Logout',//注销
+            'languageKey' => 'userStatusLogout'
         ],
         3 => [
             'value' => '3',
             'label' => 'Blacklist',//黑名单
+            'languageKey' => 'userStatusBlacklist'
         ],
         4 => [
             'value' => '4',
             'label' => 'Suspended',//停发
+            'languageKey' => 'userStatusSuspended'
         ],
         9 => [
             'value' => '9',
             'label' => 'Permanent shut down',//永久关停
+            'languageKey' => 'userStatusPermanentShutDown'
         ],
     ],
     'bonusWalletType' => [
         'bonus' => [
             'name' => 'bonus',
             'label' => 'Account bonus',//会员账户奖金
+            'languageKey' => 'bonusWalletTypeAccountBonus'
         ],
         'reconsume_points' => [
             'name' => 'bonus',
             'label' => 'Reselling points balance',//复销积分余额
+            'languageKey' => 'bonusWalletTypeResellingPointsBalance'
         ],
         'cash' => [
             'name' => 'cash',
             'label' => 'Account Ecoin',//会员账户余额
+            'languageKey' => 'bonusWalletTypeAccountEcoin'
         ],
         'exchange_points' => [
             'name' => 'bonus',
             'label' => 'Exchange points balance',//兑换积分余额
+            'languageKey' => 'bonusWalletTypeExchangePointsBalance'
         ],
 //        'cf' => [
 //            'name' => 'cf',
@@ -212,136 +248,165 @@ return [
         'tourism_points' => [
             'name' => 'tourism_points',
             'label' => 'Travel points balance',//旅游积分余额
+            'languageKey' => 'bonusWalletTypeTravelPointsBalance'
         ],
         'garage_points' => [
             'name' => 'garage_points',
             'label' => 'Car points balance',//名车积分余额
+            'languageKey' => 'bonusWalletTypeCarPointsBalance'
         ],
         'villa_points' => [
             'name' => 'villa_points',
             'label' => 'Villa points balance',//豪宅积分余额
+            'languageKey' => 'bonusWalletTypeVillaPointsBalance'
         ],
     ],
     'auditStatus' => [
         'un' => [
             'value' => 0,
-            'label' => 'Unaudited'//未审核
+            'label' => 'Unaudited',//未审核
+            'languageKey' => 'auditStatusUnaudited',
         ],
         'true' => [
             'value' => 1,
-            'label' => 'Audited'//已审核
+            'label' => 'Audited',//已审核
+            'languageKey' => 'auditStatusAudited'
         ],
         'false' => [
             'value' => 2,
-            'label' => 'Audit failure'//审核失败
+            'label' => 'Audit failure',//审核失败
+            'languageKey' => 'auditStatusAuditFailure'
         ],
         'reject' => [
             'value' => 3,
-            'label' => 'Refused'//已拒绝
+            'label' => 'Refused',//已拒绝
+            'languageKey' => 'auditStatusRefused'
         ],
     ],
     // 发货状态
     'deliveryStatus' => [
         '0' => [
             'value' => 0,
-            'label' => 'Undelivered'//未发货
+            'label' => 'Undelivered',//未发货
+            'languageKey' => 'deliveryStatusUndelivered',
         ],
         'notDelivery' => [
             'value' => 0,
-            'label' => 'Undelivered'//未发货
+            'label' => 'Undelivered',//未发货
+            'languageKey' => 'deliveryStatusUndelivered',
         ],
         '1' => [
             'value' => 1,
-            'label' => 'Delivered'//已发货
+            'label' => 'Delivered',//已发货
+            'languageKey' => 'deliveryStatusDelivered',
         ],
         'delivered' => [
             'value' => 1,
-            'label' => 'Delivered'//已发货
+            'label' => 'Delivered',//已发货
+            'languageKey' => 'deliveryStatusDelivered',
         ],
         '2' => [
             'value' => 2,
-            'label' => 'Confirm receipt'//确认收货
+            'label' => 'Confirm receipt',//确认收货
+            'languageKey' => 'deliveryStatusConfirmReceipt',
         ],
         'confirm' => [
             'value' => 2,
-            'label' => 'Confirm receipt'//确认收货
+            'label' => 'Confirm receipt',//确认收货
+            'languageKey' => 'deliveryStatusConfirmReceipt',
         ],
     ],
     'orderStatus' => [
         '0' => [
             'value' => 0,
-            'label' => 'Unpaid'//待支付
+            'label' => 'Unpaid', //待支付
+            'languageKey' => 'orderStatusUnpaid',
         ],
         'notPaid' => [
             'value' => 0,
-            'label' => 'Unpaid'//待支付
+            'label' => 'Unpaid', //待支付
+            'languageKey' => 'orderStatusUnpaid',
         ],
         '1' => [
             'value' => 1,
-            'label' => 'Paid'//已支付
+            'label' => 'Paid', //已支付
+            'languageKey' => 'orderStatusPaid',
         ],
         'paid' => [
             'value' => 1,
-            'label' => 'Paid'//已支付
+            'label' => 'Paid', //已支付
+            'languageKey' => 'orderStatusPaid',
         ],
         // 此时进入发货流程参考发货状态
         '3' => [
             'value' => 3,
-            'label' => 'Logistics status'//物流状态
+            'label' => 'Logistics status', //物流状态
+            'languageKey' => 'orderStatusLogisticsStatus',
         ],
         'delivery' => [
             'value' => 3,
-            'label' => 'Logistics status'//物流状态
+            'label' => 'Logistics status', //物流状态
+            'languageKey' => 'orderStatusLogisticsStatus',
         ],
         '4' => [
             'value' => 4,
-            'label' => 'Order completion'//订单完成
+            'label' => 'Order completion', //订单完成
+            'languageKey' => 'orderStatusOrderCompletion',
         ],
         'complete' => [
             'value' => 4,
-            'label' => 'Order completion'//订单完成
+            'label' => 'Order completion', //订单完成
+            'languageKey' => 'orderStatusOrderCompletion',
         ],
         '5' => [
             'value' => 5,
-            'label' => 'Order cancellation',//订单取消
+            'label' => 'Order cancellation', //订单取消
+            'languageKey' => 'orderStatusOrderCancellation',
         ],
         'cancel' => [
             'value' => 5,
-            'label' => 'Order cancellation',//订单取消
+            'label' => 'Order cancellation', //订单取消
+            'languageKey' => 'orderStatusOrderCancellation',
         ],
         '6' => [
             'value' => 6,
-            'label' => 'Order deletion',//订单删除
+            'label' => 'Order deletion', //订单删除
+            'languageKey' => 'orderStatusOrderDeletion',
         ],
         'del' => [
             'value' => 6,
-            'label' => 'Order deletion',//订单删除
+            'label' => 'Order deletion', //订单删除
+            'languageKey' => 'orderStatusOrderDeletion',
         ],
         '7' => [
             'value' => 7,
-            'label' => 'Order refund',//订单退款
+            'label' => 'Order refund', //订单退款
+            'languageKey' => 'orderStatusOrderRefund',
         ],
         'refund' => [
             'value' => 7,
-            'label' => 'Order refund',//订单退款
+            'label' => 'Order refund', //订单退款
+            'languageKey' => 'orderStatusOrderRefund',
         ],
         '-1' => [
             'value' => -1,
-            'label' => 'Payment failed',//支付失败
+            'label' => 'Payment failed', //支付失败
+            'languageKey' => 'orderStatusPaymentFailed',
         ],
         'failPaid' => [
             'value' => -1,
-            'label' => 'Payment failed',//支付失败
+            'label' => 'Payment failed', //支付失败
+            'languageKey' => 'orderStatusPaymentFailed',
         ],
     ],
     'exportModule' => [
-        'shop' => ['label' =>  'Mall Management', 'value'=>'shop'],//商城管理
-        'user' => ['label' => 'Member Management', 'value'=>'user'],//会员管理
-        'atlas' => ['label' => 'Network Chart', 'value'=>'atlas'],//网络图谱
-        'reconsume' => ['label' => 'Resale management', 'value'=>'reconsume'],//复销管理
-        'bonus' => ['label' => 'Bonus management', 'value'=>'bonus'],//奖金管理
+        'shop' => ['label' =>  'Mall Management', 'value'=>'shop', 'languageKey' => 'exportModuleShop'],//商城管理
+        'user' => ['label' => 'Member Management', 'value'=>'user', 'languageKey' => 'exportModuleMember'],//会员管理
+        'atlas' => ['label' => 'Network Chart', 'value'=>'atlas', 'languageKey' => 'exportModuleNetwork'],//网络图谱
+        'reconsume' => ['label' => 'Resale Management', 'value'=>'reconsume', 'languageKey' => 'exportModuleResale'],//复销管理
+        'bonus' => ['label' => 'Bonus Management', 'value'=>'bonus', 'languageKey' => 'exportModuleBonus'],//奖金管理
         //'report' => ['label' => '报表管理', 'value'=>'report'],
-        'finance' => ['label' => 'financial management', 'value'=>'finance'],//财务管理
+        'finance' => ['label' => 'Financial Management', 'value'=>'finance', 'languageKey' => 'exportModuleShopFinancial'],//财务管理
         //'log' => ['label' => '日志管理', 'value'=>'log'],
     ],
     'snowFake' => [

+ 53 - 0
common/helpers/Cache.php

@@ -10,10 +10,13 @@ namespace common\helpers;
 
 use backendApi\modules\v1\models\AdminRole;
 use common\models\Config;
+use common\models\DealType;
+use common\models\DecRole;
 use common\models\OcrApi;
 use common\models\DeclarationLevel;
 use common\models\EmployLevel;
 use common\models\Region;
+use common\models\RegType;
 use common\models\SmsApi;
 use common\models\SmsTemplate;
 use common\models\StarCrownLevel;
@@ -39,6 +42,8 @@ class Cache
     const OCR_API_CONFIG_KEY = 'sys:ocrApi';
     const SMS_API_CONFIG_KEY = 'sys:smsApi';
     const REGION_CONFIG_KEY = 'sys:region';
+    const DEAL_TYPE_CONFIG_KEY = 'sys:dealType';
+    const REG_TYPE_CONFIG_KEY = 'sys:regType';
 
     const ASYNC_KEY_PREFIX = 'async_';
     const SOCKET_KEY_PREFIX = 'socket_';
@@ -123,6 +128,38 @@ class Cache
         return DeclarationLevel::updateToCache();
     }
 
+    /**
+     * 获取报单级别
+     * @return array|mixed|\yii\db\ActiveRecord[]
+     */
+    public static function getDecRoleConfig(){
+        return DecRole::getFromCache();
+    }
+
+    /**
+     *  更新报单级别
+     * @return array|\yii\db\ActiveRecord[]
+     */
+    public static function updateDecRoleConfig(){
+        return DecRole::updateToCache();
+    }
+
+    /**
+     * 获取报单级别
+     * @return array|mixed|\yii\db\ActiveRecord[]
+     */
+    public static function getDealType(){
+        return DealType::getFromCache();
+    }
+
+    /**
+     *  更新报单级别
+     * @return array|\yii\db\ActiveRecord[]
+     */
+    public static function updateDealType(){
+        return DealType::updateToCache();
+    }
+
     /**
      * 获取地区
      * @return array|mixed|\yii\db\ActiveRecord[]
@@ -180,6 +217,22 @@ class Cache
         return EmployLevel::updateToCache();
     }
 
+    /**
+     * 获取报单级别
+     * @return array|mixed|\yii\db\ActiveRecord[]
+     */
+    public static function getRegType(){
+        return RegType::getFromCache();
+    }
+
+    /**
+     *  更新报单级别
+     * @return array|\yii\db\ActiveRecord[]
+     */
+    public static function updateRegType(){
+        return RegType::updateToCache();
+    }
+
     /**
      * 获取用户基本信息
      * @param $userId

+ 46 - 4
common/helpers/Tool.php

@@ -11,6 +11,7 @@ namespace common\helpers;
 
 use common\models\ApproachOrderCall;
 use Faker\Provider\Uuid;
+use Yii;
 use yii\helpers\Url;
 use yii\httpclient\Client;
 use yii\mongodb\Exception;
@@ -371,10 +372,15 @@ class Tool {
             $text = preg_replace('/\,/', '|', $text);
         }
         // 只有是中文时才需要转码
-        if (!preg_match('/[\x{4e00}-\x{9fa5}]/u', $text)) {
-            return $text;
-        }
-        return mb_convert_encoding($text, 'gbk', 'utf-8');
+//        if (!preg_match('/[\x{4e00}-\x{9fa5}]/u', $text)) {
+//            return $text;
+//        }
+//        return mb_convert_encoding($text, 'gbk', 'utf-8');
+
+        $text = mb_convert_encoding($text, 'GBK', 'UTF-8');
+        $text = preg_replace("/(\+|%2A|%A3%A8|%A3%A9|%A1%A4)+/",'', urlencode($text));
+
+        return urldecode($text);
     }
 
     /**
@@ -453,6 +459,42 @@ class Tool {
         }
     }
 
+    /**
+     * 转换语言标识符
+     * @param string $lang 前端传入的语言标识符
+     * @return string
+     */
+    public static function langConvert(string $lang): string
+    {
+        switch ($lang) {
+            case 'zh':
+                return 'zh-CN';
+            case 'en':
+                return 'en-US';
+        }
+
+        return 'zh-CN';
+    }
+
+    /**
+     * 参数转换
+     * @param $params
+     * @return mixed
+     */
+    public static function paramConvert($params)
+    {
+        foreach ($params as &$item) {
+            if (isset($item['title']) && $item['title']) {
+                $item['title'] = Yii::t('ctx', $item['languageKey']);
+            }
+            if (isset($item['label']) && $item['label']) {
+                $item['label'] = Yii::t('ctx', $item['languageKey']);
+            }
+        }
+
+        return $params;
+    }
+
     /**
      * 格式化筛选
      * @param $selData

+ 3 - 2
common/helpers/user/Info.php

@@ -33,6 +33,7 @@ use common\models\UserNetwork;
 use common\models\UserRelation;
 use common\models\UserSystem;
 use common\models\UserWallet;
+use Yii;
 use yii\base\Exception;
 
 class Info {
@@ -164,7 +165,7 @@ class Info {
     public static function baseInfoZhByUserName($userName) {
         $baseInfo = self::baseInfoByUserName($userName);
         // 状态处理
-        $baseInfo['STATUS_NAME'] = \Yii::$app->params['userStatus'][$baseInfo['STATUS']]['label'];
+        $baseInfo['STATUS_NAME'] = Tool::paramConvert(Yii::$app->params['userStatus'])[$baseInfo['STATUS']]['label'];
         //登录状态
         $baseInfo['LOGIN_STATUS_NAME'] = $baseInfo['ALLOW_LOGIN'] == 0 ? '禁止登录' : '允许登录';
         // 子公司
@@ -230,7 +231,7 @@ class Info {
     public static function baseInfoZh($userId, $periodNum = null) {
         $baseInfo = self::baseInfo($userId, $periodNum);
         // 状态处理
-        $baseInfo['STATUS_NAME'] = \Yii::$app->params['userStatus'][$baseInfo['STATUS']]['label'];
+        $baseInfo['STATUS_NAME'] = Tool::paramConvert(Yii::$app->params['userStatus'])[$baseInfo['STATUS']]['label'];
         //登录状态
         $baseInfo['LOGIN_STATUS_NAME'] = $baseInfo['ALLOW_LOGIN'] == 0 ? '禁止登录' : '允许登录';
         // 子公司

+ 3 - 1
common/helpers/user/Status.php

@@ -10,6 +10,7 @@ namespace common\helpers\user;
 
 use common\helpers\Cache;
 use common\helpers\Date;
+use common\helpers\Tool;
 use common\models\forms\UserStatusForm;
 use common\models\PerfMonth;
 use common\models\Period;
@@ -18,6 +19,7 @@ use common\models\User;
 use common\models\UserClose;
 use common\models\UserInfo;
 use common\models\UserStatusAudit;
+use Yii;
 
 class Status
 {
@@ -131,7 +133,7 @@ class Status
             $users = User::find()->from(User::tableName() . ' AS U')->select('U.ID,U.STATUS,U.REAL_NAME,U.STATUS_AT')->where('U.STATUS=:STATUS AND U.STATUS_AT<:STATUS_AT AND UW.CLEAR_BY_CLOSED_AT=0',[':STATUS'=>UserStatusForm::STATUS_CLOSE,'STATUS_AT'=>Date::lastNumDay($days)])->join('LEFT JOIN',UserWallet::tableName().' AS UW','U.ID=UW.USER_ID')->asArray()->all();
         }
         foreach ($users as $k=>$u){
-            $users[$k]['STATUS_NAME'] = \Yii::$app->params['userStatus'][$u['STATUS']]['label'];
+            $users[$k]['STATUS_NAME'] = Tool::paramConvert(Yii::$app->params['userStatus'])[$u['STATUS']]['label'];
         }
         return $users;
     }

+ 4 - 4
common/libs/export/BaseExport.php

@@ -343,7 +343,7 @@ class BaseExport extends Component {
                     'CREATE_USER' => $columnData['CREATE_USER'],
                     'CREATE_USER_NAME' => $createUserName,
                     'SN' => $columnData['SN'],
-                    'STATUS' => \Yii::$app->params['orderStatus'][$columnData['STATUS']]['label'] ?? '',
+                    'STATUS' => Tool::paramConvert(\Yii::$app->params['orderStatus'])[$columnData['STATUS']]['label'] ?? '',
                     'SKU_CODE' => $columnData['SKU_CODE'],
                     'GOODS_TITLE' => Tool::mbSignConvert($columnData['GOODS_TITLE']) ,
                     'CONSIGNEE' => $columnData['CONSIGNEE'],
@@ -372,7 +372,7 @@ class BaseExport extends Component {
                     'ORDER_TRACK_NO' => $columnData['ORDER_TRACK_NO'],
                     'EXPRESS_TYPE' => $columnData['EXPRESS_TYPE'] == 0 ? 'mailing ':' auto pick',
                     'FRONT_REMARK' => $columnData['FRONT_REMARK'],
-                    'DELIVERY_STATUS_NAME' => \Yii::$app->params['deliveryStatus'][$columnData['DELIVERY_STATUS']]['label'] ?? '',
+                    'DELIVERY_STATUS_NAME' => Tool::paramConvert(\Yii::$app->params['deliveryStatus'])[$columnData['DELIVERY_STATUS']]['label'] ?? '',
                     'IS_AUTO' => $columnData['IS_AUTO'] == 1 ? 'Yes' : 'No',
                 ];
 
@@ -1219,7 +1219,7 @@ ORDER;
                     'CREATE_USER' => $columnData['CREATE_USER'],
                     'CREATE_USER_NAME' => $createUserName,
                     'SN' => $columnData['SN'],
-                    'STATUS' => \Yii::$app->params['orderStatus'][$columnData['STATUS']]['label'] ?? '',
+                    'STATUS' => Tool::paramConvert(\Yii::$app->params['orderStatus'])[$columnData['STATUS']]['label'] ?? '',
                     'SKU_CODE' => $columnData['SKU_CODE'],
                     'GOODS_TITLE' => $columnData['GOODS_TITLE'],
                     'BUY_NUMS' => $columnData['BUY_NUMS'],
@@ -1245,7 +1245,7 @@ ORDER;
                     'ORDER_TRACK_NO' => $columnData['ORDER_TRACK_NO'],
                     'EXPRESS_TYPE' => $columnData['EXPRESS_TYPE'] == 0 ? 'mailing ':' auto pick',
                     'FRONT_REMARK' => $columnData['FRONT_REMARK'],
-                    'DELIVERY_STATUS_NAME' => \Yii::$app->params['deliveryStatus'][$columnData['DELIVERY_STATUS']]['label'] ?? '',
+                    'DELIVERY_STATUS_NAME' => Tool::paramConvert(\Yii::$app->params['deliveryStatus'])[$columnData['DELIVERY_STATUS']]['label'] ?? '',
                 ];
                 
                 fputcsv($this->_fp, Tool::arrTextConvert($columnAccept));

+ 4 - 1
common/libs/logging/operate/valueType/UserStatus.php

@@ -9,10 +9,13 @@
 
 namespace common\libs\logging\operate\valueType;
 
+use common\helpers\Tool;
+use Yii;
+
 class UserStatus extends AbstractValueType {
     public function result(){
         $value = $this->getValue();
-        $userStatus = \Yii::$app->params['userStatus'];
+        $userStatus = Tool::paramConvert(Yii::$app->params['userStatus']);
         return $userStatus[$value]['label']??'';
     }
 }

+ 187 - 6
common/messages/en-US/ctx.php

@@ -21,7 +21,6 @@ return [
     'resetPwdSucessNotice' => 'Password reset successfully',
 
     #Finance
-    // 系统功能
     'commonModelsWithdrawStatusNameStatusApplied' => 'Applied',
     'commonModelsWithdrawStatusNameStatusAudited' => 'Withdrawal has been reviewed',
     'commonModelsWithdrawStatusNameStatusWaitPaid' => 'Unpaid',
@@ -108,6 +107,14 @@ return [
     'financeRechargeListStatusApproved' => 'Approved',
     'financeRechargeListStatusVoucherUploaded' => 'Voucher uploaded',
     'financeRechargeListStatusRejected' => 'Rejected',
+    'rechargeStatusTitle:0' => 'To be reviewed',
+    'rechargeStatusTitle:1' => 'Voucher uploaded',
+    'rechargeStatusTitle:2' => 'Approved',
+    'rechargeStatusTitle:3' => 'Rejected',
+    'rechargeStatus:0' => 'NEW',
+    'rechargeStatus:1' => 'PROCESSING',
+    'rechargeStatus:2' => 'SUCCESS',
+    'rechargeStatus:3' => 'FAILED',
 
     'memberEcoinAdjustmentListFileName'=> 'Member_Ecoin_adjustment_list',
     'applicationChangeBalanceSucceeded'=> 'Application for change of member balance succeeded',
@@ -174,9 +181,9 @@ return [
 
     # Internet function
     'numberOfLayers' => 'Number Of Layers',
-    'recommendedMemberNo'=>'Recommended Member No',
-    'nameRecommendedMember'=>'Name Of Recommended Member',
-    'recommendedMemberLevel' => 'Recommended Member Level',
+    'recommendedMemberNo'=>'Sponsor Member No',
+    'nameRecommendedMember'=>'Name Of Sponsor Member',
+    'recommendedMemberLevel' => 'Sponsor Member Level',
     'highestDirector' => 'Highest Director',
     'highestCrown' => 'Highest Crown',
     "joiningPeriod" => 'Joining Period',
@@ -217,6 +224,9 @@ return [
     'shopListPayTravelBonus' => 'Travel Bonus',
     'shopListPayCarFund' => 'Car Fund',
     'shopListPayVillaFund' => 'Villa Fund',
+    'shopListPayStack' => 'PayStack',
+    'shopGoodTypeDomestic' => '国内商品',
+    'shopGoodTypeImport' => '国内商品',
 
     'shopExportListName' => 'Goods_List',
     'shopProductAddSucceededNotice' => 'Product add succeeded',
@@ -540,8 +550,8 @@ return [
     'PCMemberLevel' => 'PC Member Level',
     'latestDirector' => 'Latest Director',
     'latestCrown' => 'Highest Crown',
-    'recommendationNo' => 'Recommendation No',
-    'recommendedName' => 'Recommended Name',
+    'recommendationNo' => 'Sponsor Code',
+    'recommendedName' => 'Sponsor Name',
     'placementNo' => 'Placement No',
     'placementName' => 'Placement Name',
     'resettlementArea' => 'Resettlement Area',
@@ -564,6 +574,10 @@ return [
     'reviewTime' => 'Review Time',
     'I.Market' => 'I. Market',
     'II.Market' => 'II. Market',
+    'userMoveAuditStatus:0' => 'To be reviewed',
+    'userMoveAuditStatus:1' => 'Approved',
+    'userMoveAuditStatus:2' => 'Failed',
+    'userMoveAuditStatus:3' => 'Audit reject',
 
     # Network
     'placementNetwork' => 'Placement Network',
@@ -648,4 +662,171 @@ return [
     'RMarketMonthlyRemainingDeclarationPerformance' => 'R. Market Monthly Remaining Declaration Performance',
     'monthlyNewTeamPerformance' => 'Monthly New Team Performance',
     'monthlyCumulativeTeamPerformance' => 'Monthly Cumulative Team Performance',
+
+    # 【数据表】
+    # 会员等级
+    'dbDeclarationLevelBA' => 'BA',
+    'dbDeclarationLevelElite' => 'Elite',
+    'dbDeclarationLevelPro' => 'Pro',
+    'dbDeclarationLevelVip' => 'Vip',
+    # 管理星级
+    'dbEmployLevelNoRank' => 'No Rank',
+    'dbEmployLevel1StarDirector'  => '1-Star Director',
+    'dbEmployLevel2StarDirector'  => '2-Star Director',
+    'dbEmployLevel3StarDirector'  => '3-Star Director',
+    'dbEmployLevel4StarDirector'  => '4-Star Director',
+    'dbEmployLevel5StarDirector'  => '5-Star Director',
+    'dbEmployLevel6StarDirector'  => '6-Star Director',
+    'dbEmployLevel7StarDirector'  => '7-Star Director',
+    # 皇冠星级
+    'dbCrownLevel0StarCrown' => '0-Star Crown',
+    'dbCrownLevel1StarCrown' => '1-Star Crown',
+    'dbCrownLevel2StarCrown' => '2-Star Crown',
+    'dbCrownLevel3StarCrown' => '3-Star Crown',
+    'dbCrownLevel4StarCrown' => '4-Star Crown',
+    'dbCrownLevel5StarCrown' => '5-Star Crown',
+    'dbCrownLevel6StarCrown' => '6-Star Crown',
+    'dbCrownLevel7StarCrown' => '7-Star Crown',
+    # 报单中心级别
+    'dbDecRole1stLevelStockist'	=> '1st Level Stockist',
+    'dbDecRole2stLevelStockist'	=> '2nd Level Stockist',
+    'dbDecRole3rdLevelStockist'	=> '3rd Level Stockist',
+    'dbDecRole4stLevelStockist'	=> '4th Level Stockist',
+    'dbDecRole5thLevelStockist'	=> '5th Level Stockist',
+    # 注册类型
+    'dbRegTypePersonal' => '个人',
+    'dbRegTypeBusiness' => '个体工商户',
+    'dbRegTypeCompany' => '公司',
+    # 交易类型
+    'dbConfigAllowWallet' => '转出转入配置',
+    'dbConfigAutoCalcPeriod' => '自动结算',
+    'dbConfigAutoClosePeriod' => '自动封期',
+    'dbConfigBackupTime' => '备份时间',
+    'dbConfigBackupWeekDate' => '备份星期',
+    'dbConfigBaseScore' => '基础分数配置',
+    'dbConfigBsNoPvPointsPercent' => '没有业绩的时候,蓝星奖金给多少业绩比例的兑换积分',
+    'dbConfigCalcYear' => '期数计算至年份',
+    'dbConfigCashReconsumeBonusPercent' => '现金购物PV算奖比例',
+    'dbConfigCloseDays' => '自动封期天数',
+    'dbConfigCloseTime' => '自动封期时间',
+    'dbConfigCloseWeekDate' => '自动封期星期',
+    'dbConfigDealSwitch' => '查看交易记录',
+    'dbConfigDecRoleBonusFrom' => '服务奖来源',
+    'dbConfigExchangeRate' => '汇率配置',
+    'dbConfigFlowBonusSwitch' => '奖金明细',
+    'dbConfigFreeShipping' => '商品免运费阈值',
+    'dbConfigFreight' => '商品运费',
+    'dbConfigFwCoefficientFromFxCash' => '服务奖现金复消系数',
+    'dbConfigFwCoefficientFromFxPoint' => '服务奖积分复消系数',
+    'dbConfigFwCoefficientFromZc' => '服务奖首购报单系数',
+    'dbConfigHistoryBonusLimit' => '奖金余额备份近几周',
+    'dbConfigIsCanTransferProp' => '是否开启单笔转账比例',
+    'dbConfigIsCanWithdrawBack' => '是否开启前台提现退回功能',
+    'dbConfigIsDecReg' => '只允许报单中心报单',
+    'dbConfigIsOpenUpgrade' => '是否开启会员升级单功能',
+    'dbConfigIsResaleUmbrella' => '是否只允许为伞下会员报复消单',
+    'dbConfigManageTaxPercent' => '管理费比例',
+    'dbConfigManualWithdrawMinAmount' => '手动提现最低金额',
+    'dbConfigMonthPcsPvFxCondition' => '每月个人总消费PV条件',
+    'dbConfigNewBonusSwitch' => '最新奖金',
+    'dbConfigObservePeriodLimit' => '观察期月份限制',
+    'dbConfigOpenFW' => '是否开启服务奖',
+    'dbConfigOpenGL' => '是否开启管理奖',
+    'dbConfigOpenGarage' => '车奖积分比例',
+    'dbConfigOpenGarageCap' => '车奖个人封顶值',
+    'dbConfigOpenQY' => '是否开启团队奖',
+    'dbConfigOpenQuarter' => '季度奖金',
+    'dbConfigOpenTG' => '是否开启推广奖',
+    'dbConfigOpenTourism' => '旅游积分比例',
+    'dbConfigOpenVilla' => '房奖积分比例',
+    'dbConfigOpenVillaCap' => '房奖个人封顶值',
+    'dbConfigPasswordRule' => '密码规则',
+    'dbConfigPastBonusSwitch' => '往期奖金',
+    'dbConfigPayPasswordRule' => '支付密码规则',
+    'dbConfigPvRatio' => 'PV比例',
+    'dbConfigReConsumePointsMonthCap' => '重复消费积分每月上限',
+    'dbConfigReConsumePointsPercent' => '重复消费积分比例',
+    'dbConfigRecPercent' => '推广奖比例',
+    'dbConfigShowBonusPeriodNum' => '前台可见往期奖金期数',
+    'dbConfigShowFlowPeriodNum' => '前台可见交易记录期数',
+    'dbConfigShowTransferPeriodNum' => '前台可见转账记录期数',
+    'dbConfigShowWithdrawPeriodNum' => '前台可见提现记录期数',
+    'dbConfigSiteClose' => '是否关闭网站',
+    'dbConfigSiteCloseInfo' => '关闭提示信息',
+    'dbConfigSiteTitle' => '网站标题',
+    'dbConfigTransferOpen' => '是否开启转账功能',
+    'dbConfigTransferRecordSwitch' => '前台转账记录开关',
+    'dbConfigTransferSwitch' => '前台我要转账开关',
+    'dbConfigWithdrawFee' => '提现手续费',
+    'dbConfigWithdrawFreezeDays' => '提现预付款天数',
+
+    # 【参数】
+    # 钱包类型
+    'cashWallet' => 'Cash wallet',
+    # 用户状态
+    'userStatusInactive' => 'Inactive',
+    'userStatusNormal' => 'Normal',
+    'userStatusLogout' => 'Logout',
+    'userStatusBlacklist' => 'Blacklist',
+    'userStatusSuspended' => 'Suspended',
+    'userStatusPermanentShutDown' => 'Permanent shut down',
+    # 奖金类型
+    'bonusWalletTypeAccountBonus' => 'Account bonus',
+    'bonusWalletTypeResellingPointsBalance' => 'Reselling points balance',
+    'bonusWalletTypeAccountEcoin' => 'Account Ecoin',
+    'bonusWalletTypeExchangePointsBalance' => 'Exchange points balance',
+    'bonusWalletTypeTravelPointsBalance' => 'Travel points balance',
+    'bonusWalletTypeCarPointsBalance' => 'Car points balance',
+    'bonusWalletTypeVillaPointsBalance' => 'Villa points balance',
+    # 审核状态
+    'auditStatusUnaudited' => 'Unaudited',
+    'auditStatusAudited' => 'Audited',
+    'auditStatusAuditFailure' => 'Audit failure',
+    'auditStatusRefused' => 'Refused',
+    # 发货状态
+    'deliveryStatusUndelivered' => 'Undelivered',
+    'deliveryStatusDelivered' => 'Delivered',
+    'deliveryStatusConfirmReceipt' => 'Confirm receipt',
+    # 导出模块
+    'exportModuleShop' => 'Mall Management',
+    'exportModuleMember' => 'Member Management',
+    'exportModuleNetwork' => 'Network Chart',
+    'exportModuleResale' => 'Resale Management',
+    'exportModuleBonus' => 'Bonus Management',
+    'exportModuleShopFinancial' => 'Financial Management',
+    # 订单状态
+    'orderStatusUnpaid' => 'Unpaid',
+    'orderStatusPaid' => 'Paid',
+    'orderStatusLogisticsStatus' => 'Logistics status',
+    'orderStatusOrderCompletion' => 'Order completion',
+    'orderStatusOrderCancellation' => 'Order cancellation',
+    'orderStatusOrderDeletion' => 'Order deletion',
+    'orderStatusOrderRefund' => 'Order refund',
+    'orderStatusPaymentFailed' => 'Payment failed',
+    # 流水类型
+    'shopFlowTypeRemittanceRecharge' => 'Remittance recharge',
+    'shopFlowTypeThirdPartyRecharge' => 'Rhird-party recharge',
+    'shopFlowTypeTransferOut' => 'Transfer out',
+    'shopFlowTypeTransferInto' => 'Transfer into',
+    'shopFlowTypePay' => 'Pay',
+    'shopFlowTypeWelcomePackRecharge' => 'Welcome pack recharge',
+    'shopFlowTypeOrderRecharge' => 'Order recharge',
+    'shopFlowTypeFreightPayment' => 'Freight payment',
+    'shopFlowTypeAdjustedRecharge' => 'Adjusted recharge',
+    'shopFlowTypeAdjustedDeduct' => 'Adjusted deduct',
+    'shopFlowTypeAdjustedTransferOut' => 'Adjusted transfer out',
+    'shopFlowTypeAdjustedTransferIn' => 'Adjusted transfer in',
+    'shopFlowTypeExchangeRecharge' => 'Exchange recharge',
+    'shopFlowTypeExchangeDeduct' => 'Exchange deduct',
+    'shopFlowTypeDeleteOrderDeduct' => 'Delete order deduct',
+    'shopFlowTypeDeleteOrderRecharge' => 'Delete order recharge',
+    'shopFlowTypeDeleteOrderReturn' => 'Delete order return',
+    'shopFlowTypeRepairPayment' => 'Repair payment',
+    'shopFlowTypeAfterSaleExchangeRecharge' => 'After-sale exchange recharge',
+    'shopFlowTypeAfterSaleExchangeDeduct' => 'After-sale exchange deduct',
+    'shopFlowTypeOMSDeduct' => 'OMS deduct',
+    'shopFlowTypeDeduct' => 'Deduct',
+    'shopFlowTypeIncrease' => 'Increase',
+    'shopFlowTypeOther' => 'Other',
+    'shopFlowTypeAdministratorManualAdjustment' => 'Administrator manual adjustment',
 ];

+ 183 - 2
common/messages/zh-CN/ctx.php

@@ -21,7 +21,6 @@ return [
     'resetPwdSucessNotice' => '重置密码成功',
 
     #Finance
-    // 系统功能
     'commonModelsWithdrawStatusNameStatusApplied' => '提现待审核',
     'commonModelsWithdrawStatusNameStatusAudited' => '提现已审核',
     'commonModelsWithdrawStatusNameStatusWaitPaid' => '提现待付款',
@@ -97,6 +96,15 @@ return [
     'financeRechargeListStatusApproved' => '已审核',
     'financeRechargeListStatusVoucherUploaded' => '已上传凭证',
     'financeRechargeListStatusRejected' => '已拒绝',
+    'rechargeStatusTitle:0' => '待审核',
+    'rechargeStatusTitle:1' => '已上传凭证',
+    'rechargeStatusTitle:2' => '已审核',
+    'rechargeStatusTitle:3' => '已拒绝',
+
+    'rechargeStatus:0' => '待审核',
+    'rechargeStatus:1' => '审核中',
+    'rechargeStatus:2' => '成功',
+    'rechargeStatus:3' => '失败',
 
     'memberEcoinAdjustmentListFileName'=> '会员余额调整列表',
     'applicationChangeBalanceSucceeded'=> '申请变动会员余额成功',
@@ -205,6 +213,7 @@ return [
     'shopListPayTravelBonus' => '旅游积分',
     'shopListPayCarFund' => '车奖积分',
     'shopListPayVillaFund' => '房奖积分',
+    'shopListPayStack' => 'PayStack',
     'shopOrderListUndelivered' => '未发货',
     'shopOrderListDelivered'=>'已发货',
     'shopOrderListConfirmReceipt' => '确认收货',
@@ -216,7 +225,8 @@ return [
     'shopOrderListGetOrderStatusOrderDeletion' => '订单删除',
     'shopOrderListGetOrderStatusOrderDeletionOrderRefund' => '订单退款',
     'shopOrderListGetOrderStatusPaymentFailed' => '支付失败',
-    
+    'shopGoodTypeDomestic' => '国内商品',
+    'shopGoodTypeImport' => '国内商品',
 
     'shopExportListName' => '商品列表',
     'shopProductAddSucceededNotice' => '商品添加成功',
@@ -562,6 +572,10 @@ return [
     'reviewTime' => '审核时间',
     'I.Market' => '一市场',
     'II.Market' => '二市场',
+    'userMoveAuditStatus:0' => '待审核',
+    'userMoveAuditStatus:1' => '审核通过',
+    'userMoveAuditStatus:2' => '审核失败',
+    'userMoveAuditStatus:3' => '拒绝',
 
     # 网络
     'placementNetwork' => '安置网络',
@@ -652,4 +666,171 @@ return [
     'RMarketMonthlyRemainingDeclarationPerformance' => '二市场月剩余报单业绩',
     'monthlyNewTeamPerformance' => '月新增团队业绩',
     'monthlyCumulativeTeamPerformance' => '月累计团队业绩',
+
+    # 【数据表】
+    # 等级
+    'dbDeclarationLevelBA' => 'BA',
+    'dbDeclarationLevelElite' => 'Elite',
+    'dbDeclarationLevelPro' => 'Pro',
+    'dbDeclarationLevelVip' => 'Vip',
+    # 管理星级
+    'dbEmployLevelNoRank' => '无',
+    'dbEmployLevel1StarDirector'  => '1星管理',
+    'dbEmployLevel2StarDirector'  => '2星管理',
+    'dbEmployLevel3StarDirector'  => '3星管理',
+    'dbEmployLevel4StarDirector'  => '4星管理',
+    'dbEmployLevel5StarDirector'  => '5星管理',
+    'dbEmployLevel6StarDirector'  => '6星管理',
+    'dbEmployLevel7StarDirector'  => '7星管理',
+    # 皇冠星级
+    'dbCrownLevel0StarCrown'	=> '无',
+    'dbCrownLevel1StarCrown'	=> '1星皇冠',
+    'dbCrownLevel2StarCrown'	=> '2星皇冠',
+    'dbCrownLevel3StarCrown'	=> '3星皇冠',
+    'dbCrownLevel4StarCrown'	=> '4星皇冠',
+    'dbCrownLevel5StarCrown'	=> '5星皇冠',
+    'dbCrownLevel6StarCrown'	=> '6星皇冠',
+    'dbCrownLevel7StarCrown'	=> '7星皇冠',
+    # 报单中心级别
+    'dbDecRole1stLevelStockist'	=> '一级报单中心',
+    'dbDecRole2stLevelStockist'	=> '二级报单中心',
+    'dbDecRole3rdLevelStockist'	=> '三级报单中心',
+    'dbDecRole4stLevelStockist'	=> '四级报单中心',
+    'dbDecRole5thLevelStockist'	=> '五级报单中心',
+    # 注册类型
+    'dbRegTypePersonal' => '个人',
+    'dbRegTypeBusiness' => '个体工商户',
+    'dbRegTypeCompany' => '公司',
+    # 交易类型
+    'dbConfigAllowWallet' => '转出转入配置',
+    'dbConfigAutoCalcPeriod' => '自动结算',
+    'dbConfigAutoClosePeriod' => '自动封期',
+    'dbConfigBackupTime' => '备份时间',
+    'dbConfigBackupWeekDate' => '备份星期',
+    'dbConfigBaseScore' => '基础分数配置',
+    'dbConfigBsNoPvPointsPercent' => '没有业绩的时候,蓝星奖金给多少业绩比例的兑换积分',
+    'dbConfigCalcYear' => '期数计算至年份',
+    'dbConfigCashReconsumeBonusPercent' => '现金购物PV算奖比例',
+    'dbConfigCloseDays' => '自动封期天数',
+    'dbConfigCloseTime' => '自动封期时间',
+    'dbConfigCloseWeekDate' => '自动封期星期',
+    'dbConfigDealSwitch' => '查看交易记录',
+    'dbConfigDecRoleBonusFrom' => '服务奖来源',
+    'dbConfigExchangeRate' => '汇率配置',
+    'dbConfigFlowBonusSwitch' => '奖金明细',
+    'dbConfigFreeShipping' => '商品免运费阈值',
+    'dbConfigFreight' => '商品运费',
+    'dbConfigFwCoefficientFromFxCash' => '服务奖现金复消系数',
+    'dbConfigFwCoefficientFromFxPoint' => '服务奖积分复消系数',
+    'dbConfigFwCoefficientFromZc' => '服务奖首购报单系数',
+    'dbConfigHistoryBonusLimit' => '奖金余额备份近几周',
+    'dbConfigIsCanTransferProp' => '是否开启单笔转账比例',
+    'dbConfigIsCanWithdrawBack' => '是否开启前台提现退回功能',
+    'dbConfigIsDecReg' => '只允许报单中心报单',
+    'dbConfigIsOpenUpgrade' => '是否开启会员升级单功能',
+    'dbConfigIsResaleUmbrella' => '是否只允许为伞下会员报复消单',
+    'dbConfigManageTaxPercent' => '管理费比例',
+    'dbConfigManualWithdrawMinAmount' => '手动提现最低金额',
+    'dbConfigMonthPcsPvFxCondition' => '每月个人总消费PV条件',
+    'dbConfigNewBonusSwitch' => '最新奖金',
+    'dbConfigObservePeriodLimit' => '观察期月份限制',
+    'dbConfigOpenFW' => '是否开启服务奖',
+    'dbConfigOpenGL' => '是否开启管理奖',
+    'dbConfigOpenGarage' => '车奖积分比例',
+    'dbConfigOpenGarageCap' => '车奖个人封顶值',
+    'dbConfigOpenQY' => '是否开启团队奖',
+    'dbConfigOpenQuarter' => '季度奖金',
+    'dbConfigOpenTG' => '是否开启推广奖',
+    'dbConfigOpenTourism' => '旅游积分比例',
+    'dbConfigOpenVilla' => '房奖积分比例',
+    'dbConfigOpenVillaCap' => '房奖个人封顶值',
+    'dbConfigPasswordRule' => '密码规则',
+    'dbConfigPastBonusSwitch' => '往期奖金',
+    'dbConfigPayPasswordRule' => '支付密码规则',
+    'dbConfigPvRatio' => 'PV比例',
+    'dbConfigReConsumePointsMonthCap' => '重复消费积分每月上限',
+    'dbConfigReConsumePointsPercent' => '重复消费积分比例',
+    'dbConfigRecPercent' => '推广奖比例',
+    'dbConfigShowBonusPeriodNum' => '前台可见往期奖金期数',
+    'dbConfigShowFlowPeriodNum' => '前台可见交易记录期数',
+    'dbConfigShowTransferPeriodNum' => '前台可见转账记录期数',
+    'dbConfigShowWithdrawPeriodNum' => '前台可见提现记录期数',
+    'dbConfigSiteClose' => '是否关闭网站',
+    'dbConfigSiteCloseInfo' => '关闭提示信息',
+    'dbConfigSiteTitle' => '网站标题',
+    'dbConfigTransferOpen' => '是否开启转账功能',
+    'dbConfigTransferRecordSwitch' => '前台转账记录开关',
+    'dbConfigTransferSwitch' => '前台我要转账开关',
+    'dbConfigWithdrawFee' => '提现手续费',
+    'dbConfigWithdrawFreezeDays' => '提现预付款天数',
+
+    # 【参数】
+    # 钱包类型
+    'cashWallet' => '现金钱包',
+    # 用户状态
+    'userStatusInactive' => '未激活',
+    'userStatusNormal' => '正常',
+    'userStatusLogout' => '注销',
+    'userStatusBlacklist' => '黑名单',
+    'userStatusSuspended' => '停发',
+    'userStatusPermanentShutDown' => '永久关停',
+    # 奖金类型
+    'bonusWalletTypeAccountBonus' => '会员账户奖金',
+    'bonusWalletTypeResellingPointsBalance' => '复销积分余额',
+    'bonusWalletTypeAccountEcoin' => '会员账户余额',
+    'bonusWalletTypeExchangePointsBalance' => '兑换积分余额',
+    'bonusWalletTypeTravelPointsBalance' => '旅游积分余额',
+    'bonusWalletTypeCarPointsBalance' => '名车积分余额',
+    'bonusWalletTypeVillaPointsBalance' => '豪宅积分余额',
+    # 审核状态
+    'auditStatusUnaudited' => '未审核',
+    'auditStatusAudited' => '已审核',
+    'auditStatusAuditFailure' => '审核失败',
+    'auditStatusRefused' => '已拒绝',
+    # 发货状态
+    'deliveryStatusUndelivered' => '未发货',
+    'deliveryStatusDelivered' => '已发货',
+    'deliveryStatusConfirmReceipt' => '确认收货',
+    # 导出模块
+    'exportModuleShop' => '商城管理',
+    'exportModuleMember' => '会员管理',
+    'exportModuleNetwork' => '网络图谱',
+    'exportModuleResale' => '复销管理',
+    'exportModuleBonus' => '奖金管理',
+    'exportModuleShopFinancial' => '财务管理',
+    # 订单状态
+    'orderStatusUnpaid' => '待支付',
+    'orderStatusPaid' => '已支付',
+    'orderStatusLogisticsStatus' => '物流状态',
+    'orderStatusOrderCompletion' => '订单完成',
+    'orderStatusOrderCancellation' => '订单取消',
+    'orderStatusOrderDeletion' => '订单删除',
+    'orderStatusOrderRefund' => '订单退款',
+    'orderStatusPaymentFailed' => '支付失败',
+    # 流水类型
+    'shopFlowTypeRemittanceRecharge' => '汇款充值',
+    'shopFlowTypeThirdPartyRecharge' => '第三方充值',
+    'shopFlowTypeTransferOut' => '转出',
+    'shopFlowTypeTransferInto' => '转入',
+    'shopFlowTypePay' => '支付',
+    'shopFlowTypeWelcomePackRecharge' => '报单充入',
+    'shopFlowTypeOrderRecharge' => '订货充入',
+    'shopFlowTypeFreightPayment' => '支付运费',
+    'shopFlowTypeAdjustedRecharge' => '待调整充入',
+    'shopFlowTypeAdjustedDeduct' => '待调整扣除',
+    'shopFlowTypeAdjustedTransferOut' => '待调整转出',
+    'shopFlowTypeAdjustedTransferIn' => '待调整转入',
+    'shopFlowTypeExchangeRecharge' => '换货充入',
+    'shopFlowTypeExchangeDeduct' => '换货扣除',
+    'shopFlowTypeDeleteOrderDeduct' => '删单自动扣除',
+    'shopFlowTypeDeleteOrderRecharge' => '删单自动充入',
+    'shopFlowTypeDeleteOrderReturn' => '删单扣回',
+    'shopFlowTypeRepairPayment' => '支付维修费',
+    'shopFlowTypeAfterSaleExchangeRecharge' => '售后调货充入',
+    'shopFlowTypeAfterSaleExchangeDeduct' => '售后调货扣费',
+    'shopFlowTypeOMSDeduct' => 'OMS扣款',
+    'shopFlowTypeDeduct' => '扣除',
+    'shopFlowTypeIncrease' => '增加',
+    'shopFlowTypeOther' => '其它',
+    'shopFlowTypeAdministratorManualAdjustment' => '管理员手动调整',
 ];

+ 2 - 1
common/models/BalanceAudit.php

@@ -3,6 +3,7 @@
 namespace common\models;
 
 use backendApi\modules\v1\models\Admin;
+use common\helpers\Tool;
 use common\helpers\user\Info;
 use Yii;
 use common\libs\logging\operate\valueType\Config as ValueTypeConfig;
@@ -128,7 +129,7 @@ class BalanceAudit extends \common\components\ActiveRecord
                 'label' => '余额类型',
                 'type' => function($data){
                     $value = $data['value'];
-                    return \Yii::$app->params['bonusWalletType'][$value]['label'];
+                    return Tool::paramConvert(\Yii::$app->params['bonusWalletType'])[$value]['label'];
                 },
             ],
             'DEAL_TYPE' => [

+ 21 - 0
common/models/DealType.php

@@ -3,6 +3,8 @@
 namespace common\models;
 
 use backendApi\modules\v1\models\Admin;
+use common\helpers\Cache;
+use common\helpers\LoggerTool;
 use common\libs\logging\operate\valueType\Config as ValueTypeConfig;
 use Yii;
 
@@ -100,6 +102,25 @@ class DealType extends \common\components\ActiveRecord
         ];
     }
 
+    /**
+     * 从缓存获取信息
+     * @return array|mixed|\yii\db\ActiveRecord[]
+     */
+    public static function getFromCache(){
+        $data = Yii::$app->cache->get(Cache::DEAL_TYPE_CONFIG_KEY);
+        if(!$data){
+            // 获取信息
+            $data = static::find()->where('1=1')->orderBy('CREATED_AT ASC')->indexBy('ID')->asArray()->all();
+            Yii::$app->cache->set(Cache::DEAL_TYPE_CONFIG_KEY, $data);
+        }
+        // i18n转换
+        foreach ($data as &$item) {
+            $item['TYPE_NAME'] = Yii::t('ctx', $item['LANGUAGE_KEY']);
+        }
+
+        return $data;
+    }
+
     /**
      * 获取注册类型
      * @return array|null

+ 19 - 0
common/models/DecRole.php

@@ -60,6 +60,25 @@ class DecRole extends \common\components\ActiveRecord
         ];
     }
 
+    /**
+     * 从缓存获取信息
+     * @return array|mixed|\yii\db\ActiveRecord[]
+     */
+    public static function getFromCache(){
+        $data = Yii::$app->cache->get(Cache::DEC_ROLE_CONFIG_KEY);
+        if(!$data){
+            // 获取信息
+            $data = static::find()->where('1=1')->orderBy('SORT ASC')->indexBy('ID')->asArray()->all();
+            Yii::$app->cache->set(Cache::DEC_ROLE_CONFIG_KEY, $data);
+        }
+        // i18n转换
+        foreach ($data as &$item) {
+            $item['ROLE_NAME'] = Yii::t('ctx', $item['LANGUAGE_KEY']);
+        }
+
+        return $data;
+    }
+
     /**
      * 获取所有数据
      * @return array|\yii\db\ActiveRecord[]

+ 5 - 0
common/models/DeclarationLevel.php

@@ -99,6 +99,11 @@ class DeclarationLevel extends \common\components\ActiveRecord
             $data = static::find()->where('1=1')->orderBy('PERF ASC, CREATED_AT ASC')->indexBy('ID')->asArray()->all();
             Yii::$app->cache->set(Cache::DEC_LEVEL_CONFIG_KEY, $data);
         }
+        // i18n转换
+        foreach ($data as &$item) {
+            $item['LEVEL_NAME'] = Yii::t('ctx', $item['LANGUAGE_KEY']);
+        }
+
         return $data;
     }
 

+ 4 - 0
common/models/EmployLevel.php

@@ -214,6 +214,10 @@ class EmployLevel extends \common\components\ActiveRecord
             $data = self::getAllData();
             Yii::$app->cache->set(Cache::EMP_LEVEL_CONFIG_KEY, $data);
         }
+        // i18n转换
+        foreach ($data as &$item) {
+            $item['LEVEL_NAME'] = Yii::t('ctx', $item['LANGUAGE_KEY']);
+        }
         return $data;
     }
 

+ 5 - 4
common/models/PerfAudit.php

@@ -3,6 +3,7 @@
 namespace common\models;
 
 use backendApi\modules\v1\models\Admin;
+use common\helpers\Tool;
 use common\helpers\user\Info;
 use common\libs\logging\operate\valueType\Config as ValueTypeConfig;
 use Yii;
@@ -164,13 +165,13 @@ class PerfAudit extends \common\components\ActiveRecord
                     $value = $data['value'];
                     $result = '';
                     if($value == 'un' || $value == \Yii::$app->params['auditStatus']['un']['value']){
-                        $result = \Yii::$app->params['auditStatus']['un']['label'];
+                        $result = Tool::paramConvert(\Yii::$app->params['auditStatus'])['un']['label'];
                     } elseif($value == 'true' || $value == \Yii::$app->params['auditStatus']['true']['value']) {
-                        $result = \Yii::$app->params['auditStatus']['true']['label'];
+                        $result = Tool::paramConvert(\Yii::$app->params['auditStatus'])['true']['label'];
                     } elseif($value == 'false' || $value == \Yii::$app->params['auditStatus']['false']['value']) {
-                        $result = \Yii::$app->params['auditStatus']['false']['label'];
+                        $result = Tool::paramConvert(\Yii::$app->params['auditStatus'])['false']['label'];
                     } elseif($value == 'reject' || $value == \Yii::$app->params['auditStatus']['reject']['value']) {
-                        $result = \Yii::$app->params['auditStatus']['reject']['label'];
+                        $result = Tool::paramConvert(\Yii::$app->params['auditStatus'])['reject']['label'];
                     }
                     return $result;
                 },

+ 22 - 10
common/models/Recharge.php

@@ -63,6 +63,8 @@ class Recharge extends \common\components\ActiveRecord {
         self::STATUS_SUCCESS => 'SUCCESS',
         self::STATUS_REJECT => 'FAILED',
     ];
+    const STATUS_NAME_LANGUAGE_PREFIX = 'rechargeStatusTitle:';
+    const RECHARGE_STATUS_NAME_LANGUAGE_PREFIX = 'rechargeStatus:';
     /**
      * @inheritdoc
      */
@@ -118,6 +120,16 @@ class Recharge extends \common\components\ActiveRecord {
         ];
     }
 
+    public static function getStatusName()
+    {
+        return array_map(fn($index): string => \Yii::t('ctx', self::STATUS_NAME_LANGUAGE_PREFIX . $index), array_keys(self::STATUS_NAME));
+    }
+
+    public static function getRechargeStatus()
+    {
+        return array_map(fn($index): string => \Yii::t('ctx', self::RECHARGE_STATUS_NAME_LANGUAGE_PREFIX . $index), array_keys(self::RECHARGE_STATUS_NAME));
+    }
+
     /**
      * 获取充值相关期数,目前按照直接取当月第一期来实现
      * @param $nowTime
@@ -162,7 +174,7 @@ class Recharge extends \common\components\ActiveRecord {
      * @return string
      */
     public static function chkAuditStatus($sn, $nowStatus, $toStatus) {
-        $statusName = self::STATUS_NAME;
+        $statusName = self::getStatusName();
 //        $msg = '充值单' . $sn . '当前状态为【' . $statusName[$nowStatus] . '】,无法设置为【' . $statusName[$toStatus] . '】';
         $msg = 'The current status of the recharge ' . $sn . ' is 【' . $statusName[$nowStatus] . '】, cannot be set to 【' . $statusName[$toStatus] . '】';
         switch ($toStatus) {
@@ -229,17 +241,17 @@ class Recharge extends \common\components\ActiveRecord {
         //So that curl_exec returns the contents of the cURL; rather than echoing it
         curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
         //execute post
-        //$result = curl_exec($ch);
+        $result = curl_exec($ch);
         echo $result;
     }
 
     // 多语言状态名
-    public static function getStatusName() {
-        return [
-            self::STATUS_APPLIED => \Yii::t('ctx', 'financeRechargeListStatusTobeReviewed'), // 待审核
-            self::STATUS_PROVED => \Yii::t('ctx', 'financeRechargeListStatusVoucherUploaded'), // 已上传凭证
-            self::STATUS_AUDITED => \Yii::t('ctx', 'financeRechargeListStatusApproved'), // 已审核
-            self::STATUS_REFUSED => \Yii::t('ctx', 'financeRechargeListStatusRejected'), // 已拒绝
-        ];
-    }
+//    public static function getStatusName() {
+//        return [
+//            self::STATUS_APPLIED => \Yii::t('ctx', 'financeRechargeListStatusTobeReviewed'), // 待审核
+//            self::STATUS_PROVED => \Yii::t('ctx', 'financeRechargeListStatusVoucherUploaded'), // 已上传凭证
+//            self::STATUS_AUDITED => \Yii::t('ctx', 'financeRechargeListStatusApproved'), // 已审核
+//            self::STATUS_REFUSED => \Yii::t('ctx', 'financeRechargeListStatusRejected'), // 已拒绝
+//        ];
+//    }
 }

+ 30 - 0
common/models/RegType.php

@@ -2,6 +2,7 @@
 
 namespace common\models;
 
+use common\helpers\Cache;
 use Yii;
 
 /**
@@ -62,6 +63,35 @@ class RegType extends \common\components\ActiveRecord {
         ];
     }
 
+    /**
+     * 从缓存获取信息
+     * @return array|mixed|\yii\db\ActiveRecord[]
+     */
+    public static function getFromCache(){
+        $data = Yii::$app->cache->get(Cache::REG_TYPE_CONFIG_KEY);
+        if(!$data){
+            // 获取信息
+            $data = self::getTypes();
+            Yii::$app->cache->set(Cache::REG_TYPE_CONFIG_KEY, $data);
+        }
+        // i18n转换
+        foreach ($data as &$item) {
+            $item['TYPE_NAME'] = Yii::t('ctx', $item['LANGUAGE_KEY']);
+        }
+        return $data;
+    }
+
+    /**
+     *  更新缓存
+     * @return array|\yii\db\ActiveRecord[]
+     */
+    public static function updateToCache(){
+        // 获取配置
+        $data = self::getTypes();
+        Yii::$app->cache->set(Cache::REG_TYPE_CONFIG_KEY, $data);
+        return $data;
+    }
+
     /**
      * 获取注册类型
      * @return array|null

+ 23 - 0
common/models/ShopGoods.php

@@ -38,6 +38,7 @@ class ShopGoods extends \common\components\ActiveRecord
             'id' => 1,
             'name' => 'Account Balance', //余额购买
             'label' => 'cash',
+            'language' => 'shopListAccountBalance',
         ],
 //        2 => [
 //            'id' => 2,
@@ -52,21 +53,25 @@ class ShopGoods extends \common\components\ActiveRecord
             'id' => 4,
             'name' => 'Travel Bonus',
             'label' => 'tourism_points',
+            'language' => 'shopListPayTravelBonus',
         ],
         5 => [
             'id' => 5,
             'name' => 'Car Fund',
             'label' => 'garage_points',
+            'language' => 'shopListPayCarFund',
         ],
         6 => [
             'id' => 6,
             'name' => 'Villa Fund',
             'label' => 'villa_points',
+            'language' => 'shopListPayVillaFund',
         ],
         7 => [
             'id' => 7,
             'name' => 'PayStack',
             'label' => 'pay_stack',
+            'language' => 'saleTypePayStack',
         ],
     ];
 
@@ -74,10 +79,12 @@ class ShopGoods extends \common\components\ActiveRecord
         1 =>[
             'name'=>'国内商品',//国内商品
             'discount'=>'50',
+            'language' => 'shopGoodTypeDomestic',
         ],
         2 =>[
             'name'=>'进口商品',//进口商品
             'discount'=>'60',
+            'language' => 'shopGoodTypeImport',
         ],
     ];
     const GIFT_TYPE = [
@@ -306,4 +313,20 @@ class ShopGoods extends \common\components\ActiveRecord
             ],
         ];
     }
+
+    public static function getSaleType(): array
+    {
+        return array_map(function ($item) {
+            $item['name'] = \Yii::t('ctx', $item['language']);
+            return $item;
+        }, self::SALE_TYPE);
+    }
+
+    public static function getGoodType(): array
+    {
+        return array_map(function ($item) {
+            $item['name'] = \Yii::t('ctx', $item['language']);
+            return $item;
+        }, self::GOODS_TYPE);
+    }
 }

+ 4 - 0
common/models/StarCrownLevel.php

@@ -134,6 +134,10 @@ class StarCrownLevel extends \common\components\ActiveRecord
             $data = self::getAllData();
             Yii::$app->cache->set(Cache::CROWN_LEVEL_CONFIG_KEY, $data);
         }
+        // i18n转换
+        foreach ($data as &$item) {
+            $item['LEVEL_NAME'] = Yii::t('ctx', $item['LANGUAGE_KEY']);
+        }
         return $data;
     }
 

+ 25 - 2
common/models/UserMove.php

@@ -39,8 +39,16 @@ class UserMove extends \common\components\ActiveRecord
     const TYPE_RELATION = NetPoint::NET_TYPE_RELATION;
 
     const TYPE_NAME = [
-        self::TYPE_NETWORK => ['id' => self::TYPE_NETWORK, 'name' => 'Placement network', 'label' => 'placementNetwork'], // 安置网络
-        self::TYPE_RELATION => ['id' => self::TYPE_RELATION, 'name' => 'Sponsor network', 'label' => 'sponsorNetwork'], // 开拓网络
+        self::TYPE_NETWORK => [
+            'id' => self::TYPE_NETWORK,
+            'name' => 'Placement network',
+            'label' => 'placementNetwork'
+        ], // 安置网络
+        self::TYPE_RELATION => [
+            'id' => self::TYPE_RELATION,
+            'name' => 'Sponsor network',
+            'label' => 'sponsorNetwork'
+        ], // 开拓网络
     ];
 
     const STATUS_APPLIED = 0;       // 已申请
@@ -55,6 +63,8 @@ class UserMove extends \common\components\ActiveRecord
         self::STATUS_REFUSED => 'Audit reject', // 拒绝
     ];
 
+    const STATUS_NAME_LANGUAGE_PREFIX = 'userMoveAuditStatus:';
+
     /**
      * @inheritdoc
      */
@@ -108,6 +118,19 @@ class UserMove extends \common\components\ActiveRecord
         ];
     }
 
+    public static function getStatusName()
+    {
+        return array_map(fn($index): string => \Yii::t('ctx', self::STATUS_NAME_LANGUAGE_PREFIX . $index), array_keys(self::STATUS_NAME));
+    }
+
+    public static function getNetWork(): array
+    {
+        return array_map(function ($item) {
+            $item['name'] = \Yii::t('ctx', $item['label']);
+            return $item;
+        }, self::TYPE_NAME);
+    }
+
     /**
      * 操作日志记录条件
      * @return array

+ 2 - 2
common/models/forms/ApproachOrderForm.php

@@ -212,7 +212,7 @@ class ApproachOrderForm extends Model
         }
 
         // 购买方式
-        $sellTypeLabelMap = array_column(ShopGoods::SALE_TYPE, NULL, 'label');
+        $sellTypeLabelMap = array_column(ShopGoods::getSaleType(), NULL, 'label');
         if (!array_key_exists($this->payType, $sellTypeLabelMap)) {
             $this->addError($attribute, Yii::t('app', 'payTypeError'));
             return;
@@ -410,7 +410,7 @@ class ApproachOrderForm extends Model
         $totalAmount = 0;
         $totalPv = 0;
         $totalAmountStandard = 0;
-        $goodsType = ShopGoods::GOODS_TYPE;
+        $goodsType = ShopGoods::getGoodType();
         $hasInstalment = 0;
         $exchangeRate = floatval(Cache::getSystemConfig()['exchangeRate']['VALUE'] ?? 0); // 汇率
         foreach ($this->goodsNum as $k => $v) {

+ 2 - 2
common/models/forms/BaApproachOrderForm.php

@@ -81,7 +81,7 @@ class BaApproachOrderForm extends Model
         $this->adminOperateLogger = new AdminOperate([
             'fetchClass' => BaApproachOrder::class,
         ]);
-        $this->payType = ShopGoods::SALE_TYPE[7]['label'];
+        $this->payType = ShopGoods::getSaleType()[7]['label'];
     }
 
     /**
@@ -349,7 +349,7 @@ class BaApproachOrderForm extends Model
         $ids = $this->goodsId;
         $totalAmount = 0;
         $totalPv = 0;
-        $goodsType = ShopGoods::GOODS_TYPE;
+        $goodsType = ShopGoods::getGoodType();
         $exchangeRate = floatval(Cache::getSystemConfig()['exchangeRate']['VALUE'] ?? 0); // 汇率
         foreach ($this->goodsNum as $k => $v) {
             if ($v) {

+ 1 - 1
common/models/forms/ChangeBalanceForm.php

@@ -137,7 +137,7 @@ class ChangeBalanceForm extends Model {
      * @param $attribute
      */
     public function isType($attribute) {
-        if (!key_exists($this->type, BalanceAudit::TYPE)) {
+        if (!key_exists($this->type, BalanceAudit::getBalanceAuditType())) {
             $this->addError($attribute, \Yii::t('ctx', 'incorrectBalanceType'));
         }
         // 查看表里面是否有想同类型的未审核单,如果有的话,不允许再申请,需等审核完成以后,才能申请

+ 3 - 3
common/models/forms/OrderForm.php

@@ -238,7 +238,7 @@ class OrderForm extends Model
         }
 
         // 购买方式
-        $sellTypeLabelMap = array_column(ShopGoods::SALE_TYPE, NULL, 'label');
+        $sellTypeLabelMap = array_column(ShopGoods::getSaleType(), NULL, 'label');
         if (!array_key_exists($this->payType, $sellTypeLabelMap)) {
             $this->addError($attribute, Yii::t('app', 'payTypeError'));
             return;
@@ -462,7 +462,7 @@ class OrderForm extends Model
         $totalPv = 0;
         $totalRealPv = 0;
         $totalAmountStandard = 0;
-        $goodsType = ShopGoods::GOODS_TYPE;
+        $goodsType = ShopGoods::getGoodType();
         $this->_remainPv = 0;
         $hasInstalment = 0;
         $exchangeRate = floatval(Cache::getSystemConfig()['exchangeRate']['VALUE'] ?? 0); // 汇率
@@ -834,7 +834,7 @@ class OrderForm extends Model
         $ids = $this->goodsId;
         $totalAmount = 0;
         $totalPv = 0;
-        $goodsType = ShopGoods::GOODS_TYPE;
+        $goodsType = ShopGoods::getGoodType();
         foreach ($this->goodsNum as $k => $v) {
             if ($v) {
                 $goods = ShopGoods::findOneAsArray('ID=:ID AND STATUS=1',[':ID'=> $ids[$k]]);

+ 1 - 4
common/models/forms/ShopGoodsForm.php

@@ -127,14 +127,11 @@ class ShopGoodsForm extends Model
             // 处理sellType
             $categoryType = array_column(ShopGoods::CATEGORY_TYPE, NULL, 'id');
             $sellType = $categoryType[$this->categoryType]['sell_type'] ?? [];
-//            print_r($formModel);
-//            print_r($this);
-//            exit;
             if (!$sellType) {
                 $this->addError('add', \Yii::t('ctx', 'shopBuyActionErrorNotice'));
             } else {
                 foreach ($sellType as $item) {
-                    if (!in_array($item['id'], array_keys(ShopGoods::SALE_TYPE))) {
+                    if (!in_array($item['id'], array_keys(ShopGoods::getSaleType()))) {
                         $this->addError('add', \Yii::t('ctx', 'shopBuyActionErrorNotice'));
                         break;
                     }

+ 4 - 4
frontendApi/modules/v1/controllers/BaController.php

@@ -349,8 +349,8 @@ class BaController extends BaseController {
             'allGoods' => $allGoods,
             'decUserName'=>$decUserName,
             'payList' => ShopGoods::payTypes(),
-            'sellType' => ShopGoods::CATEGORY_TYPE,
-            'categoryType' => ShopGoods::CATEGORY_TYPE[0]['id'],
+            'sellType' => ShopGoods::getCategoryType(),
+            'categoryType' => ShopGoods::getCategoryType()[0]['id'],
         ]);
     }
 
@@ -441,8 +441,8 @@ class BaController extends BaseController {
             'allOpenBank' => $allOpenBank,
             'userName' => $userName,
             'payList' => ShopGoods::payTypes(),
-            'sellType' => ShopGoods::CATEGORY_TYPE,
-            'categoryType' => ShopGoods::CATEGORY_TYPE[0]['id'],
+            'sellType' => ShopGoods::getCategoryType(),
+            'categoryType' => ShopGoods::getCategoryType()[0]['id'],
             ]);
     }
 

+ 1 - 1
frontendApi/modules/v1/controllers/FinanceController.php

@@ -524,7 +524,7 @@ class FinanceController extends BaseController {
             //$data['list'][$key]['BANK_PROVINCE_NAME'] = $value['BANK_PROVINCE'] ? Region::getCnName($value['BANK_PROVINCE']) : '';
             //$data['list'][$key]['BANK_CITY_NAME'] = $value['BANK_CITY'] ? Region::getCnName($value['BANK_CITY']) : '';
             //$data['list'][$key]['BANK_COUNTY_NAME'] = $value['BANK_COUNTY'] ? Region::getCnName($value['BANK_COUNTY']) : '';
-            $data['list'][$key]['STATUS_NAME'] = Recharge::RECHARGE_STATUS_NAME[$value['AUDIT_STATUS']];
+            $data['list'][$key]['STATUS_NAME'] = Recharge::getRechargeStatus()[$value['AUDIT_STATUS']];
         }
         return static::notice($data);
     }

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

@@ -70,7 +70,7 @@ class ShopController extends BaseController {
         ]);
         foreach ($data['list'] as $key => $value) {
             if ($value['TYPE'] == 1 || $value['TYPE'] == 2) {
-                $data['list'][$key]['DISCOUNT'] = ShopGoods::GOODS_TYPE[$value['TYPE']]['discount'];
+                $data['list'][$key]['DISCOUNT'] = ShopGoods::getGoodType()[$value['TYPE']]['discount'];
             } else {
                 $data['list'][$key]['DISCOUNT'] = $value['SELL_DISCOUNT']*100;
             }
@@ -139,7 +139,7 @@ class ShopController extends BaseController {
                 'payList'=>$payList,
                 'allAddress'=>$allAddress,
                 'userBalance'=>$userBalance,
-                'sellType' => ShopGoods::CATEGORY_TYPE,
+                'sellType' => ShopGoods::getCategoryType(),
                 'freight' => $freight,
                 'freeShipping' => $freeShipping,
             ]);
@@ -336,7 +336,7 @@ class ShopController extends BaseController {
 
         foreach ($data['list'] as &$value) {
             $value['TAX_AMOUNT'] = Tool::calculateTax($value['REAL_PRICE'], floatval($value['TAX_RATE']), intval($value['BUY_NUMS']));
-            $value['STATUS'] = \Yii::$app->params['orderStatus'][$value['STATUS']]['label'] ?? '';
+            $value['STATUS'] = Tool::paramConvert(\Yii::$app->params['orderStatus'])[$value['STATUS']]['label'] ?? '';
             $value['CREATED_AT'] = $value['CREATED_AT'] ? Date::convert($value['CREATED_AT'],'Y-m-d H:i:s') : '';
             $value['REAL_PV'] = Tool::formatPrice($value['REAL_PV'] * $value['BUY_NUMS']);
             $value['TOTAL_AMOUNT'] = Tool::formatPrice($value['REAL_PRICE'] * $value['BUY_NUMS']);
@@ -402,8 +402,8 @@ class ShopController extends BaseController {
                 $orderGoods = OrderGoods::findAllAsArray('ORDER_SN=:ORDER_SN', [':ORDER_SN' => $value['ORDER_SN']], 'SKU_CODE,GOODS_TITLE,BUY_NUMS,TAX_RATE,REAL_PV,REAL_PRICE');
             }
             $value['hasChildren'] = $orderGoods;
-            $value['PAY_TYPE'] = array_column(ShopGoods::SALE_TYPE, NULL, 'label')[$value['PAY_TYPE']]['name'] ?? '';
-            $value['STATUS'] = \Yii::$app->params['orderStatus'][$value['STATUS']]['label'] ?? '';
+            $value['PAY_TYPE'] = array_column(ShopGoods::getSaleType(), NULL, 'label')[$value['PAY_TYPE']]['name'] ?? '';
+            $value['STATUS'] = Tool::paramConvert(\Yii::$app->params['orderStatus'])[$value['STATUS']]['label'] ?? '';
             $value['CREATED_AT'] = $value['CREATED_AT'] ? Date::convert($value['CREATED_AT'],'Y-m-d H:i:s') : '';
             $value['FULL_ADDRESS'] = trim(implode(', ', [$value['ADDRESS'], $value['CITY_NAME'], $value['LGA_NAME'], Region::getCnName($value['PROVINCE'])]), ', ');
 
@@ -479,9 +479,9 @@ class ShopController extends BaseController {
             $data['list'][$key]['PAY_AT'] = $value['PAY_AT'] ? Date::convert($value['PAY_AT'],'Y-m-d H:i:s') : '';
             $data['list'][$key]['CREATED_AT'] = $value['CREATED_AT'] ? Date::convert($value['CREATED_AT'],'Y-m-d H:i:s') : '';
             $data['list'][$key]['CATEGORY_TYPE'] = intval($value['CATEGORY_TYPE']);
-            $data['list'][$key]['PAY_TYPE'] = array_column(ShopGoods::SALE_TYPE, NULL, 'label')[$value['PAY_TYPE']]['name'] ?? '';
-            $data['list'][$key]['STATUS'] = \Yii::$app->params['orderStatus'][$value['STATUS']]['label'] ?? '';
-            $data['list'][$key]['CATEGORY'] = array_column(ShopGoods::CATEGORY_TYPE, NULL, 'id')[$value['CATEGORY_TYPE']]['name'] ?? ShopGoods::CATEGORY_TYPE[0]['name'];
+            $data['list'][$key]['PAY_TYPE'] = array_column(ShopGoods::getSaleType(), NULL, 'label')[$value['PAY_TYPE']]['name'] ?? '';
+            $data['list'][$key]['STATUS'] = Tool::paramConvert(\Yii::$app->params['orderStatus'])[$value['STATUS']]['label'] ?? '';
+            $data['list'][$key]['CATEGORY'] = array_column(ShopGoods::getCategoryType(), NULL, 'id')[$value['CATEGORY_TYPE']]['name'] ?? ShopGoods::getCategoryType()[0]['name'];
             $data['list'][$key]['FULL_ADDRESS'] = $value['ADDRESS'];//.', '.$value['CITY_NAME'].', '.$value['LGA_NAME'];
             if($value['CITY_NAME']){
                 $data['list'][$key]['FULL_ADDRESS'] .= ', ' . $value['CITY_NAME'];
@@ -555,8 +555,8 @@ class ShopController extends BaseController {
             }
             $data['list'][$key]['hasChildren'] = $orderGoods;
             $data['list'][$key]['ORDER_TYPE'] = $value['ORDER_TYPE']=='ZC' ? 'Welcome Pack' : (in_array($value['PAY_TYPE'], ['cash', 'pay_stack']) ? 'Repeat Purchase': 'Points');
-            $data['list'][$key]['PAY_TYPE'] = array_column(ShopGoods::SALE_TYPE, NULL, 'label')[$value['PAY_TYPE']]['name'] ?? '';
-            $data['list'][$key]['STATUS'] = \Yii::$app->params['orderStatus'][$value['STATUS']]['label'] ?? '';
+            $data['list'][$key]['PAY_TYPE'] = array_column(ShopGoods::getSaleType(), NULL, 'label')[$value['PAY_TYPE']]['name'] ?? '';
+            $data['list'][$key]['STATUS'] = Tool::paramConvert(\Yii::$app->params['orderStatus'])[$value['STATUS']]['label'] ?? '';
             $data['list'][$key]['FULL_ADDRESS'] = trim(implode(', ', [$value['ADDRESS'], $value['CITY_NAME'], $value['LGA_NAME'], Region::getCnName($value['PROVINCE'])]), ', ');
             $data['list'][$key]['SHOW_BV'] = !in_array($value['PAY_TYPE'], [5, 6]);
 
@@ -577,7 +577,7 @@ class ShopController extends BaseController {
         ]);
         foreach ($data['list'] as $key => $value) {
             if ($value['TYPE'] == 1 || $value['TYPE'] == 2) {
-                $data['list'][$key]['DISCOUNT'] = ShopGoods::GOODS_TYPE[$value['TYPE']]['discount'];
+                $data['list'][$key]['DISCOUNT'] = ShopGoods::getGoodType()[$value['TYPE']]['discount'];
             } else {
                 $data['list'][$key]['DISCOUNT'] = $value['SELL_DISCOUNT']*100;
             }
@@ -1215,7 +1215,7 @@ ORDER;
         ]);
         foreach ($data['list'] as $key => $value) {
             if ($value['TYPE'] == 1 || $value['TYPE'] == 2) {
-                $data['list'][$key]['DISCOUNT'] = ShopGoods::GOODS_TYPE[$value['TYPE']]['discount'];
+                $data['list'][$key]['DISCOUNT'] = ShopGoods::getGoodType()[$value['TYPE']]['discount'];
             } else {
                 $data['list'][$key]['DISCOUNT'] = $value['SELL_DISCOUNT']*100;
             }
@@ -1337,8 +1337,8 @@ ORDER;
             $data['list'][$key]['ORDER_TYPE'] = 'Reselling';
             $data['list'][$key]['PAY_AT'] = $value['PAY_AT'] ? Date::convert($value['PAY_AT'],'Y-m-d H:i:s') : '';
             $data['list'][$key]['CREATED_AT'] = $value['CREATED_AT'] ? Date::convert($value['CREATED_AT'],'Y-m-d H:i:s') : '';
-            $data['list'][$key]['PAY_TYPE'] = array_column(ShopGoods::SALE_TYPE, NULL, 'label')[$value['PAY_TYPE']]['name'] ?? '';
-            $data['list'][$key]['STATUS'] = \Yii::$app->params['orderStatus'][$value['STATUS']]['label'] ?? '';
+            $data['list'][$key]['PAY_TYPE'] = array_column(ShopGoods::getSaleType(), NULL, 'label')[$value['PAY_TYPE']]['name'] ?? '';
+            $data['list'][$key]['STATUS'] = Tool::paramConvert(\Yii::$app->params['orderStatus'])[$value['STATUS']]['label'] ?? '';
             $data['list'][$key]['FULL_ADDRESS'] = $value['ADDRESS'];
             $data['list'][$key]['TAX_AMOUNT'] = Tool::formatPrice(($value['REAL_PRICE'] - $value['REAL_PRICE'] / (1 + $value['TAX_RATE'] / 100)) * $value['BUY_NUMS']);
             $data['list'][$key]['TOTAL_AMOUNT'] = Tool::formatPrice($value['REAL_PRICE'] * $value['BUY_NUMS']);
@@ -1481,7 +1481,7 @@ ORDER;
             $value['hasChildren'] = $orderGoods;
             $value['STATUS'] = \Yii::$app->params['orderStatus'][$value['STATUS']]['label'] ?? '';
             $value['CREATED_AT'] = $value['CREATED_AT'] ? Date::convert($value['CREATED_AT'],'Y-m-d H:i:s') : '';
-            $value['PAY_TYPE'] = array_column(ShopGoods::SALE_TYPE, NULL, 'label')[$value['PAY_TYPE']]['name'] ?? '';
+            $value['PAY_TYPE'] = array_column(ShopGoods::getSaleType(), NULL, 'label')[$value['PAY_TYPE']]['name'] ?? '';
             $value['FULL_ADDRESS'] = trim(implode(', ', [$value['ADDRESS'], $value['CITY_NAME'], $value['LGA_NAME'], Region::getCnName($value['PROVINCE'])]), ', ');
 
             unset($value['ADDRESS'], $value['CITY_NAME'], $value['LGA_NAME'], $value['PROVINCE']);

+ 4 - 3
frontendApi/modules/v1/controllers/SiteController.php

@@ -10,6 +10,7 @@ namespace frontendApi\modules\v1\controllers;
 use common\helpers\Cache;
 use common\helpers\LoggerTool;
 use common\helpers\snowflake\PageSnowFake;
+use common\helpers\Tool;
 use common\models\Ad;
 use common\models\AdLocation;
 use common\models\ArticleCategory;
@@ -65,7 +66,7 @@ class SiteController extends BaseController
         // 时间差
         $daysDiff = Yii::$app->params['daysDiff'];
         // 钱包
-        $shopWalletType = Yii::$app->params['shopWalletType'];
+        $shopWalletType = Tool::paramConvert(Yii::$app->params['shopWalletType']);
         return [
             'decLevels' => $decLevels,
             'empLevels' => $empLevels,
@@ -131,7 +132,7 @@ class SiteController extends BaseController
         // 时间差
         $daysDiff = Yii::$app->params['daysDiff'];
         // 钱包
-        $shopWalletType = Yii::$app->params['shopWalletType'];
+        $shopWalletType = Tool::paramConvert(Yii::$app->params['shopWalletType']);
 
         //期数显示
         $periodNum = Period::instance()->getNowPeriodNum();
@@ -328,7 +329,7 @@ class SiteController extends BaseController
         // 时间差
         $daysDiff = Yii::$app->params['daysDiff'];
         // 钱包
-        $shopWalletType = Yii::$app->params['shopWalletType'];
+        $shopWalletType = Tool::paramConvert(Yii::$app->params['shopWalletType']);
 
         return [
             'decLevels' => '',

+ 6 - 6
frontendApi/modules/v1/controllers/UserController.php

@@ -371,8 +371,8 @@ class UserController extends BaseController {
             'allGoods' => $allGoods,
             'decUserName'=>$decUserName,
             'payList' => ShopGoods::payTypes(),
-            'sellType' => ShopGoods::CATEGORY_TYPE,
-            'categoryType' => ShopGoods::CATEGORY_TYPE[0]['id'],
+            'sellType' => ShopGoods::getCategoryType(),
+            'categoryType' => ShopGoods::getCategoryType()[0]['id'],
             'userBalance' => $userBalance,
         ]);
     }
@@ -476,8 +476,8 @@ class UserController extends BaseController {
             'allOpenBank' => $allOpenBank,
             'userName' => $userName,
             'payList' => ShopGoods::payTypes(),
-            'sellType' => ShopGoods::CATEGORY_TYPE,
-            'categoryType' => ShopGoods::CATEGORY_TYPE[0]['id'],
+            'sellType' => ShopGoods::getCategoryType(),
+            'categoryType' => ShopGoods::getCategoryType()[0]['id'],
             'userBalance' => $userBalance,
         ]);
     }
@@ -724,8 +724,8 @@ class UserController extends BaseController {
             'allGoods' => $allGoods,
             'userName' => $userName,
             'payList' => ShopGoods::payTypes(),
-            'sellType' => ShopGoods::CATEGORY_TYPE,
-            'categoryType' => ShopGoods::CATEGORY_TYPE[0]['id'],
+            'sellType' => ShopGoods::getCategoryType(),
+            'categoryType' => ShopGoods::getCategoryType()[0]['id'],
             'userBalance' => $userBalance,
         ]);
     }