对比新文件 |
| | |
| | | package com.gk.firework.Service.ServiceImpl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gk.firework.Domain.EnterpriseResource; |
| | | import com.gk.firework.Domain.Utils.UploadUtil; |
| | | import com.gk.firework.Mapper.EnterpriseResourceMapper; |
| | | import com.gk.firework.Service.EnterpriseResourceService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Repository; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.File; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Service("enterpriseResource") |
| | | public class EnterpriseResourceServiceImpl extends ServiceImpl<EnterpriseResourceMapper, EnterpriseResource> implements EnterpriseResourceService { |
| | | @Autowired |
| | | private EnterpriseResourceMapper enterpriseResourceMapper; |
| | | |
| | | @Override |
| | | public List<EnterpriseResource> getResourceByBelongIdAndType(Long id, String type) { |
| | | LambdaQueryWrapper<EnterpriseResource> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(EnterpriseResource::getBelongid,id); |
| | | wrapper.eq(EnterpriseResource::getTabletype,type); |
| | | return enterpriseResourceMapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<String> getUrlByBelongIdAndType(Long id, String type) { |
| | | return enterpriseResourceMapper.getUrlByBelongIdAndType(id,type); |
| | | } |
| | | |
| | | |
| | | // @Override |
| | | // public List<String> uploadFiles(MultipartFile[] files) throws Exception { |
| | | // |
| | | // List<String> urls = new ArrayList<>(); |
| | | // for (MultipartFile file : files) { |
| | | // String name = UploadUtil.uploadFile(file, filepath); |
| | | // urls.add(filepath + name); |
| | | // } |
| | | // return urls; |
| | | // } |
| | | } |