From 5f349fe34e3e33625f8593ec1b616f0c4528a12c Mon Sep 17 00:00:00 2001 From: 罗元桥 <2376770955@qq.com> Date: 星期一, 27 九月 2021 10:33:45 +0800 Subject: [PATCH] Merge branch 'test' into 'test_bak' --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java index f9576b7..4a04e93 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java @@ -8,10 +8,10 @@ import java.util.ArrayList; import java.util.Date; import java.util.List; +import java.util.stream.Collectors; import javax.annotation.Resource; -import com.panzhihua.common.model.vos.community.convenient.ExportMerchantVO; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -39,6 +39,7 @@ import com.panzhihua.common.model.vos.community.convenient.ConvenientProductSpecificationVO; import com.panzhihua.common.model.vos.community.convenient.ConvenientProductVO; import com.panzhihua.common.model.vos.community.convenient.ConvenientViewStatisticsVO; +import com.panzhihua.common.model.vos.community.convenient.ExportMerchantVO; import com.panzhihua.common.service.user.UserService; import com.panzhihua.service_community.dao.ComActDAO; import com.panzhihua.service_community.dao.ConvenientConsultationStatisticsDAO; @@ -141,6 +142,7 @@ }); } BeanUtils.copyProperties(convenientMerchantDTO, convenientMerchantDO); + convenientMerchantDO.setIntroduction(convenientMerchantDTO.getIntroduction()); this.baseMapper.updateById(convenientMerchantDO); return R.ok(); } @@ -182,6 +184,10 @@ @Override public R disableOrEnableMerchant(DisableOrEnableConvenientMerchantDTO disableOrEnableConvenientMerchantDTO) { + List<ConvenientMerchantDO> convenientMerchantDOList = this.baseMapper.selectList(new QueryWrapper<ConvenientMerchantDO>() + .lambda().in(ConvenientMerchantDO::getId, disableOrEnableConvenientMerchantDTO.getIds())); + List<Long> userIds = convenientMerchantDOList.stream().map(ConvenientMerchantDO::getUserId).collect(Collectors.toList()); + disableOrEnableConvenientMerchantDTO.setUserIds(userIds); R result = userService.disableOrEnableMerchantUsers(disableOrEnableConvenientMerchantDTO); if (R.isOk(result)) { return R.ok(); @@ -239,10 +245,16 @@ SimpleDateFormat dayFormat = new SimpleDateFormat("yyyy-MM-dd"); String moth = mothFormat.format(nowDate); String day = dayFormat.format(nowDate); + int consultationCount = convenientConsultationStatisticsDAO.selectCount(new QueryWrapper<ConvenientConsultationStatisticsDO>() + .lambda().eq(ConvenientConsultationStatisticsDO::getMerchantId, merchantId)); int monthConsultationVolume = convenientConsultationStatisticsDAO.selectMonthConsultationVolume(merchantId, moth); int dayConsultationVolume = convenientConsultationStatisticsDAO.selectDayConsultationVolume(merchantId, day); + Integer viewCount = convenientViewStatisticsDAO.selectCount(new QueryWrapper<ConvenientViewStatisticsDO>() + .lambda().eq(ConvenientViewStatisticsDO::getMerchantId, merchantId)); int monthViewNum = convenientViewStatisticsDAO.selectMonthViewNum(merchantId, moth); int dayViewNum = convenientViewStatisticsDAO.selectDayViewNum(merchantId, day); + convenientMerchantVO.setConsultationVolume(consultationCount); + convenientMerchantVO.setViewNum(viewCount); convenientMerchantVO.setMonthConsultationVolume(monthConsultationVolume); convenientMerchantVO.setDayConsultationVolume(dayConsultationVolume); convenientMerchantVO.setMonthViewNum(monthViewNum); -- Gitblit v1.7.1