Compare commits
No commits in common. "fb43f0c1e25959403593c215d64b85c9144f21558531d35d2edb542e57e879cf" and "70008ee4b166dee484a22144e42cb8a811816f4e31f82c7d3f5a6c8391487648" have entirely different histories.
fb43f0c1e2
...
70008ee4b1
@ -1,7 +1,6 @@
|
||||
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;
|
||||
@ -54,6 +53,8 @@ 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()
|
||||
@ -180,7 +181,8 @@ public class EbikeEcuInfoServiceImpl extends ServiceImpl<EbikeEcuInfoMapper, Ebi
|
||||
|
||||
@Override
|
||||
public String upload(MultipartFile file) throws Exception {
|
||||
String objectName = upgradeUrl + UUID.randomUUID().toString().replace("-", "") + FileNameUtil.extName(file.getOriginalFilename());
|
||||
String fileName = UUID.randomUUID().toString().replace("-", "");
|
||||
String objectName = upgradeUrl + fileName + upgradeSuffix;
|
||||
minioUtil.uploadFile(file.getInputStream() , objectName);
|
||||
return minioUtil.getShowUrl(objectName);
|
||||
}
|
||||
|
||||
@ -50,9 +50,4 @@ public class EbikeDicValue implements Serializable {
|
||||
@NotNull(message = "字典id不能为空")
|
||||
private Long dicId;
|
||||
|
||||
/**
|
||||
* 字典icon
|
||||
*/
|
||||
private String dicIcon;
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user