This commit is contained in:
2025-12-09 18:55:28 +08:00
parent 8d00d67540
commit c23ab8338b
209 changed files with 5445 additions and 3963 deletions

View File

@@ -10,6 +10,7 @@ import (
"ycc-server/app/main/model"
"ycc-server/common/xerr"
"github.com/google/uuid"
"github.com/pkg/errors"
"github.com/zeromicro/go-zero/core/logx"
)
@@ -32,6 +33,7 @@ func (l *AdminCreateNotificationLogic) AdminCreateNotification(req *types.AdminC
startDate, _ := time.Parse("2006-01-02", req.StartDate)
endDate, _ := time.Parse("2006-01-02", req.EndDate)
data := &model.GlobalNotifications{
Id: uuid.NewString(),
Title: req.Title,
Content: req.Content,
NotificationPage: req.NotificationPage,
@@ -45,6 +47,6 @@ func (l *AdminCreateNotificationLogic) AdminCreateNotification(req *types.AdminC
if err != nil {
return nil, errors.Wrapf(xerr.NewErrCode(xerr.DB_ERROR), "创建通知失败, err: %v, req: %+v", err, req)
}
id, _ := result.LastInsertId()
return &types.AdminCreateNotificationResp{Id: id}, nil
_ = result
return &types.AdminCreateNotificationResp{Id: data.Id}, nil
}