Browse Source

[商户商铺][商户管理][停用后解绑商铺]

release_toaliyun_real
gongbiao 7 years ago
parent
commit
35c8fe1fd4
1 changed files with 16 additions and 0 deletions
  1. +16
    -0
      mallinkService/src/main/java/com/simple/service/impl/WxMerchantServiceImpl.java

+ 16
- 0
mallinkService/src/main/java/com/simple/service/impl/WxMerchantServiceImpl.java View File

@@ -118,6 +118,22 @@ public class WxMerchantServiceImpl implements WxMerchantService {
WxMerchant wxMerchant = wxMerchantMapper.selectByPrimaryKey(id);
wxMerchant.setStatus(0);
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


Loading…
Cancel
Save