|
|
|
@ -17,6 +17,7 @@ import com.thing.common.core.utils.JsonProcessingUtils; |
|
|
|
import com.thing.common.core.web.response.PageData; |
|
|
|
import com.thing.common.core.web.response.Result; |
|
|
|
import com.thing.common.orm.service.impl.BaseServiceImpl; |
|
|
|
import com.thing.common.orm.utils.IdGenerator; |
|
|
|
import com.thing.sys.biz.dto.SysMenuDTO; |
|
|
|
import com.thing.sys.biz.dto.SysRoleDTO; |
|
|
|
import com.thing.sys.biz.entity.SysLanguageEntity; |
|
|
|
@ -116,6 +117,7 @@ public class IotVisualManageServiceImpl extends BaseServiceImpl<IotVisualManageM |
|
|
|
wrapper.in( "id", idList,CollectionUtils.isNotEmpty(idList)); |
|
|
|
} |
|
|
|
wrapper.and(IOT_VISUAL_MANAGE_ENTITY.TENANT_CODE.eq(tenantCode).or(IOT_VISUAL_MANAGE_ENTITY.IS_DEFAULT.eq(0))); |
|
|
|
wrapper.orderBy(IOT_VISUAL_MANAGE_ENTITY.CREATE_DATE,false); |
|
|
|
return wrapper; |
|
|
|
} |
|
|
|
|
|
|
|
@ -234,7 +236,9 @@ public class IotVisualManageServiceImpl extends BaseServiceImpl<IotVisualManageM |
|
|
|
List<Long> menuIdList = sysMenuDTOList.stream().map(SysMenuDTO::getId).collect(Collectors.toList()); |
|
|
|
sysRoleMenuDao.deleteByMenuIds(menuIdList); |
|
|
|
//删除菜单表 |
|
|
|
sysMenuService.batchDelete((Long[]) menuIdList.toArray()); |
|
|
|
menuIdList.forEach(temp->{ |
|
|
|
sysMenuService.delete(temp); |
|
|
|
}); |
|
|
|
sysLanguageDao.deleteByQuery(QueryWrapper.create().in(SysLanguageEntity::getTableId, menuIdList)); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -332,7 +336,7 @@ public class IotVisualManageServiceImpl extends BaseServiceImpl<IotVisualManageM |
|
|
|
public Result copy(Long id) { |
|
|
|
IotVisualManageDTO data =this.getByIdAs(id, IotVisualManageDTO.class); |
|
|
|
String name = data.getName()+"_COPY"+UUID.randomUUID().toString().substring(1,5); |
|
|
|
data.setId(null); |
|
|
|
data.setId(IdGenerator.nextId()); |
|
|
|
data.setName(name); |
|
|
|
this.saveDto(data); |
|
|
|
IotVisualDesignDTO desigDTO = iotVisualDesignService.getDetailByBoardManageId(String.valueOf(id)); |
|
|
|
|