|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
<!DOCTYPE mapper
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="com.ruoyi.screen.mapper.ZongzhiScreenOpinionMapper">
|
|
|
|
|
|
|
|
|
|
|
|
<select id="getSentimentType" resultType="com.ruoyi.screen.domain.response.ZongzhiSentimentTypeResponse">
|
|
|
|
select count(*) as count ,sentiment_type as type
|
|
|
|
from tc_network_sentiment
|
|
|
|
where sentiment_type in ("1", "2")
|
|
|
|
GROUP BY sentiment_type
|
|
|
|
</select>
|
|
|
|
<select id="getSentimenCount" resultType="com.ruoyi.screen.domain.response.ZongzhiSentimentCountResponse">
|
|
|
|
select count(*) as count ,sentiment_type as type
|
|
|
|
from tc_network_sentiment
|
|
|
|
where sentiment_type !='2'
|
|
|
|
GROUP BY sentiment_type
|
|
|
|
</select>
|
|
|
|
<select id="getSentimenClassificationBymediaType"
|
|
|
|
resultType="com.ruoyi.screen.domain.response.ZongzhiSentimenClassificationResponse">
|
|
|
|
select media_type as type, ROUND(COUNT(*) * 100.0 / SUM(COUNT(*)) OVER (), 1) AS pt
|
|
|
|
from tc_network_sentiment
|
|
|
|
GROUP BY media_type
|
|
|
|
</select>
|
|
|
|
<select id="getSentimenClassificationByeventType"
|
|
|
|
resultType="com.ruoyi.screen.domain.response.ZongzhiSentimenClassificationResponse">
|
|
|
|
select event_type as type, ROUND(COUNT(*) * 100.0 / SUM(COUNT(*)) OVER (), 1) AS pt
|
|
|
|
from tc_network_sentiment
|
|
|
|
GROUP BY event_type
|
|
|
|
</select>
|
|
|
|
<select id="getWordCloud" resultType="com.ruoyi.screen.domain.response.ZongzhiSentimenWordCloudResponse">
|
|
|
|
select yuci_type AS type
|
|
|
|
from tc_network_sentiment
|
|
|
|
GROUP BY yuci_type
|
|
|
|
</select>
|
|
|
|
</mapper>
|