diff --git a/backend/app/repo/website_acme_account.go b/backend/app/repo/website_acme_account.go
index 3bbb3ff23..c2ebee637 100644
--- a/backend/app/repo/website_acme_account.go
+++ b/backend/app/repo/website_acme_account.go
@@ -12,6 +12,7 @@ type IAcmeAccountRepo interface {
Save(account model.WebsiteAcmeAccount) error
DeleteBy(opts ...DBOption) error
WithEmail(email string) DBOption
+ WithType(acType string) DBOption
}
func NewIAcmeAccountRepo() IAcmeAccountRepo {
@@ -26,6 +27,11 @@ func (w *WebsiteAcmeAccountRepo) WithEmail(email string) DBOption {
return db.Where("email = ?", email)
}
}
+func (w *WebsiteAcmeAccountRepo) WithType(acType string) DBOption {
+ return func(db *gorm.DB) *gorm.DB {
+ return db.Where("type = ?", acType)
+ }
+}
func (w *WebsiteAcmeAccountRepo) Page(page, size int, opts ...DBOption) (int64, []model.WebsiteAcmeAccount, error) {
var accounts []model.WebsiteAcmeAccount
diff --git a/backend/app/service/website_acme_account.go b/backend/app/service/website_acme_account.go
index 48d2ac124..a433e95a2 100644
--- a/backend/app/service/website_acme_account.go
+++ b/backend/app/service/website_acme_account.go
@@ -35,7 +35,7 @@ func (w WebsiteAcmeAccountService) Page(search dto.PageInfo) (int64, []response.
}
func (w WebsiteAcmeAccountService) Create(create request.WebsiteAcmeAccountCreate) (*response.WebsiteAcmeAccountDTO, error) {
- exist, _ := websiteAcmeRepo.GetFirst(websiteAcmeRepo.WithEmail(create.Email))
+ exist, _ := websiteAcmeRepo.GetFirst(websiteAcmeRepo.WithEmail(create.Email), websiteAcmeRepo.WithType(create.Type))
if exist != nil {
return nil, buserr.New(constant.ErrEmailIsExist)
}
diff --git a/frontend/src/views/website/website/config/basic/https/index.vue b/frontend/src/views/website/website/config/basic/https/index.vue
index 1bc374c3a..b6de7dfef 100644
--- a/frontend/src/views/website/website/config/basic/https/index.vue
+++ b/frontend/src/views/website/website/config/basic/https/index.vue
@@ -40,7 +40,12 @@
:key="index"
:label="acme.email"
:value="acme.id"
- >
+ >
+
+ {{ acme.email }}
+ {{ getAccountName(acme.type) }}
+
+
@@ -162,7 +167,7 @@ import { ElMessageBox, FormInstance } from 'element-plus';
import { computed, onMounted, reactive, ref } from 'vue';
import i18n from '@/lang';
import { Rules } from '@/global/form-rules';
-import { dateFormatSimple, getProvider } from '@/utils/util';
+import { dateFormatSimple, getProvider, getAccountName } from '@/utils/util';
import { MsgSuccess } from '@/utils/message';
import FileList from '@/components/file-list/index.vue';