...
|
...
|
@@ -63,6 +63,12 @@ public class SizeServiceImpl implements ISizeService { |
|
|
LOGGER.info("saveOrUpdateSize param = {}", sizeRequestBo);
|
|
|
Size size = OrikaUtils.map(sizeRequestBo, Size.class);
|
|
|
if (size.getId() == null || size.getId() == 0) {
|
|
|
|
|
|
List<Size> sizes = ufoSizeMapper.selectBySizeNameEx(size.getSizeName(), null);
|
|
|
if (CollectionUtils.isNotEmpty(sizes)) {
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
size.setCreateTime(DateUtil.currentTimeSeconds());
|
|
|
size.setDel(0);
|
|
|
size.setUpdateTime(0);
|
...
|
...
|
@@ -72,6 +78,11 @@ public class SizeServiceImpl implements ISizeService { |
|
|
// 新增
|
|
|
return ufoSizeMapper.insertSize(size);
|
|
|
} else {
|
|
|
List<Size> sizes = ufoSizeMapper.selectBySizeNameEx(size.getSizeName(), size.getId());
|
|
|
if (CollectionUtils.isNotEmpty(sizes)) {
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
// 更新
|
|
|
size.setUpdateTime(DateUtil.currentTimeSeconds());
|
|
|
return ufoSizeMapper.updateSize(size);
|
...
|
...
|
|