|
|
|
@@ -9,19 +9,14 @@ import com.iformall.common.ResultData; |
|
|
|
import com.iformall.domain.po.WxMerchantShop; |
|
|
|
import com.iformall.domain.po.WxShop; |
|
|
|
import com.iformall.domain.vo.WxShopVo; |
|
|
|
import com.iformall.enums.*; |
|
|
|
import com.iformall.enums.EnumRentShopType; |
|
|
|
import com.iformall.enums.EnumShopStatus; |
|
|
|
import com.iformall.enums.EnumUserAdmin; |
|
|
|
import com.iformall.exception.MallinkException; |
|
|
|
import com.iformall.mapper.WxMerchantShopMapper; |
|
|
|
import com.iformall.mapper.WxShopMapper; |
|
|
|
import com.iformall.service.ExcelService; |
|
|
|
import com.iformall.service.WxShopService; |
|
|
|
import com.iformall.utils.Constant; |
|
|
|
import com.iformall.utils.DownFileUtil; |
|
|
|
import org.apache.commons.io.FileUtils; |
|
|
|
import org.apache.poi.ss.usermodel.Cell; |
|
|
|
import org.apache.poi.ss.usermodel.Row; |
|
|
|
import org.apache.poi.xssf.streaming.SXSSFSheet; |
|
|
|
import org.apache.poi.xssf.streaming.SXSSFWorkbook; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
@@ -29,9 +24,10 @@ import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import java.io.File; |
|
|
|
import java.io.FileOutputStream; |
|
|
|
import java.util.*; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
@Service |
|
|
|
public class WxShopServiceImpl implements WxShopService { |
|
|
|
@@ -86,6 +82,9 @@ public class WxShopServiceImpl implements WxShopService { |
|
|
|
public void deleteById(Long id, Integer isAdmin) { |
|
|
|
//1、已出租不让删除 |
|
|
|
WxShop wxShop = wxShopMapper.selectByPrimaryKey(id); |
|
|
|
if (wxShop == null) { |
|
|
|
throw new MallinkException(ErrorCode.SHOP_IS_NOT_FOUND); |
|
|
|
} |
|
|
|
if (wxShop.getStatus().equals(EnumShopStatus.RENT.getCode())) { |
|
|
|
throw new MallinkException(ErrorCode.SHOP_BAN_DELETED); |
|
|
|
} |
|
|
|
|