Compare commits
2 Commits
70008ee4b1
...
fb43f0c1e2
| Author | SHA256 | Date | |
|---|---|---|---|
| fb43f0c1e2 | |||
| f0350db727 |
@ -1,6 +1,7 @@
|
||||
package com.cdzy.operations.service.impl;
|
||||
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.hutool.core.io.file.FileNameUtil;
|
||||
import com.cdzy.common.ex.EbikeException;
|
||||
import com.cdzy.operations.enums.CommandType;
|
||||
import com.cdzy.operations.mapper.EbikeBikeInfoMapper;
|
||||
@ -53,8 +54,6 @@ public class EbikeEcuInfoServiceImpl extends ServiceImpl<EbikeEcuInfoMapper, Ebi
|
||||
|
||||
private static final String upgradeUrl = "/upgrade-file/";
|
||||
|
||||
private static final String upgradeSuffix = ".bin";
|
||||
|
||||
@Override
|
||||
public void saveEcu(EbikeEcuInfoVo ebikeEcuInfo) {
|
||||
EbikeEcuInfo ebikeEcuInfoEntity = EbikeEcuInfo.builder()
|
||||
@ -181,8 +180,7 @@ public class EbikeEcuInfoServiceImpl extends ServiceImpl<EbikeEcuInfoMapper, Ebi
|
||||
|
||||
@Override
|
||||
public String upload(MultipartFile file) throws Exception {
|
||||
String fileName = UUID.randomUUID().toString().replace("-", "");
|
||||
String objectName = upgradeUrl + fileName + upgradeSuffix;
|
||||
String objectName = upgradeUrl + UUID.randomUUID().toString().replace("-", "") + FileNameUtil.extName(file.getOriginalFilename());
|
||||
minioUtil.uploadFile(file.getInputStream() , objectName);
|
||||
return minioUtil.getShowUrl(objectName);
|
||||
}
|
||||
|
||||
@ -50,4 +50,9 @@ public class EbikeDicValue implements Serializable {
|
||||
@NotNull(message = "字典id不能为空")
|
||||
private Long dicId;
|
||||
|
||||
/**
|
||||
* 字典icon
|
||||
*/
|
||||
private String dicIcon;
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user