From 4e214289ec907ecb1d14de3e6fcd17b4582257f0 Mon Sep 17 00:00:00 2001
From: wzy <wzy19931122ai@163.com>
Date: Mon, 12 Jul 2021 19:17:02 +0800
Subject: [PATCH] Merge branch 'data_move' of http://120.27.238.55:7000/r/beauty-erp into data_move
---
zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml | 4 ++
zq-erp/src/test/java/com/matrix/DataMoveTest.java | 25 ++++++++++--
zq-erp/src/main/java/com/matrix/system/dataMove/DateMoveServiceImpl.java | 46 ++++++++++++++++++++++
zq-erp/src/main/java/com/matrix/system/hive/dao/SysVipInfoDao.java | 2 +
zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml | 4 ++
zq-erp/src/main/java/com/matrix/system/hive/dao/SysProjUseDao.java | 2 +
6 files changed, 77 insertions(+), 6 deletions(-)
diff --git a/zq-erp/src/main/java/com/matrix/system/dataMove/DateMoveServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/dataMove/DateMoveServiceImpl.java
index c1ce860..9e607a8 100644
--- a/zq-erp/src/main/java/com/matrix/system/dataMove/DateMoveServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/dataMove/DateMoveServiceImpl.java
@@ -1441,7 +1441,7 @@
serviceItem.setServicesId(newId);
Long beautyOldId = serviceItem.getId();
serviceItem.setId(null);
- serviceItem.setExtract("数据迁移");
+// serviceItem.setExtract("数据迁移");
sysBeauticianStateDao.insert(serviceItem);
beautyMaps.put(beautyOldId, serviceItem.getId());
}
@@ -1713,4 +1713,48 @@
sysBeauticianStateDao.update(state);
}
}
+
+ public void updateVipInfoStaff() {
+ Map<String, Integer> shopStaff = getRedisIds("shop_staff");
+
+ List<SysVipInfo> sysVipInfos = sysVipInfoDao.selectStaff();
+
+ for (SysVipInfo sysVipInfo : sysVipInfos) {
+ Long staffId = sysVipInfo.getStaffId();
+
+ Integer integer = shopStaff.get(staffId.toString());
+ if (integer == null) {
+ continue;
+ }
+
+ SysVipInfo update = new SysVipInfo();
+ update.setStaffId(integer.longValue());
+ update.setId(sysVipInfo.getId());
+ sysVipInfoDao.update(update);
+ }
+ }
+
+ @Transactional(rollbackFor = Exception.class)
+ public void updateProjUseIsCourse() {
+ List<SysProjUse> sysProjUses = sysProjUseDao.selectProjUse();
+
+ for (SysProjUse sysProjUs : sysProjUses) {
+ ShoppingGoods shoppingGoods = shoppingGoodsDao.selectById(sysProjUs.getProjId());
+
+ SysProjUse update = new SysProjUse();
+
+ if (shoppingGoods == null) {
+ continue;
+ }
+
+ if ("Y".equals(shoppingGoods.getIsCourse())) {
+ update.setIsCourse("Y");
+ } else {
+ continue;
+ }
+
+ update.setId(sysProjUs.getId());
+ sysProjUseDao.update(update);
+ }
+ }
}
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/dao/SysProjUseDao.java b/zq-erp/src/main/java/com/matrix/system/hive/dao/SysProjUseDao.java
index c064f18..1598b10 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/dao/SysProjUseDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/dao/SysProjUseDao.java
@@ -132,4 +132,6 @@
List<SysProjUseFlow> selectProjUseFlow(@Param("record") SysProjUseFlow projUseFlow, @Param("pageVo")PaginationVO pageVo);
Integer selectProjUseFlowTotal(@Param("record") SysProjUseFlow projUseFlow);
+
+ List<SysProjUse> selectProjUse();
}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/dao/SysVipInfoDao.java b/zq-erp/src/main/java/com/matrix/system/hive/dao/SysVipInfoDao.java
index 853b5c5..cd3b709 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/dao/SysVipInfoDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/dao/SysVipInfoDao.java
@@ -208,4 +208,6 @@
List<VipInfoListVo> selectVipAddressBookByList(@Param("record") VipInfoListDto vipInfoListDto);
com.matrix.system.app.vo.VipInfoVo selectVipInfoById(@Param("id") Long id);
+
+ List<SysVipInfo> selectStaff();
}
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml
index d05844a..d4f103b 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml
@@ -859,4 +859,8 @@
</select>
+ <select id="selectProjUse" resultMap="SysProjUseMap">
+ select * from sys_proj_use
+ where is_course='N'
+ </select>
</mapper>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml
index 5203a47..dd68e77 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml
@@ -1366,5 +1366,9 @@
left join sys_shop_info e on a.SHOP_ID=e.ID
where a.ID=#{id}
</select>
+
+ <select id="selectStaff" resultType="com.matrix.system.hive.bean.SysVipInfo">
+ select * from sys_vip_info where 1000 > staff_id;
+ </select>
</mapper>
diff --git a/zq-erp/src/test/java/com/matrix/DataMoveTest.java b/zq-erp/src/test/java/com/matrix/DataMoveTest.java
index 1192415..5d9b61b 100644
--- a/zq-erp/src/test/java/com/matrix/DataMoveTest.java
+++ b/zq-erp/src/test/java/com/matrix/DataMoveTest.java
@@ -4,6 +4,7 @@
import com.matrix.system.hive.bean.SysShopInfo;
import com.matrix.system.dataMove.DateMoveServiceImpl;
import com.matrix.system.hive.bean.SysVipLevel;
+import lombok.Data;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
@@ -53,6 +54,11 @@
public void vipLevelMove() {
List<SysVipLevel> sysVipLevels = dataMove.vipLevelOld();
dataMove.vipLevelNew(sysVipLevels);
+ }
+
+ // @Test
+ public void shopStaffMoveTest() throws UnsupportedEncodingException, NoSuchAlgorithmException {
+ dataMove.shopStaffInfoNew(dataMove.shopStaffInfoOld());
}
/**
@@ -119,11 +125,6 @@
dataMove.shoppingGoodsZhkNew(dataMove.shoppingGoodsZhkOld());
}
-// @Test
- public void shopStaffMoveTest() throws UnsupportedEncodingException, NoSuchAlgorithmException {
- dataMove.shopStaffInfoNew(dataMove.shopStaffInfoOld());
- }
-
// @Test
public void orderMoveTest() {
dataMove.orderNew(dataMove.orderOld());
@@ -134,6 +135,9 @@
dataMove.bedInfoNew(dataMove.bedInfoOld());
}
+ /**
+ * isCourse 不能默认为N
+ */
@Test
public void projUseMoveTest() {
dataMove.projUseNew(dataMove.projUseMoveOld());
@@ -141,6 +145,7 @@
@Test
public void serviceOrderMoveTest() {
+// dataMove.serviceOrderOld();
dataMove.serviceOrderNew(dataMove.serviceOrderOld());
}
@@ -165,4 +170,14 @@
public void updateServiceOrderStaff() {
dataMove.updateServiceOrderStaff();
}
+
+ @Test
+ public void updateVipInfoStaff() {
+ dataMove.updateVipInfoStaff();
+ }
+
+ @Test
+ public void updateProjUseIsCoures() {
+ dataMove.updateProjUseIsCourse();
+ }
}
--
Gitblit v1.9.1