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