提交 22aa3816 authored 作者: liupengfei's avatar liupengfei

--no commit message

上级 c97a5377
......@@ -58,4 +58,6 @@ public class ArticleLibrary {
private Integer status;
@ApiModelProperty("版权单位")
private String publisher;
@ApiModelProperty("浏览数量")
private Integer browseNum;
}
......@@ -51,5 +51,4 @@ public class FgArticleLibraryVO {
private Integer messageCode;
@ApiModelProperty("提示消息")
private String message;
}
package com.zrqx.resource.commons.vo.fg.resource;
import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
......@@ -34,4 +36,6 @@ public class FgAboutListVo {
private Integer clickNum;
@ApiModelProperty("时长")
private String timeLength;
@ApiModelProperty("发布时间")
private Date uploadTime;
}
......@@ -30,6 +30,12 @@ public class FgArticleLibraryController {
@GetMapping(value = "/get/{oid}")
public CallBack<FgArticleLibraryVO> getById(@PathVariable String oid) {
ArticleLibrary entity = service.selectByPrimaryKey(oid);
if(entity.getBrowseNum() == null) {
entity.setBrowseNum(1);
}else {
entity.setBrowseNum(entity.getBrowseNum() + 1);
}
service.updateByPrimaryKeySelective(entity);
FgArticleLibraryVO vo = new FgArticleLibraryVO();
BeanUtils.copyProperties(entity,vo);
return CallBack.success(vo);
......
......@@ -35,7 +35,7 @@ public interface FgResourceRelationMapper extends BaseMapper<ResourceRelation>
* @return
*/
@Select("<script>"
+ "select vi.id ,vi.name, vi.resourceType, vi.cover,vi.text as synopsis,vi.video "
+ "select vi.id ,vi.name, vi.resourceType, vi.cover,vi.text as synopsis,vi.video,vi.uploadTime,vi.browseNum "
+ "from res_resource_relation ar "
+ "left join res_article_library vi on ar.resourceId = vi.id "
+ "where 1 = 1 "
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论