|
@@ -13,6 +13,7 @@ import (
|
|
|
"youngee_m_api/model/gorm_model"
|
|
|
"youngee_m_api/model/http_model"
|
|
|
"youngee_m_api/pack"
|
|
|
+ "youngee_m_api/util"
|
|
|
)
|
|
|
|
|
|
var Project *project
|
|
@@ -59,16 +60,19 @@ func (*project) GetProjectDetail(ctx context.Context, projectID int64) (*http_mo
|
|
|
ProjectPlatform: conv.MustString(project.ProjectPlatform, ""),
|
|
|
ProjectForm: conv.MustString(project.ProjectForm, ""),
|
|
|
TalentType: conv.MustString(project.TalentType, ""),
|
|
|
- RecruitDdl: project.RecruitDdl,
|
|
|
+ RecruitDdl: util.GetTimePointer(project.RecruitDdl),
|
|
|
ContentType: conv.MustString(project.ContentType, ""),
|
|
|
ProjectDetail: conv.MustString(project.ProjectDetail, ""),
|
|
|
ProductID: conv.MustString(project.ProductID, ""),
|
|
|
EnterpriseID: conv.MustString(project.EnterpriseID, ""),
|
|
|
Balance: conv.MustString(enterprise.Balance, ""),
|
|
|
FailReason: conv.MustString(project.FailReason, ""),
|
|
|
- CreateAt: project.CreatedAt,
|
|
|
- UpdateAt: project.UpdatedAt,
|
|
|
+ CreateAt: util.GetTimePointer(project.CreatedAt),
|
|
|
+ UpdateAt: util.GetTimePointer(project.UpdatedAt),
|
|
|
Phone: user.Phone,
|
|
|
+ FinishAt: util.GetTimePointer(project.FinishAt),
|
|
|
+ PassAt: util.GetTimePointer(project.PassAt),
|
|
|
+ PayAt: util.GetTimePointer(project.PayAt),
|
|
|
}
|
|
|
Strategys, err := db.GetRecruitStrategys(ctx, projectID)
|
|
|
fmt.Println("招募策略:", Strategys)
|
|
@@ -324,7 +328,7 @@ func (*project) Create(ctx context.Context, newProject http_model.CreateProjectR
|
|
|
TalentType: newProject.TalentType,
|
|
|
ProjectPlatform: newProject.ProjectPlatform,
|
|
|
ProjectForm: newProject.ProjectForm,
|
|
|
- RecruitDdl: newProject.RecruitDdl,
|
|
|
+ RecruitDdl: &newProject.RecruitDdl,
|
|
|
ProjectDetail: newProject.ProjectDetail,
|
|
|
ContentType: newProject.ContentType,
|
|
|
EnterpriseID: enterpriseID,
|
|
@@ -381,7 +385,7 @@ func (*project) Update(ctx context.Context, newProject http_model.UpdateProjectR
|
|
|
fmt.Println("newproject:", newProject)
|
|
|
project := gorm_model.ProjectInfo{
|
|
|
ProjectID: conv.MustInt64(newProject.ProjectID, 0),
|
|
|
- RecruitDdl: newProject.RecruitDdl,
|
|
|
+ RecruitDdl: &newProject.RecruitDdl,
|
|
|
TalentType: newProject.TalentType,
|
|
|
ContentType: conv.MustInt64(newProject.ContentType, 0),
|
|
|
ProjectDetail: newProject.ProjectDetail,
|
|
@@ -499,16 +503,19 @@ func (*project) GetPorjectDetail(ctx context.Context, projectID int64) (*http_mo
|
|
|
ProjectPlatform: conv.MustString(project.ProjectPlatform, ""),
|
|
|
ProjectForm: conv.MustString(project.ProjectForm, ""),
|
|
|
TalentType: conv.MustString(project.TalentType, ""),
|
|
|
- RecruitDdl: project.RecruitDdl,
|
|
|
+ RecruitDdl: util.GetTimePointer(project.RecruitDdl),
|
|
|
ContentType: conv.MustString(project.ContentType, ""),
|
|
|
ProjectDetail: conv.MustString(project.ProjectDetail, ""),
|
|
|
ProductID: conv.MustString(project.ProductID, ""),
|
|
|
EnterpriseID: conv.MustString(project.EnterpriseID, ""),
|
|
|
Balance: conv.MustString(enterprise.Balance, ""),
|
|
|
FailReason: conv.MustString(project.FailReason, ""),
|
|
|
- CreateAt: project.CreatedAt,
|
|
|
- UpdateAt: project.UpdatedAt,
|
|
|
+ CreateAt: util.GetTimePointer(project.CreatedAt),
|
|
|
+ UpdateAt: util.GetTimePointer(project.UpdatedAt),
|
|
|
Phone: user.Phone,
|
|
|
+ FinishAt: util.GetTimePointer(project.FinishAt),
|
|
|
+ PassAt: util.GetTimePointer(project.PassAt),
|
|
|
+ PayAt: util.GetTimePointer(project.PayAt),
|
|
|
}
|
|
|
Strategys, err := db.GetRecruitStrategys(ctx, projectID)
|
|
|
fmt.Println("招募策略:", Strategys)
|