Merge pull request 'conflict' (#388) from conflict into test
Reviewed-on: http://121.41.31.146:3000/wishpal_ironfan/service/pulls/388
This commit is contained in:
commit
f4494cbabc
|
@ -52,6 +52,7 @@ const (
|
||||||
MaxDailyZoneMomentCreateTimesKey = "max_daily_zone_moment_create_times"
|
MaxDailyZoneMomentCreateTimesKey = "max_daily_zone_moment_create_times"
|
||||||
ReferentialZoneMomentKey = "referential_zone_moment"
|
ReferentialZoneMomentKey = "referential_zone_moment"
|
||||||
RestrictedVisitorMomentKey = "restricted_visitor_moment"
|
RestrictedVisitorMomentKey = "restricted_visitor_moment"
|
||||||
|
IsMomentImageEncryptEnabledKey = "is_moment_image_encrypt_enabled"
|
||||||
)
|
)
|
||||||
|
|
||||||
// del_flag
|
// del_flag
|
||||||
|
|
|
@ -73,11 +73,12 @@ type OpListByMidReq struct {
|
||||||
base.BaseRequest
|
base.BaseRequest
|
||||||
MType *int64 `json:"m_type"` // 媒体类型
|
MType *int64 `json:"m_type"` // 媒体类型
|
||||||
Status *int64 `json:"status"` // 状态
|
Status *int64 `json:"status"` // 状态
|
||||||
CtUpperBound *int64 `json:"ct_upper_bound"` //创建时间上界,闭区间
|
CtUpperBound *int64 `json:"ct_upper_bound"` // 创建时间上界,闭区间
|
||||||
CtLowerBound *int64 `json:"ct_lower_bound"` //创建时间下界,开区间,可为0
|
CtLowerBound *int64 `json:"ct_lower_bound"` // 创建时间下界,开区间,可为0
|
||||||
Offset int `json:"offset"`
|
Offset int `json:"offset"`
|
||||||
Limit int `json:"limit"`
|
Limit int `json:"limit"`
|
||||||
Sort []string
|
Sort []string
|
||||||
|
Uid *int64
|
||||||
}
|
}
|
||||||
|
|
||||||
type OpListByMidData struct {
|
type OpListByMidData struct {
|
||||||
|
|
|
@ -70,3 +70,14 @@ func OpGetUploadMediaFailConfigList(ctx *gin.Context) {
|
||||||
|
|
||||||
ReplyOk(ctx, config)
|
ReplyOk(ctx, config)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func OpGetIsMomentImageEncryptEnabled(ctx *gin.Context) {
|
||||||
|
isEnabled, ec := service.DefaultConfigService.OpGetIsMomentImageEncryptEnabled(ctx)
|
||||||
|
if ec != errcode.ErrCodeOk {
|
||||||
|
logger.Error("OpGetIsMomentImageEncryptEnabled fail, ec: %v", ec)
|
||||||
|
ReplyErrCodeMsg(ctx, ec)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
ReplyOk(ctx, isEnabled)
|
||||||
|
}
|
||||||
|
|
|
@ -136,6 +136,7 @@ func Init(r *gin.Engine) {
|
||||||
apiMomentGroup.POST("thumbs_up", middleware.JSONParamValidator(momentproto.ApiThumbsUpReq{}), middleware.JwtAuthenticator(), ApiThumbsUpMoment)
|
apiMomentGroup.POST("thumbs_up", middleware.JSONParamValidator(momentproto.ApiThumbsUpReq{}), middleware.JwtAuthenticator(), ApiThumbsUpMoment)
|
||||||
apiMomentGroup.POST("list_by_ids", middleware.JSONParamValidator(momentproto.ApiListByIdsReq{}), middleware.JwtAuthenticator(), ApiGetMomentListByIds)
|
apiMomentGroup.POST("list_by_ids", middleware.JSONParamValidator(momentproto.ApiListByIdsReq{}), middleware.JwtAuthenticator(), ApiGetMomentListByIds)
|
||||||
apiMomentGroup.POST("recomm_list", middleware.JSONParamValidator(momentproto.ApiRecommListReq{}), middleware.JwtAuthenticator(), ApiGetMomentRecommList)
|
apiMomentGroup.POST("recomm_list", middleware.JSONParamValidator(momentproto.ApiRecommListReq{}), middleware.JwtAuthenticator(), ApiGetMomentRecommList)
|
||||||
|
apiMomentGroup.POST("is_moment_image_encrypt_enabled", middleware.JSONParamValidator(base.BaseRequest{}), middleware.JwtAuthenticator(), OpGetIsMomentImageEncryptEnabled)
|
||||||
|
|
||||||
// 足迹
|
// 足迹
|
||||||
// apiFootPrintGroup := r.Group("/api/footprint", PrepareToC())
|
// apiFootPrintGroup := r.Group("/api/footprint", PrepareToC())
|
||||||
|
|
|
@ -4096,6 +4096,12 @@ func (m *Mongo) GetZoneMomentListByMid(ctx *gin.Context, req *zonemomentproto.Op
|
||||||
"mid": req.GetBaseRequest().Mid,
|
"mid": req.GetBaseRequest().Mid,
|
||||||
"del_flag": 0,
|
"del_flag": 0,
|
||||||
}
|
}
|
||||||
|
if req.Uid != nil {
|
||||||
|
query["mid"] = util.DerefInt64(req.Uid)
|
||||||
|
} else {
|
||||||
|
query["mid"] = req.GetBaseRequest().Mid
|
||||||
|
}
|
||||||
|
|
||||||
if req.MType != nil {
|
if req.MType != nil {
|
||||||
query["m_type"] = util.DerefInt64(req.MType)
|
query["m_type"] = util.DerefInt64(req.MType)
|
||||||
}
|
}
|
||||||
|
|
|
@ -171,3 +171,18 @@ func (s *ConfigService) OpGetUploadMediaFailConfigList(ctx *gin.Context) (upload
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *ConfigService) OpGetIsMomentImageEncryptEnabled(ctx *gin.Context) (isEnabled int64, ec errcode.ErrCode) {
|
||||||
|
ec = errcode.ErrCodeOk
|
||||||
|
|
||||||
|
isMomentImageEncryptEnabled, err := apollo.GetIntValue(consts.IsMomentImageEncryptEnabledKey, apollo.ApolloOpts().SetNamespace("application"))
|
||||||
|
if err != nil {
|
||||||
|
logger.Error("Apollo read failed : %v", err)
|
||||||
|
ec = errcode.ErrCodeApolloReadFail
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
isEnabled = int64(isMomentImageEncryptEnabled)
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
|
@ -3400,6 +3400,7 @@ func (s *Service) OpGetZoneMomentListByUserId(ctx *gin.Context, req *zonemomentp
|
||||||
|
|
||||||
list, err := _DefaultZoneMoment.OpListByMid(ctx, &zonemomentproto.OpListByMidReq{
|
list, err := _DefaultZoneMoment.OpListByMid(ctx, &zonemomentproto.OpListByMidReq{
|
||||||
BaseRequest: req.BaseRequest,
|
BaseRequest: req.BaseRequest,
|
||||||
|
Uid: account.Mid,
|
||||||
CtUpperBound: req.CtUpperBound,
|
CtUpperBound: req.CtUpperBound,
|
||||||
CtLowerBound: req.CtLowerBound,
|
CtLowerBound: req.CtLowerBound,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue