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

@@ -16,17 +16,17 @@ type PlanService interface {
// CreatePlan 创建一个新的计划
CreatePlan(ctx context.Context, req *dto.CreatePlanRequest) (*dto.PlanResponse, error)
// GetPlanByID 根据ID获取计划详情
GetPlanByID(ctx context.Context, id uint) (*dto.PlanResponse, error)
GetPlanByID(ctx context.Context, id uint32) (*dto.PlanResponse, error)
// ListPlans 获取计划列表,支持过滤和分页
ListPlans(ctx context.Context, query *dto.ListPlansQuery) (*dto.ListPlansResponse, error)
// UpdatePlan 更新计划
UpdatePlan(ctx context.Context, id uint, req *dto.UpdatePlanRequest) (*dto.PlanResponse, error)
UpdatePlan(ctx context.Context, id uint32, req *dto.UpdatePlanRequest) (*dto.PlanResponse, error)
// DeletePlan 删除计划(软删除)
DeletePlan(ctx context.Context, id uint) error
DeletePlan(ctx context.Context, id uint32) error
// StartPlan 启动计划
StartPlan(ctx context.Context, id uint) error
StartPlan(ctx context.Context, id uint32) error
// StopPlan 停止计划
StopPlan(ctx context.Context, id uint) error
StopPlan(ctx context.Context, id uint32) error
}
// planService 是 PlanService 接口的实现
@@ -77,7 +77,7 @@ func (s *planService) CreatePlan(ctx context.Context, req *dto.CreatePlanRequest
}
// GetPlanByID 根据ID获取计划详情
func (s *planService) GetPlanByID(ctx context.Context, id uint) (*dto.PlanResponse, error) {
func (s *planService) GetPlanByID(ctx context.Context, id uint32) (*dto.PlanResponse, error) {
serviceCtx, logger := logs.Trace(ctx, s.ctx, "GetPlanByID")
const actionType = "应用服务层:获取计划详情"
@@ -135,7 +135,7 @@ func (s *planService) ListPlans(ctx context.Context, query *dto.ListPlansQuery)
}
// UpdatePlan 更新计划
func (s *planService) UpdatePlan(ctx context.Context, id uint, req *dto.UpdatePlanRequest) (*dto.PlanResponse, error) {
func (s *planService) UpdatePlan(ctx context.Context, id uint32, req *dto.UpdatePlanRequest) (*dto.PlanResponse, error) {
serviceCtx, logger := logs.Trace(ctx, s.ctx, "UpdatePlan")
const actionType = "应用服务层:更新计划"
@@ -166,7 +166,7 @@ func (s *planService) UpdatePlan(ctx context.Context, id uint, req *dto.UpdatePl
}
// DeletePlan 删除计划(软删除)
func (s *planService) DeletePlan(ctx context.Context, id uint) error {
func (s *planService) DeletePlan(ctx context.Context, id uint32) error {
serviceCtx, logger := logs.Trace(ctx, s.ctx, "DeletePlan")
const actionType = "应用服务层:删除计划"
@@ -182,7 +182,7 @@ func (s *planService) DeletePlan(ctx context.Context, id uint) error {
}
// StartPlan 启动计划
func (s *planService) StartPlan(ctx context.Context, id uint) error {
func (s *planService) StartPlan(ctx context.Context, id uint32) error {
serviceCtx, logger := logs.Trace(ctx, s.ctx, "StartPlan")
const actionType = "应用服务层:启动计划"
@@ -198,7 +198,7 @@ func (s *planService) StartPlan(ctx context.Context, id uint) error {
}
// StopPlan 停止计划
func (s *planService) StopPlan(ctx context.Context, id uint) error {
func (s *planService) StopPlan(ctx context.Context, id uint32) error {
serviceCtx, logger := logs.Trace(ctx, s.ctx, "StopPlan")
const actionType = "应用服务层:停止计划"