You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pdd-order-api/app/libs/const/class.MallConst.php

97 lines
3.7 KiB
PHP

<?php
class MallConst {
const goodsHugeSellerGoodsTotal = 120000;
const moveHugeSellerMoveTotal = 10000;
const skipOfflineGoodsRsyncDaysDefault = 455;
const traceAdmin = 'admin';
const traceAuto = 'auto';
const mallRoleFactory = 2;
const subAccountAuthMallMethodMall = 'mall';
const subAccountAuthMallMethodGroup = 'group';
const bizCodeAuthShopOuterId = 'authShopOuterId';
const bizCodeFullRsyncOpOrder = 'fullRsyncOpOrder';
const bizCodeForbidRsyncOpOrder = 'forbidRsyncOpOrder';
const bizCodeEnableChat = 'enableChat';
const bizCodeEnableMms = 'enableMms';
const bizCodeEnableLoginMms = 'enableLoginMms';
const bizCodeEnablePddPurchase = 'enablePddPurchase';
const bizCodeEnableSubAccount = 'enableSubAccount';
const bizCodeShowBrowserPluginUpdateAlert = 'showBrowserPluginUpdateAlert';
const bizCodeShowBrowserPluginAlertNextBtn = 'showBrowserPluginUpdateNextBtn';
const blacklistBizCodeUserPayment = 'userPayment';
const addBlacklistBizCodeReasonAdminAdd = '后台添加';
const addBlacklistBizCodeReasonAdminImport = '后台导入';
const addBlacklistBizCodeReasonGeoIpNonConformity = 'IP地址属于上海';
const addBlacklistBizCodeReasonMoveSettingContainsBanWords = '搬家配置中包含敏感词:测试、勿拍、下单无效、拍下无效、拍下不发货';
public static function getDesktopBizWhiteListCodeMap() {
return [
MallConst::bizCodeEnableChat => '多客服',
MallConst::bizCodeEnableMms => '后台管理',
MallConst::bizCodeEnablePddPurchase => '采购拼多多',
];
}
public static function getBizCodeNameMap() {
return [
self::bizCodeShowBrowserPluginUpdateAlert => '浏览器插件升级弹窗',
self::bizCodeShowBrowserPluginAlertNextBtn => '浏览器插件升级弹窗下一次按钮',
self::bizCodeAuthShopOuterId => 'authShopOuterId',
self::bizCodeFullRsyncOpOrder => 'fullRsyncOpOrder',
self::bizCodeForbidRsyncOpOrder => 'forbidRsyncOpOrder',
self::bizCodeEnableChat => 'enableChat',
self::bizCodeEnableMms => 'enableMms',
self::bizCodeEnableLoginMms => 'enableLoginMms',
self::bizCodeEnablePddPurchase => 'enablePddPurchase',
self::bizCodeEnableSubAccount => 'enableSubAccount',
];
}
public static function getWhitelistBizCodes() {
return array (
self::bizCodeAuthShopOuterId,
self::bizCodeFullRsyncOpOrder,
self::bizCodeForbidRsyncOpOrder,
self::bizCodeEnableChat,
self::bizCodeEnableMms,
self::bizCodeEnablePddPurchase,
self::bizCodeEnableSubAccount,
self::bizCodeShowBrowserPluginUpdateAlert,
self::bizCodeShowBrowserPluginAlertNextBtn,
);
}
public static function getBlacklistBizCodes() {
return array(
self::blacklistBizCodeUserPayment,
);
}
public static function getBlacklistBizCodeNameMap() {
return array(
self::blacklistBizCodeUserPayment => '订购黑名单',
);
}
public static function getBlacklistNameByBizCode($bizCode) {
$blacklistBizCodeNameMap = self::getBlacklistBizCodeNameMap();
return $blacklistBizCodeNameMap[$bizCode];
}
public static function isLegalWhitelistBizCode($bizCode) {
$bizCodes = self::getWhitelistBizCodes();
return $bizCode && in_array($bizCode, $bizCodes);
}
public static function isLegalBlacklistBizCode($bizCode) {
$bizCodes = self::getBlacklistBizCodes();
return $bizCode && in_array($bizCode, $bizCodes);
}
}