| @@ -118,6 +118,22 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| WxMerchant wxMerchant = wxMerchantMapper.selectByPrimaryKey(id); | WxMerchant wxMerchant = wxMerchantMapper.selectByPrimaryKey(id); | ||||
| wxMerchant.setStatus(0); | wxMerchant.setStatus(0); | ||||
| wxMerchantMapper.updateByPrimaryKeySelective(wxMerchant); | wxMerchantMapper.updateByPrimaryKeySelective(wxMerchant); | ||||
| //解绑商铺 | |||||
| WxMerchantShop wxMerchantShopQuery = new WxMerchantShop(); | |||||
| wxMerchantShopQuery.setTenantId(wxMerchant.getTenantId()); | |||||
| wxMerchantShopQuery.setMerchantId(wxMerchant.getId()); | |||||
| List<WxMerchantShop> wxMerchantShopList = wxMerchantShopMapper.findList(wxMerchantShopQuery); | |||||
| for(WxMerchantShop merchantShop:wxMerchantShopList){ | |||||
| merchantShop.setIsDel(1); | |||||
| wxMerchantShopMapper.updateByPrimaryKeySelective(merchantShop); | |||||
| //更新商铺状态 | |||||
| WxShop wxShop = new WxShop(); | |||||
| wxShop.setId(merchantShop.getShopId()); | |||||
| wxShop.setStatus(0);//未出租 | |||||
| WxShopMapper.updateByPrimaryKeySelective(wxShop); | |||||
| } | |||||
| } | } | ||||
| @Transactional | @Transactional | ||||