解决获取当前用户的仓库的bug

This commit is contained in:
季圣华
2021-10-03 22:00:40 +08:00
parent 6104e87fd8
commit 89565ec769

View File

@@ -291,9 +291,9 @@ public class DepotService {
String[] depotArr = depotStr.split(","); String[] depotArr = depotStr.split(",");
for(String depotId: depotArr) { for(String depotId: depotArr) {
JSONObject item = new JSONObject(); JSONObject item = new JSONObject();
item.put("id", depotId); item.put("id", Long.parseLong(depotId));
for (Depot depot : dataList) { for (Depot depot : dataList) {
if(depot.getId() == Integer.parseInt(depotId)){ if(depot.getId() == Long.parseLong(depotId)){
item.put("depotName", depot.getName()); item.put("depotName", depot.getName());
item.put("isDefault", depot.getIsDefault()); item.put("isDefault", depot.getIsDefault());
} }