|
|
|
@@ -33,9 +33,10 @@ func (l *InstanceCenterLogic) InstanceCenter(req *types.InstanceCenterReq) (*typ |
|
|
|
|
|
|
|
if req.InstanceType == 0 { |
|
|
|
l.svcCtx.DbEngin.Raw("select * from ai_instance_center").Scan(&InstanceCenter) |
|
|
|
} else if req.InstanceType != 0 && req.InstanceClass == "" { |
|
|
|
l.svcCtx.DbEngin.Raw("select * from ai_instance_center where instance_type = ? ", req.InstanceType).Scan(&InstanceCenter) |
|
|
|
} else { |
|
|
|
l.svcCtx.DbEngin.Raw("select * from ai_instance_center where instance_type = ?", req.InstanceType).Scan(&InstanceCenter) |
|
|
|
|
|
|
|
l.svcCtx.DbEngin.Raw("select * from ai_instance_center where instance_type = ? and instance_class = ?", req.InstanceType, req.InstanceClass).Scan(&InstanceCenter) |
|
|
|
} |
|
|
|
|
|
|
|
var instanceCenter = *InstanceCenter |
|
|
|
|