gomod引用
This commit is contained in:
@@ -46,8 +46,8 @@ func (c *application) GetApplication(ctx context.Context, req *dto.GetApplicatio
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// 将字符串ID转换为int64
|
||||
id, _ := strconv.ParseInt(app.Id, 10, 64)
|
||||
// 将ObjectId的十六进制字符串转换为int64,如果失败则使用0
|
||||
id, _ := strconv.ParseInt(app.Id.Hex(), 16, 64)
|
||||
// Application实体中没有TenantId字段,暂时设为0
|
||||
tenantID := int64(0)
|
||||
|
||||
@@ -81,7 +81,7 @@ func (c *application) ListApplications(ctx context.Context, req *dto.ListApplica
|
||||
// 转换为响应格式
|
||||
appItems := make([]dto.ApplicationItem, len(list))
|
||||
for i, app := range list {
|
||||
id, _ := strconv.ParseInt(app.Id, 10, 64)
|
||||
id, _ := strconv.ParseInt(app.Id.Hex(), 16, 64)
|
||||
appItems[i] = dto.ApplicationItem{
|
||||
ID: id,
|
||||
Name: app.Name,
|
||||
@@ -129,8 +129,8 @@ func (c *application) ValidateApplication(ctx context.Context, req *dto.Validate
|
||||
}, nil
|
||||
}
|
||||
|
||||
// 将字符串ID转换为int64
|
||||
appID, _ := strconv.ParseInt(app.Id, 10, 64)
|
||||
// 将ObjectId的十六进制字符串转换为int64,如果失败则使用0
|
||||
appID, _ := strconv.ParseInt(app.Id.Hex(), 16, 64)
|
||||
// Application实体中没有TenantId字段,暂时设为0
|
||||
tenantID := int64(0)
|
||||
tentantName := ""
|
||||
|
||||
Reference in New Issue
Block a user