| | |
| | | if (CollUtil.isNotEmpty(shopInfos)) { |
| | | Map<Long, Long> oldAndNewId = new HashMap<>(); |
| | | for (SysShopInfo shopInfo : shopInfos) { |
| | | if (shopInfo.getShopName().equals("总部")) { |
| | | if (shopInfo.getShopName().equals("总店")) { |
| | | shopInfo.setShopType(1); |
| | | shopInfo.setIsOpenNet(2); |
| | | } else { |
| | |
| | | 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()); |
| | | } |
| | |
| | | shoppingGood.setIsDel(1); |
| | | shoppingGood.setZjm(StringUtils.toHanyuPinyin(shoppingGood.getName()) + "," + StringUtils.toHeadWordHanyuPinyin(shoppingGood.getName())); |
| | | |
| | | if (shoppingGood.getCarUseCount() != null) { |
| | | shoppingGood.setIsCourse("Y"); |
| | | shoppingGood.setIsInfinite("N"); |
| | | } |
| | | |
| | | shoppingGood.setWeiDescription("数据迁移-tc"); |
| | | |
| | | List<ShoppingGoodsAssemble> assembleList = mapsToListBean(assembles, ShoppingGoodsAssemble.class); |
| | |
| | | } |
| | | |
| | | shoppingGood.setAssembleGoods(assembleList); |
| | | shoppingGood.setIsInfinite("N"); |
| | | } |
| | | |
| | | return shoppingGoods; |
| | |
| | | for (SysOrder sysOrder : list) { |
| | | Long oldOrderId = sysOrder.getId(); |
| | | sysOrder.setId(null); |
| | | sysOrder.setCreateBy("数据迁移"); |
| | | sysOrder.setCreateTime(sysOrder.getOrderTime()); |
| | | sysOrder.setUpdateTime(sysOrder.getOrderTime()); |
| | | sysOrderDao.insert(sysOrder); |
| | | orderIds.put(oldOrderId, sysOrder.getId()); |
| | | |
| | |
| | | "\t\ta.balance,\n" + |
| | | "\t\ta.remark,\n" + |
| | | " b.name projName,\n" + |
| | | " sum(a.SURPLUS_COUNT) SURPLUS_COUNT\n" + |
| | | " a.SURPLUS_COUNT\n" + |
| | | "\t\tfrom sys_proj_use a\n" + |
| | | "\t\tleft join shopping_goods b on a.TAOCAN_ID= b.ID\n" + |
| | | "where TAOCAN_ID IS NOT NULL\n" + |
| | |
| | | } |
| | | |
| | | beauticianState.setCount(1); |
| | | beauticianState.setExtract("数据迁移"); |
| | | // beauticianState.setcreate("数据迁移"); |
| | | newBeautician.add(beauticianState); |
| | | } |
| | | } |
| | |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void tyOrderAndAchieveMove() { |
| | | jdbcTemplate.update("update sys_order set orderType=1, is_has_refund=2 where 1=1"); |
| | | |
| | | List<SysOrderFlow> flows = sysOrderFlowDao.selectOrderFlowByType(); |
| | | if (CollUtil.isNotEmpty(flows)) { |
| | | for (SysOrderFlow flow : flows) { |
| | | SysOrder sysOrder = sysOrderDao.selectById(flow.getOrderId()); |
| | | sysOrder.setIsHasRefund(1); |
| | | sysOrderDao.update(sysOrder); |
| | | } |
| | | } |
| | | |
| | | List<AchieveNew> achieveNews = achieveNewDao.selectAchieveForOrder(); |
| | | if (CollUtil.isNotEmpty(achieveNews)) { |
| | | for (AchieveNew achieveNew : achieveNews) { |
| | | if ("现金业绩".equalsIgnoreCase(achieveNew.getAchieveType())) { |
| | | achieveNew.setPayMethod("现金"); |
| | | } else { |
| | | achieveNew.setPayMethod("划扣"); |
| | | } |
| | | |
| | | // if (achieveNew.getConsume() == null) { |
| | | // achieveNew.setPayMethod("现金"); |
| | | // } else { |
| | | // achieveNew.setPayMethod("划扣"); |
| | | // } |
| | | achieveNew.setAchieveType("顾问业绩"); |
| | | achieveNew.setGoodsCash(Double.parseDouble(achieveNew.getT1())); |
| | | achieveNewDao.updateByModel(achieveNew); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | } |