...
|
...
|
@@ -63,7 +63,13 @@ public class SizeServiceImpl implements ISizeService { |
|
|
LOGGER.info("saveOrUpdateSize param = {}", sizeRequestBo);
|
|
|
Size size = OrikaUtils.map(sizeRequestBo, Size.class);
|
|
|
if (size.getId() == null || size.getId() == 0) {
|
|
|
size.setCreateTime(DateUtil.currentTimeSeconds());
|
|
|
|
|
|
List<Size> sizes = ufoSizeMapper.selectBySizeNameEx(size.getSizeName(), null);
|
|
|
if (CollectionUtils.isNotEmpty(sizes)) {
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
size.setCreateTime(DateUtil.currentTimeSeconds());
|
|
|
size.setDel(0);
|
|
|
size.setUpdateTime(0);
|
|
|
if (size.getOrderBy() == null) {
|
...
|
...
|
@@ -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);
|
...
|
...
|
|