fix
Helius
2021-07-09 e519edd7c8190aca9fa7a30a12608a00f15f09cd
zq-erp/src/main/java/com/matrix/system/dataMove/DateMoveServiceImpl.java
@@ -104,6 +104,7 @@
        return shopInfos;
    }
    @Transactional(rollbackFor = Exception.class)
    public void toNewShopInfo(List<SysShopInfo>  shopInfos) {
        if (CollUtil.isNotEmpty(shopInfos)) {
            Map<Long, Long> oldAndNewId = new HashMap<>();
@@ -122,17 +123,20 @@
                query.setShopNo(shopInfo.getShopNo());
                Long oldId = shopInfo.getId();
                shopInfo.setId(null);
                // TODO 若迁往正式环境,这里需要变动
                if (!shopInfo.getShopName().contains("美度") && !shopInfo.getShopName().contains("总店")) {
                    sysShopInfoDao.insert(shopInfo);
                    oldAndNewId.put(oldId, shopInfo.getId());
                } else {
                    if (shopInfo.getShopName().equals("总店")) {
                        shopInfo.setShopName("美度(总部)");
                    }
                    SysShopInfo sysShopInfo = sysShopInfoDao.selectByShopName(shopInfo.getShopName());
                    oldAndNewId.put(oldId, sysShopInfo.getId());
                }
                sysShopInfoDao.insert(shopInfo);
                oldAndNewId.put(oldId, shopInfo.getId());
//                // TODO 若迁往正式环境,这里需要变动
//                if (!shopInfo.getShopName().contains("美度") && !shopInfo.getShopName().contains("总店")) {
//                    sysShopInfoDao.insert(shopInfo);
//                    oldAndNewId.put(oldId, shopInfo.getId());
//                } else {
//                    if (shopInfo.getShopName().equals("总店")) {
//                        shopInfo.setShopName("美度(总部)");
//                    }
//                    SysShopInfo sysShopInfo = sysShopInfoDao.selectByShopName(shopInfo.getShopName());
//                    oldAndNewId.put(oldId, sysShopInfo.getId());
//                }
            }
            redisClient.saveMapValue("shopId", oldAndNewId);
        }
@@ -170,7 +174,7 @@
            sysUsers.setSuRegisterTime((Date) map.get("register_time"));
            sysUsers.setCreateBy(AppConstance.SYSTEM_USER);
            sysUsers.setUpdateBy(AppConstance.SYSTEM_USER);
            sysUsers.setSuPassword(PasswordUtil.getEncrypUserPwd(sysUsers));
//            sysUsers.setSuPassword(PasswordUtil.getEncrypUserPwd(sysUsers));
            list.add(sysUsers);
        }
        return list;
@@ -669,6 +673,18 @@
                    }
                }
                if ("否".equals(shoppingGoods.getIsOnce())) {
                    shoppingGoods.setIsOnce("0");
                } else {
                    shoppingGoods.setIsOnce("1");
                }
                if ("否".equals(shoppingGoods.getIsPresent())) {
                    shoppingGoods.setIsPresent("0");
                } else {
                    shoppingGoods.setIsPresent("1");
                }
                Long oldId = shoppingGoods.getId();
                shoppingGoods.setId(null);
                shoppingGoodsDao.insert(shoppingGoods);
@@ -682,6 +698,18 @@
                            Long oldIdTc = assembleGood.getAssembleSkuId() == null ? assembleGood.getAssembleProjId() : assembleGood.getAssembleSkuId();
                            if (assembleGood.getShoppingGoods() != null) {
                                if ("否".equals(assembleGood.getShoppingGoods().getIsOnce())) {
                                    assembleGood.getShoppingGoods().setIsOnce("0");
                                } else {
                                    assembleGood.getShoppingGoods().setIsOnce("1");
                                }
                                if ("否".equals(assembleGood.getShoppingGoods().getIsPresent())) {
                                    assembleGood.getShoppingGoods().setIsPresent("0");
                                } else {
                                    assembleGood.getShoppingGoods().setIsPresent("1");
                                }
                                assembleGood.getShoppingGoods().setId(null);
                                shoppingGoodsDao.insert(assembleGood.getShoppingGoods());
@@ -756,6 +784,18 @@
                    }
                }
                if ("否".equals(shoppingGoods.getIsOnce())) {
                    shoppingGoods.setIsOnce("0");
                } else {
                    shoppingGoods.setIsOnce("1");
                }
                if ("否".equals(shoppingGoods.getIsPresent())) {
                    shoppingGoods.setIsPresent("0");
                } else {
                    shoppingGoods.setIsPresent("1");
                }
                Long oldId = shoppingGoods.getId();
                shoppingGoods.setId(null);
                shoppingGoodsDao.insert(shoppingGoods);