|
@@ -6,22 +6,17 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.dliyun.oap.framework.annotation.ServiceMethod;
|
|
import com.dliyun.oap.framework.annotation.ServiceMethod;
|
|
|
import com.dliyun.oap.framework.annotation.ServiceMethodBean;
|
|
import com.dliyun.oap.framework.annotation.ServiceMethodBean;
|
|
|
import com.dliyun.oap.framework.response.OapResponse;
|
|
import com.dliyun.oap.framework.response.OapResponse;
|
|
|
-import com.zhiqiyun.open.annotation.Permission;
|
|
|
|
|
import com.zhiqiyun.open.core.models.statistics.PopularFeelings;
|
|
import com.zhiqiyun.open.core.models.statistics.PopularFeelings;
|
|
|
import com.zhiqiyun.open.core.models.statistics.PopularFeelingsPage;
|
|
import com.zhiqiyun.open.core.models.statistics.PopularFeelingsPage;
|
|
|
import com.zhiqiyun.open.core.service.PopularFeelingsPageService;
|
|
import com.zhiqiyun.open.core.service.PopularFeelingsPageService;
|
|
|
import com.zhiqiyun.open.core.service.PopularFeelingsService;
|
|
import com.zhiqiyun.open.core.service.PopularFeelingsService;
|
|
|
import com.zhiqiyun.open.core.service.SequenceService;
|
|
import com.zhiqiyun.open.core.service.SequenceService;
|
|
|
-import com.zhiqiyun.open.mvc.Result;
|
|
|
|
|
-import com.zhiqiyun.open.mvc.params.statistics.QueryPopularFeelingsPageParam;
|
|
|
|
|
import com.zhiqiyun.open.router.request.statistics.*;
|
|
import com.zhiqiyun.open.router.request.statistics.*;
|
|
|
import com.zhiqiyun.open.utils.DateUtil;
|
|
import com.zhiqiyun.open.utils.DateUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
@@ -39,7 +34,7 @@ public class PopularFeelingsApi {
|
|
|
private SequenceService sequenceService;
|
|
private SequenceService sequenceService;
|
|
|
|
|
|
|
|
@ServiceMethod(method = "popular.feelings.findPage", title = "互联网舆情监控查询")
|
|
@ServiceMethod(method = "popular.feelings.findPage", title = "互联网舆情监控查询")
|
|
|
- public OapResponse findPage(QueryPopularFeelingsRequest request) {
|
|
|
|
|
|
|
+ public OapResponse findPage(QueryRequest request) {
|
|
|
|
|
|
|
|
QueryWrapper<PopularFeelings> wrapper = new QueryWrapper<>();
|
|
QueryWrapper<PopularFeelings> wrapper = new QueryWrapper<>();
|
|
|
|
|
|
|
@@ -64,7 +59,7 @@ public class PopularFeelingsApi {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@ServiceMethod(method = "popular.feelings.add", title = "新建舆情监控")
|
|
@ServiceMethod(method = "popular.feelings.add", title = "新建舆情监控")
|
|
|
- public OapResponse save(SavePopularFeelingsRequest request) {
|
|
|
|
|
|
|
+ public OapResponse save(SaveRequest request) {
|
|
|
PopularFeelings entity = new PopularFeelings();
|
|
PopularFeelings entity = new PopularFeelings();
|
|
|
BeanUtils.copyProperties(request, entity);
|
|
BeanUtils.copyProperties(request, entity);
|
|
|
|
|
|
|
@@ -81,7 +76,7 @@ public class PopularFeelingsApi {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@ServiceMethod(method = "popular.feelings.updateById", title = "更新舆情监控")
|
|
@ServiceMethod(method = "popular.feelings.updateById", title = "更新舆情监控")
|
|
|
- public OapResponse updateById(UpdatePopularFeelingsRequest request) {
|
|
|
|
|
|
|
+ public OapResponse updateById(UpdateRequest request) {
|
|
|
PopularFeelings entity = new PopularFeelings();
|
|
PopularFeelings entity = new PopularFeelings();
|
|
|
BeanUtils.copyProperties(request, entity);
|
|
BeanUtils.copyProperties(request, entity);
|
|
|
|
|
|
|
@@ -94,13 +89,13 @@ public class PopularFeelingsApi {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@ServiceMethod(method = "popular.feelings.deleteByIds", title = "删除舆情监控")
|
|
@ServiceMethod(method = "popular.feelings.deleteByIds", title = "删除舆情监控")
|
|
|
- public OapResponse deleteByIds(PopularFeelingsIdsRequest request) {
|
|
|
|
|
|
|
+ public OapResponse deleteByIds(IdsRequest request) {
|
|
|
this.popularFeelingsService.removeByIds(request.getIds());
|
|
this.popularFeelingsService.removeByIds(request.getIds());
|
|
|
return OapResponse.success();
|
|
return OapResponse.success();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@ServiceMethod(method = "popular.feelings.start", title = "启动舆情监控")
|
|
@ServiceMethod(method = "popular.feelings.start", title = "启动舆情监控")
|
|
|
- public OapResponse startSpider(PopularFeelingsIdsRequest request) {
|
|
|
|
|
|
|
+ public OapResponse startSpider(IdsRequest request) {
|
|
|
List<PopularFeelings> listData = this.popularFeelingsService.listByIds(request.getIds());
|
|
List<PopularFeelings> listData = this.popularFeelingsService.listByIds(request.getIds());
|
|
|
for (PopularFeelings popularFeelings : listData) {
|
|
for (PopularFeelings popularFeelings : listData) {
|
|
|
this.popularFeelingsService.start(popularFeelings);
|
|
this.popularFeelingsService.start(popularFeelings);
|
|
@@ -109,7 +104,7 @@ public class PopularFeelingsApi {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@ServiceMethod(method = "popular.feelings.stop", title = "停止舆情监控")
|
|
@ServiceMethod(method = "popular.feelings.stop", title = "停止舆情监控")
|
|
|
- public OapResponse stopSpider(PopularFeelingsIdsRequest request) {
|
|
|
|
|
|
|
+ public OapResponse stopSpider(IdsRequest request) {
|
|
|
List<PopularFeelings> listData = this.popularFeelingsService.listByIds(request.getIds());
|
|
List<PopularFeelings> listData = this.popularFeelingsService.listByIds(request.getIds());
|
|
|
for (PopularFeelings popularFeelings : listData) {
|
|
for (PopularFeelings popularFeelings : listData) {
|
|
|
this.popularFeelingsService.stop(popularFeelings);
|
|
this.popularFeelingsService.stop(popularFeelings);
|
|
@@ -118,10 +113,10 @@ public class PopularFeelingsApi {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@ServiceMethod(method = "popular.feelings.findDetailPage", title = "分页查询舆情监控详情")
|
|
@ServiceMethod(method = "popular.feelings.findDetailPage", title = "分页查询舆情监控详情")
|
|
|
- public OapResponse findDetailPage(QueryPopularFeelingsDetailPageRequest request) {
|
|
|
|
|
|
|
+ public OapResponse findDetailPage(QueryDetailPageRequest request) {
|
|
|
|
|
|
|
|
QueryWrapper<PopularFeelingsPage> wrapper = new QueryWrapper<>();
|
|
QueryWrapper<PopularFeelingsPage> wrapper = new QueryWrapper<>();
|
|
|
- wrapper.select("id", "popular_feelings_id", "url", "title", "spider_time");
|
|
|
|
|
|
|
+ wrapper.select("id", "popular_feelings_id", "url", "title", "keywords", "description", "spider_time", "update_time");
|
|
|
wrapper.eq("popular_feelings_id", request.getPopularFeelingsId());
|
|
wrapper.eq("popular_feelings_id", request.getPopularFeelingsId());
|
|
|
|
|
|
|
|
Page<PopularFeelingsPage> page = new Page<>(request.getCurrent(), request.getPageSize());
|
|
Page<PopularFeelingsPage> page = new Page<>(request.getCurrent(), request.getPageSize());
|
|
@@ -131,4 +126,12 @@ public class PopularFeelingsApi {
|
|
|
|
|
|
|
|
return OapResponse.success().setBody(resultData);
|
|
return OapResponse.success().setBody(resultData);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @ServiceMethod(method = "popular.feelings.findDetailInfo", title = "查询页面详情")
|
|
|
|
|
+ public OapResponse findDetailInfo(QueryDetailInfoRequest request) {
|
|
|
|
|
+
|
|
|
|
|
+ PopularFeelingsPage popularFeelingsPage = this.popularFeelingsPageService.getById(request.getId());
|
|
|
|
|
+
|
|
|
|
|
+ return OapResponse.success().setBody(popularFeelingsPage);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|