Commit 3c6d0655 authored by wangqiang's avatar wangqiang

提交测试代码(添加附件)

parent 2df238f4
...@@ -4,12 +4,16 @@ import com.yonde.dcs.core.constants.Constants; ...@@ -4,12 +4,16 @@ import com.yonde.dcs.core.constants.Constants;
import com.yonde.dcs.core.event.DocumentEvent; import com.yonde.dcs.core.event.DocumentEvent;
import com.yonde.dcs.core.util.ProcessDataUtils; import com.yonde.dcs.core.util.ProcessDataUtils;
import com.yonde.dcs.core.util.ExtDocUtil; import com.yonde.dcs.core.util.ExtDocUtil;
import com.yonde.dex.basedata.entity.data.OperatorType;
import com.yonde.dex.basedata.exception.DxBusinessException; import com.yonde.dex.basedata.exception.DxBusinessException;
import com.yonde.dex.dfs.vo.ObjFileLinkVO;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.apache.logging.log4j.spi.CopyOnWrite; import org.apache.logging.log4j.spi.CopyOnWrite;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Collection; import java.util.Collection;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -46,15 +50,19 @@ public class ExtDxDocumentServiceImpl<V extends DxDocumentVO> extends DocumentSe ...@@ -46,15 +50,19 @@ public class ExtDxDocumentServiceImpl<V extends DxDocumentVO> extends DocumentSe
public void beforeSave(Collection<V> target) { public void beforeSave(Collection<V> target) {
for (V v : target) { for (V v : target) {
documentEvent.createDocListener(v); documentEvent.createDocListener(v);
ObjFileLinkVO linkVO = new ObjFileLinkVO();
linkVO.setTargetId(2L);
linkVO.setOperator(OperatorType.ADD);
v.setObjFileLinks(Arrays.asList(linkVO));
} }
super.beforeSave(target); // super.beforeSave(target);
} }
@Override @Override
public void beforeUpdate(Collection<V> target, Collection<V> origin) { public void beforeUpdate(Collection<V> target, Collection<V> origin) {
for (V v : target) { for (V v : target) {
documentEvent.updateDocListener(v); documentEvent.updateDocListener(v);
} }
super.beforeUpdate(target,origin); // super.beforeUpdate(target,origin);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment