Parcourir la source

Merge branch 'master' of ssh://47.108.30.231:8084/gd-backend/gd_adm_data

jason il y a 1 an
Parent
commit
f4c9471304
1 fichiers modifiés avec 10 ajouts et 0 suppressions
  1. 10 0
      impl/v1/query/V01.go

+ 10 - 0
impl/v1/query/V01.go

@@ -44,6 +44,16 @@ func V01(ctx context.Context, params string) (reply *apis.QueryResponse, err err
 	//var updatedAt int64
 	db := database.DB()
 
+	// 存在字母
+	for _, v := range req.Owner {
+		if (v > 64 && v < 91) || (v > 96 && v < 123) {
+			res.IsMatch = -1
+			reply.Data, _ = jsoniter.MarshalToString(res)
+			return reply, nil
+		}
+	}
+
+	// 黑名单
 	var id int64
 	err = db.Raw("select id from t_adm_name_black_list where name=?", req.Owner).Find(&id).Error
 	if err == nil && id > 0 {