提交 8f77418f 编写于 作者: sq3536's avatar sq3536

重构了上下级关系

上级 ebebabc4
...@@ -59,11 +59,11 @@ public class IBZEmp2UserAspect ...@@ -59,11 +59,11 @@ public class IBZEmp2UserAspect
Object obj = args[0]; Object obj = args[0];
if(obj instanceof IBZEmployee) if(obj instanceof IBZEmployee)
{ {
ibzuserService.saveOrUpdate((IBZUSER) ibzEmp2UserMapping.toUser(obj)); ibzuserService.saveOrUpdate(ibzEmp2UserMapping.toDto((IBZEmployee)obj));
} }
else if (obj instanceof List) else if (obj instanceof List)
{ {
ibzuserService.saveOrUpdateBatch((List) ibzEmp2UserMapping.toUser(obj)); ibzuserService.saveOrUpdateBatch(ibzEmp2UserMapping.toDto((List<IBZEmployee>) obj));
} }
} }
} }
......
package cn.ibizlab.core.extensions.mapping; package cn.ibizlab.core.extensions.mapping;
import cn.ibizlab.core.ou.domain.IBZEmployee;
import cn.ibizlab.util.domain.IBZUSER;
import cn.ibizlab.util.domain.MappingBase;
import org.mapstruct.Mapper; import org.mapstruct.Mapper;
import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.NullValueCheckStrategy;
import org.mapstruct.NullValuePropertyMappingStrategy; import org.mapstruct.NullValuePropertyMappingStrategy;
...@@ -9,16 +12,9 @@ import java.util.List; ...@@ -9,16 +12,9 @@ import java.util.List;
@Mapper(componentModel = "spring", uses = {}, @Mapper(componentModel = "spring", uses = {},
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS) nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface IBZEmp2UserMapping<IBZUSER, IBZEmployee> { public interface IBZEmp2UserMapping extends MappingBase<IBZUSER, IBZEmployee>
{
IBZUSER toUser(IBZEmployee emp);
IBZEmployee toEmp(IBZUSER user);
List<IBZUSER> toUser(List<IBZEmployee> ibzEmployeeList);
List <IBZEmployee> toEmp(List<IBZUSER> ibzuserList);
} }
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册