Browse Source

保存接口

renjiaojiao 4 months ago
parent
commit
73778a7f17
2 changed files with 4 additions and 1 deletions
  1. 1 1
      config.yaml
  2. 3 0
      service/kbService.go

+ 1 - 1
config.yaml

@@ -11,7 +11,7 @@ kbMySql:
   dbname: kanboard
 filePath: ./upload/
 wechatWorkUrl: https://qyapi.weixin.qq.com/cgi-bin/webhook/send
-wechatWorkKey: f195c32d-aed7-4070-8aa2-190eeebab00c
+wechatWorkKey: 39d428d4-f35c-4651-a064-147c27e7bed0
 wechatRemind:
   - 15038701380
 workflowsUrl: https://dify.jydev.jianyu360.com/v1/workflows/run

+ 3 - 0
service/kbService.go

@@ -43,6 +43,9 @@ func CheckCreateUserAccount(name string) (accountId int, err error) {
 	if name == "" {
 		return 0, errors.New("名字不能为空")
 	}
+	if len([]rune(name)) == 11 {
+		return 0, errors.New("请确认获取名字是否正确")
+	}
 	res := KbDb.FindOne("users", map[string]interface{}{"name": name}, "id", "id DESC")
 	if res != nil && len(*res) > 0 {
 		accountId = common.IntAll((*res)["id"])