diff --git a/src/main/java/com/kwan/springbootkwan/service/impl/PicInfoServiceImpl.java b/src/main/java/com/kwan/springbootkwan/service/impl/PicInfoServiceImpl.java index a43c786736cc433fbe6e6dfb85c779c15cc11f97..d4a4a2ccac92f3171a73bf6ad64edcef6ae76ecb 100644 --- a/src/main/java/com/kwan/springbootkwan/service/impl/PicInfoServiceImpl.java +++ b/src/main/java/com/kwan/springbootkwan/service/impl/PicInfoServiceImpl.java @@ -43,11 +43,11 @@ public class PicInfoServiceImpl extends ServiceImpl impl wrapper.eq("pic_url", picPath); wrapper.eq("is_delete", 0); final PicInfo pic = picInfoMapper.selectOne(wrapper); - if(Objects.nonNull(pic)){ + if (Objects.nonNull(pic)) { continue; } PicInfo picInfo = new PicInfo(); - picInfo.setPicName(picName); + picInfo.setPicName(picName.split(".")[0]); picInfo.setPicUrl(picPath); picInfoMapper.insert(picInfo); }