From 9238d42f45f06b3b694b841c935fee644d7cf066 Mon Sep 17 00:00:00 2001 From: GYJ <1157756119@qq.com> Date: Thu, 13 Mar 2025 13:45:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=81=E7=A7=BB=20pad=20=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/CurPadLayoutServiceImpl.java | 18 +++++------------- 收银机数据迁移关系.md | 7 +++++++ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/czg/mergedata/cur/service/impl/CurPadLayoutServiceImpl.java b/src/main/java/com/czg/mergedata/cur/service/impl/CurPadLayoutServiceImpl.java index 937ca15..8638ce3 100644 --- a/src/main/java/com/czg/mergedata/cur/service/impl/CurPadLayoutServiceImpl.java +++ b/src/main/java/com/czg/mergedata/cur/service/impl/CurPadLayoutServiceImpl.java @@ -10,7 +10,6 @@ import com.czg.mergedata.cur.mapper.CurPadLayoutMapper; import com.czg.mergedata.cur.mapper.CurPadProductCategoryDetailMapper; import com.czg.mergedata.cur.mapper.CurPadProductCategoryMapper; import com.czg.mergedata.cur.service.CurPadLayoutService; -import com.czg.mergedata.cur.service.CurShopIdRelationService; import com.czg.mergedata.old.entity.OldPadLayout; import com.czg.mergedata.old.entity.OldPadProductCategory; import com.czg.mergedata.old.entity.OldPadProductCategoryDetail; @@ -25,7 +24,6 @@ import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.List; -import java.util.Map; /** * Pad商品布局版式 服务层实现。 @@ -35,10 +33,6 @@ import java.util.Map; */ @Service public class CurPadLayoutServiceImpl extends ServiceImpl implements CurPadLayoutService { - - @Resource - private CurShopIdRelationService curShopIdRelationService; - @Resource private CurPadProductCategoryMapper curPadProductCategoryMapper; @@ -61,10 +55,8 @@ public class CurPadLayoutServiceImpl extends ServiceImpl oldAndCurShopIdMap = curShopIdRelationService.getOldShopIdRelation(); - execPadLayout(); - execPadProductCategory(oldAndCurShopIdMap); + execPadProductCategory(); execPadProductCategoryDetail(); return CzgResult.success("迁移成功"); @@ -80,11 +72,11 @@ public class CurPadLayoutServiceImpl extends ServiceImpl oldAndCurShopIdMap) { + private void execPadProductCategory() { Page page = oldPadProductCategoryService.page(PageUtils.buildPage()); while (!page.getRecords().isEmpty()) { - savePadProductCategory(page.getRecords(), oldAndCurShopIdMap); + savePadProductCategory(page.getRecords()); page = oldPadProductCategoryService.page(PageUtils.buildPage(page.getPageNumber() + 1)); } } @@ -109,12 +101,12 @@ public class CurPadLayoutServiceImpl extends ServiceImpl oldPadProductCategoryList, Map oldAndCurShopIdMap) { + private void savePadProductCategory(List oldPadProductCategoryList) { List curPadProductCategoryList = new ArrayList<>(); for (OldPadProductCategory oldPadProductCategory : oldPadProductCategoryList) { CurPadProductCategory curPadProductCategory = BeanUtil.toBean(oldPadProductCategory, CurPadProductCategory.class); - curPadProductCategory.setShopId(oldAndCurShopIdMap.get(oldPadProductCategory.getShopId())); + curPadProductCategory.setShopId(oldPadProductCategory.getShopId()); curPadProductCategoryList.add(curPadProductCategory); } diff --git a/收银机数据迁移关系.md b/收银机数据迁移关系.md index 897cce0..c730410 100644 --- a/收银机数据迁移关系.md +++ b/收银机数据迁移关系.md @@ -111,5 +111,12 @@ - tb_prod_group 表 - tb_prod_group_relation 表 +### 16. Pad 配置管理 +> /merge/pad/mergePad +#### 执行表 +- tb_pad_layout 表 +- tb_pad_product_category 表 +- tb_pad_product_category_detail 表 +