diff --git a/src/main/java/com/glxp/api/service/thrsys/impl/ThrDeptServiceImpl.java b/src/main/java/com/glxp/api/service/thrsys/impl/ThrDeptServiceImpl.java index 6d892a2b3..6a0d2d4d3 100644 --- a/src/main/java/com/glxp/api/service/thrsys/impl/ThrDeptServiceImpl.java +++ b/src/main/java/com/glxp/api/service/thrsys/impl/ThrDeptServiceImpl.java @@ -146,6 +146,7 @@ public class ThrDeptServiceImpl extends ServiceImpl i thrDeptEntity.setAdvanceType(false); //默认是仓库 thrDeptEntity.setStatus(1);//默认启用 thrDeptEntity.setUpdateTime(new Date()); + thrDeptEntity.setId(IdUtil.getSnowflake(6, 1).nextId()); list.add(thrDeptEntity); ThrInvWarehouseEntity thrInvWarehouseEntity = new ThrInvWarehouseEntity(); diff --git a/src/main/resources/mybatis/mapper/thrsys/ThrDeptDao.xml b/src/main/resources/mybatis/mapper/thrsys/ThrDeptDao.xml index eddcacaed..911e382bc 100644 --- a/src/main/resources/mybatis/mapper/thrsys/ThrDeptDao.xml +++ b/src/main/resources/mybatis/mapper/thrsys/ThrDeptDao.xml @@ -175,12 +175,13 @@ - replace into thr_dept (pid, code, `name`, advanceType, isDefault, status, updateTime, remark, `level`, + replace into thr_dept (id,pid, code, `name`, advanceType, isDefault, status, updateTime, remark, `level`, pcode, thirdSysFk) values - (#{item.pid}, + (#{item.id}, + #{item.pid}, #{item.code}, #{item.name}, #{item.advanceType},