shish пре 5 година
родитељ
комит
1eac9f5696

+ 6 - 3
app/hd/controllers/ConsoleController.php

@@ -8,6 +8,7 @@ use bizHd\stat\services\StatIncomeService;
 use bizHd\stat\services\StatOrderService;
 use bizHd\stat\services\StatUserService;
 use bizHd\stat\services\StatVisitService;
+use common\components\configDict;
 use common\components\constant;
 use Yii;
 use common\components\util;
@@ -62,12 +63,14 @@ class ConsoleController extends BaseController
 			'incomeStat' => $incomeStat,
 		]);
 	}
-	
+
 	//常用初始化
 	public function actionInit()
 	{
-		$constant = constant::data();
+		$constant1 = configDict::$dict;
+		$constant2 = constant::data();
+		$constant = array_merge($constant1, $constant2);
 		util::success(['constant' => $constant]);
 	}
-	
+
 }

+ 13 - 3
biz-hd/px/classes/PxApplyClass.php

@@ -2,10 +2,12 @@
 
 namespace bizHd\px\classes;
 
+use biz\shop\classes\ShopCapitalClass;
 use biz\shop\classes\ShopClass;
 use biz\sj\classes\SjCapitalClass;
 use bizHd\custom\classes\CustomClass;
 use bizHd\stat\classes\StatStudentClass;
+use common\components\configDict;
 use common\components\imgUtil;
 use common\components\orderSn;
 use Yii;
@@ -29,9 +31,17 @@ class PxApplyClass extends BaseClass
 		$shopId = $shop['id'];
 		$totalIncome = bcadd($shop['totalIncome'], $data['actPrice'], 2);
 		ShopClass::updateById($shopId, ['totalIncome' => $totalIncome]);
-
-		$capitalData = [];
-		SjCapitalClass::addCapital($capitalData);
+		
+		$capitalType = configDict::getConfig('capitalType', 'capitalType');
+		$totalIncome = 10;
+		$capitalTypeId = $capitalType['id'];
+		$capitalData = [
+			'capitalType' => $capitalTypeId,
+			'io' => 1,
+			'totalIncome' => $totalIncome,
+			'payWay' => 1,
+		];
+		ShopCapitalClass::addCapital($capitalData);
 		
 		return self::add($data);
 	}

+ 8 - 1
biz/shop/classes/ShopCapitalClass.php

@@ -2,12 +2,19 @@
 
 namespace biz\shop\classes;
 
+use biz\sj\classes\SjCapitalClass;
 use Yii;
 use biz\base\classes\BaseClass;
 
 class ShopCapitalClass extends BaseClass
 {
 
-    public static $baseFile = '\biz\shop\models\ShopCapital';
+	public static $baseFile = '\biz\shop\models\ShopCapital';
+
+	//门店流水增加 shish 2021.3.18
+	public static function addCapital($data)
+	{
+
+	}
 
 }

+ 220 - 309
common/components/configDict.php

@@ -9,313 +9,224 @@ namespace common\components;
 class configDict
 {
 
-    public static $dict = [
-        'openId' => 1,//开放平台初始数据
-        'openAdminId' => 1,//开放平台初始管理员id
-        'merchantId' => 1,//公众平台的默认初始商户id
-        'categoryClassify' => ['goodsLink' => 0, 'articleLink' => 1],
-        'categoryClassifyName' => [0 => '商品', 1 => '文章'],//导航菜单的分类属性
-        'categoryClassifyUrl' => [//导航菜单分类属性对应的访问链接
-            0 => '/mobile/goods-list',
-            1 => '/article/article-list',
-        ],
-        'merchant' => [
-            'authAccount' => [3]//0个人个体户 1未认证服务号 2未认证订阅号 3服务号 4订阅号
-        ],
-        'merchantStatus' => ['checking' => 0, 'pass' => 1, 'noPass' => 2, 'freeze' => 3, 'unfreeze' => 4, 'shut' => 5],
-        'merchantStatusName' => [0 => '审核中', 1 => '审核通过', 2 => '审核未通过', 3 => '冻结', 4 => '解除冻结', 5 => '自主关闭'],
-
-        'riseType' => ['noRise' => 0, 'percent' => 1, 'amount' => 2,],//涨价方式
-        'riseTypeName' => [0 => '不涨价', 1 => '按百分比', 2 => '按金额'],
-
-        'accountStyle' => ['serviceAccount' => 0, 'subscribeAccount' => 1, 'unAuthServiceAccount' => 2],//公众号类型
-        'accountStyleName' => [0 => '服务号', 1 => '订阅号', 2 => '未认证服务号'],
-
-        'payStyleName' => [0 => '第三方支付', 1 => '非第三方支付'],
-        'payStyle' => ['weixinPay' => 0, 'alipay' => 0, 'thirdPay' => 0, 'balancePay' => 1, 'cashPay' => 1, 'selfPay' => 1],//公众号的微信支付、支付宝支付属于第三方支付,余额现金属于非第三方
-
-        'payWay' => ['weixinPay' => 0, 'alipay' => 1, 'balancePay' => 2],
-        'payWayName' => [0 => '微信', 1 => '支付宝', 2 => '余额'],
-        'payWayFullName' => [0 => '微信支付', 1 => '支付宝', 2 => '余额支付'],
-
-        'payStatusName' => [-1 => '客户关闭', 0 => '待付款', 1 => '已付款'],
-        'payStatus' => ['cancel' => -1, 'waitForPay' => 0, 'waitForSend' => 1],
-
-        'sendStatusName' => [0 => '待发货', 1 => '送货中', 2 => '已送达'],
-        'sendStatus' => ['waitForSend' => 0, 'sending' => 1, 'reached' => 2],
-
-        'replyType' => ['redirectUrl' => 0, 'text' => 1, 'news' => 2, 'multiNews' => 3],
-        'replyTypeName' => [0 => '跳转链接', 1 => '回复文字', 2 => '回复单图文', 3 => '回复多图文'],
-
-        'goodsStatusName' => [0 => '正常', 1 => '下架', 2 => '删除'],
-        'goodsStatus' => ['online' => 0, 'soldOut' => 1, 'del' => 2],
-
-        'goodsDelStatusName' => [0 => '正常,未删除', 1 => '删除'],
-        'goodsDelStatus' => ['normal' => 0, 'del' => 1],
-
-        'wxMenuOption' => ['redirectToCommonUseUrl' => 0, 'redirectToCustomUrl' => 1, 'showText' => 2, 'redirectToMiniProgram' => 3],
-        'wxMenuOptionName' => [
-            0 => ['name' => '跳转到-常用链接', 'key' => 0, 'replyType' => 0],//replyType 回复类型
-            1 => ['name' => '跳转到-自定义网址', 'key' => 1, 'replyType' => 0],
-            2 => ['name' => '跳转到-文字', 'key' => 2, 'replyType' => 1],
-            3 => ['name' => '跳转到-小程序', 'key' => 3, 'replyType' => 0],
-        ],
-
-        'reachPeriodName' => [0 => '上午', 1 => '下午', 2 => '晚上'],
-        'reachPeriod' => ['am' => 0, 'pm' => 1, 'night' => 2],
-
-        'manageStyle' => ['retail' => 0, 'train' => 1, 'wholesale' => 2],//经营类型
-        'manageStyleName' => [0 => '零售', 1 => '花艺培训', 2 => '批发'],//经营类型
-        'commonUseUrl' => [//常用链接 manageStyle 0 零售 1 培训学校 2批发商
-            1 => ['name' => '商城首页', 'url' => '/mobile/index', 'key' => 1, 'manageStyle' => 0],
-            2 => ['name' => '我的订单', 'url' => '/center/order', 'key' => 2, 'manageStyle' => 0],
-            3 => ['name' => '会员中心', 'url' => '/center/index', 'key' => 3, 'manageStyle' => 0],
-            4 => ['name' => '我的会员卡', 'url' => '/center/qr-code', 'key' => 4, 'manageStyle' => 0],
-            5 => ['name' => '培训首页', 'url' => '/train/index', 'key' => 5, 'manageStyle' => 1],
-            6 => ['name' => '我的代金劵', 'url' => '/center/coupon', 'key' => 6, 'manageStyle' => 0],
-            7 => ['name' => '快速付款', 'url' => '/payment/quick-order', 'key' => 7, 'manageStyle' => 0],
-        ],
-        'commonUseUrlMapped' => ['mall' => 1, 'myOrder' => 2, 'memberCenter' => 3, 'myMemberCard' => 4, 'trainIndex' => 5, 'myCoupon' => 6, 'quickOrder' => 7],
-
-        //运费
-        'freight' => [
-            'firstDistance' => 5000,//5公里内
-            'firstPrice' => 0,//16元运费
-            'nextDistance' => 1000,//每增加1公里
-            'nextPrice' => 2,//增加2元
-        ],
-        "iWantToJoin" => "iWantToJoin",//我要入驻
-
-        "io" => ['payout' => 0, 'income' => 1, 'other' => 2],
-        "ioName" => [0 => '支出', 1 => '收入', 2 => '其它'],
-
-        "inviteUseTo" => [//邀请码用处
-            'applyMerchant' => ['key' => 0, 'name' => 'xhApplyOrder'],//申请公众号
-            'openRenew' => ['key' => 1, 'name' => 'xhOpenRenewOrder'],//开通续费
-        ],
-
-        "capitalType" => [//流水类型,充值支付回调时的订单类型
-            'xhOrder' => ['id' => 0, 'name' => 'xhOrder'],
-            'xhActiveOrder' => ['id' => 2, 'name' => 'xhActiveOrder'],
-            //充值
-            'xhRecharge' => ['id' => 4, 'name' => 'xhRecharge'],
-            //支付宝关联微信帐号,积分累加订单
-            'xhUserUnite' => ['id' => 5, 'name' => 'xhUserUnite'],
-            'xhDrawCash' => ['id' => 6, 'name' => 'xhDrawCash'],
-            'xhApplyOrder' => ['id' => 7, 'name' => 'xhApplyOrder'],
-            'xhMergeUser' => ['id' => 8, 'name' => 'xhMergeUser'],
-            'xhRenew' => ['id' => 9, 'name' => 'xhRenew'],
-            //供货商订单
-            'xhGhsOrder' => ['id' => 10, 'name' => 'xhGhsOrder'],
-            //花店采购
-            'xhPurchase' => ['id' => 11, 'name' => 'xhPurchase'],
-        ],
-        "capitalTypeList" => [//流水类型的对应链接,后台收支明细查看时跳转的链接
-            0 => ['link' => '/capital/order-detail', 'name' => '网店', 'orderLink' => '/order/detail'],
-            2 => ['link' => '/capital/active-order-detail', 'name' => '活动报名', 'orderLink' => ''],
-            4 => ['link' => '/capital/recharge-detail', 'name' => '充值', 'orderLink' => ''],
-            5 => ['link' => '/capital/user-unite', 'name' => '帐号关联', 'orderLink' => ''],
-            6 => ['link' => '/capital/draw-cash', 'name' => '提现', 'orderLink' => ''],
-            7 => ['link' => '/capital/apply-order-detail', 'name' => '接入申请', 'orderLink' => ''],
-            8 => ['link' => '/capital/merge-user', 'name' => '帐号合并', 'orderLink' => ''],
-            9 => ['link' => '/capital/renew', 'name' => '续费', 'orderLink' => ''],
-            10 => ['link' => '/capital/order-detail', 'name' => '订单', 'orderLink' => ''],
-            11 => ['link' => '/capital/purchase-detail', 'name' => '订单', 'orderLink' => ''],
-        ],
-        "imgSavePath" => [//图片保存目录
-            'wxUserAvatar' => 'weixinUserAvatar',//微信用户头像
-            'wxUserImg' => 'weixinUserImg',//微信用户上传的图片
-            'wxMpQrcode' => 'weixinMpQrcode',//公众号二维码
-            'wxMpAvatar' => 'weixinMpAvatar',//公众号头像
-            'wxAdminAvatar' => 'weixinAdminAvatar',//管理员头像
-            'wxAdminImg' => 'weixinAdminImg',//微信后台管理上传图片
-        ],
-        //模板消息
-        'tMessage' => [
-            'OPENTM207430125' => '操作成功通知',
-            'OPENTM401915538' => '审核通知',
-            'TM00006' => '充值通知',
-            'OPENTM201205968' => '订单送达通知',
-            'OPENTM207777535' => '付款提醒',
-            'OPENTM401761342' => '订单价格修改通知',
-            'OPENTM205211943' => '会员升级通知',
-            'TM00230' => '积分变动通知',
-            'OPENTM200605630' => '任务处理通知',
-//			'OPENTM401027382' => '课程报名成功',
-            'OPENTM207422813' => '收入提醒',
-            'OPENTM202297555' => '下单成功通知',
-            'OPENTM207327227' => '宝贝售出提醒',
-            'OPENTM207188526' => '付款成功',
-//			'TM00575' => '报名成功通知',
-//			'OPENTM201319876' => '结算通知',
-        ],
-        //格式:  表名 => ['表字段' => [...]]
-        'xhShop' => [ //表名
-            'status' => [0 => '运营后台审核中', 1 => '微信审核中', 2 => '审核通过', 3 => '未通过', 4 => '微信系统错误'],//门店审核状态(表字段)
-        ],
-        'xhActiveOrder' => [ //表名
-            'payStatus' => [-1 => '未通过', 0 => '等待审批', 1 => '通过'],
-        ],
-        'xhLuckyDrawAwardCustomer' => [ //表名
-            'status' => [-1 => '过期未领取', 0 => '待发放', 1 => '已发放'],
-        ],
-
-        'xhGuaGuaWin' => [ //表名
-            'status' => [1 => '未领取', 2 => '已发放', 3 => '过期未领取'],
-        ],
-
-        'trainDemo' => [//培训演示使用的公众号
-            'merchant' => ['name' => '花掌柜', 'account' => '16063078665', 'wxPayMerchantId' => '1265953301', 'wxPayKey' => 'woz23aG739jscv4309275jnza3qw8dwm'],
-            'platform' => ['name' => '花汇宝', 'account' => '16063078661', 'wxPayMerchantId' => '1398843402', 'wxPayKey' => 'db123jf239jswx2309h10jnze3qwjd1v'],
-        ],
-
-        //图片形状和比例类型
-        'imgShape' => [
-            'square' => ['id' => 0],//正方形 1:1  400x400
-            'rectangle' => ['id' => 1],//长方形 3:2 450x300
-            'focus' => ['id' => 2],//焦点图 750x280
-        ],
-        'imgShapeGetId' => [
-            0 => ['name' => 'square'],
-            1 => ['name' => 'rectangle'],
-            2 => ['name' => 'focus'],
-        ],
-        //用户来源
-        'userSource' => [
-            0 => 'official',
-            1 => 'alipay',
-            2 => 'mini',
-        ],
-        'userSourceGetId' => [
-            'official' => ['id' => 0, 'name' => 'official'],
-            'alipay' => ['id' => 1, 'name' => 'alipay'],
-            'mini' => ['id' => 2, 'name' => 'mini'],
-        ],
-    ];
-
-    //生成二维码的Key
-    public static $qrKey = [
-        'user' => 'huahuibao_user_',
-        'coupon' => 'huahuibao_coupon_',
-        'xhStudent' => 'xhStudent_',
-        'gathering' => 'gathering_',//收款二维码
-    ];
-
-    public static $cacheKey = [
-        'tagUser' => '_tagUser_',//标签下的用户
-        'userTag' => 'userTag_',//用户的标签
-        'merchantTag' => 'merchantTag_',//商家的标签
-        'userCart' => 'userCart_',
-        'cart' => 'cart_',
-        'userCoupon' => 'userCoupon_',//用户代金劵
-        'merchantAccount' => 'merchant_account_',//根据account取商家信息
-        'merchantId' => 'merchant_id_',//根据id取商家信息
-        'merchantAsset' => 'merchantAsset_',
-        'merchantExtend' => 'merchantExtend_',
-        'merchantAppId' => 'merchantAppId_',
-        'gatherVisitIPByDay' => 'gatherVisitIPByDay',//每天访问的IP列表
-        'statVisitNumByDay' => 'statVisitNumByDay',//每天访问量
-        'statUserNumByDay' => 'statUserNumByDay',//每天新增粉丝
-        'statIncome' => 'statIncome',//每天增加的收入,微信支付、支付宝支付、余额支付,加积分(现金消费)都属于收入,充值暂不归属于商家收入
-        'statDealByDay' => 'statDealByDay',//每天新增的交易,微信支付、支付宝支付、余额支付,加积分(现金消费)都属于交易,充值暂不归属于商家交易
-        'merchantTrade' => 'merchantTrade',
-        'latestVisitNum' => 'latestVisitNum_',//最近N天访问数
-        'latestIncomeNum' => 'latestIncomeNum_',//最近N天的收入金额
-        'latestUserNum' => 'latestUserNum_',//最近N天的粉丝变化
-        'wxOpen' => 'wxOpen_',
-        'goodsGetById' => 'goodsGetById_',
-        'article' => 'article_',
-        'slide' => 'slide_',
-        'recommendGoods' => 'recommendGoods_',
-        'tMessage' => 'tMessage_',
-        'admin' => 'admin_',
-        'order' => 'order_',
-        'categoryGoodsList' => 'categoryGoodsList_',
-        'categoryList' => 'categoryList_',
-        'categoryNavigationBar' => 'categoryNavigationBar_',
-        'category' => 'category_',
-        'mobileOpenAdmin' => 'mobileOpenAdmin_',
-        'openAdmin' => 'openAdmin_',
-        'inviteCodeList' => 'inviteCodeList',
-        'coupon' => 'coupon_',
-        'swoolePhoneMsg' => 'swoole:phone:message',//swoole进程中断时,保存上次发送手机短信的时间
-
-        //表数据缓存
-        'xhUserAsset' => 'xhUserAsset_',
-        'xhUserAlipayAsset' => 'xhUserAlipayAsset',
-        'xhAdminMobile' => 'xhAdminMobile_',
-        'xhActive' => 'xhActive_',
-        'xhActiveTicketClass' => 'xhActiveTicketClass_',
-        'xhActiveOrder' => 'xhActiveOrder_',
-        'xhUnionUser' => 'xhUnionUser_',
-        'xhGoodsSetting' => 'xhGoodsSetting_',
-        'xhUser' => 'xhUser_',
-        'xhUserAlipay' => 'xhUserAlipay',
-        'xhUserOpenId' => 'xhUser_openId_',
-        'xhUserUnite' => 'xhUserUnite',
-        'xhDrawCash' => 'xhDrawCash_',
-        'xhWxMenu' => 'xhWxMenu_',
-        'xhWxMenuKey' => 'xhWxMenuKey_',
-        'xhWxMenuList' => 'xhWxMenuList_',
-        'xhShop' => 'xhShop_',
-        'xhWifiList' => 'xhWifiList_',
-        'xhAdminOpenId' => 'xhAdminOpenId_',
-        'xhPxClass' => 'xhPxClass_',
-        'xhPxCourse' => 'xhPxCourse_',
-        'xhTrainStudent' => 'xhTrainStudent_',
-        'xhPxUserCourse' => 'xhPxUserCourse_',
-        'xhOrderDayNum' => 'xhOrderDayNum',
-        'xhOrderMonthNum' => 'xhOrderMonthNum',
-        'xhStatIncome' => 'xhStatIncome',
-        'xhStatIncomeMonth' => 'xhStatIncomeMonth',
-        'xhUserByMonth' => 'xhUserByMonth',
-        'xhUserByDay' => 'xhUserByDay',
-        'xhVisitByMonth' => 'xhVisitByMonth',
-        'xhVisitByDay' => 'xhVisitByDay',
-        'xhInvite' => 'xhInvite_',
-        'xhMerchantAccount' => 'xhMerchantAccount_',
-        'xhApplyOrder' => 'xhApplyOrder_',
-        'xhInviteCode' => 'xhInviteCode_',
-        'xhSetMeal' => 'xhSetMeal_',
-        'xhGoodsPrice' => 'xhGoodsPrice_',
-        'xhAdminToMerchant' => 'xhAdminToMerchant',
-        'xhAdminToMerchantList' => 'xhAdminToMerchantList',
-        'xhUserIntegral' => 'xhUserIntegral_',
-        'xhLuckyDrawActivity' => 'xhLuckyDrawActivity_',
-        'xhLuckyDrawAward' => 'xhLuckyDrawAward_',
-        'xhLuckyDrawAwardParticipant' => 'xhLuckyDrawAwardParticipant_',
-        'xhLuckyDrawAwardCustomer' => 'xhLuckyDrawAwardCustomer_',
-    ];
-
-    /**
-     * 取配置文件的值
-     */
-    public static function getConfig($category, $name = null)
-    {
-        return empty($name) ? self::$dict[$category] : self::$dict[$category][$name];
-    }
-
-
-    public function getValue($category, $name = '')
-    {
-        return empty($name) ? self::$dict[$category] : self::$dict[$category][$name];
-    }
-
-    /**
-     * 取缓存Key
-     */
-    public static function getCacheKey($key)
-    {
-        if (isset(self::$cacheKey[$key])) {
-            return self::$cacheKey[$key];
-        }
-    }
-
-    public static function getQrKey($key)
-    {
-        if (isset(self::$qrKey[$key])) {
-            return self::$qrKey[$key];
-        }
-    }
-
+	public static $dict = [
+
+		'merchantStatus' => ['checking' => 0, 'pass' => 1, 'noPass' => 2, 'freeze' => 3, 'unfreeze' => 4, 'shut' => 5],
+		'merchantStatusName' => [0 => '审核中', 1 => '审核通过', 2 => '审核未通过', 3 => '冻结', 4 => '解除冻结', 5 => '自主关闭'],
+
+		'riseType' => ['noRise' => 0, 'percent' => 1, 'amount' => 2,],//涨价方式
+		'riseTypeName' => [0 => '不涨价', 1 => '按百分比', 2 => '按金额'],
+
+		'accountStyle' => ['serviceAccount' => 0, 'subscribeAccount' => 1, 'unAuthServiceAccount' => 2],//公众号类型
+		'accountStyleName' => [0 => '服务号', 1 => '订阅号', 2 => '未认证服务号'],
+
+		'payWay' => ['weixinPay' => 0, 'alipay' => 1, 'balancePay' => 2],
+		'payWayName' => [0 => '微信', 1 => '支付宝', 2 => '余额'],
+		'payWayFullName' => [0 => '微信支付', 1 => '支付宝', 2 => '余额支付'],
+		//后台支付方式选项
+		'htPayWayOption' => [
+			['name' => '微信支付', 'id' => 0],
+			['name' => '微信支付', 'id' => 0],
+			['name' => '微信支付', 'id' => 0],
+		],
+
+		'payStatusName' => [-1 => '客户关闭', 0 => '待付款', 1 => '已付款'],
+		'payStatus' => ['cancel' => -1, 'waitForPay' => 0, 'waitForSend' => 1],
+		
+		'sendStatusName' => [0 => '待发货', 1 => '送货中', 2 => '已送达'],
+		'sendStatus' => ['waitForSend' => 0, 'sending' => 1, 'reached' => 2],
+		
+		'replyType' => ['redirectUrl' => 0, 'text' => 1, 'news' => 2, 'multiNews' => 3],
+		'replyTypeName' => [0 => '跳转链接', 1 => '回复文字', 2 => '回复单图文', 3 => '回复多图文'],
+		
+		'goodsStatusName' => [0 => '正常', 1 => '下架', 2 => '删除'],
+		'goodsStatus' => ['online' => 0, 'soldOut' => 1, 'del' => 2],
+		
+		'goodsDelStatusName' => [0 => '正常,未删除', 1 => '删除'],
+		'goodsDelStatus' => ['normal' => 0, 'del' => 1],
+		
+		'reachPeriodName' => [0 => '上午', 1 => '下午', 2 => '晚上'],
+		'reachPeriod' => ['am' => 0, 'pm' => 1, 'night' => 2],
+		
+		'manageStyle' => ['retail' => 0, 'train' => 1, 'wholesale' => 2],//经营类型
+		'manageStyleName' => [0 => '零售', 1 => '花艺培训', 2 => '批发'],//经营类型
+		
+		//运费
+		'freight' => [
+			'firstDistance' => 5000,//5公里内
+			'firstPrice' => 0,//16元运费
+			'nextDistance' => 1000,//每增加1公里
+			'nextPrice' => 2,//增加2元
+		],
+		"iWantToJoin" => "iWantToJoin",//我要入驻
+		
+		"io" => ['payout' => 0, 'income' => 1, 'other' => 2],
+		"ioName" => [0 => '支出', 1 => '收入', 2 => '其它'],
+		
+		"capitalType" => [//流水类型,充值支付回调时的订单类型
+			'xhOrder' => ['id' => 0, 'name' => 'xhOrder'],
+			'xhActiveOrder' => ['id' => 2, 'name' => 'xhActiveOrder'],
+			//充值
+			'xhRecharge' => ['id' => 4, 'name' => 'xhRecharge'],
+			//支付宝关联微信帐号,积分累加订单
+			'xhUserUnite' => ['id' => 5, 'name' => 'xhUserUnite'],
+			'xhDrawCash' => ['id' => 6, 'name' => 'xhDrawCash'],
+			'xhApplyOrder' => ['id' => 7, 'name' => 'xhApplyOrder'],
+			'xhMergeUser' => ['id' => 8, 'name' => 'xhMergeUser'],
+			'xhRenew' => ['id' => 9, 'name' => 'xhRenew'],
+			//供货商订单
+			'xhGhsOrder' => ['id' => 10, 'name' => 'xhGhsOrder'],
+			//花店采购
+			'xhPurchase' => ['id' => 11, 'name' => 'xhPurchase'],
+			'pxApply' => ['id' => 12, 'name' => 'pxApply'],
+		],
+		"capitalTypeList" => [//流水类型的对应链接,后台收支明细查看时跳转的链接
+			0 => ['link' => '/capital/order-detail', 'name' => '网店', 'orderLink' => '/order/detail', 'id' => 0,],
+			2 => ['link' => '/capital/active-order-detail', 'name' => '活动报名', 'orderLink' => '', 'id' => 2,],
+			4 => ['link' => '/capital/recharge-detail', 'name' => '充值', 'orderLink' => '', 'id' => 4,],
+			5 => ['link' => '/capital/user-unite', 'name' => '帐号关联', 'orderLink' => '', 'id' => 5,],
+			6 => ['link' => '/capital/draw-cash', 'name' => '提现', 'orderLink' => '', 'id' => 6,],
+			7 => ['link' => '/capital/apply-order-detail', 'name' => '接入申请', 'orderLink' => '', 'id' => 7,],
+			8 => ['link' => '/capital/merge-user', 'name' => '帐号合并', 'orderLink' => '', 'id' => 8,],
+			9 => ['link' => '/capital/renew', 'name' => '续费', 'orderLink' => '', 'id' => 9,],
+			10 => ['link' => '/capital/order-detail', 'name' => '订单', 'orderLink' => '', 'id' => 10,],
+			11 => ['link' => '/capital/purchase-detail', 'name' => '订单', 'orderLink' => '', 'id' => 11,],
+			12 => ['link' => '/capital/purchase-detail', 'name' => '培训报名', 'orderLink' => '', 'id' => 12,],
+		],
+
+		//模板消息
+		'tMessage' => [
+			'OPENTM207430125' => '操作成功通知',
+			'OPENTM401915538' => '审核通知',
+			'TM00006' => '充值通知',
+			'OPENTM201205968' => '订单送达通知',
+			'OPENTM207777535' => '付款提醒',
+			'OPENTM401761342' => '订单价格修改通知',
+			'OPENTM205211943' => '会员升级通知',
+			'TM00230' => '积分变动通知',
+			'OPENTM200605630' => '任务处理通知',
+			'OPENTM207422813' => '收入提醒',
+			'OPENTM202297555' => '下单成功通知',
+			'OPENTM207327227' => '宝贝售出提醒',
+			'OPENTM207188526' => '付款成功',
+		],
+
+		//用户来源
+		'userSource' => [
+			0 => 'official',
+			1 => 'alipay',
+			2 => 'mini',
+		],
+		'userSourceGetId' => [
+			'official' => ['id' => 0, 'name' => 'official'],
+			'alipay' => ['id' => 1, 'name' => 'alipay'],
+			'mini' => ['id' => 2, 'name' => 'mini'],
+		],
+	];
+
+	public static $cacheKey = [
+		'tagUser' => '_tagUser_',//标签下的用户
+		'userTag' => 'userTag_',//用户的标签
+		'merchantTag' => 'merchantTag_',//商家的标签
+		'userCart' => 'userCart_',
+		'cart' => 'cart_',
+		'userCoupon' => 'userCoupon_',//用户代金劵
+		'merchantAccount' => 'merchant_account_',//根据account取商家信息
+		'merchantId' => 'merchant_id_',//根据id取商家信息
+		'merchantAsset' => 'merchantAsset_',
+		'merchantExtend' => 'merchantExtend_',
+		'merchantAppId' => 'merchantAppId_',
+		'gatherVisitIPByDay' => 'gatherVisitIPByDay',//每天访问的IP列表
+		'statVisitNumByDay' => 'statVisitNumByDay',//每天访问量
+		'statUserNumByDay' => 'statUserNumByDay',//每天新增粉丝
+		'statIncome' => 'statIncome',//每天增加的收入,微信支付、支付宝支付、余额支付,加积分(现金消费)都属于收入,充值暂不归属于商家收入
+		'statDealByDay' => 'statDealByDay',//每天新增的交易,微信支付、支付宝支付、余额支付,加积分(现金消费)都属于交易,充值暂不归属于商家交易
+		'merchantTrade' => 'merchantTrade',
+		'latestVisitNum' => 'latestVisitNum_',//最近N天访问数
+		'latestIncomeNum' => 'latestIncomeNum_',//最近N天的收入金额
+		'latestUserNum' => 'latestUserNum_',//最近N天的粉丝变化
+		'wxOpen' => 'wxOpen_',
+		'goodsGetById' => 'goodsGetById_',
+		'article' => 'article_',
+		'slide' => 'slide_',
+		'recommendGoods' => 'recommendGoods_',
+		'tMessage' => 'tMessage_',
+		'admin' => 'admin_',
+		'order' => 'order_',
+		'categoryGoodsList' => 'categoryGoodsList_',
+		'categoryList' => 'categoryList_',
+		'categoryNavigationBar' => 'categoryNavigationBar_',
+		'category' => 'category_',
+		'mobileOpenAdmin' => 'mobileOpenAdmin_',
+		'openAdmin' => 'openAdmin_',
+		'inviteCodeList' => 'inviteCodeList',
+		'coupon' => 'coupon_',
+		//swoole进程中断时,保存上次发送手机短信的时间
+		'swoolePhoneMsg' => 'swoole:phone:message',
+		//表数据缓存
+		'xhUserAsset' => 'xhUserAsset_',
+		'xhUserAlipayAsset' => 'xhUserAlipayAsset',
+		'xhAdminMobile' => 'xhAdminMobile_',
+		'xhActive' => 'xhActive_',
+		'xhActiveTicketClass' => 'xhActiveTicketClass_',
+		'xhActiveOrder' => 'xhActiveOrder_',
+		'xhUnionUser' => 'xhUnionUser_',
+		'xhGoodsSetting' => 'xhGoodsSetting_',
+		'xhUser' => 'xhUser_',
+		'xhUserAlipay' => 'xhUserAlipay',
+		'xhUserOpenId' => 'xhUser_openId_',
+		'xhUserUnite' => 'xhUserUnite',
+		'xhDrawCash' => 'xhDrawCash_',
+		'xhWxMenu' => 'xhWxMenu_',
+		'xhWxMenuKey' => 'xhWxMenuKey_',
+		'xhWxMenuList' => 'xhWxMenuList_',
+		'xhShop' => 'xhShop_',
+		'xhWifiList' => 'xhWifiList_',
+		'xhAdminOpenId' => 'xhAdminOpenId_',
+		'xhPxClass' => 'xhPxClass_',
+		'xhPxCourse' => 'xhPxCourse_',
+		'xhTrainStudent' => 'xhTrainStudent_',
+		'xhPxUserCourse' => 'xhPxUserCourse_',
+		'xhOrderDayNum' => 'xhOrderDayNum',
+		'xhOrderMonthNum' => 'xhOrderMonthNum',
+		'xhStatIncome' => 'xhStatIncome',
+		'xhStatIncomeMonth' => 'xhStatIncomeMonth',
+		'xhUserByMonth' => 'xhUserByMonth',
+		'xhUserByDay' => 'xhUserByDay',
+		'xhVisitByMonth' => 'xhVisitByMonth',
+		'xhVisitByDay' => 'xhVisitByDay',
+		'xhInvite' => 'xhInvite_',
+		'xhMerchantAccount' => 'xhMerchantAccount_',
+		'xhApplyOrder' => 'xhApplyOrder_',
+		'xhInviteCode' => 'xhInviteCode_',
+		'xhSetMeal' => 'xhSetMeal_',
+		'xhGoodsPrice' => 'xhGoodsPrice_',
+		'xhAdminToMerchant' => 'xhAdminToMerchant',
+		'xhAdminToMerchantList' => 'xhAdminToMerchantList',
+		'xhUserIntegral' => 'xhUserIntegral_',
+		'xhLuckyDrawActivity' => 'xhLuckyDrawActivity_',
+		'xhLuckyDrawAward' => 'xhLuckyDrawAward_',
+		'xhLuckyDrawAwardParticipant' => 'xhLuckyDrawAwardParticipant_',
+		'xhLuckyDrawAwardCustomer' => 'xhLuckyDrawAwardCustomer_',
+	];
+	
+	//取配置文件的值
+	public static function getConfig($category, $name = null)
+	{
+		return empty($name) ? self::$dict[$category] : self::$dict[$category][$name];
+	}
+
+	public function getValue($category, $name = '')
+	{
+		return empty($name) ? self::$dict[$category] : self::$dict[$category][$name];
+	}
+
+	//取缓存键名
+	public static function getCacheKey($key)
+	{
+		if (isset(self::$cacheKey[$key])) {
+			return self::$cacheKey[$key];
+		}
+	}
+	
 }