病例列表增加了医生加密手机号查询,增加了剩余积分和是否还有福利的字段

This commit is contained in:
2025-07-03 09:13:30 +08:00
parent f54e6a337b
commit dd2530e819
5 changed files with 82 additions and 8 deletions
+20 -6
View File
@@ -23,12 +23,15 @@ type ResProjectDto struct {
// ResCaseDto 病历
type ResCaseDto struct {
SId string `json:"sid"` // 主键id
ProjectId string `json:"project_id"` // 项目标识
Titel string `json:"titel"` // 病例名称
Thumb string `json:"thumb"` // 封面图片
StarTime model.LocalTime `json:"startime"` // 创建时间
Url string `json:"url"` // 链接
SId string `json:"sid"` // 主键id
ProjectId string `json:"project_id"` // 项目标识
Titel string `json:"titel"` // 病例名称
Thumb string `json:"thumb"` // 封面图片
StarTime model.LocalTime `json:"startime"` // 创建时间
Url string `json:"url"` // 链接
IsWelfare bool `json:"Is_welfare"` // 是否存在福利
IsJoin bool `json:"is_join"` // 是否参与过
IssuedScore int `json:"issued_score"` // 已发放积分
}
// ResCaseRecordDto 病例领取记录
@@ -137,6 +140,9 @@ func GetCaseResListDto(m []*model.Case) []*ResCaseDto {
StarTime: v.CreatedAt,
}
// 加载已发放积分
response.LoadIssuedScore(v.CasePlatform)
// 将转换后的结构体添加到新切片中
responses[i] = response
}
@@ -175,3 +181,11 @@ func (r *ResCaseDto) LoadLink(link string) *ResCaseDto {
return r
}
// LoadIssuedScore 加载已发放积分
func (r *ResCaseDto) LoadIssuedScore(m *model.CasePlatform) *ResCaseDto {
if m != nil {
r.IssuedScore = m.IssuedScore
}
return r
}