|
|
@@ -3,246 +3,252 @@
|
|
|
namespace common\components;
|
|
|
|
|
|
//字典
|
|
|
+use bizGhs\express\services\MiniExpressService;
|
|
|
+
|
|
|
class dict
|
|
|
{
|
|
|
-
|
|
|
- const data = [
|
|
|
-
|
|
|
- //默认的日期搜索选项
|
|
|
- 'dateDefaultOption' => [
|
|
|
- ['name' => '昨天', 'value' => 'yesterday'],
|
|
|
- ['name' => '今天', 'value' => 'today',],
|
|
|
- ['name' => '本月', 'value' => 'thisMonth',],
|
|
|
- ['name' => '上月', 'value' => 'lastMonth',],
|
|
|
- ['name' => '今年', 'value' => 'thisYear',],
|
|
|
- ],
|
|
|
-
|
|
|
- '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' => 1],
|
|
|
- ['name' => '余额', 'id' => 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],
|
|
|
-
|
|
|
- '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::data[$category] : self::data[$category][$name];
|
|
|
- }
|
|
|
-
|
|
|
- public function getValue($category, $name = '')
|
|
|
- {
|
|
|
- return empty($name) ? self::data[$category] : self::data[$category][$name];
|
|
|
- }
|
|
|
-
|
|
|
- //取缓存键名
|
|
|
- public static function getCacheKey($key)
|
|
|
- {
|
|
|
- if (isset(self::$cacheKey[$key])) {
|
|
|
- return self::$cacheKey[$key];
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- //列出所有的常量 shish 2021.3.18
|
|
|
- public static function get()
|
|
|
- {
|
|
|
- $data = self::data;
|
|
|
- return $data;
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
+ const data = [
|
|
|
+
|
|
|
+ //默认的日期搜索选项
|
|
|
+ 'dateDefaultOption' => [
|
|
|
+ ['name' => '昨天', 'value' => 'yesterday'],
|
|
|
+ ['name' => '今天', 'value' => 'today',],
|
|
|
+ ['name' => '本月', 'value' => 'thisMonth',],
|
|
|
+ ['name' => '上月', 'value' => 'lastMonth',],
|
|
|
+ ['name' => '今年', 'value' => 'thisYear',],
|
|
|
+ ],
|
|
|
+
|
|
|
+ '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' => 1],
|
|
|
+ ['name' => '余额', 'id' => 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],
|
|
|
+
|
|
|
+ '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::data[$category] : self::data[$category][$name];
|
|
|
+ }
|
|
|
+
|
|
|
+ public function getValue($category, $name = '')
|
|
|
+ {
|
|
|
+ return empty($name) ? self::data[$category] : self::data[$category][$name];
|
|
|
+ }
|
|
|
+
|
|
|
+ //取缓存键名
|
|
|
+ public static function getCacheKey($key)
|
|
|
+ {
|
|
|
+ if (isset(self::$cacheKey[$key])) {
|
|
|
+ return self::$cacheKey[$key];
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //列出所有的常量 shish 2021.3.18
|
|
|
+ public static function get()
|
|
|
+ {
|
|
|
+ $data = self::data;
|
|
|
+
|
|
|
+ //即时配送列表
|
|
|
+ $data['expressList'] = MiniExpressService::getAllImmeDelivery();
|
|
|
+
|
|
|
+ return $data;
|
|
|
+ }
|
|
|
+
|
|
|
}
|