| @@ -19,6 +19,9 @@ import java.math.BigDecimal; | |||||
| import java.util.*; | import java.util.*; | ||||
| import java.util.stream.Collectors; | import java.util.stream.Collectors; | ||||
| /** | |||||
| * @author gongbiao | |||||
| */ | |||||
| @Service | @Service | ||||
| public class WxMerchantServiceImpl implements WxMerchantService { | public class WxMerchantServiceImpl implements WxMerchantService { | ||||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | private final Logger logger = LoggerFactory.getLogger(this.getClass()); | ||||
| @@ -125,6 +128,7 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| wxMerchantMapper.deleteByPrimaryKey(id); | wxMerchantMapper.deleteByPrimaryKey(id); | ||||
| } | } | ||||
| @Transactional(rollbackFor = {Exception.class}) | |||||
| @Override | @Override | ||||
| public void disable(Long id) { | public void disable(Long id) { | ||||
| WxMerchant wxMerchant = wxMerchantMapper.selectByPrimaryKey(id); | WxMerchant wxMerchant = wxMerchantMapper.selectByPrimaryKey(id); | ||||
| @@ -167,7 +171,7 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| } | } | ||||
| @Transactional | |||||
| @Transactional(rollbackFor = {Exception.class}) | |||||
| @Override | @Override | ||||
| public void saveOrUpdate(WxMerchant wxMerchant) { | public void saveOrUpdate(WxMerchant wxMerchant) { | ||||
| @@ -224,7 +228,8 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| //更新商铺状态 | //更新商铺状态 | ||||
| WxShop wxShop = new WxShop(); | WxShop wxShop = new WxShop(); | ||||
| wxShop.setId(shopid); | wxShop.setId(shopid); | ||||
| wxShop.setStatus(EnumShopStatus.RENT.getCode());//已出租 | |||||
| //已出租 | |||||
| wxShop.setStatus(EnumShopStatus.RENT.getCode()); | |||||
| wxShopMapper.updateByPrimaryKeySelective(wxShop); | wxShopMapper.updateByPrimaryKeySelective(wxShop); | ||||
| } | } | ||||
| @@ -286,7 +291,8 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| //更新商铺状态 | //更新商铺状态 | ||||
| WxShop wxShop = new WxShop(); | WxShop wxShop = new WxShop(); | ||||
| wxShop.setId(merchantShop.getShopId()); | wxShop.setId(merchantShop.getShopId()); | ||||
| wxShop.setStatus(EnumShopStatus.NOT_RENT.getCode());//未出租 | |||||
| //未出租 | |||||
| wxShop.setStatus(EnumShopStatus.NOT_RENT.getCode()); | |||||
| wxShopMapper.updateByPrimaryKeySelective(wxShop); | wxShopMapper.updateByPrimaryKeySelective(wxShop); | ||||
| } | } | ||||