From 80b3ea5587ff7ec20541d9ca7c6c28739e4d615b Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期二, 30 一月 2024 14:28:20 +0800 Subject: [PATCH] 更新bug修改 --- cloud-server-other/src/main/java/com/dsh/other/controller/StoreController.java | 16 +++++----------- 1 files changed, 5 insertions(+), 11 deletions(-) diff --git a/cloud-server-other/src/main/java/com/dsh/other/controller/StoreController.java b/cloud-server-other/src/main/java/com/dsh/other/controller/StoreController.java index 38e3a64..146520a 100644 --- a/cloud-server-other/src/main/java/com/dsh/other/controller/StoreController.java +++ b/cloud-server-other/src/main/java/com/dsh/other/controller/StoreController.java @@ -417,7 +417,7 @@ @ApiImplicitParams({ @ApiImplicitParam(value = "门店id", name = "id", dataType = "int", required = true), }) - public ResultUtil<List<TStoreOtherVo>> queryIndexSet(Integer id) { + public ResultUtil<List<TStoreOtherConfigTrue>> queryIndexSet(Integer id) { try { List<TStoreOtherConfigTrue> tStoreOtherConfigTrues = new ArrayList<>(); @@ -425,20 +425,14 @@ if (list.size() > 0) { tStoreOtherConfigTrues = tStoreOtherConfigTrueService.list(new LambdaQueryWrapper<TStoreOtherConfigTrue>().in(TStoreOtherConfigTrue::getPid, list.stream().map(TStoreOther::getId).collect(Collectors.toList())).eq(TStoreOtherConfigTrue::getState, 1)); } - List<TStoreOtherVo> list1 = new ArrayList<>(); - for (TStoreOther tStoreOther : list) { - TStoreOtherVo storeOtherVo = new TStoreOtherVo(); - BeanUtils.copyProperties(tStoreOther, storeOtherVo); - List<TStoreOtherConfigTrue> lists = new ArrayList<>(); - for (TStoreOtherConfigTrue tStoreOtherConfigTrue : tStoreOtherConfigTrues) { + for (TStoreOtherConfigTrue tStoreOtherConfigTrue : tStoreOtherConfigTrues) { + for (TStoreOther tStoreOther : list) { if (tStoreOtherConfigTrue.getPid() == tStoreOther.getId()) { - lists.add(tStoreOtherConfigTrue); + tStoreOtherConfigTrue.setSort(tStoreOther.getSort()); } } - storeOtherVo.setList(lists); - list1.add(storeOtherVo); } - return ResultUtil.success(list1); + return ResultUtil.success(tStoreOtherConfigTrues); } catch (Exception e) { e.printStackTrace(); return ResultUtil.runErr(); -- Gitblit v1.7.1