代码优化
This commit is contained in:
@@ -18,6 +18,8 @@ const (
|
||||
PacketTypeTestFlight PacketType = 3 // TF包
|
||||
)
|
||||
|
||||
const statAppId int32 = 5
|
||||
|
||||
type AppVersionReq struct {
|
||||
AppId int32 `json:"appId" binding:"required"` // AppID
|
||||
SysType string `json:"sysType,omitempty"` // 终端类型
|
||||
@@ -38,7 +40,7 @@ type AppVersionResp struct {
|
||||
|
||||
func VersionThreeServer(curVersion, sysType, buildID, packageName string) (resp AppVersionResp, err error) {
|
||||
req := AppVersionReq{
|
||||
AppId: 4,
|
||||
AppId: statAppId,
|
||||
PktType: PacketTypeEnterprise,
|
||||
SysType: sysType,
|
||||
CurVersion: curVersion,
|
||||
|
||||
@@ -711,16 +711,16 @@ func LoginWithH5(ctx *gin.Context) {
|
||||
common.ServeJSON(ctx, stderr.ErrParamError, nil)
|
||||
return
|
||||
}
|
||||
// 仅允许 h5/ios 端登录注册,其余 sysType 一律拒绝
|
||||
if p.SysType != "h5" && p.SysType != "ios" {
|
||||
common.ServeJSON(ctx, stderr.ErrParamError, nil)
|
||||
return
|
||||
}
|
||||
// devID 以 web 开头的为攻击流量,直接拒绝(忽略大小写)
|
||||
if strings.HasPrefix(strings.ToLower(p.DevID), "web") {
|
||||
common.ServeJSON(ctx, stderr.ErrParamError, nil)
|
||||
return
|
||||
}
|
||||
// // 仅允许 h5/ios 端登录注册,其余 sysType 一律拒绝
|
||||
// if p.SysType != "h5" && p.SysType != "ios" {
|
||||
// common.ServeJSON(ctx, stderr.ErrParamError, nil)
|
||||
// return
|
||||
// }
|
||||
// // devID 以 web 开头的为攻击流量,直接拒绝(忽略大小写)
|
||||
// if strings.HasPrefix(strings.ToLower(p.DevID), "web") {
|
||||
// common.ServeJSON(ctx, stderr.ErrParamError, nil)
|
||||
// return
|
||||
// }
|
||||
ip := common.GetIP(ctx)
|
||||
ua, err := common.GetUA(ctx)
|
||||
if err != nil {
|
||||
|
||||
@@ -122,7 +122,7 @@ func (ad AdDetailInfo) GetAdvertiseType() int {
|
||||
}
|
||||
|
||||
// advertiseAppId 广告中心应用ID
|
||||
const advertiseAppId int32 = 4
|
||||
const advertiseAppId int32 = 5
|
||||
|
||||
type advertiseClickReq struct {
|
||||
Id int64 `json:"id"` // 广告id
|
||||
|
||||
@@ -165,7 +165,7 @@ func QuickSearch(objID string, data []cmtmod.ParentRespList) []cmtmod.ParentResp
|
||||
ID: q.ID.Hex(),
|
||||
ObjID: objID,
|
||||
UserID: 100001,
|
||||
UserName: "91短剧运营",
|
||||
UserName: "黄果漫剧运营",
|
||||
UserPortrait: "cf230705/image/cg/227/fg/1bw/a86065d7ab4cbb11ebbebaefc0ee4444.png",
|
||||
Content: q.Title,
|
||||
LinkStr: q.Link,
|
||||
|
||||
@@ -23,7 +23,7 @@ type PayTypeParam struct {
|
||||
}
|
||||
|
||||
// BillPlatformID 账单中心平台标识
|
||||
const BillPlatformID = "91短剧"
|
||||
const BillPlatformID = "黄果漫剧"
|
||||
|
||||
// billDevType 账单中心设备类型,非android按ios处理
|
||||
func billDevType(devType string) string {
|
||||
|
||||
@@ -13,7 +13,7 @@ type KFKTopic string
|
||||
|
||||
const (
|
||||
KFK_APPID int32 = 214 // 214:91短剧
|
||||
KFK_APP_NAME = "91短剧" // app名字
|
||||
KFK_APP_NAME = "黄果短剧" // app名字
|
||||
USER_REG KFKTopic = "user_register" // 用户注册
|
||||
USER_RECH KFKTopic = "user_recharge" // 用户充值
|
||||
USER_RECH_ALL KFKTopic = "user_recharge_all" // 全部订单
|
||||
|
||||
+9
-9
@@ -1,15 +1,15 @@
|
||||
package models
|
||||
|
||||
const (
|
||||
ESInfoVideoTable = "91jd_video_info"
|
||||
ESMediaTable = "91jd_media_info"
|
||||
ESInfoTagTable = "91jd_tag_info"
|
||||
ESInfoUserTable = "91jd_user_info"
|
||||
ESInfoLouFengTable = "91jd_loufeng_info"
|
||||
ESInfoFictionTable = "91jd_fiction_info"
|
||||
ESInfoAudioBookTable = "91jd_audiobook"
|
||||
ESInfoVideoTable = "hgmj_video_info"
|
||||
ESMediaTable = "hgmj_media_info"
|
||||
ESInfoTagTable = "hgmj_tag_info"
|
||||
ESInfoUserTable = "hgmj_user_info"
|
||||
ESInfoLouFengTable = "hgmj_loufeng_info"
|
||||
ESInfoFictionTable = "hgmj_fiction_info"
|
||||
ESInfoAudioBookTable = "hgmj_audiobook"
|
||||
|
||||
ESLogSearchLogTable = "91jd_search_log"
|
||||
ESLogSearchLogTable = "hgmj_search_log"
|
||||
|
||||
ESStatKeywordTable = "91jd_keyword_stat"
|
||||
ESStatKeywordTable = "hgmj_keyword_stat"
|
||||
)
|
||||
|
||||
@@ -19,7 +19,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
proName = "91短剧"
|
||||
proName = "黄果短剧"
|
||||
tgToken = "5852134617:AAEO0_GPZiUJS_LeR5dM7byEfOpnRg4dGqU"
|
||||
maxDataNum = 20000 // 每个excel存储的数据量
|
||||
maxWorkerNum = 3
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
// 数据中心同步协议(与哔哩 statcenter 第三版协议保持一致)
|
||||
|
||||
// statAppId 数据中心同步使用的应用ID
|
||||
const statAppId int32 = 4
|
||||
const statAppId int32 = 5
|
||||
|
||||
type StatJob string
|
||||
|
||||
|
||||
Reference in New Issue
Block a user