fix:修正参数字段名称

This commit is contained in:
jiaji.H 2025-09-24 17:19:11 +08:00
parent 31c8132a5b
commit a22cd227ef
3 changed files with 8 additions and 8 deletions

View File

@ -37,7 +37,7 @@ func (annualReportsDao) Add(req *reports.AddAnnualReportReq) (err error) {
Date: req.Date, Date: req.Date,
FileUrl: req.FileUrl, FileUrl: req.FileUrl,
Operator: req.Operator, Operator: req.Operator,
OperatorID: req.OperatorId, OperatorId: req.OperatorId,
}).Error }).Error
if err != nil { if err != nil {
return errors.New("新增年度报告失败") return errors.New("新增年度报告失败")
@ -53,7 +53,7 @@ func (annualReportsDao) Edit(req *reports.EditAnnualReportReq) (err error) {
Status: req.Status, Status: req.Status,
Sort: req.Sort, Sort: req.Sort,
Operator: req.Operator, Operator: req.Operator,
OperatorID: req.OperatorId, OperatorId: req.OperatorId,
UpdatedAt: time.Now(), UpdatedAt: time.Now(),
}).Error }).Error
if err != nil { if err != nil {

View File

@ -37,7 +37,7 @@ func (quarterlyReportsDao) Add(req *reports.AddQuarterlyReportReq) (err error) {
Attachment: req.Attachment, Attachment: req.Attachment,
AttachmentName: req.AttachmentName, AttachmentName: req.AttachmentName,
Operator: req.Operator, Operator: req.Operator,
OperatorID: req.OperatorId, OperatorId: req.OperatorId,
}).Error }).Error
if err != nil { if err != nil {
return errors.New("新增季度报告失败") return errors.New("新增季度报告失败")
@ -54,7 +54,7 @@ func (quarterlyReportsDao) Edit(req *reports.EditQuarterlyReportReq) (err error)
Status: req.Status, Status: req.Status,
Sort: req.Sort, Sort: req.Sort,
Operator: req.Operator, Operator: req.Operator,
OperatorID: req.OperatorId, OperatorId: req.OperatorId,
UpdatedAt: time.Now(), UpdatedAt: time.Now(),
}).Error }).Error
if err != nil { if err != nil {

View File

@ -7,7 +7,7 @@ import (
) )
type AnnualReport struct { type AnnualReport struct {
ID uint `gorm:"primarykey"` Id int32 `gorm:"primarykey"`
CreatedAt time.Time CreatedAt time.Time
UpdatedAt time.Time UpdatedAt time.Time
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;index:idx_annual_report_deleted_at;"` DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;index:idx_annual_report_deleted_at;"`
@ -17,7 +17,7 @@ type AnnualReport struct {
Status int32 `gorm:"column:status;type:int;not null;default:2;comment:状态:1上架 2 下架"` Status int32 `gorm:"column:status;type:int;not null;default:2;comment:状态:1上架 2 下架"`
Sort int32 `gorm:"column:sort;type:int;not null;default:1;comment:排序"` Sort int32 `gorm:"column:sort;type:int;not null;default:1;comment:排序"`
Operator string `gorm:"column:operator;type:varchar(100);not null;default:'';comment:操作人"` Operator string `gorm:"column:operator;type:varchar(100);not null;default:'';comment:操作人"`
OperatorID int32 `gorm:"column:operator_id;comment:操作人Id"` OperatorId int32 `gorm:"column:operator_id;comment:操作人Id"`
} }
func (*AnnualReport) TableName() string { func (*AnnualReport) TableName() string {
@ -25,7 +25,7 @@ func (*AnnualReport) TableName() string {
} }
type QuarterlyReport struct { type QuarterlyReport struct {
ID uint `gorm:"primarykey"` Id int32 `gorm:"primarykey"`
CreatedAt time.Time CreatedAt time.Time
UpdatedAt time.Time UpdatedAt time.Time
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;index:idx_quarterly_report_deleted_at;"` DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;index:idx_quarterly_report_deleted_at;"`
@ -36,7 +36,7 @@ type QuarterlyReport struct {
Status int32 `gorm:"column:status;type:int;not null;default:2;comment:状态:1上架 2 下架"` Status int32 `gorm:"column:status;type:int;not null;default:2;comment:状态:1上架 2 下架"`
Sort int32 `gorm:"column:sort;type:int;not null;default:1;comment:排序"` Sort int32 `gorm:"column:sort;type:int;not null;default:1;comment:排序"`
Operator string `gorm:"column:operator;type:varchar(100);not null;default:'';comment:操作人"` Operator string `gorm:"column:operator;type:varchar(100);not null;default:'';comment:操作人"`
OperatorID int32 `gorm:"column:operator_id;comment:操作人Id"` OperatorId int32 `gorm:"column:operator_id;comment:操作人Id"`
} }
func (*QuarterlyReport) TableName() string { func (*QuarterlyReport) TableName() string {