| @@ -470,7 +470,6 @@ public class WxCouponController extends BaseController { | |||||
| public ResultData findPressCountList(@ModelAttribute WxCoupon wxCoupon, Integer pageNum, Integer pageSize) { | public ResultData findPressCountList(@ModelAttribute WxCoupon wxCoupon, Integer pageNum, Integer pageSize) { | ||||
| TenantEntity tenantEntity = getTenantInfo(); | TenantEntity tenantEntity = getTenantInfo(); | ||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | ||||
| Map<String,Object> result = new HashedMap(); | |||||
| wxCoupon.updateTenantInfo(tenantEntity); | wxCoupon.updateTenantInfo(tenantEntity); | ||||
| wxCoupon.setSourceType(EnumCouponSourceType.COUPONSource_Admin.getCode()); | wxCoupon.setSourceType(EnumCouponSourceType.COUPONSource_Admin.getCode()); | ||||
| PageInfo<WxCouponStatisVo> pages = wxCouponService.findPressData(wxCoupon,tenantEntitys,pageNum,pageSize); | PageInfo<WxCouponStatisVo> pages = wxCouponService.findPressData(wxCoupon,tenantEntitys,pageNum,pageSize); | ||||
| @@ -389,7 +389,6 @@ public class WxCouponController extends BaseController { | |||||
| TenantEntity tenantEntity = getTenantInfo(); | TenantEntity tenantEntity = getTenantInfo(); | ||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | ||||
| Map<String, Object> result = new HashedMap(); | |||||
| if (wxCoupon.getStartdate() == null) { | if (wxCoupon.getStartdate() == null) { | ||||
| wxCoupon.setStartdate(DateUtils.getFirstDayForCurrMonth()); | wxCoupon.setStartdate(DateUtils.getFirstDayForCurrMonth()); | ||||
| } | } | ||||
| @@ -419,7 +418,7 @@ public class WxCouponController extends BaseController { | |||||
| public ResultData findPressCountList(@ModelAttribute WxCoupon wxCoupon, Integer pageNum, Integer pageSize) { | public ResultData findPressCountList(@ModelAttribute WxCoupon wxCoupon, Integer pageNum, Integer pageSize) { | ||||
| TenantEntity tenantEntity = getTenantInfo(); | TenantEntity tenantEntity = getTenantInfo(); | ||||
| List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); | ||||
| Map<String,Object> result = new HashedMap(); | |||||
| wxCoupon.updateTenantInfo(tenantEntity); | wxCoupon.updateTenantInfo(tenantEntity); | ||||
| wxCoupon.setSourceType(EnumCouponSourceType.COUPONSource_Bapi.getCode()); | wxCoupon.setSourceType(EnumCouponSourceType.COUPONSource_Bapi.getCode()); | ||||
| PageInfo<WxCouponStatisVo> pages = wxCouponService.findPressData(wxCoupon,tenantEntitys,pageNum,pageSize); | PageInfo<WxCouponStatisVo> pages = wxCouponService.findPressData(wxCoupon,tenantEntitys,pageNum,pageSize); | ||||
| @@ -81,4 +81,17 @@ public class TenantEntity extends BaseEntity { | |||||
| public void setFinalTenantId(String finalTenantId) { | public void setFinalTenantId(String finalTenantId) { | ||||
| this.finalTenantId = finalTenantId; | this.finalTenantId = finalTenantId; | ||||
| } | } | ||||
| 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,7 @@ public class TtCUserServiceAdapter extends BasicCUserService implements CUserSer | |||||
| @Override | @Override | ||||
| public long findCount(WxCUserBasicInfoDto dto) { | public long findCount(WxCUserBasicInfoDto dto) { | ||||
| TenantEntity tenantEntity = dto; | |||||
| TenantEntity tenantEntity = dto.getTenantInfo(); | |||||
| 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,7 @@ public class WxCUserServiceAdapter extends BasicCUserService implements CUserSer | |||||
| @Override | @Override | ||||
| public long findCount(WxCUserBasicInfoDto dto) { | public long findCount(WxCUserBasicInfoDto dto) { | ||||
| TenantEntity tenantEntity = dto; | |||||
| TenantEntity tenantEntity = dto.getTenantInfo(); | |||||
| 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,7 @@ public class WxCUserCarServiceImpl implements WxCUserCarService { | |||||
| @Override | @Override | ||||
| public Integer countUser(WxCUserBasicInfoDto dto) { | public Integer countUser(WxCUserBasicInfoDto dto) { | ||||
| TenantEntity tenantEntity = dto; | |||||
| TenantEntity tenantEntity = dto.getTenantInfo(); | |||||
| 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,7 @@ public class WxCUserServiceImpl implements WxCUserService { | |||||
| @Override | @Override | ||||
| public long countByChannel(WxCUser user) { | public long countByChannel(WxCUser user) { | ||||
| TenantEntity tenantEntity = user; | |||||
| TenantEntity tenantEntity = user.getTenantInfo(); | |||||
| 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,7 @@ public class WxCarCmdLogServiceImpl implements WxCarCmdLogService { | |||||
| @Override | @Override | ||||
| public Map<String, Long> getHourCountMap(WxCarCmdLog wxCarCmdLog) { | public Map<String, Long> getHourCountMap(WxCarCmdLog wxCarCmdLog) { | ||||
| TenantEntity tenantEntity = wxCarCmdLog; | |||||
| TenantEntity tenantEntity = wxCarCmdLog.getTenantInfo(); | |||||
| 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,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { | |||||
| @Override | @Override | ||||
| public int countCoupon(WxCouponChannel wxCouponChannel) { | public int countCoupon(WxCouponChannel wxCouponChannel) { | ||||
| TenantEntity tenantEntity = wxCouponChannel; | |||||
| TenantEntity tenantEntity = wxCouponChannel.getTenantInfo(); | |||||
| 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,7 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| @Override | @Override | ||||
| public int queryPriceTotal(WxCouponOrder wxCouponOrder) { | public int queryPriceTotal(WxCouponOrder wxCouponOrder) { | ||||
| TenantEntity tenantEntity = wxCouponOrder; | |||||
| TenantEntity tenantEntity = wxCouponOrder.getTenantInfo(); | |||||
| 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 +2749,7 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| } | } | ||||
| public int findCount(WxCouponOrder wxCouponOrder){ | public int findCount(WxCouponOrder wxCouponOrder){ | ||||
| TenantEntity tenantEntity = wxCouponOrder; | |||||
| TenantEntity tenantEntity = wxCouponOrder.getTenantInfo(); | |||||
| 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,7 @@ public class WxMerchantTradeDailyServiceImpl implements WxMerchantTradeDailyServ | |||||
| @Override | @Override | ||||
| public Integer findSumMoney(WxMerchantTradeDaily merchantTradeDaily) { | public Integer findSumMoney(WxMerchantTradeDaily merchantTradeDaily) { | ||||
| TenantEntity tenantEntity = merchantTradeDaily; | |||||
| TenantEntity tenantEntity = merchantTradeDaily.getTenantInfo(); | |||||
| 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,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| @Override | @Override | ||||
| public long findCount(WxRentContract wxRentContract) { | public long findCount(WxRentContract wxRentContract) { | ||||
| TenantEntity tenantEntity = wxRentContract; | |||||
| TenantEntity tenantEntity = wxRentContract.getTenantInfo(); | |||||
| 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,15 +169,13 @@ public class WxShopServiceImpl implements WxShopService { | |||||
| @Override | @Override | ||||
| public long findCount(WxShop wxShop) { | public long findCount(WxShop wxShop) { | ||||
| TenantEntity tenantEntity = wxShop; | |||||
| logger.info("---------tenantId="+tenantEntity.getTenantId()+"-----parentTenantId="+tenantEntity.getParentTenantId()); | |||||
| TenantEntity tenantEntity = wxShop.getTenantInfo(); | |||||
| 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) { | ||||
| wxShop.updateTenantInfo(te); | wxShop.updateTenantInfo(te); | ||||
| count += wxShopMapper.findCount(wxShop); | count += wxShopMapper.findCount(wxShop); | ||||
| } | } | ||||
| logger.info("---------tenantId="+tenantEntity.getTenantId()+"-----parentTenantId="+tenantEntity.getParentTenantId()); | |||||
| wxShop.updateTenantInfo(tenantEntity); | wxShop.updateTenantInfo(tenantEntity); | ||||
| return count; | return count; | ||||
| } | } | ||||