uint/uint64全部改为uint32

This commit is contained in:
2025-11-10 22:23:31 +08:00
parent 3e711551e7
commit ecd2d37c70
96 changed files with 775 additions and 785 deletions

View File

@@ -54,7 +54,7 @@ func NewListDeviceCommandLogResponse(data []models.DeviceCommandLog, total int64
// NewListPlanExecutionLogResponse 从模型数据创建列表响应 DTO
func NewListPlanExecutionLogResponse(planLogs []models.PlanExecutionLog, plans []models.Plan, total int64, page, pageSize int) *ListPlanExecutionLogResponse {
planId2Name := make(map[uint]string)
planId2Name := make(map[uint32]string)
for _, plan := range plans {
planId2Name[plan.ID] = string(plan.Name)
}
@@ -95,7 +95,7 @@ func NewListTaskExecutionLogResponse(data []models.TaskExecutionLog, total int64
PlanExecutionLogID: item.PlanExecutionLogID,
TaskID: item.TaskID,
Task: TaskDTO{
ID: uint(item.Task.ID),
ID: uint32(item.Task.ID),
Name: item.Task.Name,
Description: item.Task.Description,
},
@@ -373,7 +373,7 @@ func NewListWeighingRecordResponse(data []models.WeighingRecord, total int64, pa
func NewListPigTransferLogResponse(data []models.PigTransferLog, total int64, page, pageSize int) *ListPigTransferLogResponse {
dtos := make([]PigTransferLogDTO, len(data))
for i, item := range data {
// 注意PigTransferLog 的 ID, CreatedAt, UpdatedAt 字段是 gorm.Model 嵌入的
// 注意PigTransferLog 的 ID, CreatedAt, UpdatedAt 字段是 Model 嵌入的
dtos[i] = PigTransferLogDTO{
ID: item.ID,
CreatedAt: item.CreatedAt,