|
|
@@ -124,23 +124,23 @@ public class TauvWaterSpectrumServiceImpl extends BaseServiceImpl<TauvWaterSpect |
|
|
|
@Override |
|
|
|
public Response editSpectrum(TauvWaterSpectrum waterSpectrum) { |
|
|
|
// 处理图片路径 |
|
|
|
if (StringUtils.isNotEmpty(waterSpectrum.getCodPic()) && waterSpectrum.getCodPic().contains(uploadFolder)) { |
|
|
|
waterSpectrum.setCodPic(waterSpectrum.getCodPic().replace(uploadFolder, "")); |
|
|
|
if (StringUtils.isNotEmpty(waterSpectrum.getCodPic()) && waterSpectrum.getCodPic().contains("http")) { |
|
|
|
waterSpectrum.setCodPic(waterSpectrum.getCodPic().replace(uploadUrl, "")); |
|
|
|
} |
|
|
|
if (StringUtils.isNotEmpty(waterSpectrum.getNh3nPic()) && waterSpectrum.getNh3nPic().contains(uploadFolder)) { |
|
|
|
waterSpectrum.setNh3nPic(waterSpectrum.getNh3nPic().replace(uploadFolder, "")); |
|
|
|
if (StringUtils.isNotEmpty(waterSpectrum.getNh3nPic()) && waterSpectrum.getNh3nPic().contains("http")) { |
|
|
|
waterSpectrum.setNh3nPic(waterSpectrum.getNh3nPic().replace(uploadUrl, "")); |
|
|
|
} |
|
|
|
if (StringUtils.isNotEmpty(waterSpectrum.getTpPic()) && waterSpectrum.getTpPic().contains(uploadFolder)) { |
|
|
|
waterSpectrum.setTpPic(waterSpectrum.getTpPic().replace(uploadFolder, "")); |
|
|
|
if (StringUtils.isNotEmpty(waterSpectrum.getTpPic()) && waterSpectrum.getTpPic().contains("http")) { |
|
|
|
waterSpectrum.setTpPic(waterSpectrum.getTpPic().replace(uploadUrl, "")); |
|
|
|
} |
|
|
|
if (StringUtils.isNotEmpty(waterSpectrum.getTnPic()) && waterSpectrum.getTnPic().contains(uploadFolder)) { |
|
|
|
waterSpectrum.setTnPic(waterSpectrum.getTnPic().replace(uploadFolder, "")); |
|
|
|
if (StringUtils.isNotEmpty(waterSpectrum.getTnPic()) && waterSpectrum.getTnPic().contains("http")) { |
|
|
|
waterSpectrum.setTnPic(waterSpectrum.getTnPic().replace(uploadUrl, "")); |
|
|
|
} |
|
|
|
if (StringUtils.isNotEmpty(waterSpectrum.getDoPic()) && waterSpectrum.getDoPic().contains(uploadFolder)) { |
|
|
|
waterSpectrum.setDoPic(waterSpectrum.getDoPic().replace(uploadFolder, "")); |
|
|
|
if (StringUtils.isNotEmpty(waterSpectrum.getDoPic()) && waterSpectrum.getDoPic().contains("http")) { |
|
|
|
waterSpectrum.setDoPic(waterSpectrum.getDoPic().replace(uploadUrl, "")); |
|
|
|
} |
|
|
|
if (StringUtils.isNotEmpty(waterSpectrum.getTubPic()) && waterSpectrum.getTubPic().contains(uploadFolder)) { |
|
|
|
waterSpectrum.setTubPic(waterSpectrum.getTubPic().replace(uploadFolder, "")); |
|
|
|
if (StringUtils.isNotEmpty(waterSpectrum.getTubPic()) && waterSpectrum.getTubPic().contains("http")) { |
|
|
|
waterSpectrum.setTubPic(waterSpectrum.getTubPic().replace(uploadUrl, "")); |
|
|
|
} |
|
|
|
Boolean res = updateById(waterSpectrum); |
|
|
|
if (!res) { |