3
0

2 Commity d12888ccdb ... f4c9471304

Autor SHA1 Správa Dátum
  jason f4c9471304 Merge branch 'master' of ssh://47.108.30.231:8084/gd-backend/gd_adm_data 1 rok pred
  jason 0220098b61 update 1 rok pred
2 zmenil súbory, kde vykonal 8 pridanie a 2 odobranie
  1. 2 2
      impl/v1/query/V01.go
  2. 6 0
      log/gd_adm_data-access.log

+ 2 - 2
impl/v1/query/V01.go

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

+ 6 - 0
log/gd_adm_data-access.log

@@ -30,3 +30,9 @@
 {"L":"INFO","T":"2023-03-15 14:45:41.012","C":"task/access.go:18","M":"Query","appname":"gd_adm_data","trace_id":0,"span_id":0,"parent_id":0,"status":"FAIL","elapsed":"98.000000ms"}
 {"L":"INFO","T":"2023-03-15 14:50:12.130","C":"task/access.go:18","M":"Query","appname":"gd_adm_data","trace_id":0,"span_id":0,"parent_id":0,"status":"FAIL","elapsed":"98.000000ms"}
 {"L":"INFO","T":"2023-03-15 14:51:21.372","C":"task/access.go:18","M":"Query","appname":"gd_adm_data","trace_id":0,"span_id":0,"parent_id":0,"status":"FAIL","elapsed":"90.000000ms"}
+{"L":"INFO","T":"2023-04-07 07:41:14.339","C":"task/access.go:18","M":"Query","appname":"gd_adm_data","trace_id":0,"span_id":0,"parent_id":0,"status":"SUCCESS","elapsed":"1.962885ms"}
+{"L":"INFO","T":"2023-04-07 07:41:15.318","C":"task/access.go:18","M":"Query","appname":"gd_adm_data","trace_id":0,"span_id":0,"parent_id":0,"status":"SUCCESS","elapsed":"1.579845ms"}
+{"L":"INFO","T":"2023-04-07 07:41:16.283","C":"task/access.go:18","M":"Query","appname":"gd_adm_data","trace_id":0,"span_id":0,"parent_id":0,"status":"SUCCESS","elapsed":"1.529553ms"}
+{"L":"INFO","T":"2023-04-07 07:41:26.828","C":"task/access.go:18","M":"Query","appname":"gd_adm_data","trace_id":0,"span_id":0,"parent_id":0,"status":"SUCCESS","elapsed":"1.655185ms"}
+{"L":"INFO","T":"2023-04-07 07:41:44.787","C":"task/access.go:18","M":"Query","appname":"gd_adm_data","trace_id":0,"span_id":0,"parent_id":0,"status":"SUCCESS","elapsed":"0.868602ms"}
+{"L":"INFO","T":"2023-04-07 07:42:05.555","C":"task/access.go:18","M":"Query","appname":"gd_adm_data","trace_id":0,"span_id":0,"parent_id":0,"status":"SUCCESS","elapsed":"0.822842ms"}