This commit is contained in:
邹宗楠
2022-12-16 12:52:24 +08:00
parent 9212f14ffd
commit e138e49e27
3 changed files with 13 additions and 6 deletions

View File

@@ -225,6 +225,7 @@ func (c *ApiController) DelPrinter(dataMap map[string]interface{}) (data, errCod
printNos []string
printNosStr string
appID int
storeId string
)
globals.SugarLogger.Debugf("Begin API DelPrinter data: [%v]", utils.Format4Output(dataMap, false))
if _, ok := dataMap["print_nos"].(string); !ok {
@@ -234,6 +235,9 @@ func (c *ApiController) DelPrinter(dataMap map[string]interface{}) (data, errCod
return buildParamErrCodeAndErr("print_nos")
}
}
if _, ok := dataMap["storeId"].(string); !ok {
return buildParamErrCodeAndErr("storeId")
}
if err = utils.UnmarshalUseNumber([]byte(printNosStr), &printNos); err != nil {
return buildParamErrCodeAndErr("print_nos")
}
@@ -243,7 +247,7 @@ func (c *ApiController) DelPrinter(dataMap map[string]interface{}) (data, errCod
}
}
appID = utils.Str2Int(dataMap[keyAppID].(string))
if err = cms.DelPrinter(appID, printNos); err != nil {
if err = cms.DelPrinter(appID, printNos, storeId); err != nil {
return "", model.ErrCodeGeneralFailed, err
}
return "", errCode, err