|
|
|
@@ -23,7 +23,7 @@ public class WxMerchantServiceImpl implements WxMerchantService { |
|
|
|
WxMerchantMapper wxMerchantMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
WxShopMapper WxShopMapper; |
|
|
|
WxShopMapper wxShopMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
WxMerchantShopMapper wxMerchantShopMapper; |
|
|
|
@@ -75,7 +75,7 @@ public class WxMerchantServiceImpl implements WxMerchantService { |
|
|
|
WxMerchantShop wxMerchantShop=new WxMerchantShop(); |
|
|
|
wxMerchantShop.setMerchantId(wxMerchant.getId()); |
|
|
|
wxMerchantShop.setIsDel(EnumDelStatus.NOT_DEL.getCode()); |
|
|
|
List<WxShop> shops = new ArrayList<>(); |
|
|
|
List<Map<String,Object>> shops = new ArrayList<>(); |
|
|
|
|
|
|
|
WxRentContract wxRentContract = new WxRentContract(); |
|
|
|
wxRentContract.setMerchantId(id); |
|
|
|
@@ -90,12 +90,14 @@ public class WxMerchantServiceImpl implements WxMerchantService { |
|
|
|
for(WxMerchantShop merchantShop:wxMerchantShopList){ |
|
|
|
wxMerchant.setRentalStartDate(merchantShop.getRentalStartDate()); |
|
|
|
wxMerchant.setRentalEndDate(merchantShop.getRentalEndDate()); |
|
|
|
WxShop wxShop = WxShopMapper.selectByPrimaryKey(merchantShop.getShopId()); |
|
|
|
if(wxShop!=null) |
|
|
|
shops.add(wxShop); |
|
|
|
WxShop record = new WxShop(); |
|
|
|
record.setId(merchantShop.getShopId()); |
|
|
|
List<Map<String,Object>> shoplist = wxShopMapper.findListMap(record); |
|
|
|
if(shoplist.size()>0) |
|
|
|
shops.add(shoplist.get(0)); |
|
|
|
} |
|
|
|
|
|
|
|
wxMerchant.setShops(shops); |
|
|
|
wxMerchant.setShoplist(shops); |
|
|
|
|
|
|
|
WxMerchantBUser wxMerchantBUser = new WxMerchantBUser(); |
|
|
|
wxMerchantBUser.setMerchantId(wxMerchant.getId()); |
|
|
|
@@ -130,7 +132,7 @@ public class WxMerchantServiceImpl implements WxMerchantService { |
|
|
|
WxShop wxShop = new WxShop(); |
|
|
|
wxShop.setId(merchantShop.getShopId()); |
|
|
|
wxShop.setStatus(EnumShopStatus.NOT_RENT.getCode());//未出租 |
|
|
|
WxShopMapper.updateByPrimaryKeySelective(wxShop); |
|
|
|
wxShopMapper.updateByPrimaryKeySelective(wxShop); |
|
|
|
} |
|
|
|
|
|
|
|
//解绑用户 |
|
|
|
@@ -166,7 +168,7 @@ public class WxMerchantServiceImpl implements WxMerchantService { |
|
|
|
|
|
|
|
WxShop wxShopP = new WxShop(); |
|
|
|
wxShopP.setId(wxMerchant.getShopids().get(0)); |
|
|
|
wxShopP = WxShopMapper.findList(wxShopP).get(0); |
|
|
|
wxShopP = wxShopMapper.findList(wxShopP).get(0); |
|
|
|
|
|
|
|
WxRentContract wxRentContract = new WxRentContract(); |
|
|
|
wxRentContract.setMerchantId(merchantid); |
|
|
|
@@ -201,7 +203,7 @@ public class WxMerchantServiceImpl implements WxMerchantService { |
|
|
|
WxShop wxShop = new WxShop(); |
|
|
|
wxShop.setId(shopid); |
|
|
|
wxShop.setStatus(EnumShopStatus.RENT.getCode());//已出租 |
|
|
|
WxShopMapper.updateByPrimaryKeySelective(wxShop); |
|
|
|
wxShopMapper.updateByPrimaryKeySelective(wxShop); |
|
|
|
} |
|
|
|
|
|
|
|
List<WxMerchantBUser> bUsers = wxMerchant.getbUsers(); |
|
|
|
@@ -239,7 +241,7 @@ public class WxMerchantServiceImpl implements WxMerchantService { |
|
|
|
|
|
|
|
WxShop wxShopP = new WxShop(); |
|
|
|
wxShopP.setId(wxMerchant.getShopids().get(0)); |
|
|
|
wxShopP = WxShopMapper.findList(wxShopP).get(0); |
|
|
|
wxShopP = wxShopMapper.findList(wxShopP).get(0); |
|
|
|
|
|
|
|
WxRentContract wxRentContract = wxRentContractMapper.findObjectByMerchantId(wxMerchant.getId()); |
|
|
|
wxRentContract.setRentalStartDate(wxMerchant.getRentalStartDate()); |
|
|
|
@@ -263,7 +265,7 @@ public class WxMerchantServiceImpl implements WxMerchantService { |
|
|
|
WxShop wxShop = new WxShop(); |
|
|
|
wxShop.setId(merchantShop.getShopId()); |
|
|
|
wxShop.setStatus(EnumShopStatus.NOT_RENT.getCode());//未出租 |
|
|
|
WxShopMapper.updateByPrimaryKeySelective(wxShop); |
|
|
|
wxShopMapper.updateByPrimaryKeySelective(wxShop); |
|
|
|
} |
|
|
|
|
|
|
|
//保存商户商铺的关联 |
|
|
|
@@ -286,7 +288,7 @@ public class WxMerchantServiceImpl implements WxMerchantService { |
|
|
|
WxShop wxShop = new WxShop(); |
|
|
|
wxShop.setId(shopid); |
|
|
|
wxShop.setStatus(EnumShopStatus.RENT.getCode());//已出租 |
|
|
|
WxShopMapper.updateByPrimaryKeySelective(wxShop); |
|
|
|
wxShopMapper.updateByPrimaryKeySelective(wxShop); |
|
|
|
} |
|
|
|
|
|
|
|
List<WxMerchantBUser> bUsers = wxMerchant.getbUsers(); |
|
|
|
|