dongdingding
董丁丁 2 years ago
parent 59a4b3e447
commit 3b6b355c62

@ -24,8 +24,6 @@ public class ZongzhiActionResponse {
private Date zhuanxiangTime; private Date zhuanxiangTime;
@ApiModelProperty(value = "百分比")
private double pt;
@ApiModelProperty(value = "处理类型 1.处理有害信息 2.关闭直播平台违规账号") @ApiModelProperty(value = "处理类型 1.处理有害信息 2.关闭直播平台违规账号")

@ -30,6 +30,7 @@ public interface ZongzhiScreenManageMapper {
/** /**
* *
*/ */
//
public List<ZongzhiActionResponse> getaction(); public List<ZongzhiActionResponse> getaction();

@ -1,6 +1,8 @@
package com.ruoyi.zongzhi.service.impl; package com.ruoyi.zongzhi.service.impl;
import java.util.List; import java.util.List;
import com.ruoyi.common.exception.ServiceException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.ruoyi.zongzhi.mapper.TcYqFlMapper; import com.ruoyi.zongzhi.mapper.TcYqFlMapper;
@ -52,6 +54,12 @@ public class TcYqFlServiceImpl implements ITcYqFlService
@Override @Override
public int insertTcYqFl(TcYqFl tcYqFl) public int insertTcYqFl(TcYqFl tcYqFl)
{ {
List<TcYqFl> list =tcYqFlMapper.selectTcYqFlList(tcYqFl);
if (list.contains(tcYqFl.getMediaType())){
throw new ServiceException("此媒体类型已存在");
}else if(list.contains(tcYqFl.getEventType())){
throw new ServiceException("此涉事类型已存在");
}
return tcYqFlMapper.insertTcYqFl(tcYqFl); return tcYqFlMapper.insertTcYqFl(tcYqFl);
} }

@ -17,10 +17,10 @@
</select> </select>
<select id="getaction" resultType="com.ruoyi.screen.domain.response.ZongzhiActionResponse"> <select id="getaction" resultType="com.ruoyi.screen.domain.response.ZongzhiActionResponse">
select count(*) as count, zhuanxiang_time as zhuanxiangTime ,ROUND(count(*) * 100.0/ sum(count(*)) OVER (), 1 ) select count(*) as count, month_year as zhuanxiangTime ,type
as pt,zhuanxiang_type as type from tc_qlzxxdsj WHERE NOW() >= DATE_SUB(DATE_SUB(month_year, INTERVAL 6 MONTH), INTERVAL 1 YEAR)
from tc_qinglang_zhuanxiang AND NOW() &lt;= DATE_SUB(month_year, INTERVAL 6 MONTH);
GROUP BY zhuanxiang_type, zhuanxiang_time GROUP BY type, month_year
</select> </select>
<select id="getReportByYear" resultType="com.ruoyi.screen.domain.response.ZongzhiReportByYearResponse"> <select id="getReportByYear" resultType="com.ruoyi.screen.domain.response.ZongzhiReportByYearResponse">

@ -10,20 +10,19 @@
from tc_network_article group by type from tc_network_article group by type
</select> </select>
<select id="getAppraiser" resultType="com.ruoyi.screen.domain.response.ZongzhiAppraiserResponse"> <select id="getAppraiser" resultType="com.ruoyi.screen.domain.response.ZongzhiAppraiserResponse">
select appraiser_type as type, ROUND(COUNT(*) * 100.0 / SUM(COUNT(*)) OVER (), 1) AS pt select name as type, sum(percent) AS pt
from tc_network_evaluate from tc_bjsj
WHERE MONTH (create_time) = MONTH (CURDATE())
GROUP BY type GROUP BY type
</select> </select>
<select id="getAppraiserComplete" <select id="getAppraiserComplete"
resultType="com.ruoyi.screen.domain.response.ZongzhiAppraiserCompleteResponse"> resultType="com.ruoyi.screen.domain.response.ZongzhiAppraiserCompleteResponse">
select ROUND(COUNT(*) * 100.0 / SUM(COUNT(*)) OVER (), 1) AS pt, b.name from( select SUM(s.finish) b.name from(
SELECT SELECT
CASE CASE
WHEN LOCATE(',', area_id) = 0 THEN TRIM(TRAILING ']' FROM SUBSTR(area_id, LOCATE('[', area_id) + 1)) WHEN LOCATE(',', area_id) = 0 THEN TRIM(TRAILING ']' FROM SUBSTR(area_id, LOCATE('[', area_id) + 1))
ELSE TRIM(TRAILING ']' FROM SUBSTRING_INDEX(area_id, ',', -1)) ELSE TRIM(TRAILING ']' FROM SUBSTRING_INDEX(area_id, ',', -1))
END AS area_id END AS area_id,finsh
FROM tc_network_evaluate)s left join tc_town b on s.area_id = b.id FROM tc_wpyrwwcl)s left join tc_town b on s.area_id = b.id
GROUP BY s.area_id GROUP BY s.area_id
</select> </select>

@ -6,11 +6,9 @@
<select id="getSentimentType" resultType="com.ruoyi.screen.domain.response.ZongzhiSentimentTypeResponse"> <select id="getSentimentType" resultType="com.ruoyi.screen.domain.response.ZongzhiSentimentTypeResponse">
select count(*) as count ,sentiment_type as type,publish_time as publishTime select count(*) as count , type,date_time as publishTime
from tc_yq_zs
from tc_network_sentiment GROUP BY type,publish_time
where sentiment_type in ("1", "2")
GROUP BY sentiment_type,publish_time
</select> </select>
<select id="getSentimenCount" resultType="com.ruoyi.screen.domain.response.ZongzhiSentimentCountResponse"> <select id="getSentimenCount" resultType="com.ruoyi.screen.domain.response.ZongzhiSentimentCountResponse">
select count(*) as count ,sentiment_type as type,ROUND(COUNT(*) * 100.0 / SUM(COUNT(*)) OVER (), 1) AS pt select count(*) as count ,sentiment_type as type,ROUND(COUNT(*) * 100.0 / SUM(COUNT(*)) OVER (), 1) AS pt
@ -20,14 +18,14 @@
</select> </select>
<select id="getSentimenClassificationBymediaType" <select id="getSentimenClassificationBymediaType"
resultType="com.ruoyi.screen.domain.response.ZongzhiSentimenClassificationResponse"> resultType="com.ruoyi.screen.domain.response.ZongzhiSentimenClassificationResponse">
select media_type as type, ROUND(COUNT(*) * 100.0 / SUM(COUNT(*)) OVER (), 1) AS pt select media_type as type,sum(media_count)as pt
from tc_network_sentiment from tc_yq_fl
GROUP BY media_type GROUP BY media_type
</select> </select>
<select id="getSentimenClassificationByeventType" <select id="getSentimenClassificationByeventType"
resultType="com.ruoyi.screen.domain.response.ZongzhiSentimenClassificationResponse"> resultType="com.ruoyi.screen.domain.response.ZongzhiSentimenClassificationResponse">
select event_type as type, ROUND(COUNT(*) * 100.0 / SUM(COUNT(*)) OVER (), 1) AS pt select event_type as type, sum(event_count)as pt
from tc_network_sentiment from tc_yq_fl
GROUP BY event_type GROUP BY event_type
</select> </select>
<select id="getWordCloud" resultType="com.ruoyi.screen.domain.response.ZongzhiSentimenWordCloudResponse"> <select id="getWordCloud" resultType="com.ruoyi.screen.domain.response.ZongzhiSentimenWordCloudResponse">

Loading…
Cancel
Save