Răsfoiți Sursa

feat:添加人员

wangchuanjin 1 an în urmă
părinte
comite
0531f83094
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      service/service.go

+ 2 - 2
service/service.go

@@ -53,7 +53,7 @@ func AddUsePerson(this *entmanageapplication.AddUsePersonReq) *entmanageapplicat
 				//
 				entUserId, _ := strconv.Atoi(v)
 				data := JyMysql.FindOne(EntnichePower, map[string]interface{}{"ent_user_id": entUserId}, "", "")
-				if data != nil && len(*data) > 0 {
+				if common.ObjToString((*sourceData)["product_type"]) != "运营商数据定制及分析" && data != nil && len(*data) > 0 {
 					dataStatus := common.IntAll((*data)["status"])
 					wait_empower_id := common.Int64All((*data)["wait_empower_id"])
 					if dataStatus == -1 {
@@ -62,7 +62,7 @@ func AddUsePerson(this *entmanageapplication.AddUsePersonReq) *entmanageapplicat
 						resdata := JyMysql.FindOne(EntnicheWaitEmpower, map[string]interface{}{"id": wait_empower_id}, "", "")
 						end_time := common.ObjToString((*resdata)["end_time"])
 						res, _ := time.ParseInLocation("2006-01-02 15:04:05", end_time, time.Local)
-						if res.Unix() > time.Now().Unix() && common.ObjToString((*sourceData)["product_type"]) != "运营商数据定制及分析" {
+						if res.Unix() > time.Now().Unix() {
 							msg = "人员已经拥有权限,请先删除原有权限"
 							code = int64(-1)
 							break