| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.sandu.common.execption.BusinessException; |
| | | import com.sandu.common.file.FileUploadDto; |
| | | import com.sandu.common.file.impl.AliOssFileServiceImpl; |
| | | import com.sandu.common.object.BaseConditionVO; |
| | | import com.sandu.common.service.impl.BaseServiceImpl; |
| | | import com.sandu.ximon.admin.security.SecurityUtils; |
| | | import com.sandu.ximon.admin.utils.StoreOperationRecordsUtils; |
| | |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author liuhaonan |
| | |
| | | return removeById(id); |
| | | } |
| | | |
| | | public LambdaQueryWrapper<LedSFile> listFile() { |
| | | LambdaQueryWrapper<LedSFile> ledProgramFileLambdaQueryWrapper = Wrappers.lambdaQuery(LedSFile.class); |
| | | |
| | | /** |
| | | * 列表 |
| | | * |
| | | * @param baseConditionVO |
| | | * @param keyword |
| | | * @return |
| | | */ |
| | | public List<LedSFile> listfile(BaseConditionVO baseConditionVO, String keyword) { |
| | | LambdaQueryWrapper<LedSFile> wrapper = Wrappers.lambdaQuery(LedSFile.class); |
| | | if (SecurityUtils.getClientId() != null) { |
| | | return ledProgramFileLambdaQueryWrapper.eq(LedSFile::getCilentId, SecurityUtils.getUserId()).or(w -> { |
| | | wrapper.eq(LedSFile::getCilentId, SecurityUtils.getUserId()).or(w -> { |
| | | w.eq(LedSFile::getUserId, SecurityUtils.getUserId()); |
| | | }); |
| | | } else { |
| | | return ledProgramFileLambdaQueryWrapper; |
| | | } |
| | | |
| | | if (keyword != null && !keyword.isEmpty()) { |
| | | wrapper.like(LedSFile::getOriginName, keyword); |
| | | } |
| | | |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | return list(wrapper); |
| | | } |
| | | |
| | | } |