'notFound', self::keyTypeString => 'string', self::keyTypeSet => 'set', self::keyTypeList => 'list', self::keyTypeZset => 'zset', self::keyTypeHash => 'hash', ]; return $keyTypeMap; } public static function buildShopRequestRouteMapKey($shopId, $dt, $hour) { return sprintf('dd_shop_request_route_map_%s_%s_%s', $dt, $hour, $shopId); } public static function buildShopRequestJsSignAbnormalKey($shopId) { return sprintf('dd_shop_request_js_sign_abnormal_%s', $shopId); } public static function getQueueRedisKey($queueName, $isAdminSelf) { if ($isAdminSelf) { return ($queueName . '_self'); } else { return $queueName; } } public static function getInusePurchasePlatformsKey($shopId) { return 'inusePurchasePlatforms_' . $shopId; } public static function buildGetNeedCheckPurchaseOrdersLockKey($shopId) { return 'getNeedCheckPurchaseOrdersBizKey_' . $shopId; } public static function buildGetOpOrderPurchaseOutstorageQueueLockKey($shopId) { return 'getOpOrderPurchaseOutstorageQueueBizKey_' . $shopId; } public static function getShopProductTotalKey($shopId) { return sprintf('product_total_%s', $shopId); } public static function getSourceCategoryMapKey($shopId) { return sprintf('source_category_map_%s', $shopId); } public static function shopCatKey($shopId) { return sprintf('shop_category_%s', $shopId); } public static function getOrderMsgTipLockKey($shopId) { return "rsync_order_msg_tip_lock_{$shopId}"; } public static function getOrderReceiveMobileMapKey($minute = '') { $minute = is_numeric($minute) ? str_pad($minute, 2, '0', STR_PAD_LEFT) : date('i'); return sprintf('order_receiver_mobile_map_%s', $minute); } public static function getWaybillWarningWaybillCodeKey($waybillCode) { return "waybill_warning_waybill_code_{$waybillCode}"; } public static function getCheckOrderTipMsgKey($shopId, $filter) { ksort($filter); $condition = md5(serialize($filter)); return "rsync_after_sales_msg_{$shopId}_{$condition}"; } public static function buildDeletedSystemBanWordsKey($shopId) { return 'deleted_system_ban_words_' . $shopId; } public static function buildWhiteBgImgKey($shopId, $taskId) { return sprintf('build_white_bg_img_key_%s_%s', $shopId, $taskId); } public static function getShopBizWhitelistBizKey($bizCode) { return sprintf('shop_biz_whitelist_%s_map', $bizCode); } public static function getMergeSimilarOrderLockKey($venderId, $postReceiverIndex) { return sprintf('merge_similar_order_lock_%s_%s', $venderId, $postReceiverIndex); } public static function buildShopAuthTokenKey($shopId, $groupId) { return sprintf("shop_auth_join_group_token_%s_%s", $shopId, $groupId); } public static function buildShopAuthTokenGroupIdKey($token) { return sprintf("shop_auth_join_group_token_%s", $token); } public static function getIsvLogRedisBizKey($isAdminSelf) { $key = Zc::C('appName') . '_isvLogToDdList'; if ($isAdminSelf) { $key .= '_self'; } return $key; } public static function buildRsyncOpOrderQueueCompletedMapLockKey($queueId) { return sprintf('rsync_op_order_queue_completed_map_lock_%s', $queueId); } public static function getBizIdUuidKey($date) { return sprintf('bizIdUuidKey_%s', $date); } public static function buildStopAllKafkaConsumerKey($bizKey) { return sprintf('stop_kafka_consumer_%s', $bizKey); } public static function buildStopKafkaConsumerKey($timerLockId) { return sprintf('stop_kafka_consumer_%s', $timerLockId); } public static function buildAddMarkNewOrderTipMsgReadQueueKey($shopId) { return sprintf('add_mark_new_order_tip_msg_read_%s', $shopId); } public static function buildPayingNewOrderStatBizKey($date = '') { $dt = date('Ymd', $date ? strtotime($date) : time()); return sprintf('paying_new_order_stat_%s', $dt); } public static function buildIsForceUseDbSearch($biz) { $isPre = AppConst::isPre(); return sprintf('is_force_use_db_search_%s%s', $biz, $isPre ? '_pre' : ''); } public static function buildIsForceUseEsSearchShopIdsKey($biz) { $isPre = AppConst::isPre(); return sprintf('is_force_use_es_search_shop_ids_%s%s', $biz, $isPre ? '_pre' : ''); } public static function buildOrderStatBizKey($isSelf) { return self::orderStatBizKey . ($isSelf ? '_self' : ''); } public static function buildPurchaseOrderStatBizKey($isSelf) { return self::purchaseOrderStatBizKey . ($isSelf ? '_self' : ''); } public static function buildPreview1688CgSaleproxyFailItemCountKey($ymd, $isSelf) { return 'preview_1688cg_saleproxy_fail_item_count_' . $ymd . ($isSelf ? '_self' : '');; } public static function buildJmonitorLogWarningKey($errorMsgMd5) { return sprintf('jmonitor_log_warning_%s', $errorMsgMd5); } public static function buildDbErrorLogWarningKey($errorMsgMd5) { return sprintf('db_error_log_warning_%s', $errorMsgMd5); } public static function getOuterPlatformAuthFromServiceKey($authId) { return sprintf('outer_platform_auth_from_service:%s', $authId); } public static function getOuterPlatformAuthCodeKey($authId) { return sprintf('outer_platform_auth_code:%s', $authId); } public static function buildLtaoUserInfoCacheKey($shopId) { return sprintf('ltao_user_info_cache_' . $shopId); } public static function buildShopAccessBlacklistKey() { return sprintf('shop_access_blacklist'); } public static function buildShopRouteReqMapKey($shopId, $route, $isV2 = false) { return sprintf('shop_route_req_map'. ($isV2 ? '_v2' : '') . ':%s:%s', $shopId, $route); } public static function buildShopAllRouteReqStatList() { return 'shop_all_route_req_stat_list'; } public static function buildMinuteShopReqNoticeKey($shopId, $route) { return sprintf('minute_shop_req_notice:%s:%s', $shopId, $route); } public static function buildMinuteShopSearchFieldLimitKey($shopId, $fieldType = 'common') { return sprintf('minute_shop_search_field_limit:%s:%s', $fieldType, $shopId); } public static function buildDayShopSearchFieldLimitKey($shopId, $fieldType = 'common') { return sprintf('day_shop_search_field_limit:%s:%s', $fieldType, $shopId); } public static function buildOrderRsyncCountStatMapKey() { return sprintf('order_rsync_count_stat_map_%s', date('Ymd')); } public static function getMCTokenKey($shopId) { return sprintf('get_mc_token_%s', $shopId); } public static function getDyLogRedisBizKey($isAdminSelf) { $key = Zc::C('appName') . '_dyLogToKafkaList'; if ($isAdminSelf) { $key .= '_self'; } return $key; } public static function buildUserAgreementKey($userId) { return sprintf('user_agreement:%s', $userId); } public static function buildShop1688ReAuthorizedKey($shopId) { return sprintf('shop_1688_reauthorized:%d', $shopId); } public static function buildAddShopAuthGroupByTmpAuthCodeMapKey($shopId) { return sprintf('add_shop_auth_group_by_tmp_auth_code_map_%s', $shopId); } }