| @@ -82,22 +82,4 @@ public class TenantEntity extends BaseEntity { | |||||
| public void setFinalTenantId(String finalTenantId) { | public void setFinalTenantId(String finalTenantId) { | ||||
| this.finalTenantId = finalTenantId; | this.finalTenantId = finalTenantId; | ||||
| } | } | ||||
| @TableField(exist = false) | |||||
| @JsonProperty(access = JsonProperty.Access.READ_ONLY) | |||||
| @io.swagger.annotations.ApiModelProperty(value = "", name = "tenantInfo") | |||||
| private String tenantInfo; | |||||
| public TenantEntity getTenantInfo() { | |||||
| if (StringUtils.isBlank(getParentTenantId())) { | |||||
| TenantEntity single = new TenantEntity(); | |||||
| single.setTenantId(getTenantId()); | |||||
| return single; | |||||
| } else { | |||||
| TenantEntity mul = new TenantEntity(); | |||||
| mul.setTenantId(getTenantId()); | |||||
| mul.setParentTenantId(getParentTenantId()); | |||||
| return mul; | |||||
| } | |||||
| } | |||||
| } | } | ||||
| @@ -306,7 +306,9 @@ public class TtCUserServiceAdapter extends BasicCUserService implements CUserSer | |||||
| @Override | @Override | ||||
| public long findCount(WxCUserBasicInfoDto dto) { | public long findCount(WxCUserBasicInfoDto dto) { | ||||
| TenantEntity tenantEntity = dto.getTenantInfo(); | |||||
| TenantEntity tenantEntity = new TenantEntity(); | |||||
| tenantEntity.setTenantId(dto.getTenantId()); | |||||
| tenantEntity.setParentTenantId(dto.getParentTenantId()); | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | ||||
| long count = 0l; | long count = 0l; | ||||
| for (TenantEntity te:tenantEntitys) { | for (TenantEntity te:tenantEntitys) { | ||||
| @@ -315,7 +315,9 @@ public class WxCUserServiceAdapter extends BasicCUserService implements CUserSer | |||||
| @Override | @Override | ||||
| public long findCount(WxCUserBasicInfoDto dto) { | public long findCount(WxCUserBasicInfoDto dto) { | ||||
| TenantEntity tenantEntity = dto.getTenantInfo(); | |||||
| TenantEntity tenantEntity = new TenantEntity(); | |||||
| tenantEntity.setTenantId(dto.getTenantId()); | |||||
| tenantEntity.setParentTenantId(dto.getParentTenantId()); | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | ||||
| long count = 0l; | long count = 0l; | ||||
| for (TenantEntity te:tenantEntitys) { | for (TenantEntity te:tenantEntitys) { | ||||
| @@ -92,7 +92,9 @@ public class WxCUserCarServiceImpl implements WxCUserCarService { | |||||
| @Override | @Override | ||||
| public Integer countUser(WxCUserBasicInfoDto dto) { | public Integer countUser(WxCUserBasicInfoDto dto) { | ||||
| TenantEntity tenantEntity = dto.getTenantInfo(); | |||||
| TenantEntity tenantEntity = new TenantEntity(); | |||||
| tenantEntity.setTenantId(dto.getTenantId()); | |||||
| tenantEntity.setParentTenantId(dto.getParentTenantId()); | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | ||||
| int count = 0; | int count = 0; | ||||
| for (TenantEntity te:tenantEntitys) { | for (TenantEntity te:tenantEntitys) { | ||||
| @@ -244,7 +244,9 @@ public class WxCUserServiceImpl implements WxCUserService { | |||||
| @Override | @Override | ||||
| public long countByChannel(WxCUser user) { | public long countByChannel(WxCUser user) { | ||||
| TenantEntity tenantEntity = user.getTenantInfo(); | |||||
| TenantEntity tenantEntity = new TenantEntity(); | |||||
| tenantEntity.setTenantId(user.getTenantId()); | |||||
| tenantEntity.setParentTenantId(user.getParentTenantId()); | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | ||||
| long count = 0l; | long count = 0l; | ||||
| for (TenantEntity te:tenantEntitys) { | for (TenantEntity te:tenantEntitys) { | ||||
| @@ -81,7 +81,9 @@ public class WxCarCmdLogServiceImpl implements WxCarCmdLogService { | |||||
| @Override | @Override | ||||
| public Map<String, Long> getHourCountMap(WxCarCmdLog wxCarCmdLog) { | public Map<String, Long> getHourCountMap(WxCarCmdLog wxCarCmdLog) { | ||||
| TenantEntity tenantEntity = wxCarCmdLog.getTenantInfo(); | |||||
| TenantEntity tenantEntity = new TenantEntity(); | |||||
| tenantEntity.setTenantId(wxCarCmdLog.getTenantId()); | |||||
| tenantEntity.setParentTenantId(wxCarCmdLog.getParentTenantId()); | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | ||||
| Map<String, Long> map = new HashMap<>(); | Map<String, Long> map = new HashMap<>(); | ||||
| for (TenantEntity te:tenantEntitys) { | for (TenantEntity te:tenantEntitys) { | ||||
| @@ -348,7 +348,9 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { | |||||
| @Override | @Override | ||||
| public int countCoupon(WxCouponChannel wxCouponChannel) { | public int countCoupon(WxCouponChannel wxCouponChannel) { | ||||
| TenantEntity tenantEntity = wxCouponChannel.getTenantInfo(); | |||||
| TenantEntity tenantEntity = new TenantEntity(); | |||||
| tenantEntity.setTenantId(wxCouponChannel.getTenantId()); | |||||
| tenantEntity.setParentTenantId(wxCouponChannel.getParentTenantId()); | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | ||||
| int count = 0; | int count = 0; | ||||
| for (TenantEntity te:tenantEntitys) { | for (TenantEntity te:tenantEntitys) { | ||||
| @@ -2158,7 +2158,9 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| @Override | @Override | ||||
| public int queryPriceTotal(WxCouponOrder wxCouponOrder) { | public int queryPriceTotal(WxCouponOrder wxCouponOrder) { | ||||
| TenantEntity tenantEntity = wxCouponOrder.getTenantInfo(); | |||||
| TenantEntity tenantEntity = new TenantEntity(); | |||||
| tenantEntity.setTenantId(wxCouponOrder.getTenantId()); | |||||
| tenantEntity.setParentTenantId(wxCouponOrder.getParentTenantId()); | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | ||||
| int price = 0; | int price = 0; | ||||
| for (TenantEntity te:tenantEntitys) { | for (TenantEntity te:tenantEntitys) { | ||||
| @@ -2749,7 +2751,9 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| } | } | ||||
| public int findCount(WxCouponOrder wxCouponOrder){ | public int findCount(WxCouponOrder wxCouponOrder){ | ||||
| TenantEntity tenantEntity = wxCouponOrder.getTenantInfo(); | |||||
| TenantEntity tenantEntity = new TenantEntity(); | |||||
| tenantEntity.setTenantId(wxCouponOrder.getTenantId()); | |||||
| tenantEntity.setParentTenantId(wxCouponOrder.getParentTenantId()); | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | ||||
| int count = 0; | int count = 0; | ||||
| for (TenantEntity te:tenantEntitys) { | for (TenantEntity te:tenantEntitys) { | ||||
| @@ -206,7 +206,9 @@ public class WxMerchantTradeDailyServiceImpl implements WxMerchantTradeDailyServ | |||||
| @Override | @Override | ||||
| public Integer findSumMoney(WxMerchantTradeDaily merchantTradeDaily) { | public Integer findSumMoney(WxMerchantTradeDaily merchantTradeDaily) { | ||||
| TenantEntity tenantEntity = merchantTradeDaily.getTenantInfo(); | |||||
| TenantEntity tenantEntity = new TenantEntity(); | |||||
| tenantEntity.setTenantId(merchantTradeDaily.getTenantId()); | |||||
| tenantEntity.setParentTenantId(merchantTradeDaily.getParentTenantId()); | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | ||||
| int money = 0; | int money = 0; | ||||
| for (TenantEntity te:tenantEntitys) { | for (TenantEntity te:tenantEntitys) { | ||||
| @@ -3249,7 +3249,9 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| @Override | @Override | ||||
| public long findCount(WxRentContract wxRentContract) { | public long findCount(WxRentContract wxRentContract) { | ||||
| TenantEntity tenantEntity = wxRentContract.getTenantInfo(); | |||||
| TenantEntity tenantEntity = new TenantEntity(); | |||||
| tenantEntity.setTenantId(wxRentContract.getTenantId()); | |||||
| tenantEntity.setParentTenantId(wxRentContract.getParentTenantId()); | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | ||||
| long count = 0l; | long count = 0l; | ||||
| for (TenantEntity te:tenantEntitys) { | for (TenantEntity te:tenantEntitys) { | ||||
| @@ -169,7 +169,9 @@ public class WxShopServiceImpl implements WxShopService { | |||||
| @Override | @Override | ||||
| public long findCount(WxShop wxShop) { | public long findCount(WxShop wxShop) { | ||||
| TenantEntity tenantEntity = wxShop.getTenantInfo(); | |||||
| TenantEntity tenantEntity = new TenantEntity(); | |||||
| tenantEntity.setTenantId(wxShop.getTenantId()); | |||||
| tenantEntity.setParentTenantId(wxShop.getParentTenantId()); | |||||
| long count = 0l; | long count = 0l; | ||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | ||||
| for (TenantEntity te:tenantEntitys) { | for (TenantEntity te:tenantEntitys) { | ||||