| @@ -310,6 +310,7 @@ public class WxShopServiceImpl implements WxShopService { | |||||
| Long shopId = (Long)shop.get("id"); | Long shopId = (Long)shop.get("id"); | ||||
| if (null != shopId) { | if (null != shopId) { | ||||
| Long merchantId = shopMerchantIdMap.get(shopId); | Long merchantId = shopMerchantIdMap.get(shopId); | ||||
| boolean isSetRentName = false; | |||||
| if (null != merchantId && null != merchantMap) { | if (null != merchantId && null != merchantMap) { | ||||
| WxMerchant m = merchantMap.get(merchantId); | WxMerchant m = merchantMap.get(merchantId); | ||||
| if (null != m) { | if (null != m) { | ||||
| @@ -317,6 +318,25 @@ public class WxShopServiceImpl implements WxShopService { | |||||
| shop.put("merchantId", m.getId()); | shop.put("merchantId", m.getId()); | ||||
| shop.put("linkPerson", m.getLinkPerson()); | shop.put("linkPerson", m.getLinkPerson()); | ||||
| shop.put("linkPhone", m.getLinkPhone()); | shop.put("linkPhone", m.getLinkPhone()); | ||||
| //如果不是虚拟商户,则取商户的名称 | |||||
| if (m.getIsPrivate() == EnumYesOrNo.NO.getCode()) { | |||||
| shop.put("rentName",m.getName()); | |||||
| shop.put("rentType", 3); | |||||
| isSetRentName = true; | |||||
| } | |||||
| } | |||||
| } | |||||
| if (!isSetRentName) { | |||||
| //查询租户和业主 | |||||
| WxShopUsers suq = new WxShopUsers(); | |||||
| suq.updateTenantInfo(record); | |||||
| suq.setShopId(shopId); | |||||
| suq.setStatus(EnumShopUsersStatus.LIVE.getCode()); | |||||
| suq.setSortColumns("type desc"); | |||||
| WxShopUsers wsu = this.getOneShopUsers(suq); | |||||
| if (null != wsu) { | |||||
| shop.put("rentName",wsu.getName()); | |||||
| shop.put("rentType", wsu.getType()); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||