From 179c4d64313c9b7572778da4aaaf6c6584fe457d Mon Sep 17 00:00:00 2001 From: mitao <2763622819@qq.com> Date: 星期二, 20 五月 2025 23:48:08 +0800 Subject: [PATCH] 修改文件上传类型限制 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/VolunteerMerchantServiceImpl.java | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/VolunteerMerchantServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/VolunteerMerchantServiceImpl.java index 45bdfc9..37dc7af 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/VolunteerMerchantServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/VolunteerMerchantServiceImpl.java @@ -12,6 +12,7 @@ import com.panzhihua.service_community.entity.VolunteerActivity; import com.panzhihua.service_community.entity.VolunteerMerchant; import com.panzhihua.service_community.entity.VolunteerType; +import com.panzhihua.service_community.service.VolunteerIntegralMerchantService; import com.panzhihua.service_community.service.VolunteerMerchantService; import com.panzhihua.service_community.service.VolunteerTypeService; import lombok.extern.slf4j.Slf4j; @@ -27,6 +28,10 @@ { @Resource private VolunteerMerchantService vmService; + + + @Resource + private VolunteerIntegralMerchantService vimService; @Override public R getById(String id) { @@ -155,13 +160,22 @@ } @Override - public R deleteVolunteerMerchant(String id) { + public R deleteVolunteerMerchant(String id) + { + + int goodNum=vimService.getNum(id); + + if(goodNum>0) + { + return R.fail("请下架所有商铺商品"); + } + int num= baseMapper.delete(id); if(num>0) { return R.ok(); } - return R.fail("添加失败"); + return R.fail("失败"); } @Override -- Gitblit v1.7.1