uint/uint64全部改为uint32
This commit is contained in:
@@ -16,8 +16,8 @@ import (
|
||||
// ReleaseFeedWeightTaskParams 定义了 ReleaseFeedWeightTask 的参数结构
|
||||
type ReleaseFeedWeightTaskParams struct {
|
||||
ReleaseWeight float32 `json:"release_weight"` // 需要释放的重量
|
||||
FeedPortDeviceID uint `json:"feed_port_device_id"` // 下料口ID
|
||||
MixingTankDeviceID uint `json:"mixing_tank_device_id"` // 称重传感器ID
|
||||
FeedPortDeviceID uint32 `json:"feed_port_device_id"` // 下料口ID
|
||||
MixingTankDeviceID uint32 `json:"mixing_tank_device_id"` // 称重传感器ID
|
||||
}
|
||||
|
||||
// ReleaseFeedWeightTask 是一个控制下料口释放指定重量的任务
|
||||
@@ -30,7 +30,7 @@ type ReleaseFeedWeightTask struct {
|
||||
|
||||
feedPortDevice *models.Device
|
||||
releaseWeight float32
|
||||
mixingTankDeviceID uint
|
||||
mixingTankDeviceID uint32
|
||||
|
||||
feedPort device.Service
|
||||
|
||||
@@ -178,10 +178,10 @@ func (r *ReleaseFeedWeightTask) OnFailure(ctx context.Context, executeErr error)
|
||||
logger.Errorf("善后处理完成, 日志ID:%v", r.claimedLog.ID)
|
||||
}
|
||||
|
||||
func (r *ReleaseFeedWeightTask) ResolveDeviceIDs(ctx context.Context) ([]uint, error) {
|
||||
func (r *ReleaseFeedWeightTask) ResolveDeviceIDs(ctx context.Context) ([]uint32, error) {
|
||||
taskCtx := logs.AddFuncName(ctx, r.ctx, "ResolveDeviceIDs")
|
||||
if err := r.parseParameters(taskCtx); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return []uint{r.feedPortDevice.ID, r.mixingTankDeviceID}, nil
|
||||
return []uint32{r.feedPortDevice.ID, r.mixingTankDeviceID}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user