12 changed files with 220 additions and 5 deletions
@ -0,0 +1,41 @@ |
|||
package com.elink.esua.epdc.dto.topic.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 最热话题接口入参DTO |
|||
* @Author wgf |
|||
* @Date 2020/2/11 10:31 |
|||
*/ |
|||
@Data |
|||
public class HotTopicFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -1938141144074477454L; |
|||
|
|||
/** |
|||
* 页码,从1开始 |
|||
*/ |
|||
@Min(value = 1, message = "页码必须大于0") |
|||
private int pageIndex; |
|||
|
|||
/** |
|||
* 页容量,默认10页 |
|||
*/ |
|||
@Min(value = 1, message = "每页条数必须大于必须大于0") |
|||
private int pageSize = 10; |
|||
|
|||
/** |
|||
* 第一页查询发起时的时间 |
|||
*/ |
|||
@NotBlank(message = "时间戳不能为空") |
|||
private String timestamp; |
|||
|
|||
/** |
|||
* 数据时间类型(1:最近1个月,2:最近3个月,3:最近半年,4:最近一年),默认1 |
|||
*/ |
|||
@NotBlank(message = "数据时间类型不能为空") |
|||
private int someMonthsType = 1; |
|||
} |
|||
@ -0,0 +1,32 @@ |
|||
package com.elink.esua.epdc.dto.topic.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 话题列表DTO |
|||
* @Author yinzuomei |
|||
* @Date 2020/2/10 11:31 |
|||
*/ |
|||
@Data |
|||
public class HotTopicResultDTO implements Serializable { |
|||
private static final long serialVersionUID = -1938141144074477454L; |
|||
|
|||
/** |
|||
* 话题Id(TopicId) |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 内容 |
|||
*/ |
|||
private String content; |
|||
|
|||
/** |
|||
* 表态数 |
|||
*/ |
|||
private String statementNum; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,56 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.modules.topic.controller; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.topic.form.HotTopicFormDTO; |
|||
import com.elink.esua.epdc.modules.topic.service.TopicAnalysisService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
|
|||
/** |
|||
* 话题相关接口APP |
|||
* |
|||
* @author wanggongfeng |
|||
* @since v1.0.0 2020-02-11 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("apptopic") |
|||
public class AppTopicAnalysisController { |
|||
|
|||
@Autowired |
|||
private TopicAnalysisService topicAnalysisService; |
|||
|
|||
/** |
|||
* @param hotTopicFormDTO |
|||
* @return com.elink.esua.epdc.dto.result.TopicResultDTO |
|||
* @Author wanggongfeng |
|||
* @Description 最热话题接口 |
|||
* @Date 2020/2/11 11:12 |
|||
**/ |
|||
@GetMapping("getHotTopicList") |
|||
public Result getHotTopicList(@RequestBody HotTopicFormDTO hotTopicFormDTO) { |
|||
Result result = topicAnalysisService.getHotTopicList(hotTopicFormDTO); |
|||
return result; |
|||
} |
|||
|
|||
} |
|||
Loading…
Reference in new issue