Commit 5adedd13 by 阳浪

4.24bug优化

parent 89d7c150
......@@ -133,6 +133,10 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr
public Integer getNum(String typeStr,Long businessId){
String key = "event_track_type";
Integer type = 0;
RequestContext context = ContextHolder.get();
if(typeStr.indexOf("event_favorite_")>=0){
return this.baseMapper.getFavoriteNum(businessId,context.getSiteId());
}
List<Dictionary> dictionaryList = dictionaryFeignClients.listChildDictionary(key,false,1);
if(CollUtil.isNotEmpty(dictionaryList)){
Optional<Dictionary> optional = dictionaryList.stream().filter(d-> Objects.equals(d.getCode(),typeStr)).findFirst();
......@@ -145,7 +149,6 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr
return 0;
}
RequestContext context = ContextHolder.get();
return this.baseMapper.getNum(type,businessId,context.getSiteId());
}
......
......@@ -1051,7 +1051,7 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
info.setAdmireNum(eventTrackService.getNum("event_admire_"+info.getTypeOne(),info.getId()));
info.setFavoriteNum(eventTrackService.getNum("event_favorite_"+info.getTypeOne(),info.getId()));
info.setRelayNum(eventTrackService.getNum("event_relay_"+info.getTypeOne(),info.getId()));
info.setReadNum(eventTrackService.getNum(String.valueOf(info.getTypeOne()),info.getId()));
info.setReadNum(informationReadNumberService.getInformationReadCount(info.getId()));
}
}
page.setRecords(list);
......
......@@ -167,6 +167,11 @@
FROM cloud_system.authz_user_group aug
where aug.site_id = #{siteId}
</select>
<select id="getFavoriteNum" resultType="java.lang.Integer">
SELECT count(1) FROM cloud_case_library.favorite
WHERE biz_id = #{businessId} and site_id = #{siteId} and state = 1
</select>
<select id="getExamTotal" resultType="java.lang.Integer">
SELECT COUNT(DISTINCT create_by_id) FROM cloud_portal.event_track
WHERE sub_type =#{subType} and DATE_FORMAT(create_time,'%Y') = #{year}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment