From 197e035f0bc68930395725a53c2a7e11b82dd047 Mon Sep 17 00:00:00 2001 From: coward Date: Tue, 4 Jun 2024 14:47:29 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 ++ repository/client.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e14c3c8..d87027c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,4 @@ +# 打包前端 FROM node:18-alpine as build-stage WORKDIR front @@ -10,6 +11,7 @@ RUN npm config set registry https://registry.npmmirror.com RUN pnpm install RUN pnpm build +# 前后端集成打包 FROM golang:alpine as build RUN apk add upx diff --git a/repository/client.go b/repository/client.go index daf1215..4cb8820 100644 --- a/repository/client.go +++ b/repository/client.go @@ -194,7 +194,7 @@ func (r clientRepo) GetById(id string) (data entity.Client, err error) { // @return data // @return err func (r clientRepo) GetByPublicKey(publicKey string) (data entity.Client, err error) { - err = r.Model(&entity.Client{}).Where("json_extract(keys, '.publicKey') = ?", publicKey).Preload("Server").First(&data).Error + err = r.Model(&entity.Client{}).Where("json_extract(keys, '.publicKey') = '?'", publicKey).Preload("Server").First(&data).Error return }