| | |
| | | import com.yeshi.fanli.dao.mybatis.user.SpreadImgMapper;
|
| | | import com.yeshi.fanli.entity.bus.invite.SpreadImg;
|
| | | import com.yeshi.fanli.service.inter.config.SpreadImgService;
|
| | | import com.yeshi.fanli.util.FilePathEnum;
|
| | |
|
| | | @Service
|
| | | public class SpreadImgServiceImpl implements SpreadImgService {
|
| | |
| | | String type = contentType.substring(contentType.indexOf("/") + 1);
|
| | |
|
| | | // 文件路径
|
| | | String filePath="/img/invite/"+UUID.randomUUID().toString().replace("-", "") + "." + type;
|
| | | String filePath=FilePathEnum.invite.getPath() + UUID.randomUUID().toString().replace("-", "") + "." + type;
|
| | | // 执行上传
|
| | | return COSManager.getInstance().uploadFile(inputStream, filePath).getUrl();
|
| | | }
|
| | |
| | | return spreadImgMapper.countQuery(key);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<SpreadImg> listAll() {
|
| | | return spreadImgMapper.listAll();
|
| | | }
|
| | | |
| | | @Override
|
| | | public long countAll() {
|
| | | return spreadImgMapper.countAll();
|
| | | }
|
| | | }
|