chore: 并入 iotlcm-admin-svr 历史到 admin-svr/(原提交 49818c6)

This commit is contained in:
MiFaZhan
2026-11-02 13:27:59 +08:00
1250 changed files with 154111 additions and 0 deletions
@@ -0,0 +1,57 @@
package common
import (
"context"
v1 "git.5iot.com/iotlcm-public/iotlcm-admin-svr/api/common/v1"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/service"
)
// List 查看通知日志列表
func (c *ControllerV1) TNotifyLogList(ctx context.Context, req *v1.TNotifyLogListReq) (res *v1.TNotifyLogListRes, err error) {
list, totalCount, err := service.CommonTNotifyLog().List(ctx, &req.TNotifyLogListParam)
if err != nil {
return
}
if list == nil {
list = []*model.TNotifyLogListModel{}
}
res = new(v1.TNotifyLogListRes)
res.Items = list
res.PageResult.Page = req.Page
res.PageResult.PageSize = req.PageSize
res.PageResult.Total = totalCount
return
}
// Export 导出通知日志列表
func (c *ControllerV1) TNotifyLogExport(ctx context.Context, req *v1.TNotifyLogExportReq) (res *v1.TNotifyLogExportRes, err error) {
err = service.CommonTNotifyLog().Export(ctx, &req.TNotifyLogListParam)
return
}
// Edit 更新通知日志
func (c *ControllerV1) TNotifyLogEdit(ctx context.Context, req *v1.TNotifyLogEditReq) (res *v1.TNotifyLogEditRes, err error) {
err = service.CommonTNotifyLog().Edit(ctx, &req.TNotifyLogEditParam)
return
}
// View 获取指定通知日志信息
func (c *ControllerV1) TNotifyLogView(ctx context.Context, req *v1.TNotifyLogViewReq) (res *v1.TNotifyLogViewRes, err error) {
data, err := service.CommonTNotifyLog().View(ctx, &req.TNotifyLogViewParam)
if err != nil {
return
}
res = new(v1.TNotifyLogViewRes)
res.TNotifyLogViewModel = data
return
}
// Delete 删除通知日志
func (c *ControllerV1) TNotifyLogDelete(ctx context.Context, req *v1.TNotifyLogDeleteReq) (res *v1.TNotifyLogDeleteRes, err error) {
err = service.CommonTNotifyLog().Delete(ctx, &req.TNotifyLogDeleteParam)
return
}