2026-01-16 19:38:06 +08:00
|
|
|
package com.ruoyi.device.service.impl;
|
|
|
|
|
|
2026-01-20 13:20:39 +08:00
|
|
|
import com.ruoyi.device.api.domain.DockVO;
|
2026-01-16 19:38:06 +08:00
|
|
|
import com.ruoyi.device.domain.api.IGroupDomain;
|
|
|
|
|
import com.ruoyi.device.domain.model.Group;
|
|
|
|
|
import com.ruoyi.device.service.api.IGroupService;
|
|
|
|
|
import com.ruoyi.device.service.convert.GroupServiceConvert;
|
|
|
|
|
import com.ruoyi.device.service.dto.GroupDTO;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 分组Service业务层处理
|
|
|
|
|
*
|
|
|
|
|
* @author ruoyi
|
|
|
|
|
* @date 2026-01-16
|
|
|
|
|
*/
|
|
|
|
|
@Service
|
|
|
|
|
public class GroupServiceImpl implements IGroupService
|
|
|
|
|
{
|
|
|
|
|
@Autowired
|
|
|
|
|
private IGroupDomain groupDomain;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<GroupDTO> selectGroupList(GroupDTO groupDTO)
|
|
|
|
|
{
|
|
|
|
|
Group model = GroupServiceConvert.toModel(groupDTO);
|
|
|
|
|
List<Group> modelList = groupDomain.selectGroupList(model);
|
|
|
|
|
return GroupServiceConvert.toDTOList(modelList);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public GroupDTO selectGroupByGroupId(Long groupId)
|
|
|
|
|
{
|
|
|
|
|
Group model = groupDomain.selectGroupByGroupId(groupId);
|
|
|
|
|
return GroupServiceConvert.toDTO(model);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public int insertGroup(GroupDTO groupDTO)
|
|
|
|
|
{
|
|
|
|
|
Group model = GroupServiceConvert.toModel(groupDTO);
|
|
|
|
|
return groupDomain.insertGroup(model);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public int updateGroup(GroupDTO groupDTO)
|
|
|
|
|
{
|
|
|
|
|
Group model = GroupServiceConvert.toModel(groupDTO);
|
|
|
|
|
return groupDomain.updateGroup(model);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public int deleteGroupByGroupId(Long groupId)
|
|
|
|
|
{
|
|
|
|
|
return groupDomain.deleteGroupByGroupId(groupId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public int deleteGroupByGroupIds(Long[] groupIds)
|
|
|
|
|
{
|
|
|
|
|
return groupDomain.deleteGroupByGroupIds(groupIds);
|
|
|
|
|
}
|
2026-01-20 13:20:39 +08:00
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Long createGroup(GroupDTO groupDTO)
|
|
|
|
|
{
|
2026-01-20 13:38:15 +08:00
|
|
|
Group model = GroupServiceConvert.toModel(groupDTO);
|
|
|
|
|
groupDomain.insertGroup(model);
|
|
|
|
|
return model.getGroupId();
|
2026-01-20 13:20:39 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void deleteGroup(Long groupId)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void switchDockGroup(Long dockId, Long groupId)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<DockVO> getDocksByGroupId(Long groupId)
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<Long> getAllGroupIds()
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
}
|
2026-01-16 19:38:06 +08:00
|
|
|
}
|