|
@@ -2,7 +2,6 @@ package sandbox
|
|
|
|
|
|
import (
|
|
|
"encoding/json"
|
|
|
- "errors"
|
|
|
"eta/eta_api/models"
|
|
|
"eta/eta_api/models/company"
|
|
|
"eta/eta_api/models/sandbox"
|
|
@@ -15,215 +14,215 @@ import (
|
|
|
)
|
|
|
|
|
|
|
|
|
-func AddSandbox(req request.AddAndEditSandbox, opUserId int, opUserName string, ignoreVariety bool) (resp *sandbox.SandboxSaveResp, err error) {
|
|
|
- resp = new(sandbox.SandboxSaveResp)
|
|
|
-
|
|
|
- var permissionName string
|
|
|
- if !ignoreVariety {
|
|
|
- chartPermissionInfo, e := company.GetChartPermissionListById(req.ChartPermissionId)
|
|
|
- if e != nil {
|
|
|
- err = e
|
|
|
- return
|
|
|
- }
|
|
|
- permissionName = chartPermissionInfo.PermissionName
|
|
|
- }
|
|
|
-
|
|
|
- sandboxInfo := &sandbox.Sandbox{
|
|
|
- Name: utils.TrimStr(req.Name),
|
|
|
- ChartPermissionId: req.ChartPermissionId,
|
|
|
- ChartPermissionName: permissionName,
|
|
|
- CurrVersion: 1,
|
|
|
- Code: GenerateCode(),
|
|
|
- Content: req.Content,
|
|
|
- PicUrl: utils.TrimStr(req.PicUrl),
|
|
|
- OpUserId: opUserId,
|
|
|
- OpUserName: opUserName,
|
|
|
- IsDelete: 0,
|
|
|
- ModifyTime: time.Now(),
|
|
|
- CreateTime: time.Now(),
|
|
|
- }
|
|
|
-
|
|
|
- sandboxVersionInfo := &sandbox.SandboxVersion{
|
|
|
- Name: sandboxInfo.Name,
|
|
|
- ChartPermissionId: sandboxInfo.ChartPermissionId,
|
|
|
- ChartPermissionName: sandboxInfo.ChartPermissionName,
|
|
|
- CurrVersion: sandboxInfo.CurrVersion,
|
|
|
- Content: sandboxInfo.Content,
|
|
|
- PicUrl: sandboxInfo.PicUrl,
|
|
|
- OpUserId: sandboxInfo.OpUserId,
|
|
|
- OpUserName: sandboxInfo.OpUserName,
|
|
|
- VersionCode: GenerateVersionCode(sandboxInfo.SandboxId, sandboxInfo.CurrVersion),
|
|
|
- IsDelete: sandboxInfo.IsDelete,
|
|
|
- CreateTime: sandboxInfo.CreateTime,
|
|
|
- }
|
|
|
-
|
|
|
- sandboxDraftInfo := &sandbox.SandboxDraft{
|
|
|
- Name: sandboxInfo.Name,
|
|
|
- ChartPermissionId: sandboxInfo.ChartPermissionId,
|
|
|
- ChartPermissionName: sandboxInfo.ChartPermissionName,
|
|
|
- CurrVersion: sandboxInfo.CurrVersion,
|
|
|
- Content: sandboxInfo.Content,
|
|
|
- OpUserId: sandboxInfo.OpUserId,
|
|
|
- OpUserName: sandboxInfo.OpUserName,
|
|
|
- CreateTime: sandboxInfo.CreateTime,
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- err = sandbox.AddNewSandbox(sandboxInfo, sandboxVersionInfo, sandboxDraftInfo)
|
|
|
- if err != nil {
|
|
|
- return
|
|
|
- }
|
|
|
- resp.Sandbox = sandboxInfo
|
|
|
- resp.VersionCode = sandboxVersionInfo.VersionCode
|
|
|
- return
|
|
|
-}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
-func UpdateSandbox(req request.AddAndEditSandbox, opUserId int, opUserName string, ignoreVariety bool) (resp *sandbox.SandboxSaveResp, err error, errMsg string) {
|
|
|
- resp = new(sandbox.SandboxSaveResp)
|
|
|
-
|
|
|
- sandboxVersion, err := sandbox.GetSandboxVersionBySandboxVersionCode(req.SandboxVersionCode)
|
|
|
- if err != nil {
|
|
|
- if err.Error() == utils.ErrNoRow() {
|
|
|
- errMsg = "找不到该版本"
|
|
|
- err = errors.New(errMsg)
|
|
|
- }
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
- sandboxInfo, err := sandbox.GetSandboxById(sandboxVersion.SandboxId)
|
|
|
- if err != nil {
|
|
|
- if err.Error() == utils.ErrNoRow() {
|
|
|
- errMsg = "找不到该沙盘"
|
|
|
- err = errors.New(errMsg)
|
|
|
- }
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
- var isUpdateName, isUpdateContent bool
|
|
|
- if sandboxInfo.Name != utils.TrimStr(req.Name) {
|
|
|
- isUpdateName = true
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- if checkoutContent(sandboxInfo.Content, req.Content) {
|
|
|
- isUpdateContent = true
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- if isUpdateName == false && isUpdateContent == false {
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- var permissionName string
|
|
|
- if !ignoreVariety {
|
|
|
- chartPermissionInfo, e := company.GetChartPermissionListById(req.ChartPermissionId)
|
|
|
- if e != nil {
|
|
|
- err = e
|
|
|
- return
|
|
|
- }
|
|
|
- permissionName = chartPermissionInfo.PermissionName
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- if isUpdateName == true && isUpdateContent == false {
|
|
|
- sandboxInfo.Name = utils.TrimStr(req.Name)
|
|
|
- sandboxInfo.ChartPermissionId = req.ChartPermissionId
|
|
|
- sandboxInfo.ChartPermissionName = permissionName
|
|
|
- sandboxInfo.Content = req.Content
|
|
|
- sandboxInfo.PicUrl = utils.TrimStr(req.PicUrl)
|
|
|
- sandboxInfo.OpUserId = opUserId
|
|
|
- sandboxInfo.OpUserName = opUserName
|
|
|
- sandboxInfo.ModifyTime = time.Now()
|
|
|
- var updateSandboxColumn = []string{"Name", "ChartPermissionId", "ChartPermissionName", "PicUrl", "OpUserId", "OpUserName", "ModifyTime"}
|
|
|
-
|
|
|
-
|
|
|
- sandboxVersionInfo, tmpErr := sandbox.GetSandboxVersionBySandbox2VersionId(sandboxInfo.SandboxId, sandboxInfo.CurrVersion)
|
|
|
- if tmpErr != nil {
|
|
|
- err = tmpErr
|
|
|
- return
|
|
|
- }
|
|
|
- sandboxVersionInfo.Name = sandboxInfo.Name
|
|
|
- sandboxVersionInfo.ChartPermissionId = sandboxInfo.ChartPermissionId
|
|
|
- sandboxVersionInfo.ChartPermissionName = sandboxInfo.ChartPermissionName
|
|
|
- sandboxVersionInfo.PicUrl = sandboxInfo.PicUrl
|
|
|
- sandboxVersionInfo.OpUserId = sandboxInfo.OpUserId
|
|
|
- sandboxVersionInfo.OpUserName = sandboxInfo.OpUserName
|
|
|
- var updateSandboxVersionColumn = []string{"Name", "ChartPermissionId", "ChartPermissionName", "PicUrl", "OpUserId", "OpUserName"}
|
|
|
-
|
|
|
-
|
|
|
- sandboxDraftInfo := &sandbox.SandboxDraft{
|
|
|
- Name: sandboxInfo.Name,
|
|
|
- ChartPermissionId: sandboxInfo.ChartPermissionId,
|
|
|
- ChartPermissionName: sandboxInfo.ChartPermissionName,
|
|
|
- CurrVersion: sandboxInfo.CurrVersion,
|
|
|
- Content: sandboxInfo.Content,
|
|
|
- OpUserId: sandboxInfo.OpUserId,
|
|
|
- OpUserName: sandboxInfo.OpUserName,
|
|
|
- CreateTime: time.Now(),
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- err = sandbox.UpdateSandboxName(sandboxInfo, sandboxVersionInfo, sandboxDraftInfo, updateSandboxColumn, updateSandboxVersionColumn)
|
|
|
- if err != nil {
|
|
|
- return
|
|
|
- }
|
|
|
- resp.Sandbox = sandboxInfo
|
|
|
- resp.VersionCode = sandboxVersionInfo.VersionCode
|
|
|
- } else {
|
|
|
- sandboxInfo.Name = utils.TrimStr(req.Name)
|
|
|
- sandboxInfo.ChartPermissionId = req.ChartPermissionId
|
|
|
- sandboxInfo.ChartPermissionName = permissionName
|
|
|
- sandboxInfo.CurrVersion = sandboxInfo.CurrVersion + 1
|
|
|
- sandboxInfo.Content = req.Content
|
|
|
- sandboxInfo.PicUrl = utils.TrimStr(req.PicUrl)
|
|
|
- sandboxInfo.OpUserId = opUserId
|
|
|
- sandboxInfo.OpUserName = opUserName
|
|
|
- sandboxInfo.ModifyTime = time.Now()
|
|
|
-
|
|
|
- var updateSandbox = []string{"Name", "ChartPermissionId", "ChartPermissionName", "CurrVersion", "Content", "PicUrl", "OpUserId", "OpUserName", "ModifyTime"}
|
|
|
-
|
|
|
-
|
|
|
- sandboxVersionInfo := &sandbox.SandboxVersion{
|
|
|
- Name: sandboxInfo.Name,
|
|
|
- ChartPermissionId: sandboxInfo.ChartPermissionId,
|
|
|
- ChartPermissionName: sandboxInfo.ChartPermissionName,
|
|
|
- CurrVersion: sandboxInfo.CurrVersion,
|
|
|
- Content: sandboxInfo.Content,
|
|
|
- SvgData: req.SvgData,
|
|
|
- PicUrl: sandboxInfo.PicUrl,
|
|
|
- OpUserId: sandboxInfo.OpUserId,
|
|
|
- OpUserName: sandboxInfo.OpUserName,
|
|
|
- VersionCode: GenerateVersionCode(sandboxInfo.SandboxId, sandboxInfo.CurrVersion),
|
|
|
- IsDelete: sandboxInfo.IsDelete,
|
|
|
- CreateTime: time.Now(),
|
|
|
- }
|
|
|
-
|
|
|
- sandboxDraftInfo := &sandbox.SandboxDraft{
|
|
|
- Name: sandboxInfo.Name,
|
|
|
- ChartPermissionId: sandboxInfo.ChartPermissionId,
|
|
|
- ChartPermissionName: sandboxInfo.ChartPermissionName,
|
|
|
- CurrVersion: sandboxInfo.CurrVersion,
|
|
|
- Content: sandboxInfo.Content,
|
|
|
- OpUserId: sandboxInfo.OpUserId,
|
|
|
- OpUserName: sandboxInfo.OpUserName,
|
|
|
- CreateTime: time.Now(),
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- err = sandbox.UpdateSandbox(sandboxInfo, updateSandbox, sandboxVersionInfo, sandboxDraftInfo)
|
|
|
- if err != nil {
|
|
|
- return
|
|
|
- }
|
|
|
- resp.Sandbox = sandboxInfo
|
|
|
- resp.VersionCode = sandboxVersionInfo.VersionCode
|
|
|
- }
|
|
|
- return
|
|
|
-}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
func AddSandboxDraft(sandboxId int, req request.AddAndEditSandbox, opUserId int, opUserName string) (sandboxDraftInfo *sandbox.SandboxDraft, err error) {
|
|
@@ -328,29 +327,29 @@ func UpdateSandboxEditMark(sandboxId, nowUserId, status int, nowUserName string)
|
|
|
}
|
|
|
|
|
|
|
|
|
-func ResetDraftToLastVersion(sandboxId, opUserId int, opUserName string) (sandboxDraftInfo *sandbox.SandboxDraft, err error) {
|
|
|
-
|
|
|
- sandboxInfo, err := sandbox.GetSandboxById(sandboxId)
|
|
|
- if err != nil {
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- sandboxDraftInfo = &sandbox.SandboxDraft{
|
|
|
- SandboxId: sandboxInfo.SandboxId,
|
|
|
- Name: sandboxInfo.Name,
|
|
|
- ChartPermissionId: sandboxInfo.ChartPermissionId,
|
|
|
- ChartPermissionName: sandboxInfo.ChartPermissionName,
|
|
|
- Content: sandboxInfo.Content,
|
|
|
- OpUserId: opUserId,
|
|
|
- OpUserName: opUserName,
|
|
|
- CreateTime: time.Now(),
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- err = sandbox.AddSandboxDraft(sandboxDraftInfo)
|
|
|
- return
|
|
|
-}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
func DeleteSandbox(sandboxId int) (err error) {
|
|
@@ -367,74 +366,74 @@ func DeleteSandbox(sandboxId int) (err error) {
|
|
|
}
|
|
|
|
|
|
|
|
|
-func DeleteSandboxVersion(sandboxVersionCode string, opUserId int) (err error, errMsg string) {
|
|
|
-
|
|
|
- sandboxVersion, err := sandbox.GetSandboxVersionBySandboxVersionCode(sandboxVersionCode)
|
|
|
- if err != nil {
|
|
|
- if err.Error() == utils.ErrNoRow() {
|
|
|
- errMsg = "找不到该版本"
|
|
|
- err = errors.New(errMsg)
|
|
|
- }
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- nowOpUserId, _ := utils.Rc.RedisInt(key)
|
|
|
-
|
|
|
- if nowOpUserId > 0 && nowOpUserId != opUserId {
|
|
|
- errMsg = "当前有其他人正在编辑,不允许删除该沙盘"
|
|
|
- err = errors.New(errMsg)
|
|
|
- return
|
|
|
- }*/
|
|
|
-
|
|
|
- markStatus, err := UpdateSandboxEditMark(sandboxVersion.SandboxId, opUserId, 2, "")
|
|
|
- if err != nil {
|
|
|
- errMsg = "查询标记状态失败"
|
|
|
- err = errors.New("查询标记状态失败,Err:" + err.Error())
|
|
|
- return
|
|
|
- }
|
|
|
- if markStatus.Status == 1 {
|
|
|
- errMsg = fmt.Sprintf("当前%s正在编辑,不允许删除该沙盘", markStatus.Editor)
|
|
|
- err = errors.New(errMsg)
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- sandboxInfo, err := sandbox.GetSandboxById(sandboxVersion.SandboxId)
|
|
|
- if err != nil {
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- if sandboxVersion.CurrVersion == sandboxInfo.CurrVersion {
|
|
|
- lastSandboxVersion, tmpErr := sandbox.GetLastSandboxVersionBySandbox2VersionId(sandboxInfo.SandboxId, sandboxVersion.CurrVersion)
|
|
|
- if tmpErr != nil {
|
|
|
-
|
|
|
- if tmpErr.Error() == utils.ErrNoRow() {
|
|
|
- sandboxInfo.IsDelete = 1
|
|
|
- var updateSandboxColumn = []string{"IsDelete"}
|
|
|
- err = sandboxInfo.Update(updateSandboxColumn)
|
|
|
- return
|
|
|
- }
|
|
|
- err = tmpErr
|
|
|
- return
|
|
|
- } else {
|
|
|
-
|
|
|
- sandboxInfo.Content = lastSandboxVersion.Content
|
|
|
- sandboxInfo.CurrVersion = lastSandboxVersion.CurrVersion
|
|
|
- sandboxInfo.PicUrl = lastSandboxVersion.PicUrl
|
|
|
- err = sandboxInfo.Update([]string{"Content", "CurrVersion", "PicUrl"})
|
|
|
- if err != nil {
|
|
|
- return
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- sandboxVersion.IsDelete = 1
|
|
|
- err = sandboxVersion.Update([]string{"IsDelete"})
|
|
|
-
|
|
|
- return
|
|
|
-}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
func GetSandboxVersionDetailByCode(sandboxVersionCode string) (sandboxVersionInfo *sandbox.SandboxVersion, err error) {
|
|
@@ -636,7 +635,6 @@ func checkoutContent(oldContent, reqContent string) (isUpdate bool) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
func sandboxClassifyHaveChild(allNode []*sandbox.SandboxClassifyItems, node *sandbox.SandboxClassifyItems) (childs []*sandbox.SandboxClassifyItems, yes bool) {
|
|
|
for _, v := range allNode {
|
|
|
if v.ParentId == node.SandboxClassifyId {
|
|
@@ -764,4 +762,30 @@ func HandleNoPermissionSandbox(allNodes []*sandbox.SandboxClassifyItems, noPermi
|
|
|
}
|
|
|
|
|
|
return
|
|
|
-}
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+func AddSandboxV2(req request.AddAndEditSandboxV2, opUserId int, opUserName string) (resp *sandbox.SandboxSaveResp, err error) {
|
|
|
+ resp = new(sandbox.SandboxSaveResp)
|
|
|
+
|
|
|
+ sandboxInfo := &sandbox.Sandbox{
|
|
|
+ Name: utils.TrimStr(req.Name),
|
|
|
+ Code: GenerateCode(),
|
|
|
+ Content: req.Content,
|
|
|
+ PicUrl: utils.TrimStr(req.PicUrl),
|
|
|
+ SysUserId: opUserId,
|
|
|
+ SysUserName: opUserName,
|
|
|
+ IsDelete: 0,
|
|
|
+ ModifyTime: time.Now(),
|
|
|
+ CreateTime: time.Now(),
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ id,err := sandbox.AddSandbox(sandboxInfo)
|
|
|
+ if err != nil {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ sandboxInfo.SandboxId = int(id)
|
|
|
+ resp.Sandbox = sandboxInfo
|
|
|
+ return
|
|
|
+}
|