|
@@ -5,6 +5,7 @@ import (
|
|
|
"fmt"
|
|
|
"strconv"
|
|
|
"strings"
|
|
|
+ "time"
|
|
|
"youngee_b_api/db"
|
|
|
"youngee_b_api/model/common_model"
|
|
|
"youngee_b_api/model/gorm_model"
|
|
@@ -49,6 +50,7 @@ func (*project) Create(ctx context.Context, newProject http_model.CreateProjectR
|
|
|
}
|
|
|
feeFroms := strings.Join(feeFrom, ",")
|
|
|
fmt.Printf("创建项目new %+v", newProject)
|
|
|
+ RecruitDdl, _ := time.ParseInLocation("2006-01-02 15:04:05", newProject.RecruitDdl, time.Local)
|
|
|
projectInfo := gorm_model.ProjectInfo{}
|
|
|
if newProject.ProjectType == int64(1) {
|
|
|
projectInfo = gorm_model.ProjectInfo{
|
|
@@ -58,7 +60,7 @@ func (*project) Create(ctx context.Context, newProject http_model.CreateProjectR
|
|
|
TalentType: newProject.TalentType,
|
|
|
ProjectPlatform: newProject.ProjectPlatform,
|
|
|
ProjectForm: newProject.ProjectForm,
|
|
|
- RecruitDdl: &newProject.RecruitDdl,
|
|
|
+ RecruitDdl: &RecruitDdl,
|
|
|
ProjectDetail: newProject.ProjectDetail,
|
|
|
ContentType: newProject.ContentType,
|
|
|
EnterpriseID: enterpriseID,
|
|
@@ -66,6 +68,7 @@ func (*project) Create(ctx context.Context, newProject http_model.CreateProjectR
|
|
|
FeeForm: feeFroms,
|
|
|
AutoTaskID: conv.MustInt64(AutoTaskID),
|
|
|
AutoDefaultID: conv.MustInt64(AutoDefaultID),
|
|
|
+ IsRead: 0,
|
|
|
}
|
|
|
} else {
|
|
|
projectInfo = gorm_model.ProjectInfo{
|
|
@@ -144,7 +147,8 @@ func (*project) Create(ctx context.Context, newProject http_model.CreateProjectR
|
|
|
return res, nil
|
|
|
}
|
|
|
func (*project) Update(ctx context.Context, newProject http_model.UpdateProjectRequest, enterpriseID int64) (*http_model.UpdateProjectData, error) {
|
|
|
- fmt.Println("newproject:", newProject)
|
|
|
+ fmt.Println("RecruitDdl:", newProject.RecruitDdl)
|
|
|
+ RecruitDdl, _ := time.ParseInLocation("2006-01-02 15:04:05", newProject.RecruitDdl, time.Local)
|
|
|
oldProject, err3 := db.GetProjectDetail(ctx, conv.MustInt64(newProject.ProjectID))
|
|
|
if err3 != nil {
|
|
|
return nil, err3
|
|
@@ -158,7 +162,7 @@ func (*project) Update(ctx context.Context, newProject http_model.UpdateProjectR
|
|
|
feeFroms := strings.Join(feeFrom, ",")
|
|
|
project := gorm_model.ProjectInfo{
|
|
|
ProjectID: conv.MustInt64(newProject.ProjectID),
|
|
|
- RecruitDdl: &newProject.RecruitDdl,
|
|
|
+ RecruitDdl: &RecruitDdl,
|
|
|
TalentType: newProject.TalentType,
|
|
|
ContentType: conv.MustInt64(newProject.ContentType),
|
|
|
ProjectDetail: newProject.ProjectDetail,
|