| @@ -306,12 +306,14 @@ public class TtCUserServiceAdapter extends BasicCUserService implements CUserSer | |||||
| @Override | @Override | ||||
| public long findCount(WxCUserBasicInfoDto dto) { | public long findCount(WxCUserBasicInfoDto dto) { | ||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(dto); | |||||
| TenantEntity tenantEntity = dto; | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | |||||
| long count = 0l; | long count = 0l; | ||||
| for (TenantEntity tenantEntity:tenantEntitys) { | |||||
| dto.updateTenantInfo(tenantEntity); | |||||
| for (TenantEntity te:tenantEntitys) { | |||||
| dto.updateTenantInfo(te); | |||||
| count += ttCUserMapper.findCount(dto); | count += ttCUserMapper.findCount(dto); | ||||
| } | } | ||||
| dto.updateTenantInfo(tenantEntity); | |||||
| return count; | return count; | ||||
| } | } | ||||
| @@ -315,12 +315,14 @@ public class WxCUserServiceAdapter extends BasicCUserService implements CUserSer | |||||
| @Override | @Override | ||||
| public long findCount(WxCUserBasicInfoDto dto) { | public long findCount(WxCUserBasicInfoDto dto) { | ||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(dto); | |||||
| TenantEntity tenantEntity = dto; | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | |||||
| long count = 0l; | long count = 0l; | ||||
| for (TenantEntity tenantEntity:tenantEntitys) { | |||||
| dto.updateTenantInfo(tenantEntity); | |||||
| for (TenantEntity te:tenantEntitys) { | |||||
| dto.updateTenantInfo(te); | |||||
| count += wxCUserMapper.findCount(dto); | count += wxCUserMapper.findCount(dto); | ||||
| } | } | ||||
| dto.updateTenantInfo(tenantEntity); | |||||
| return count; | return count; | ||||
| } | } | ||||
| @@ -92,12 +92,14 @@ public class WxCUserCarServiceImpl implements WxCUserCarService { | |||||
| @Override | @Override | ||||
| public Integer countUser(WxCUserBasicInfoDto dto) { | public Integer countUser(WxCUserBasicInfoDto dto) { | ||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(dto); | |||||
| TenantEntity tenantEntity = dto; | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | |||||
| int count = 0; | int count = 0; | ||||
| for (TenantEntity tenantEntity:tenantEntitys) { | |||||
| dto.updateTenantInfo(tenantEntity); | |||||
| for (TenantEntity te:tenantEntitys) { | |||||
| dto.updateTenantInfo(te); | |||||
| count += wxCUserCarMapper.countUser(dto); | count += wxCUserCarMapper.countUser(dto); | ||||
| } | } | ||||
| dto.updateTenantInfo(tenantEntity); | |||||
| return count; | return count; | ||||
| } | } | ||||
| @@ -162,16 +164,18 @@ public class WxCUserCarServiceImpl implements WxCUserCarService { | |||||
| String tenantId = params.get("tenantId").toString(); | String tenantId = params.get("tenantId").toString(); | ||||
| String parentTenantId = params.get("parentTenantId") == null?null:params.get("parentTenantId").toString(); | String parentTenantId = params.get("parentTenantId") == null?null:params.get("parentTenantId").toString(); | ||||
| TenantEntity te = new TenantEntity(); | |||||
| te.setTenantId(tenantId); | |||||
| te.setParentTenantId(parentTenantId); | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(te); | |||||
| TenantEntity tenantEntity = new TenantEntity(); | |||||
| tenantEntity.setTenantId(tenantId); | |||||
| tenantEntity.setParentTenantId(parentTenantId); | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | |||||
| long count = 0l; | long count = 0l; | ||||
| for (TenantEntity tenantEntity:tenantEntitys) { | |||||
| params.put("tenantId", tenantEntity.getTenantId()); | |||||
| params.put("parentTenantId", tenantEntity.getParentTenantId()); | |||||
| for (TenantEntity te:tenantEntitys) { | |||||
| params.put("tenantId", te.getTenantId()); | |||||
| params.put("parentTenantId", te.getParentTenantId()); | |||||
| count += wxCUserCarMapper.queryCarCount(params); | count += wxCUserCarMapper.queryCarCount(params); | ||||
| } | } | ||||
| params.put("tenantId", tenantEntity.getTenantId()); | |||||
| params.put("parentTenantId", tenantEntity.getParentTenantId()); | |||||
| return count; | return count; | ||||
| } | } | ||||
| @@ -244,12 +244,14 @@ public class WxCUserServiceImpl implements WxCUserService { | |||||
| @Override | @Override | ||||
| public long countByChannel(WxCUser user) { | public long countByChannel(WxCUser user) { | ||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(user); | |||||
| TenantEntity tenantEntity = user; | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | |||||
| long count = 0l; | long count = 0l; | ||||
| for (TenantEntity te:tenantEntitys) { | for (TenantEntity te:tenantEntitys) { | ||||
| user.updateTenantInfo(te); | user.updateTenantInfo(te); | ||||
| count += wxCUserMapper.countByChannel(user); | count += wxCUserMapper.countByChannel(user); | ||||
| } | } | ||||
| user.updateTenantInfo(tenantEntity); | |||||
| return count; | return count; | ||||
| } | } | ||||
| @@ -81,11 +81,11 @@ public class WxCarCmdLogServiceImpl implements WxCarCmdLogService { | |||||
| @Override | @Override | ||||
| public Map<String, Long> getHourCountMap(WxCarCmdLog wxCarCmdLog) { | public Map<String, Long> getHourCountMap(WxCarCmdLog wxCarCmdLog) { | ||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(wxCarCmdLog); | |||||
| TenantEntity tenantEntity = wxCarCmdLog; | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | |||||
| Map<String, Long> map = new HashMap<>(); | Map<String, Long> map = new HashMap<>(); | ||||
| for (TenantEntity tenantEntity:tenantEntitys) { | |||||
| wxCarCmdLog.updateTenantInfo(tenantEntity); | |||||
| for (TenantEntity te:tenantEntitys) { | |||||
| wxCarCmdLog.updateTenantInfo(te); | |||||
| List<Map<String, Object>> list = wxCarCmdLogMapper.queryTodayCar(wxCarCmdLog); | List<Map<String, Object>> list = wxCarCmdLogMapper.queryTodayCar(wxCarCmdLog); | ||||
| Map<String, Long> collect = list.stream().collect(Collectors.toMap(m -> { | Map<String, Long> collect = list.stream().collect(Collectors.toMap(m -> { | ||||
| return (String)m.get("create_time"); | return (String)m.get("create_time"); | ||||
| @@ -94,6 +94,7 @@ public class WxCarCmdLogServiceImpl implements WxCarCmdLogService { | |||||
| })); | })); | ||||
| collect.forEach((key,value) -> map.merge(key,value,Long::sum)); | collect.forEach((key,value) -> map.merge(key,value,Long::sum)); | ||||
| } | } | ||||
| wxCarCmdLog.updateTenantInfo(tenantEntity); | |||||
| return map; | return map; | ||||
| } | } | ||||
| @@ -101,16 +102,18 @@ public class WxCarCmdLogServiceImpl implements WxCarCmdLogService { | |||||
| public long queryHistoryCount(HashMap<String, Object> params) { | public long queryHistoryCount(HashMap<String, Object> params) { | ||||
| String tenantId = params.get("tenantId").toString(); | String tenantId = params.get("tenantId").toString(); | ||||
| String parentTenantId = params.get("parentTenantId") == null?null:params.get("parentTenantId").toString(); | String parentTenantId = params.get("parentTenantId") == null?null:params.get("parentTenantId").toString(); | ||||
| TenantEntity te = new TenantEntity(); | |||||
| te.setTenantId(tenantId); | |||||
| te.setParentTenantId(parentTenantId); | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(te); | |||||
| TenantEntity tenantEntity = new TenantEntity(); | |||||
| tenantEntity.setTenantId(tenantId); | |||||
| tenantEntity.setParentTenantId(parentTenantId); | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | |||||
| long count = 0l; | long count = 0l; | ||||
| for (TenantEntity tenantEntity:tenantEntitys) { | |||||
| params.put("tenantId", tenantEntity.getTenantId()); | |||||
| params.put("parentTenantId", tenantEntity.getParentTenantId()); | |||||
| for (TenantEntity te:tenantEntitys) { | |||||
| params.put("tenantId", te.getTenantId()); | |||||
| params.put("parentTenantId", te.getParentTenantId()); | |||||
| count += wxCarCmdLogMapper.queryHistoryCount(params); | count += wxCarCmdLogMapper.queryHistoryCount(params); | ||||
| } | } | ||||
| params.put("tenantId", tenantEntity.getTenantId()); | |||||
| params.put("parentTenantId", tenantEntity.getParentTenantId()); | |||||
| return count; | return count; | ||||
| } | } | ||||
| @@ -118,17 +121,19 @@ public class WxCarCmdLogServiceImpl implements WxCarCmdLogService { | |||||
| public BigDecimal queryCarPay(HashMap<String, Object> params) { | public BigDecimal queryCarPay(HashMap<String, Object> params) { | ||||
| String tenantId = params.get("tenantId").toString(); | String tenantId = params.get("tenantId").toString(); | ||||
| String parentTenantId = params.get("parentTenantId") == null?null:params.get("parentTenantId").toString(); | String parentTenantId = params.get("parentTenantId") == null?null:params.get("parentTenantId").toString(); | ||||
| TenantEntity te = new TenantEntity(); | |||||
| te.setTenantId(tenantId); | |||||
| te.setParentTenantId(parentTenantId); | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(te); | |||||
| TenantEntity tenantEntity = new TenantEntity(); | |||||
| tenantEntity.setTenantId(tenantId); | |||||
| tenantEntity.setParentTenantId(parentTenantId); | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | |||||
| BigDecimal carPay = new BigDecimal(0); | BigDecimal carPay = new BigDecimal(0); | ||||
| for (TenantEntity tenantEntity:tenantEntitys) { | |||||
| params.put("tenantId", tenantEntity.getTenantId()); | |||||
| params.put("parentTenantId", tenantEntity.getParentTenantId()); | |||||
| for (TenantEntity te:tenantEntitys) { | |||||
| params.put("tenantId", te.getTenantId()); | |||||
| params.put("parentTenantId", te.getParentTenantId()); | |||||
| BigDecimal bigDecimal = wxCarCmdLogMapper.queryCarPay(params); | BigDecimal bigDecimal = wxCarCmdLogMapper.queryCarPay(params); | ||||
| carPay.add(bigDecimal); | carPay.add(bigDecimal); | ||||
| } | } | ||||
| params.put("tenantId", tenantEntity.getTenantId()); | |||||
| params.put("parentTenantId", tenantEntity.getParentTenantId()); | |||||
| return carPay; | return carPay; | ||||
| } | } | ||||
| @@ -302,12 +302,14 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { | |||||
| @Override | @Override | ||||
| public int countCoupon(WxCouponChannel wxCouponChannel) { | public int countCoupon(WxCouponChannel wxCouponChannel) { | ||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(wxCouponChannel); | |||||
| TenantEntity tenantEntity = wxCouponChannel; | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | |||||
| int count = 0; | int count = 0; | ||||
| for (TenantEntity tenantEntity:tenantEntitys) { | |||||
| wxCouponChannel.updateTenantInfo(tenantEntity); | |||||
| for (TenantEntity te:tenantEntitys) { | |||||
| wxCouponChannel.updateTenantInfo(te); | |||||
| count += wxCouponChannelMapper.countCoupon(wxCouponChannel); | count += wxCouponChannelMapper.countCoupon(wxCouponChannel); | ||||
| } | } | ||||
| wxCouponChannel.updateTenantInfo(tenantEntity); | |||||
| return count; | return count; | ||||
| } | } | ||||
| @@ -2159,12 +2159,14 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| @Override | @Override | ||||
| public int queryPriceTotal(WxCouponOrder wxCouponOrder) { | public int queryPriceTotal(WxCouponOrder wxCouponOrder) { | ||||
| int price = 0; | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(wxCouponOrder); | |||||
| for (TenantEntity tenantEntity:tenantEntitys) { | |||||
| wxCouponOrder.updateTenantInfo(tenantEntity); | |||||
| TenantEntity tenantEntity = wxCouponOrder; | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | |||||
| int price = 0; | |||||
| for (TenantEntity te:tenantEntitys) { | |||||
| wxCouponOrder.updateTenantInfo(te); | |||||
| price += wxCouponOrderMapper.queryPriceTotal(wxCouponOrder); | price += wxCouponOrderMapper.queryPriceTotal(wxCouponOrder); | ||||
| } | } | ||||
| wxCouponOrder.updateTenantInfo(tenantEntity); | |||||
| return price; | return price; | ||||
| } | } | ||||
| @@ -2748,12 +2750,14 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| } | } | ||||
| public int findCount(WxCouponOrder wxCouponOrder){ | public int findCount(WxCouponOrder wxCouponOrder){ | ||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(wxCouponOrder); | |||||
| TenantEntity tenantEntity = wxCouponOrder; | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | |||||
| int count = 0; | int count = 0; | ||||
| for (TenantEntity tenantEntity:tenantEntitys) { | |||||
| wxCouponOrder.updateTenantInfo(tenantEntity); | |||||
| for (TenantEntity te:tenantEntitys) { | |||||
| wxCouponOrder.updateTenantInfo(te); | |||||
| count += wxCouponOrderMapper.findCount(wxCouponOrder); | count += wxCouponOrderMapper.findCount(wxCouponOrder); | ||||
| } | } | ||||
| wxCouponOrder.updateTenantInfo(tenantEntity); | |||||
| return count; | return count; | ||||
| } | } | ||||
| @@ -206,13 +206,15 @@ public class WxMerchantTradeDailyServiceImpl implements WxMerchantTradeDailyServ | |||||
| @Override | @Override | ||||
| public Integer findSumMoney(WxMerchantTradeDaily merchantTradeDaily) { | public Integer findSumMoney(WxMerchantTradeDaily merchantTradeDaily) { | ||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(merchantTradeDaily); | |||||
| TenantEntity tenantEntity = merchantTradeDaily; | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | |||||
| int money = 0; | int money = 0; | ||||
| for (TenantEntity tenantEntity:tenantEntitys) { | |||||
| merchantTradeDaily.updateTenantInfo(tenantEntity); | |||||
| for (TenantEntity te:tenantEntitys) { | |||||
| merchantTradeDaily.updateTenantInfo(te); | |||||
| String sumMoney = wxMerchantTradeDailyMapper.findSumMoney(merchantTradeDaily); | String sumMoney = wxMerchantTradeDailyMapper.findSumMoney(merchantTradeDaily); | ||||
| money += Integer.parseInt(sumMoney); | money += Integer.parseInt(sumMoney); | ||||
| } | } | ||||
| merchantTradeDaily.updateTenantInfo(tenantEntity); | |||||
| return money; | return money; | ||||
| } | } | ||||
| @@ -3249,12 +3249,14 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| @Override | @Override | ||||
| public long findCount(WxRentContract wxRentContract) { | public long findCount(WxRentContract wxRentContract) { | ||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(wxRentContract); | |||||
| TenantEntity tenantEntity = wxRentContract; | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | |||||
| long count = 0l; | long count = 0l; | ||||
| for (TenantEntity tenantEntity:tenantEntitys) { | |||||
| wxRentContract.updateTenantInfo(tenantEntity); | |||||
| for (TenantEntity te:tenantEntitys) { | |||||
| wxRentContract.updateTenantInfo(te); | |||||
| count += wxRentContractMapper.findCount(wxRentContract); | count += wxRentContractMapper.findCount(wxRentContract); | ||||
| } | } | ||||
| wxRentContract.updateTenantInfo(tenantEntity); | |||||
| return count; | return count; | ||||
| } | } | ||||
| @@ -169,12 +169,14 @@ public class WxShopServiceImpl implements WxShopService { | |||||
| @Override | @Override | ||||
| public long findCount(WxShop wxShop) { | public long findCount(WxShop wxShop) { | ||||
| TenantEntity tenantEntity = wxShop; | |||||
| long count = 0l; | long count = 0l; | ||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(wxShop); | |||||
| for (TenantEntity tenantEntity:tenantEntitys) { | |||||
| wxShop.updateTenantInfo(tenantEntity); | |||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | |||||
| for (TenantEntity te:tenantEntitys) { | |||||
| wxShop.updateTenantInfo(te); | |||||
| count += wxShopMapper.findCount(wxShop); | count += wxShopMapper.findCount(wxShop); | ||||
| } | } | ||||
| wxShop.updateTenantInfo(tenantEntity); | |||||
| return count; | return count; | ||||
| } | } | ||||