wuweihao 3 лет назад
Родитель
Сommit
da58059439

+ 2 - 7
gis_cms/src/main/java/com/gis/cms/service/impl/ContentServiceImpl.java

@@ -113,24 +113,19 @@ public class ContentServiceImpl extends ServiceImpl<ContentMapper, ContentEntity
     public Result saveEntity(ContentDto param) {
         Long id = param.getId();
         ContentEntity entity;
-        boolean isIndex = false;
         Long imgIndexId = param.getImgIndexId();
         if (id == null) {
             entity = new ContentEntity();
             BeanUtils.copyProperties(param, entity);
             entity.setCreatorId(baseService.getUserId());
             this.save(entity);
-            if (imgIndexId != null){
-                isIndex = true;
-            }
+
 
         } else {
             entity = this.getById(id);
             BaseRuntimeException.isNull(entity, ErrorEnum.FAILURE_SYS_2001);
             BeanUtils.copyProperties(param, entity);
-            if (imgIndexId !=null && !imgIndexId.equals(entity.getImgIndexId())){
-                isIndex = true;
-            }
+
             this.updateById(entity);
         }