You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.4 KiB
31 lines
1.4 KiB
2 years ago
|
<?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>
|
||
|
</mapper>
|