|
|
@@ -7,6 +7,7 @@ import com.iformall.controller.base.BaseController; |
|
|
import com.iformall.domain.po.base.TenantEntity; |
|
|
import com.iformall.domain.po.base.TenantEntity; |
|
|
import com.iformall.domain.po.WxBusiness; |
|
|
import com.iformall.domain.po.WxBusiness; |
|
|
import com.iformall.domain.po.WxCoupon; |
|
|
import com.iformall.domain.po.WxCoupon; |
|
|
|
|
|
import com.iformall.domain.po.WxMerchant; |
|
|
import com.iformall.domain.vo.WxBusinessDataVo; |
|
|
import com.iformall.domain.vo.WxBusinessDataVo; |
|
|
import com.iformall.enums.EnumCouponContentType; |
|
|
import com.iformall.enums.EnumCouponContentType; |
|
|
import com.iformall.enums.EnumCouponSourceType; |
|
|
import com.iformall.enums.EnumCouponSourceType; |
|
|
@@ -14,6 +15,7 @@ import com.iformall.enums.EnumRentContractAppStatus; |
|
|
import com.iformall.enums.EnumYesOrNo; |
|
|
import com.iformall.enums.EnumYesOrNo; |
|
|
import com.iformall.service.ExcelService; |
|
|
import com.iformall.service.ExcelService; |
|
|
import com.iformall.service.WxBusinessService; |
|
|
import com.iformall.service.WxBusinessService; |
|
|
|
|
|
import com.iformall.service.WxMerchantService; |
|
|
import com.iformall.utils.Constant; |
|
|
import com.iformall.utils.Constant; |
|
|
import com.iformall.utils.DateUtils; |
|
|
import com.iformall.utils.DateUtils; |
|
|
import io.swagger.annotations.Api; |
|
|
import io.swagger.annotations.Api; |
|
|
@@ -39,6 +41,9 @@ public class WxBusinessController extends BaseController { |
|
|
private WxBusinessService wxBusinessService; |
|
|
private WxBusinessService wxBusinessService; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private ExcelService excelService; |
|
|
private ExcelService excelService; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private WxMerchantService wxMerchantService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("业态全列表接口") |
|
|
@ApiOperation("业态全列表接口") |
|
|
@@ -107,6 +112,15 @@ public class WxBusinessController extends BaseController { |
|
|
if (b.getIsSystem().intValue() == EnumYesOrNo.YES.getCode().intValue()) { |
|
|
if (b.getIsSystem().intValue() == EnumYesOrNo.YES.getCode().intValue()) { |
|
|
return new ResultData(Result.ERROR,"不能修改系统默认业态"); |
|
|
return new ResultData(Result.ERROR,"不能修改系统默认业态"); |
|
|
} |
|
|
} |
|
|
|
|
|
//已经关联商户了不能删 |
|
|
|
|
|
WxMerchant merchantQ = new WxMerchant(); |
|
|
|
|
|
merchantQ.updateTenantInfo(tenantEntity); |
|
|
|
|
|
merchantQ.setBusinessId(b.getId()); |
|
|
|
|
|
List<WxMerchant> merchantList = wxMerchantService.findList(merchantQ); |
|
|
|
|
|
if (null != merchantList && merchantList.size() > 0 ) { |
|
|
|
|
|
return new ResultData(Result.ERROR,"存在已关联的商户,不能删除"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
b.setIsDel(EnumYesOrNo.YES.getCode()); |
|
|
b.setIsDel(EnumYesOrNo.YES.getCode()); |
|
|
wxBusinessService.saveOrUpdate(b); |
|
|
wxBusinessService.saveOrUpdate(b); |
|
|
return new ResultData(); |
|
|
return new ResultData(); |
|
|
|