service/api/consts/consts.go

178 lines
5.9 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package consts
const (
RetCodeSuccess = 1
RetCodeFail = -1
)
const (
ErrorCodeSuccess = 1
ErrorCodeFail = -1
)
// 分页查询
const (
DefaultPageSize = 10 //默认页长为10
)
// 推荐每次吞吐量
const (
StreamerRecommThroughput = 4
MomentRecommThroughput = 4
)
// 设备类型
const (
DevType_Android = 0
DevType_Ios = 1
)
// 接口类型
const (
InterfaceType_Op = 0
InterfaceType_Api = 1
)
// apollo_config
const (
MaxPswdWrongTimesKey = "max_pswd_wrong_times"
MaxVeriCodeWrongTimesKey = "max_veri_code_wrong_times"
MaxVeriCodeValidDurationKey = "max_veri_code_valid_duration"
IosKey = "ios"
AndroidKey = "android"
AccountInitKey = "account_init"
TagNumKey = "tag_num"
PlatformNumKey = "platform_num"
SupportWxIdNumKey = "support_wx_id_num"
MaxDailyVeriCodeSendTimesKey = "max_daily_veri_code_send_times"
ImageIdForUploadFail = "image_id_for_upload_fail"
VideoIdForUploadFail = "video_id_for_upload_fail"
RestrictedVisitorKey = "restricted_visitor"
MaxDailyMomentCreateTimesKey = "max_daily_moment_create_times"
DefaultMomentTextKey = "default_moment_text"
MaxDailyZoneMomentCreateTimesKey = "max_daily_zone_moment_create_times"
ReferentialZoneMomentKey = "referential_zone_moment"
IsMomentImageEncryptEnabledKey = "is_moment_image_encrypt_enabled"
RestrictedVisitorMomentKey = "restricted_visitor_moment"
AppConfigReflectKey = "app_config_reflect"
ZoneVIPConfigKey = "zone_vip_config"
StreamerScoreFormulaKey = "streamer_score_formula"
HvyogoSingleDistributeChargePercentageKey = "hvyogo_single_distribute_charge_percentage"
AutoResponseKey = "auto_response"
QuestionMapKey = "question_map"
AgeScore2IQResultMapKey = "age_score_2_IQ_result_map"
ClassScore2ClassResultMapKey = "class_score_2_class_result_map"
IQResultMapKey = "IQ_result_map"
ClassResultMapKey = "class_result_map"
DefaultZoneTextKey = "default_zone_text"
AuditTaskCollectionReflectKey = "audit_task_collection_reflect"
StreamerFilterKey = "streamer_filter"
RavenIQTestEmailConfigKey = "Raven_IQ_test_email_config"
OfficialEmailKey = "official_email"
SmsSplitRatioKey = "sms_split_ratio"
NotifBannerInfoKey = "notif_banner_info"
InstallInfoKey = "install_info"
NTypeListKey = "n_type_list"
AcctPunishmentRealEndTimeKey = "acct_punishment_real_endtime"
DefaultNotifThumbnailIdKey = "default_notif_thumbnail_id"
)
// del_flag
const (
Exist = 0 //存在
Deleted = 1 //已删除
)
const (
PermanentMember = 1 // 会员
NoPermanentMember = 0 // 非会员
)
// 默认login初始化配置
const (
OriginalLoginMid = -1
OriginalLoginPassword = "C114B58B8B7E435F2EA353A83E63E123"
OriginalLoginPhoneHash = ""
OriginalLoginRegionCode = "86"
OriginalLoginIsLogined = 0
OriginalLoginLastLoginTime = 0
OriginalLoginWrongPswdTimes = 0
OriginalLoginIsEnabled = 0
OriginalLoginIsLocked = 0
OriginalLoginIsBanned = 0
)
// redis键前缀
const (
RedisStreamerPrefix = "streamer:" //streamer服务前缀
RedisMomentPrefix = "moment:" //moment服务前缀
RedisNotificationPrefix = "notif:" //notification服务前缀
RedisContactCustomerServicePrefix = "contact_customer_service:" //contact_customer_service服务前缀
)
const (
UnAudited = 1 // 未审核
Audited = 2 // 已审核
)
// 用户表信息审核状态,按位判断
// 状态大致如下:
//
// 00昵称正常
// 01昵称违规
// 10昵称审核中
const (
AuditPass = 0 // 审核通过
StreamerNikeNameAuditReject = 1 // 主播昵称违规
StreamerNikeNameAuditing = 2 // 主播昵称审核状态
//StreamerAvatarReject = 4 // 主播头像违规
//StreamerAvatarAuditing = 8 // 主播头像审核状态
)
// 审核的维度
const (
StreamNikeAudit = 1 // 主播昵称审核
//StreamerAvatar = 2 // 主播头像审核
)
const (
ImageTiff = "image_tiff"
ImageWebp = "image/webp"
ImageHeic = "image/heic"
ImageJpeg = "image/jpeg"
ImageGif = "image/gif"
ImagePng = "image/png"
VideoMp4 = "video/mp4"
)
//const PackageRootPath = "C:/Users/PC/Desktop/service"
const PackageRootPath = "/app/wishpal-ironfan"
//const OfflinePackageRootPath = "C:/Users/PC/Desktop/service"
const OfflinePackageRootPath = "/app/wishpal-ironfan-offline"
const MainConfigPath = PackageRootPath + "/etc/mix/mix-test.yaml"
const MainOfflineConfigPath = OfflinePackageRootPath + "/etc/mix/mix-test-offline.yaml"
const ProductionConfigPath = PackageRootPath + "/etc/mix/mix-prod.yaml"
const ProductionOfflineConfigPath = OfflinePackageRootPath + "/etc/mix/mix-prod-offline.yaml"
const LocalConfigPath = "C:/Users/PC/Desktop/service/etc/mix/mix-local.yaml"
const ReservedUserIdRegexesConfig = PackageRootPath + "/etc/mix/resource/reg_reserved_user_id_config.xml"
const EsbRoutingTableConfig = PackageRootPath + "/etc/mix/resource/esb_routing_table_config.xml"
// H5调用路径
const H5CallUrl = "/api/streamer/list_ext_by_user_id"
// 站外user_id访问zone调用路径
const ZoneListFromOutsideCountCallUrl = "/api/zone/list_by_user_id_from_outside"
// 应用上线时间2024-01-02 14:00:00
const AppEnterProductionTime = 1704175200