字典值功能更新
This commit is contained in:
parent
0e8982ec3b
commit
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