feat: 客户关联产品并支持按产品圈选通知群体
新增客户-产品多对多关联,列表可按产品筛选并复制邮箱;发证/下单自动回填历史关联。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
d0e1ca3729
commit
4c46088f4f
10 files changed
+337
-89
No files matched your search
@@ -4,6 +4,7 @@ import (
|
||||
"backend/config"
|
||||
"backend/internal/dto"
|
||||
"backend/internal/model"
|
||||
customersvc "backend/internal/service/customer"
|
||||
"backend/utils"
|
||||
"errors"
|
||||
"fmt"
|
||||
@@ -139,6 +140,7 @@ func (s *OfflineIssuer) Issue(req dto.OfflineLicenseCreate) (*dto.OfflineLicense
|
||||
if err := s.db.Create(&lic).Error; err != nil {
|
||||
return nil, errors.New("保存离线 License 失败")
|
||||
}
|
||||
_ = customersvc.AttachProduct(s.db, customer.ID, product.ID)
|
||||
|
||||
activation := model.Activation{
|
||||
LicenseID: lic.ID,
|
||||
|
||||
Reference in new issue
Block a user