From 15a258efc247128b9a171610b4efe5a15b9cd95f Mon Sep 17 00:00:00 2001 From: liangzai <2440983361@qq.com> Date: Tue, 15 Apr 2025 23:30:36 +0800 Subject: [PATCH] add vip ExpiryTime --- app/user/cmd/api/desc/agent.api | 1 + .../api/internal/logic/agent/getagentinfologic.go | 15 ++++++++------- app/user/cmd/api/internal/types/types.go | 15 ++++++++------- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/app/user/cmd/api/desc/agent.api b/app/user/cmd/api/desc/agent.api index f6098b3..9cc0ee0 100644 --- a/app/user/cmd/api/desc/agent.api +++ b/app/user/cmd/api/desc/agent.api @@ -68,6 +68,7 @@ type ( region string `json:"region"` mobile string `json:"mobile"` wechatID string `json:"wechat_id"` + expiryTime string `json:"expiry_time"` } // 查询代理申请状态响应 AgentAuditStatusResp { diff --git a/app/user/cmd/api/internal/logic/agent/getagentinfologic.go b/app/user/cmd/api/internal/logic/agent/getagentinfologic.go index 8e4a96d..6d9b2a6 100644 --- a/app/user/cmd/api/internal/logic/agent/getagentinfologic.go +++ b/app/user/cmd/api/internal/logic/agent/getagentinfologic.go @@ -65,12 +65,13 @@ func (l *GetAgentInfoLogic) GetAgentInfo() (resp *types.AgentInfoResp, err error return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "获取代理信息, 解密手机号失败: %v", err) } return &types.AgentInfoResp{ - AgentID: agent.Id, - Level: agent.LevelName, - IsAgent: true, - Status: 1, - Region: agent.Region, - Mobile: agent.Mobile, - WechatID: lzUtils.NullStringToString(agent.WechatId), + AgentID: agent.Id, + Level: agent.LevelName, + IsAgent: true, + Status: 1, + Region: agent.Region, + Mobile: agent.Mobile, + ExpiryTime: agent.MembershipExpiryTime.Time.Format("2006-01-02 15:04:05"), + WechatID: lzUtils.NullStringToString(agent.WechatId), }, nil } diff --git a/app/user/cmd/api/internal/types/types.go b/app/user/cmd/api/internal/types/types.go index 5828cc3..65fd892 100644 --- a/app/user/cmd/api/internal/types/types.go +++ b/app/user/cmd/api/internal/types/types.go @@ -52,13 +52,14 @@ type AgentGeneratingLinkResp struct { } type AgentInfoResp struct { - Status int64 `json:"status"` // 0=待审核,1=审核通过,2=审核未通过,3=未申请 - IsAgent bool `json:"is_agent"` - AgentID int64 `json:"agent_id"` - Level string `json:"level"` - Region string `json:"region"` - Mobile string `json:"mobile"` - WechatID string `json:"wechat_id"` + Status int64 `json:"status"` // 0=待审核,1=审核通过,2=审核未通过,3=未申请 + IsAgent bool `json:"is_agent"` + AgentID int64 `json:"agent_id"` + Level string `json:"level"` + Region string `json:"region"` + Mobile string `json:"mobile"` + WechatID string `json:"wechat_id"` + ExpiryTime string `json:"expiry_time"` } type AgentMembershipProductConfigReq struct {