yuliang1112 2 anni fa
parent
commit
151ca8aa45
4 ha cambiato i file con 5 aggiunte e 3 eliminazioni
  1. 0 1
      db/project.go
  2. 1 1
      db/user.go
  3. 3 0
      handler/project_approve.go
  4. 1 1
      handler/project_update.go

+ 0 - 1
db/project.go

@@ -102,7 +102,6 @@ func ApproveProject(ctx context.Context, projectId string,isApprove int64) (erro
 	db := GetReadDB(ctx)
 	projectInfo := gorm_model.ProjectInfo{}
 	db = db.Debug().Model(gorm_model.ProjectInfo{}).Where("project_id = ?",project_id).First(&projectInfo)
-	fmt.Println("isApprove:",isApprove)
 	if isApprove == 1 &&  projectInfo.ProjectStatus == 2{
 		err := db.Update("project_status", 4).Error
 		message = "审核通过"

+ 1 - 1
db/user.go

@@ -23,7 +23,7 @@ func GetUser(ctx context.Context, User string) (*gorm_model.YounggeeUser, error)
 	return user, nil
 }
 
-//GetUserByPhone 查不到返回空
+//GetUserByID 查不到返回空
 func GetUserByID(ctx context.Context, ID int64) (*gorm_model.YounggeeUser, error) {
 	db := GetReadDB(ctx)
 	user := &gorm_model.YounggeeUser{}

+ 3 - 0
handler/project_approve.go

@@ -50,6 +50,9 @@ func (h *ApproveProjectHandler) run() {
 		logrus.Info("FindAllProduct fail,req:%+v", h.req)
 		return
 	}
+	if message == "操作失败"{
+		h.resp.Status = 1
+	}
 	h.resp.Message = message
 }
 func (h *ApproveProjectHandler) checkParam() error {

+ 1 - 1
handler/project_update.go

@@ -47,7 +47,7 @@ func (h *UpdateProjectHandler) run() {
 		logrus.Info("UpdateProject fail,req:%+v", h.req)
 		return
 	}
-	h.resp.Message = "成功创建项目"
+	h.resp.Message = "项目更新成功"
 	h.resp.Data = res
 }
 func (h *UpdateProjectHandler) checkParam() error {