diff --git a/module-material-store/src/main/java/cn/com/tenlion/materialstore/dao/materialaudio/IMaterialAudioDao.java b/module-material-store/src/main/java/cn/com/tenlion/materialstore/dao/materialaudio/IMaterialAudioDao.java index 8b41bc5..f7860d4 100644 --- a/module-material-store/src/main/java/cn/com/tenlion/materialstore/dao/materialaudio/IMaterialAudioDao.java +++ b/module-material-store/src/main/java/cn/com/tenlion/materialstore/dao/materialaudio/IMaterialAudioDao.java @@ -116,4 +116,5 @@ public interface IMaterialAudioDao { */ Integer count(Map params) throws SearchException; + void removeByMaterialId(Map params) throws RemoveException; } \ No newline at end of file diff --git a/module-material-store/src/main/java/cn/com/tenlion/materialstore/dao/materiallink/IMaterialLinkDao.java b/module-material-store/src/main/java/cn/com/tenlion/materialstore/dao/materiallink/IMaterialLinkDao.java index 226e6e1..64775ca 100644 --- a/module-material-store/src/main/java/cn/com/tenlion/materialstore/dao/materiallink/IMaterialLinkDao.java +++ b/module-material-store/src/main/java/cn/com/tenlion/materialstore/dao/materiallink/IMaterialLinkDao.java @@ -117,4 +117,5 @@ public interface IMaterialLinkDao { */ Integer count(Map params) throws SearchException; + void removeByMaterialId(Map params) throws RemoveException; } \ No newline at end of file diff --git a/module-material-store/src/main/java/cn/com/tenlion/materialstore/dao/materialmap/IMaterialMapDao.java b/module-material-store/src/main/java/cn/com/tenlion/materialstore/dao/materialmap/IMaterialMapDao.java index 48f3b0c..a36416d 100644 --- a/module-material-store/src/main/java/cn/com/tenlion/materialstore/dao/materialmap/IMaterialMapDao.java +++ b/module-material-store/src/main/java/cn/com/tenlion/materialstore/dao/materialmap/IMaterialMapDao.java @@ -117,4 +117,5 @@ public interface IMaterialMapDao { */ Integer count(Map params) throws SearchException; + void removeByMaterialId(Map params) throws RemoveException; } \ No newline at end of file diff --git a/module-material-store/src/main/java/cn/com/tenlion/materialstore/dao/materialphoto/IMaterialPhotoDao.java b/module-material-store/src/main/java/cn/com/tenlion/materialstore/dao/materialphoto/IMaterialPhotoDao.java index 46e33f5..8d3cba0 100644 --- a/module-material-store/src/main/java/cn/com/tenlion/materialstore/dao/materialphoto/IMaterialPhotoDao.java +++ b/module-material-store/src/main/java/cn/com/tenlion/materialstore/dao/materialphoto/IMaterialPhotoDao.java @@ -117,4 +117,5 @@ public interface IMaterialPhotoDao { */ Integer count(Map params) throws SearchException; + void removeByMaterialId(Map params) throws RemoveException; } \ No newline at end of file diff --git a/module-material-store/src/main/java/cn/com/tenlion/materialstore/dao/materialtext/IMaterialTextDao.java b/module-material-store/src/main/java/cn/com/tenlion/materialstore/dao/materialtext/IMaterialTextDao.java index d51d444..d1b1e92 100644 --- a/module-material-store/src/main/java/cn/com/tenlion/materialstore/dao/materialtext/IMaterialTextDao.java +++ b/module-material-store/src/main/java/cn/com/tenlion/materialstore/dao/materialtext/IMaterialTextDao.java @@ -117,4 +117,5 @@ public interface IMaterialTextDao { */ Integer count(Map params) throws SearchException; + void removeByMaterialId(Map params) throws RemoveException; } \ No newline at end of file diff --git a/module-material-store/src/main/java/cn/com/tenlion/materialstore/dao/materialvideo/IMaterialVideoDao.java b/module-material-store/src/main/java/cn/com/tenlion/materialstore/dao/materialvideo/IMaterialVideoDao.java index 444e34f..bb5617b 100644 --- a/module-material-store/src/main/java/cn/com/tenlion/materialstore/dao/materialvideo/IMaterialVideoDao.java +++ b/module-material-store/src/main/java/cn/com/tenlion/materialstore/dao/materialvideo/IMaterialVideoDao.java @@ -117,4 +117,5 @@ public interface IMaterialVideoDao { */ Integer count(Map params) throws SearchException; + void removeByMaterialId(Map params) throws RemoveException; } \ No newline at end of file diff --git a/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialaudio/IMaterialAudioService.java b/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialaudio/IMaterialAudioService.java index cfa4a7d..4a88fdc 100644 --- a/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialaudio/IMaterialAudioService.java +++ b/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialaudio/IMaterialAudioService.java @@ -187,4 +187,6 @@ public interface IMaterialAudioService { List getByMaterialId(String materialId); + void removeByMaterialId(String materialId); + } \ No newline at end of file diff --git a/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialaudio/impl/MaterialAudioServiceImpl.java b/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialaudio/impl/MaterialAudioServiceImpl.java index 831a5c6..f71f773 100644 --- a/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialaudio/impl/MaterialAudioServiceImpl.java +++ b/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialaudio/impl/MaterialAudioServiceImpl.java @@ -173,4 +173,11 @@ public class MaterialAudioServiceImpl extends DefaultBaseService implements IMat return materialAudioDao.list(params); } + @Override + public void removeByMaterialId(String materialId) { + Map params = super.getHashMap(2); + params.put("materialId", materialId); + materialAudioDao.removeByMaterialId(params); + } + } \ No newline at end of file diff --git a/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialdata/impl/MaterialDataServiceImpl.java b/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialdata/impl/MaterialDataServiceImpl.java index 491d25f..98ee929 100644 --- a/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialdata/impl/MaterialDataServiceImpl.java +++ b/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialdata/impl/MaterialDataServiceImpl.java @@ -52,6 +52,7 @@ public class MaterialDataServiceImpl implements MaterialDataService { /** * 文字存储 */ + materialTextService.removeByMaterialId(dataVO.getMaterialId()); if(textVOList != null && textVOList.size() > 0) { for (MaterialTextVO text : textVOList) { text.setMaterialId(dataVO.getMaterialId()); @@ -61,6 +62,7 @@ public class MaterialDataServiceImpl implements MaterialDataService { /** * 照片存储 */ + materialPhotoService.removeByMaterialId(dataVO.getMaterialId()); if(photoVOList != null && photoVOList.size() > 0) { for (MaterialPhotoVO photo : photoVOList) { photo.setMaterialId(dataVO.getMaterialId()); @@ -70,6 +72,7 @@ public class MaterialDataServiceImpl implements MaterialDataService { /** * 音频存储 */ + materialAudioService.removeByMaterialId(dataVO.getMaterialId()); if(audioVOList != null && audioVOList.size() > 0) { for (MaterialAudioVO audio : audioVOList) { audio.setMaterialId(dataVO.getMaterialId()); @@ -79,6 +82,7 @@ public class MaterialDataServiceImpl implements MaterialDataService { /** * 视频存储 */ + materialVideoService.removeByMaterialId(dataVO.getMaterialId()); if(videoVOList != null && videoVOList.size() > 0) { for (MaterialVideoVO video : videoVOList) { video.setMaterialId(dataVO.getMaterialId()); @@ -88,6 +92,7 @@ public class MaterialDataServiceImpl implements MaterialDataService { /** * 经纬度存储 */ + materialMapService.removeByMaterialId(dataVO.getMaterialId()); if(mapVOList != null && mapVOList.size() > 0) { for (MaterialMapVO map : mapVOList) { map.setMaterialId(dataVO.getMaterialId()); @@ -97,6 +102,7 @@ public class MaterialDataServiceImpl implements MaterialDataService { /** * 链接存储 */ + materialLinkService.removeByMaterialId(dataVO.getMaterialId()); if(linkVOList != null && linkVOList.size() > 0) { for (MaterialLinkVO link : linkVOList) { link.setMaterialId(dataVO.getMaterialId()); diff --git a/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materiallink/IMaterialLinkService.java b/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materiallink/IMaterialLinkService.java index fa57c1c..74b864a 100644 --- a/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materiallink/IMaterialLinkService.java +++ b/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materiallink/IMaterialLinkService.java @@ -187,4 +187,6 @@ public interface IMaterialLinkService { List getByMaterialId(String materialId); + void removeByMaterialId(String materialId); + } \ No newline at end of file diff --git a/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materiallink/impl/MaterialLinkServiceImpl.java b/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materiallink/impl/MaterialLinkServiceImpl.java index 42168b3..0eacc4e 100644 --- a/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materiallink/impl/MaterialLinkServiceImpl.java +++ b/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materiallink/impl/MaterialLinkServiceImpl.java @@ -175,4 +175,11 @@ public class MaterialLinkServiceImpl extends DefaultBaseService implements IMate return materialLinkDao.list(params); } + @Override + public void removeByMaterialId(String materialId) { + Map params = super.getHashMap(2); + params.put("materialId", materialId); + materialLinkDao.removeByMaterialId(params); + } + } \ No newline at end of file diff --git a/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialmap/IMaterialMapService.java b/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialmap/IMaterialMapService.java index 7609bdc..9f5d38f 100644 --- a/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialmap/IMaterialMapService.java +++ b/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialmap/IMaterialMapService.java @@ -187,4 +187,6 @@ public interface IMaterialMapService { List getByMaterialId(String materialId); + void removeByMaterialId(String materialId); + } \ No newline at end of file diff --git a/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialmap/impl/MaterialMapServiceImpl.java b/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialmap/impl/MaterialMapServiceImpl.java index 0e08b94..c0a34cb 100644 --- a/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialmap/impl/MaterialMapServiceImpl.java +++ b/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialmap/impl/MaterialMapServiceImpl.java @@ -175,4 +175,11 @@ public class MaterialMapServiceImpl extends DefaultBaseService implements IMater return materialMapDao.list(params); } + @Override + public void removeByMaterialId(String materialId) { + Map params = super.getHashMap(2); + params.put("materialId", materialId); + materialMapDao.removeByMaterialId(params); + } + } \ No newline at end of file diff --git a/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialphoto/IMaterialPhotoService.java b/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialphoto/IMaterialPhotoService.java index e2c8199..2c3303e 100644 --- a/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialphoto/IMaterialPhotoService.java +++ b/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialphoto/IMaterialPhotoService.java @@ -187,4 +187,6 @@ public interface IMaterialPhotoService { List getByMaterialId(String materialId); + void removeByMaterialId(String materialId); + } \ No newline at end of file diff --git a/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialphoto/impl/MaterialPhotoServiceImpl.java b/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialphoto/impl/MaterialPhotoServiceImpl.java index 1e079f7..464e4b8 100644 --- a/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialphoto/impl/MaterialPhotoServiceImpl.java +++ b/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialphoto/impl/MaterialPhotoServiceImpl.java @@ -175,4 +175,11 @@ public class MaterialPhotoServiceImpl extends DefaultBaseService implements IMat return materialPhotoDao.list(params); } + @Override + public void removeByMaterialId(String materialId) { + Map params = super.getHashMap(2); + params.put("materialId", materialId); + materialPhotoDao.removeByMaterialId(params); + } + } \ No newline at end of file diff --git a/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialtext/IMaterialTextService.java b/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialtext/IMaterialTextService.java index 1a9434f..572a236 100644 --- a/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialtext/IMaterialTextService.java +++ b/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialtext/IMaterialTextService.java @@ -187,4 +187,6 @@ public interface IMaterialTextService { List getByMaterialId(String materialId); + void removeByMaterialId(String materialId); + } \ No newline at end of file diff --git a/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialtext/impl/MaterialTextServiceImpl.java b/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialtext/impl/MaterialTextServiceImpl.java index 005d5f2..f3405b1 100644 --- a/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialtext/impl/MaterialTextServiceImpl.java +++ b/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialtext/impl/MaterialTextServiceImpl.java @@ -175,4 +175,11 @@ public class MaterialTextServiceImpl extends DefaultBaseService implements IMate return materialTextDao.list(params); } + @Override + public void removeByMaterialId(String materialId) { + Map params = super.getHashMap(2); + params.put("materialId", materialId); + materialTextDao.removeByMaterialId(params); + } + } \ No newline at end of file diff --git a/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialvideo/IMaterialVideoService.java b/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialvideo/IMaterialVideoService.java index 4c9f3ba..531cf2f 100644 --- a/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialvideo/IMaterialVideoService.java +++ b/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialvideo/IMaterialVideoService.java @@ -187,4 +187,6 @@ public interface IMaterialVideoService { List getByMaterialId(String materialId); + void removeByMaterialId(String materialId); + } \ No newline at end of file diff --git a/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialvideo/impl/MaterialVideoServiceImpl.java b/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialvideo/impl/MaterialVideoServiceImpl.java index 7121a33..1af93e1 100644 --- a/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialvideo/impl/MaterialVideoServiceImpl.java +++ b/module-material-store/src/main/java/cn/com/tenlion/materialstore/service/materialvideo/impl/MaterialVideoServiceImpl.java @@ -175,4 +175,11 @@ public class MaterialVideoServiceImpl extends DefaultBaseService implements IMat return materialVideoDao.list(params); } + @Override + public void removeByMaterialId(String materialId) { + Map params = super.getHashMap(2); + params.put("materialId", materialId); + materialVideoDao.removeByMaterialId(params); + } + } \ No newline at end of file diff --git a/module-material-store/src/main/resources/mybatis/mapper/materialaudio/material-audio-mapper.xml b/module-material-store/src/main/resources/mybatis/mapper/materialaudio/material-audio-mapper.xml index 1985954..0546c50 100644 --- a/module-material-store/src/main/resources/mybatis/mapper/materialaudio/material-audio-mapper.xml +++ b/module-material-store/src/main/resources/mybatis/mapper/materialaudio/material-audio-mapper.xml @@ -68,6 +68,14 @@ ) + + + DELETE FROM + m_material_audio + WHERE + material_id = #{materialId} + + UPDATE diff --git a/module-material-store/src/main/resources/mybatis/mapper/materiallink/material-link-mapper.xml b/module-material-store/src/main/resources/mybatis/mapper/materiallink/material-link-mapper.xml index d9365df..5600724 100644 --- a/module-material-store/src/main/resources/mybatis/mapper/materiallink/material-link-mapper.xml +++ b/module-material-store/src/main/resources/mybatis/mapper/materiallink/material-link-mapper.xml @@ -73,6 +73,14 @@ ) + + + DELETE FROM + m_material_link + WHERE + material_id = #{materialId} + + UPDATE @@ -233,10 +241,7 @@ #{materialLinkIds[${index}]} - - AND t1.material_id = #{materialId} - - ORDER BY t1.material_order + ORDER BT t1.material_order diff --git a/module-material-store/src/main/resources/mybatis/mapper/materialmap/material-map-mapper.xml b/module-material-store/src/main/resources/mybatis/mapper/materialmap/material-map-mapper.xml index 73f3fdc..898cfae 100644 --- a/module-material-store/src/main/resources/mybatis/mapper/materialmap/material-map-mapper.xml +++ b/module-material-store/src/main/resources/mybatis/mapper/materialmap/material-map-mapper.xml @@ -78,6 +78,14 @@ ) + + + DELETE FROM + m_material_map + WHERE + material_id = #{materialId} + + UPDATE diff --git a/module-material-store/src/main/resources/mybatis/mapper/materialphoto/material-photo-mapper.xml b/module-material-store/src/main/resources/mybatis/mapper/materialphoto/material-photo-mapper.xml index 3f149e7..db27ef7 100644 --- a/module-material-store/src/main/resources/mybatis/mapper/materialphoto/material-photo-mapper.xml +++ b/module-material-store/src/main/resources/mybatis/mapper/materialphoto/material-photo-mapper.xml @@ -68,6 +68,14 @@ ) + + + DELETE FROM + m_material_photo + WHERE + material_id = #{materialId} + + UPDATE diff --git a/module-material-store/src/main/resources/mybatis/mapper/materialtext/material-text-mapper.xml b/module-material-store/src/main/resources/mybatis/mapper/materialtext/material-text-mapper.xml index 507c5e3..55b3230 100644 --- a/module-material-store/src/main/resources/mybatis/mapper/materialtext/material-text-mapper.xml +++ b/module-material-store/src/main/resources/mybatis/mapper/materialtext/material-text-mapper.xml @@ -73,6 +73,14 @@ ) + + + DELETE FROM + m_material_text + WHERE + material_id = #{materialId} + + UPDATE diff --git a/module-material-store/src/main/resources/mybatis/mapper/materialvideo/material-video-mapper.xml b/module-material-store/src/main/resources/mybatis/mapper/materialvideo/material-video-mapper.xml index 46a38b7..04e6a3a 100644 --- a/module-material-store/src/main/resources/mybatis/mapper/materialvideo/material-video-mapper.xml +++ b/module-material-store/src/main/resources/mybatis/mapper/materialvideo/material-video-mapper.xml @@ -68,6 +68,14 @@ ) + + + DELETE FROM + m_material_video + WHERE + material_id = #{materialId} + + UPDATE