Update SkuController.java

Add code to error message
pull/8040/head
Qiuyi LI 2025-02-17 15:45:50 +01:00 committed by GitHub
parent b2517f6a38
commit 3188347bec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -588,12 +588,12 @@ public class SkuController {
String parsedColumn = CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, column.replace("_dictText", ""));
String parsedOrder = order.toUpperCase();
if(!parsedOrder.equals("ASC") && !parsedOrder.equals("DESC")) {
return Result.error("Error 400 Bad Request");
return Result.error(400, "Bad Request");
}
try {
specialFilterContentForDictSql(parsedColumn);
} catch (RuntimeException e) {
return Result.error("Error 400 Bad Request");
return Result.error(400, "Bad Request");
}
String shopId = shopService.getIdByCode(shopCode);
if (shopId == null) return Result.error(404, "Shop not found");