forked from JointCloud/pcm-coordinator
parent
7300f017fa
commit
a1cfa43774
|
@ -27,7 +27,7 @@ func (l *DeleteAppByAppNameLogic) DeleteAppByAppName(req *types.DeleteAppReq) (r
|
|||
resp = &types.DeleteAppResp{}
|
||||
var task = &Task{}
|
||||
//查询应用的yamlString
|
||||
l.svcCtx.DbEngin.Raw(`select * from task where ns_id= ? and name= ? `, req.NsID, req.Name).Scan(&task)
|
||||
l.svcCtx.DbEngin.Raw(`select * from task where ns_id= ? and name= ? AND deleted_at IS NULL`, req.NsID, req.Name).Scan(&task)
|
||||
if task.Id == 0 {
|
||||
resp.Code = 500
|
||||
resp.Msg = "App not fount"
|
||||
|
|
|
@ -23,7 +23,7 @@ func NewGetAppByAppNameLogic(ctx context.Context, svcCtx *svc.ServiceContext) *G
|
|||
|
||||
func (l *GetAppByAppNameLogic) GetAppByAppName(req *types.AppDetailReq) (resp interface{}, err error) {
|
||||
var task Task
|
||||
db := l.svcCtx.DbEngin.Raw("select * from task where ns_id = ? and name = ?", req.NsID, req.Name).Scan(&task)
|
||||
db := l.svcCtx.DbEngin.Raw("select * from task where ns_id = ? and name = ? AND deleted_at IS NULL", req.NsID, req.Name).Scan(&task)
|
||||
if db.Error != nil {
|
||||
logx.Errorf("db error: %v", db.Error)
|
||||
return
|
||||
|
|
|
@ -29,7 +29,7 @@ func (l *RestartAppByAppNameLogic) RestartAppByAppName(req *types.DeleteAppReq)
|
|||
resp = &types.AppResp{}
|
||||
var task = &Task{}
|
||||
//查询应用的yamlString
|
||||
l.svcCtx.DbEngin.Raw(`select * from task where ns_id= ? and name= ? `, req.NsID, req.Name).Scan(&task)
|
||||
l.svcCtx.DbEngin.Raw(`select * from task where ns_id= ? and name= ? AND deleted_at IS NULL`, req.NsID, req.Name).Scan(&task)
|
||||
if task.Id == 0 {
|
||||
resp.Code = 500
|
||||
resp.Msg = "App not fount"
|
||||
|
|
Loading…
Reference in New Issue