mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-23 04:25:21 +08:00
update 上传固件路径 多个斜杠
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.jsowell.pile.mapper;
|
||||
|
||||
import com.jsowell.pile.domain.PileFirmwareInfo;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -10,6 +11,7 @@ import java.util.List;
|
||||
* @author jsowell
|
||||
* @date 2023-06-28
|
||||
*/
|
||||
@Repository
|
||||
public interface PileFirmwareInfoMapper {
|
||||
/**
|
||||
* 查询充电桩固件信息
|
||||
|
||||
@@ -51,9 +51,20 @@ public class PileFirmwareInfoServiceImpl implements PileFirmwareInfoService {
|
||||
@Override
|
||||
public int insertPileFirmwareInfo(PileFirmwareInfo pileFirmwareInfo) {
|
||||
// pileFirmwareInfo.setCreateTime(DateUtils.getNowDate());
|
||||
String filePath = pileFirmwareInfo.getFilePath();
|
||||
// 两个斜杠 留一个
|
||||
filePath = filePath.replaceAll("//", "/");
|
||||
pileFirmwareInfo.setFilePath(filePath);
|
||||
return pileFirmwareInfoMapper.insertPileFirmwareInfo(pileFirmwareInfo);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String filePath = "//4G_06.bin";
|
||||
// 两个斜杠 留一个
|
||||
filePath = filePath.replaceAll("//", "/");
|
||||
System.out.println(filePath);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改充电桩固件信息
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user