This commit is contained in:
Mrx
2026-03-11 15:05:51 +08:00
parent a083fdca46
commit 0dc053420a
4 changed files with 20 additions and 4 deletions

View File

@@ -105,6 +105,8 @@ type (
LevelName string `json:"level_name"` // 等级名称 LevelName string `json:"level_name"` // 等级名称
Region string `json:"region"` // 区域 Region string `json:"region"` // 区域
Mobile string `json:"mobile"` // 手机号 Mobile string `json:"mobile"` // 手机号
RealName string `json:"real_name"` // 姓名(来自实名表)
IdCard string `json:"id_card"` // 身份证(解密后明文返回)
WechatId string `json:"wechat_id"` // 微信号 WechatId string `json:"wechat_id"` // 微信号
TeamLeaderId string `json:"team_leader_id"` // 团队首领ID TeamLeaderId string `json:"team_leader_id"` // 团队首领ID
AgentCode int64 `json:"agent_code"` AgentCode int64 `json:"agent_code"`

View File

@@ -79,12 +79,23 @@ func (l *AdminGetAgentListLogic) AdminGetAgentList(req *types.AdminGetAgentListR
// 查询钱包信息 // 查询钱包信息
wallet, _ := l.svcCtx.AgentWalletModel.FindOneByAgentId(l.ctx, agent.Id) wallet, _ := l.svcCtx.AgentWalletModel.FindOneByAgentId(l.ctx, agent.Id)
// 查询实名认证信息 // 查询实名认证信息(数据库姓名明文、身份证密文,解密后明文返回不脱敏)
realNameInfo, _ := l.svcCtx.AgentRealNameModel.FindOneByAgentId(l.ctx, agent.Id) realNameInfo, _ := l.svcCtx.AgentRealNameModel.FindOneByAgentId(l.ctx, agent.Id)
isRealName := false isRealName := false
if realNameInfo != nil && realNameInfo.VerifyTime.Valid { realName := ""
idCardPlain := "" // 解密后明文返回
if realNameInfo != nil {
if realNameInfo.VerifyTime.Valid {
isRealName = true // verify_time不为空表示已通过三要素核验 isRealName = true // verify_time不为空表示已通过三要素核验
} }
realName = realNameInfo.Name
if realNameInfo.IdCard != "" {
decrypted, err := crypto.DecryptIDCard(realNameInfo.IdCard, []byte(l.svcCtx.Config.Encrypt.SecretKey))
if err == nil {
idCardPlain = decrypted
}
}
}
wechatId := "" wechatId := ""
if agent.WechatId.Valid { if agent.WechatId.Valid {
@@ -108,6 +119,8 @@ func (l *AdminGetAgentListLogic) AdminGetAgentList(req *types.AdminGetAgentListR
LevelName: levelName, LevelName: levelName,
Region: region, Region: region,
Mobile: agent.Mobile, Mobile: agent.Mobile,
RealName: realName,
IdCard: idCardPlain,
WechatId: wechatId, WechatId: wechatId,
TeamLeaderId: teamLeaderId, TeamLeaderId: teamLeaderId,
AgentCode: agent.AgentCode, AgentCode: agent.AgentCode,

View File

@@ -1574,6 +1574,5 @@ func (a *ApiRequestService) ProcessIVYZ3P9MRequest(params []byte) ([]byte, error
if err != nil { if err != nil {
return nil, err return nil, err
} }
return convertTianyuanResponse(resp) return convertTianyuanResponse(resp)
} }

View File

@@ -988,6 +988,8 @@ type AgentListItem struct {
LevelName string `json:"level_name"` // 等级名称 LevelName string `json:"level_name"` // 等级名称
Region string `json:"region"` // 区域 Region string `json:"region"` // 区域
Mobile string `json:"mobile"` // 手机号 Mobile string `json:"mobile"` // 手机号
RealName string `json:"real_name"` // 姓名(来自实名表)
IdCard string `json:"id_card"` // 身份证(解密后明文返回)
WechatId string `json:"wechat_id"` // 微信号 WechatId string `json:"wechat_id"` // 微信号
TeamLeaderId string `json:"team_leader_id"` // 团队首领ID TeamLeaderId string `json:"team_leader_id"` // 团队首领ID
AgentCode int64 `json:"agent_code"` AgentCode int64 `json:"agent_code"`