| | |
| | | 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()); |
| | | } |
| | |
| | | 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()); |
| | | |
| | |
| | | */ |
| | | private String statu; |
| | | |
| | | private Date createTime; |
| | | |
| | | private Date updateTime; |
| | | |
| | | private String createBy; |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public Date getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(Date updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | public String getCreateBy() { |
| | | return createBy; |
| | | } |
| | | |
| | | public void setCreateBy(String createBy) { |
| | | this.createBy = createBy; |
| | | } |
| | | |
| | | /** |
| | | * 扩展属性 |
| | | */ |
| | |
| | | strict: false |
| | | datasource: |
| | | master: |
| | | # url: jdbc:mysql://120.27.238.55:3306/hive_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 |
| | | # username: ct_test |
| | | # password: 123456 |
| | | # driver-class-name: com.mysql.jdbc.Driver |
| | | url: jdbc:mysql://124.70.222.34/hive_prd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 |
| | | username: hive |
| | | password: hive123!@# |
| | | url: jdbc:mysql://120.27.238.55:3306/hive_test_meidu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 |
| | | username: ct_test |
| | | password: 123456 |
| | | driver-class-name: com.mysql.jdbc.Driver |
| | | # url: jdbc:mysql://124.70.222.34/hive_prd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 |
| | | # username: hive |
| | | # password: hive123!@# |
| | | # driver-class-name: com.mysql.jdbc.Driver |
| | | slave: |
| | | url: jdbc:mysql://47.111.134.136:3306/db_meidu8300?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 |
| | | username: meidu_data |
| | |
| | | pay_time, |
| | | company_id, |
| | | orderType, |
| | | is_has_refund |
| | | is_has_refund, |
| | | create_time, |
| | | update_time, |
| | | create_by |
| | | ) |
| | | VALUES ( |
| | | #{id}, |
| | |
| | | #{payTime}, |
| | | #{companyId}, |
| | | #{orderType}, |
| | | #{isHasRefund} |
| | | #{isHasRefund}, |
| | | #{createTime}, |
| | | #{updateTime}, |
| | | #{createBy} |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | VALUES ( |
| | | #{id}, |
| | | #{createBy}, |
| | | now(), |
| | | #{createTime}, |
| | | #{updateBy}, |
| | | now(), |
| | | #{updateTime}, |
| | | #{flowNo}, |
| | | #{orderId}, |
| | | #{flowContent}, |
| | |
| | | /** |
| | | * 商铺信息迁移 |
| | | */ |
| | | @Test |
| | | // @Test |
| | | public void slaveTest() { |
| | | List<SysShopInfo> shopInfos = dataMove.oldShopInfo(); |
| | | dataMove.toNewShopInfo(shopInfos); |
| | |
| | | * @throws UnsupportedEncodingException |
| | | * @throws NoSuchAlgorithmException |
| | | */ |
| | | @Test |
| | | // @Test |
| | | public void sysUsersMoveTest() throws UnsupportedEncodingException, NoSuchAlgorithmException { |
| | | List<SysUsers> sysUsers = dataMove.oldSysUsers(); |
| | | dataMove.newSysUsers(sysUsers); |
| | |
| | | dataMove.shopStaffInfoNew(dataMove.shopStaffInfoOld()); |
| | | } |
| | | |
| | | // @Test |
| | | @Test |
| | | public void orderMoveTest() { |
| | | dataMove.orderNew(dataMove.orderOld()); |
| | | } |