|
@@ -28,6 +28,13 @@ func NewGetSubSomeInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Ge
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+const (
|
|
|
+ SubFreeFlag = "fType"
|
|
|
+ SubVipFlag = "vType"
|
|
|
+ MemberFlag = "mType"
|
|
|
+ EntnicheFlag = "eType"
|
|
|
+)
|
|
|
+
|
|
|
// 获取订阅推送相关信息
|
|
|
func (l *GetSubSomeInfoLogic) GetSubSomeInfo(in *bxsubscribe.SomeInfoReq) (*bxsubscribe.SomeInfoResp, error) {
|
|
|
resp := &bxsubscribe.SomeInfoResp{
|
|
@@ -56,6 +63,17 @@ func (l *GetSubSomeInfoLogic) GetSubSomeInfo(in *bxsubscribe.SomeInfoReq) (*bxsu
|
|
|
//resp.Data.HasKey, resp.Data.Industry = model.GetKeySet(in.UserType, user, []string{})
|
|
|
todayNum := time.Unix(time.Now().Unix(), 1).Format("20060102")
|
|
|
if user != nil {
|
|
|
+ resp.Data.HasKey = user.Vip.GetHasKey()
|
|
|
+ switch in.UserType {
|
|
|
+ case SubFreeFlag:
|
|
|
+ resp.Data.HasKey = user.Free.FreeHasKey
|
|
|
+ case SubVipFlag:
|
|
|
+ resp.Data.HasKey = user.Vip.HasKey
|
|
|
+ case MemberFlag:
|
|
|
+ resp.Data.HasKey = user.Member.HasKey
|
|
|
+ case EntnicheFlag:
|
|
|
+ resp.Data.HasKey = user.Entniche.HasKey
|
|
|
+ }
|
|
|
//超级订阅
|
|
|
if user.Vip.Status == 1 || common.IntAll(user.Vip.Status) == 2 {
|
|
|
var threeRemind = int64(3 * 24 * 60 * 60)
|