fix:只需要图片名称 不需要图片后缀

上级 2be8fde4
...@@ -43,11 +43,11 @@ public class PicInfoServiceImpl extends ServiceImpl<PicInfoMapper, PicInfo> impl ...@@ -43,11 +43,11 @@ public class PicInfoServiceImpl extends ServiceImpl<PicInfoMapper, PicInfo> impl
wrapper.eq("pic_url", picPath); wrapper.eq("pic_url", picPath);
wrapper.eq("is_delete", 0); wrapper.eq("is_delete", 0);
final PicInfo pic = picInfoMapper.selectOne(wrapper); final PicInfo pic = picInfoMapper.selectOne(wrapper);
if(Objects.nonNull(pic)){ if (Objects.nonNull(pic)) {
continue; continue;
} }
PicInfo picInfo = new PicInfo(); PicInfo picInfo = new PicInfo();
picInfo.setPicName(picName); picInfo.setPicName(picName.split(".")[0]);
picInfo.setPicUrl(picPath); picInfo.setPicUrl(picPath);
picInfoMapper.insert(picInfo); picInfoMapper.insert(picInfo);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册