xuzhiheng 2 gadi atpakaļ
vecāks
revīzija
5a7cd52d6e
1 mainītis faili ar 7 papildinājumiem un 0 dzēšanām
  1. 7 0
      service/service.go

+ 7 - 0
service/service.go

@@ -22,6 +22,13 @@ import (
 
 func AddUsePerson(this *entmanageapplication.AddUsePersonReq) *entmanageapplication.AddUsePersonResp {
 	timeStr, ok, id, msg, code := time.Now().Format("2006-01-02 15:04:05"), false, int64(0), "", int64(0)
+	if this.EntUserId == "" {
+		return &entmanageapplication.AddUsePersonResp{
+			ErrorCode: -1,
+			ErrorMsg:  "添加失败",
+			Data:      &entmanageapplication.AddUsePerson{Status: int64(-1)},
+		}
+	}
 	UserArr := strings.Split(this.EntUserId, ",")
 	sourceData := JyMysql.FindOne(EntnicheWaitEmpower, map[string]interface{}{"id": this.WaitEmpowerId}, "", "")
 	if sourceData != nil && len(*sourceData) > 0 {