| New file |
| | |
| | | package com.ard.route.service.impl; |
| | | |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | |
| | | import com.ard.common.annotation.DataScope; |
| | | import com.ard.common.utils.DateUtils; |
| | | import com.ard.common.utils.SecurityUtils; |
| | | import com.ard.common.utils.uuid.IdUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.ard.route.mapper.ArdRouteFileMapper; |
| | | import com.ard.route.domain.ArdRouteFile; |
| | | import com.ard.route.service.IArdRouteFileService; |
| | | |
| | | /** |
| | | * 文件Service业务层处理 |
| | | * |
| | | * @author xia |
| | | * @date 2025-10-18 |
| | | */ |
| | | @Service |
| | | public class ArdRouteFileServiceImpl implements IArdRouteFileService { |
| | | |
| | | @Autowired |
| | | private ArdRouteFileMapper ardRouteFileMapper; |
| | | |
| | | /** |
| | | * 查询文件 |
| | | * |
| | | * @param id 文件主键 |
| | | * @return 文件 |
| | | */ |
| | | @Override |
| | | public ArdRouteFile selectArdRouteFileById(String id) { |
| | | return ardRouteFileMapper.selectArdRouteFileById(id); |
| | | } |
| | | |
| | | /** |
| | | * 查询文件列表 |
| | | * |
| | | * @param ardRouteFile 文件 |
| | | * @return 文件 |
| | | */ |
| | | @Override |
| | | @DataScope(deptAlias = "d", userAlias = "u") |
| | | public List<ArdRouteFile> selectArdRouteFileList(ArdRouteFile ardRouteFile) { |
| | | return ardRouteFileMapper.selectArdRouteFileList(ardRouteFile); |
| | | } |
| | | |
| | | /** |
| | | * 新增文件 |
| | | * |
| | | * @param ardRouteFile 文件 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int insertArdRouteFile(ArdRouteFile ardRouteFile) { |
| | | ardRouteFile.setId(IdUtils.simpleUUID()); |
| | | ardRouteFile.setCreateTime(DateUtils.getNowDate()); |
| | | return ardRouteFileMapper.insertArdRouteFile(ardRouteFile); |
| | | } |
| | | |
| | | /** |
| | | * 修改文件 |
| | | * |
| | | * @param ardRouteFile 文件 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int updateArdRouteFile(ArdRouteFile ardRouteFile) { |
| | | ardRouteFile.setUpdateTime(DateUtils.getNowDate()); |
| | | return ardRouteFileMapper.updateArdRouteFile(ardRouteFile); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除文件 |
| | | * |
| | | * @param ids 需要删除的文件主键 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteArdRouteFileByIds(String[] ids) { |
| | | return ardRouteFileMapper.deleteArdRouteFileByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * 删除文件信息 |
| | | * |
| | | * @param id 文件主键 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteArdRouteFileById(String id) { |
| | | return ardRouteFileMapper.deleteArdRouteFileById(id); |
| | | } |
| | | } |