From a4f0f020ce2ea0fccd150bdd2ec2af855a544321 Mon Sep 17 00:00:00 2001 From: XiaoLFeng Date: Wed, 31 Jan 2024 13:40:59 +0800 Subject: [PATCH] feat: waterfall --- Jenkinsfile | 21 +++++++++++++++++++ .../SponsorServiceImpl/sponsorServiceImpl.go | 2 ++ 2 files changed, 23 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..8cec9f9 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,21 @@ +pipeline { + environment { + QODANA_TOKEN=credentials('qodana-token') + } + agent { + docker { + args ''' + -v "${WORKSPACE}":/data/project + --entrypoint="" + ''' + image 'jetbrains/qodana-go' + } + } + stages { + stage('Qodana') { + steps { + sh '''qodana''' + } + } + } +} \ No newline at end of file diff --git a/internal/logic/SponsorServiceImpl/sponsorServiceImpl.go b/internal/logic/SponsorServiceImpl/sponsorServiceImpl.go index 611e6af..4c0ebe1 100644 --- a/internal/logic/SponsorServiceImpl/sponsorServiceImpl.go +++ b/internal/logic/SponsorServiceImpl/sponsorServiceImpl.go @@ -202,6 +202,8 @@ func (*SponsorServiceImpl) DeleteSponsor(req *ghttp.Request, entity entity.Spons } else { ResultUtil.ErrorNoData(req, ErrorCode.ServerDatabaseInteriorError) } + } else { + ResultUtil.ErrorNoData(req, ErrorCode.NoSponsor) } } else { ResultUtil.ErrorNoData(req, ErrorCode.NoPermission)