Bladeren bron

[商户管理][修改][方法添加事务]

release_toaliyun_real
gongbiao 7 jaren geleden
bovenliggende
commit
31caf3d69c
1 gewijzigde bestanden met toevoegingen van 9 en 3 verwijderingen
  1. +9
    -3
      mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java

+ 9
- 3
mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java Bestand weergeven

@@ -19,6 +19,9 @@ import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;

/**
* @author gongbiao
*/
@Service
public class WxMerchantServiceImpl implements WxMerchantService {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
@@ -125,6 +128,7 @@ public class WxMerchantServiceImpl implements WxMerchantService {
wxMerchantMapper.deleteByPrimaryKey(id);
}

@Transactional(rollbackFor = {Exception.class})
@Override
public void disable(Long id) {
WxMerchant wxMerchant = wxMerchantMapper.selectByPrimaryKey(id);
@@ -167,7 +171,7 @@ public class WxMerchantServiceImpl implements WxMerchantService {

}

@Transactional
@Transactional(rollbackFor = {Exception.class})
@Override
public void saveOrUpdate(WxMerchant wxMerchant) {

@@ -224,7 +228,8 @@ public class WxMerchantServiceImpl implements WxMerchantService {
//更新商铺状态
WxShop wxShop = new WxShop();
wxShop.setId(shopid);
wxShop.setStatus(EnumShopStatus.RENT.getCode());//已出租
//已出租
wxShop.setStatus(EnumShopStatus.RENT.getCode());
wxShopMapper.updateByPrimaryKeySelective(wxShop);
}

@@ -286,7 +291,8 @@ public class WxMerchantServiceImpl implements WxMerchantService {
//更新商铺状态
WxShop wxShop = new WxShop();
wxShop.setId(merchantShop.getShopId());
wxShop.setStatus(EnumShopStatus.NOT_RENT.getCode());//未出租
//未出租
wxShop.setStatus(EnumShopStatus.NOT_RENT.getCode());
wxShopMapper.updateByPrimaryKeySelective(wxShop);
}



Laden…
Annuleren
Opslaan