Selaa lähdekoodia

[商户][修改][添加商铺的判断]

release_toaliyun_real
gongbiao 7 vuotta sitten
vanhempi
commit
cd30d9f4a5
1 muutettua tiedostoa jossa 7 lisäystä ja 8 poistoa
  1. +7
    -8
      mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java

+ 7
- 8
mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java Näytä tiedosto

@@ -152,22 +152,21 @@ public class WxMerchantServiceImpl implements WxMerchantService {
} }
wxMerchant.setStatus(EnumMerchantStatus.NOT_VALID.getCode()); wxMerchant.setStatus(EnumMerchantStatus.NOT_VALID.getCode());
wxMerchantMapper.updateByPrimaryKeySelective(wxMerchant); wxMerchantMapper.updateByPrimaryKeySelective(wxMerchant);

//解绑商铺 //解绑商铺
WxMerchantShop wxMerchantShopQuery = new WxMerchantShop(); WxMerchantShop wxMerchantShopQuery = new WxMerchantShop();
wxMerchantShopQuery.setTenantId(wxMerchant.getTenantId()); wxMerchantShopQuery.setTenantId(wxMerchant.getTenantId());
wxMerchantShopQuery.setMerchantId(wxMerchant.getId()); wxMerchantShopQuery.setMerchantId(wxMerchant.getId());
wxMerchantShopQuery.setIsDel(EnumDelStatus.NOT_DEL.getCode());
List<WxMerchantShop> wxMerchantShopList = wxMerchantShopMapper.findList(wxMerchantShopQuery); List<WxMerchantShop> wxMerchantShopList = wxMerchantShopMapper.findList(wxMerchantShopQuery);
for (WxMerchantShop merchantShop : wxMerchantShopList) {
merchantShop.setIsDel(EnumDelStatus.DEL.getCode());
wxMerchantShopMapper.updateByPrimaryKeySelective(merchantShop);
for(WxMerchantShop wxMerchantShop:wxMerchantShopList){
wxMerchantShop.setIsDel(EnumDelStatus.DEL.getCode());
wxMerchantShopMapper.updateByPrimaryKeySelective(wxMerchantShop);
//更新商铺状态 //更新商铺状态
WxShop wxShop = new WxShop(); WxShop wxShop = new WxShop();
wxShop.setId(merchantShop.getShopId());
wxShop.setId(wxMerchantShop.getShopId());
wxShop.setStatus(EnumShopStatus.NOT_RENT.getCode()); wxShop.setStatus(EnumShopStatus.NOT_RENT.getCode());
wxShopMapper.updateByPrimaryKeySelective(wxShop); wxShopMapper.updateByPrimaryKeySelective(wxShop);
} }

//解绑用户 //解绑用户
WxMerchantBUser bUser = new WxMerchantBUser(); WxMerchantBUser bUser = new WxMerchantBUser();
bUser.setMerchantId(wxMerchant.getId()); bUser.setMerchantId(wxMerchant.getId());
@@ -176,7 +175,6 @@ public class WxMerchantServiceImpl implements WxMerchantService {
wxMerchantBUser.setStatus(EnumMerchantBUserStatus.INVALID.getCode()); wxMerchantBUser.setStatus(EnumMerchantBUserStatus.INVALID.getCode());
wxMerchantBUserMapper.updateByPrimaryKeySelective(wxMerchantBUser); wxMerchantBUserMapper.updateByPrimaryKeySelective(wxMerchantBUser);
} }

//作废卡券 //作废卡券
WxCoupon wxCoupon = new WxCoupon(); WxCoupon wxCoupon = new WxCoupon();
wxCoupon.setMerchantId(wxMerchant.getId()); wxCoupon.setMerchantId(wxMerchant.getId());
@@ -185,7 +183,6 @@ public class WxMerchantServiceImpl implements WxMerchantService {
c.setStatus(EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode()); c.setStatus(EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode());
wxCouponService.updateCoupon(c); wxCouponService.updateCoupon(c);
} }

} }


@Transactional(rollbackFor = {Exception.class}) @Transactional(rollbackFor = {Exception.class})
@@ -200,6 +197,8 @@ public class WxMerchantServiceImpl implements WxMerchantService {
if(null!=shopidlist && !shopidlist.isEmpty()){ if(null!=shopidlist && !shopidlist.isEmpty()){
Long shopid = shopidlist.get(0); Long shopid = shopidlist.get(0);
WxMerchantShop wxMerchantShop = new WxMerchantShop(); WxMerchantShop wxMerchantShop = new WxMerchantShop();
wxMerchantShop.setTenantId(wxMerchant.getTenantId());
wxMerchantShop.setShopId(shopid);
wxMerchantShop.setIsDel(EnumDelStatus.NOT_DEL.getCode()); wxMerchantShop.setIsDel(EnumDelStatus.NOT_DEL.getCode());
long count = wxMerchantShopMapper.findList(wxMerchantShop).size(); long count = wxMerchantShopMapper.findList(wxMerchantShop).size();
if(count>0){ if(count>0){


Ladataan…
Peruuta
Tallenna