| | |
| | | } |
| | | |
| | | shoppingGood.setAssembleGoods(assembleList); |
| | | shoppingGood.setIsInfinite("N"); |
| | | } |
| | | |
| | | return shoppingGoods; |
| | |
| | | |
| | | Map<String, Integer> vipInfos = getRedisIds("vip_info"); |
| | | Map<String, Integer> bedInfos = getRedisIds("bed_info"); |
| | | Map<String, Integer> sysUsers = getRedisIds("sys_users"); |
| | | // Map<String, Integer> sysUsers = getRedisIds("sys_users"); |
| | | Map<String, Integer> projUses = getRedisIds("proj_use"); |
| | | Map<String, Integer> goodProj = getRedisIds("shopping_goods_proj"); |
| | | Map<String, Integer> shopIds = getRedisIds("shopId"); |
| | | Map<String, Integer> shopStaff = getRedisIds("shop_staff"); |
| | | for (SysProjServices sysProjServices : list) { |
| | | List<Map<String, Object>> beauticiansMap = jdbcTemplate.queryForList("select * from sys_beautician_state where SERVICES_ID=" + sysProjServices.getId()); |
| | | // Map<String, Object> bedStatesMap = jdbcTemplate.queryForMap("select * from sys_bed_state where SERVICE_ID=" + sysProjServices.getId()); |
| | |
| | | } |
| | | |
| | | if (sysProjServices.getBeauticianId() != null) { |
| | | Integer beautyId = sysUsers.get(sysProjServices.getBeauticianId().toString()); |
| | | Integer beautyId = shopStaff.get(sysProjServices.getBeauticianId().toString()); |
| | | if (beautyId != null) { |
| | | sysProjServices.setBeauticianId(beautyId.longValue()); |
| | | } else { |
| | |
| | | } |
| | | |
| | | if (sysProjServices.getDevisionId() != null) { |
| | | Integer devisionId = sysUsers.get(sysProjServices.getDevisionId().toString()); |
| | | Integer devisionId = shopStaff.get(sysProjServices.getDevisionId().toString()); |
| | | if (devisionId != null) { |
| | | sysProjServices.setDevisionId(devisionId.longValue()); |
| | | } else { |
| | |
| | | } |
| | | |
| | | if (sysProjServices.getCreateStaffId() != null) { |
| | | Integer staffId = sysUsers.get(sysProjServices.getCreateStaffId().toString()); |
| | | Integer staffId = shopStaff.get(sysProjServices.getCreateStaffId().toString()); |
| | | if (staffId != null) { |
| | | sysProjServices.setCreateStaffId(staffId.longValue()); |
| | | } else { |
| | |
| | | } |
| | | |
| | | beauticianState.setCount(1); |
| | | beauticianState.setExtract("数据迁移"); |
| | | // beauticianState.setcreate("数据迁移"); |
| | | newBeautician.add(beauticianState); |
| | | } |
| | | } |
| | |
| | | achieveNew.setShopId(shopId != null ? shopId.longValue() : -achieveNew.getShopId()); |
| | | achieveNew.setVipId(vipId != null ? vipId.longValue() : -achieveNew.getVipId()); |
| | | |
| | | Integer saleIdInt = sysUsers.get(achieveNew.getSaleId() == null ? "" : achieveNew.getSaleId().toString()); |
| | | Integer saleIdInt = shopStaff.get(achieveNew.getSaleId() == null ? "" : achieveNew.getSaleId().toString()); |
| | | achieveNew.setSaleId(saleIdInt == null ? -achieveNew.getSaleId() : saleIdInt); |
| | | |
| | | Integer beaultyIdInt = sysUsers.get(achieveNew.getBeaultId() == null ? "" : achieveNew.getBeaultId().toString()); |
| | | Integer beaultyIdInt = shopStaff.get(achieveNew.getBeaultId() == null ? "" : achieveNew.getBeaultId().toString()); |
| | | achieveNew.setBeaultId(beaultyIdInt == null ? -achieveNew.getBeaultId() : beaultyIdInt); |
| | | |
| | | if (achieveNew.getShoppingGoodsId() != null) { |
| | |
| | | redisClient.saveMapValue("shop_staff", shopStaff); |
| | | } |
| | | |
| | | @DS("slave") |
| | | public List<MoneyCardUse> moneyCardUseOld() { |
| | | List<Map<String, Object>> maps = jdbcTemplate.queryForList("select * from money_card_use"); |
| | | List<MoneyCardUse> moneyCardUses = mapsToListBean(maps, MoneyCardUse.class); |
| | | |
| | | Map<String, Integer> goodCzk = getRedisIds("shopping_goods_czk"); |
| | | Map<String, Integer> vipInfos = getRedisIds("vip_info"); |
| | | for (MoneyCardUse moneyCardUse : moneyCardUses) { |
| | | moneyCardUse.setIsVipCar("N"); |
| | | |
| | | Integer vipId = null; |
| | | if (moneyCardUse.getVipId() != null) { |
| | | vipId = vipInfos.get(moneyCardUse.getVipId().toString()); |
| | | if (vipId != null) { |
| | | moneyCardUse.setVipId(vipId.longValue()); |
| | | } else { |
| | | moneyCardUse.setVipId(-moneyCardUse.getVipId()); |
| | | } |
| | | } |
| | | |
| | | if (moneyCardUse.getGoodsId() != null) { |
| | | Integer goodsId = goodCzk.get(moneyCardUse.getGoodsId().toString()); |
| | | if (goodsId != null) { |
| | | moneyCardUse.setGoodsId(goodsId.longValue()); |
| | | } else { |
| | | moneyCardUse.setGoodsId(-moneyCardUse.getGoodsId()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return moneyCardUses; |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void moneyCardUseNew(List<MoneyCardUse> list) { |
| | | if (CollUtil.isNotEmpty(list)) { |
| | | for (MoneyCardUse moneyCardUse : list) { |
| | | moneyCardUse.setId(null); |
| | | moneyCardUse.setSource("美度-数据迁移"); |
| | | moneyCardUseDao.insert(moneyCardUse); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |