springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComSanshuoExpertDao.java
@@ -3,6 +3,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.panzhihua.common.model.dtos.community.sanshuo.ComSanshuoExpertDTO; import com.panzhihua.common.model.dtos.community.sanshuo.IndexDateDTO; import com.panzhihua.common.model.vos.sanshuo.ComSanshuoExpertVO; import com.panzhihua.common.model.vos.sanshuo.ExpertShowVO; import com.panzhihua.service_community.entity.ComSanshuoExpert; @@ -61,6 +62,11 @@ * 是否重名,重复手机号,重复账号 * */ List<ComSanshuoExpert> selectExpertByNameOrPhoneOrAccount(@Param("dto") ComSanshuoExpertDTO comSanshuoExpertDTO); /** * 获取当前级别的专家数量 * */ Integer selectExpertCount(@Param("dto") IndexDateDTO indexDataDTO); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java
@@ -28,6 +28,7 @@ import com.panzhihua.service_community.api.ComSanShuoEventTransferRecordController; import com.panzhihua.service_community.dao.ComActDAO; import com.panzhihua.service_community.dao.ComEventMapper; import com.panzhihua.service_community.dao.ComSanshuoExpertDao; import com.panzhihua.service_community.dao.ComStreetDAO; import com.panzhihua.service_community.entity.*; import com.panzhihua.service_community.model.dos.ComActDO; @@ -37,6 +38,7 @@ import org.apache.commons.lang3.RandomUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.RequestParam; import javax.annotation.Resource; import java.util.*; @@ -81,6 +83,9 @@ @Resource private CommediateTypeService commediateTypeService; @Resource private ComSanshuoExpertDao comSanshuoExpertDao; @Override @@ -962,6 +967,8 @@ vo.setSuccessRate(NumberUtil.div(vo.getSuccess(),vo.getAccepted(),2)); } } vo.setExpert(comSanshuoExpertDao.selectExpertCount(indexDataDTO)); //查询当前级别下的专家 //折线图X轴 List<Date> dates = pastTwelveMoth(); vo.setX(getYAndM(dates)); springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEventMapper.xml
@@ -366,29 +366,6 @@ <if test="dto.type == 1"> AND current_process_type=4 </if>) as fail, (select count(id) from com_sanshuo_expert where `status`=1 and del_flag=1 AND user_event_status not in(3,4) <if test="dto.type == 2"> AND current_process_type=1 <if test="dto.id != null"> AND center_id=#{dto.id} </if> </if> <if test="dto.type == 3"> AND current_process_type=3 <if test="dto.id != null"> AND request_user_community in (select com_act.community_id from com_act where street_id=#{dto.id}) </if> </if> <if test="dto.type == 4"> AND current_process_type in(2,5) <if test="dto.id != null"> AND request_user_community=#{dto.id} </if> </if> <if test="dto.type == 1"> AND current_process_type=4 </if>) as expert, (select count(id) from com_sanshuo_event_info WHERE create_at BETWEEN DATE_FORMAT(#{beginDate}, '%Y-%m-%d 00:00:00') AND DATE_FORMAT(#{endDate}, '%Y-%m-%d 23:59:59') AND event_process_status not in (8) springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSanshuoExpertDao.xml
@@ -98,4 +98,31 @@ select * from com_sanshuo_expert where name=#{dto.name} or phone=#{dto.phone} or account=#{dto.account} and status=1 and del_flag=1 </select> <select id="selectExpertCount" resultType="Integer"> select count(id) from com_sanshuo_expert where del_flag=1 and status=1 <if test="dto.type != null"> <if test="dto.type == 2"> AND level=2 <if test="dto.id != null"> AND center_id=#{dto.id} </if> </if> <if test="dto.type == 3"> AND level=3 <if test="dto.id != null"> AND community_id in (select com_act.community_id from com_act where street_id=#{dto.id}) </if> </if> <if test="dto.type == 4"> AND level=4 <if test="dto.id != null"> AND community_id=#{dto.id} </if> </if> <!--<if test="dto.type == 1">--> <!--AND current_process_type=4--> <!--</if>--> </if> </select> </mapper>