...
|
...
|
@@ -113,7 +113,27 @@ public class SecondhandProductServiceImpl implements SecondhandProductService { |
|
|
|
|
|
@Override
|
|
|
public int copySkupInfo(Integer oldSkup, Integer newSkup) {
|
|
|
return 1;
|
|
|
SecondhandInfo oldInfo = secondhandInfoMapper.selectBySkup(oldSkup);
|
|
|
if(null == oldInfo) {
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
List<SecondhandImages> imageList = secondhandImagesMapper.selectBySkup(oldSkup);
|
|
|
if(CollectionUtils.isNotEmpty(imageList)) {
|
|
|
for(SecondhandImages image : imageList) {
|
|
|
image.setSkup(newSkup);
|
|
|
}
|
|
|
|
|
|
secondhandImagesMapper.insertBatch(imageList);
|
|
|
}
|
|
|
|
|
|
SecondhandInfo newInfo = new SecondhandInfo();
|
|
|
newInfo.setSkup(newSkup);
|
|
|
newInfo.setFlawId(oldInfo.getFlawId());
|
|
|
newInfo.setFlawAttr(oldInfo.getFlawAttr());
|
|
|
newInfo.setDescribeInfo(oldInfo.getDescribeInfo());
|
|
|
|
|
|
return secondhandInfoMapper.insert(newInfo);
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|