Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
zcq
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
zcq
Commits
4572297c
提交
4572297c
authored
3月 12, 2019
作者:
renjiancai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
859fb80c
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
130 行增加
和
5 行删除
+130
-5
MemberCollectionForm.java
...rm/resource/fg/membercollection/MemberCollectionForm.java
+1
-1
AudioLibrary.java
...m/zrqx/core/model/resource/audiolibrary/AudioLibrary.java
+4
-0
PdfLibrary.java
...m/zrqx/core/model/resource/pdffilelibrary/PdfLibrary.java
+4
-0
VideoLibrary.java
...m/zrqx/core/model/resource/videolibrary/VideoLibrary.java
+4
-0
BulletinContent.java
...com/zrqx/core/model/sysuser/bulletin/BulletinContent.java
+9
-0
ArticleLibrarySerivceImpl.java
.../bg/service/articlelibrary/ArticleLibrarySerivceImpl.java
+25
-0
FgArticleLibraryController.java
...controller/articlelibrary/FgArticleLibraryController.java
+0
-1
FgInformationController.java
...er/fg/controller/information/FgInformationController.java
+18
-3
FgBulletinContentService.java
...sysuser/fg/service/bulletin/FgBulletinContentService.java
+16
-0
FgFgBulletinContentServiceImpl.java
...r/fg/service/bulletin/FgFgBulletinContentServiceImpl.java
+49
-0
没有找到文件。
com.zrqx.core/src/main/java/com/zrqx/core/form/resource/fg/membercollection/MemberCollectionForm.java
浏览文件 @
4572297c
...
@@ -19,6 +19,6 @@ public class MemberCollectionForm {
...
@@ -19,6 +19,6 @@ public class MemberCollectionForm {
@ApiModelProperty
(
"收藏对象"
)
@ApiModelProperty
(
"收藏对象"
)
private
List
<
GoodsForm
>
goodsList
;
private
List
<
GoodsForm
>
goodsList
;
@ApiModelProperty
(
"资源类型
供查询用1医著
2文章"
)
@ApiModelProperty
(
"资源类型
1图书
2文章"
)
private
String
goodsType
;
private
String
goodsType
;
}
}
com.zrqx.core/src/main/java/com/zrqx/core/model/resource/audiolibrary/AudioLibrary.java
浏览文件 @
4572297c
...
@@ -45,4 +45,8 @@ public class AudioLibrary {
...
@@ -45,4 +45,8 @@ public class AudioLibrary {
private
Integer
nationsType
;
private
Integer
nationsType
;
@ApiModelProperty
(
value
=
"销量"
)
@ApiModelProperty
(
value
=
"销量"
)
private
Integer
salesNum
;
private
Integer
salesNum
;
@ApiModelProperty
(
"是否删除 1未删除 2已删除"
)
private
Integer
isDelete
;
@ApiModelProperty
(
"文章id"
)
private
String
objectId
;
}
}
com.zrqx.core/src/main/java/com/zrqx/core/model/resource/pdffilelibrary/PdfLibrary.java
浏览文件 @
4572297c
...
@@ -41,5 +41,9 @@ public class PdfLibrary {
...
@@ -41,5 +41,9 @@ public class PdfLibrary {
private
Integer
nationsType
;
private
Integer
nationsType
;
@ApiModelProperty
(
"状态:0已录入,1已上架,2已下架"
)
@ApiModelProperty
(
"状态:0已录入,1已上架,2已下架"
)
private
Integer
status
;
private
Integer
status
;
@ApiModelProperty
(
"是否删除 1未删除 2已删除"
)
private
Integer
isDelete
;
@ApiModelProperty
(
"文章id"
)
private
String
objectId
;
}
}
com.zrqx.core/src/main/java/com/zrqx/core/model/resource/videolibrary/VideoLibrary.java
浏览文件 @
4572297c
...
@@ -54,4 +54,8 @@ public class VideoLibrary {
...
@@ -54,4 +54,8 @@ public class VideoLibrary {
private
Integer
clickNum
;
private
Integer
clickNum
;
@ApiModelProperty
(
value
=
"销量"
)
@ApiModelProperty
(
value
=
"销量"
)
private
Integer
salesNum
;
private
Integer
salesNum
;
@ApiModelProperty
(
"是否删除 1未删除 2已删除"
)
private
Integer
isDelete
;
@ApiModelProperty
(
"文章id"
)
private
String
objectId
;
}
}
com.zrqx.core/src/main/java/com/zrqx/core/model/sysuser/bulletin/BulletinContent.java
浏览文件 @
4572297c
...
@@ -41,6 +41,7 @@ public class BulletinContent {
...
@@ -41,6 +41,7 @@ public class BulletinContent {
private
String
content
;
private
String
content
;
@ApiModelProperty
(
value
=
"置顶状态:0未置顶,1已置顶"
)
@ApiModelProperty
(
value
=
"置顶状态:0未置顶,1已置顶"
)
private
Integer
topStatus
;
private
Integer
topStatus
;
/***
/***
* @see StatusEnum
* @see StatusEnum
*/
*/
...
@@ -57,4 +58,12 @@ public class BulletinContent {
...
@@ -57,4 +58,12 @@ public class BulletinContent {
private
String
linkType
;
private
String
linkType
;
@ApiModelProperty
(
value
=
"链接地址"
)
@ApiModelProperty
(
value
=
"链接地址"
)
private
String
linkUrl
;
private
String
linkUrl
;
//rjc添加
@ApiModelProperty
(
value
=
"浏览数量"
)
private
Integer
browseNum
;
@ApiModelProperty
(
value
=
"点赞量"
)
private
Integer
fabulousNum
;
@ApiModelProperty
(
"用户id"
)
private
String
userId
;
}
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/articlelibrary/ArticleLibrarySerivceImpl.java
浏览文件 @
4572297c
...
@@ -95,12 +95,14 @@ public class ArticleLibrarySerivceImpl extends BaseServiceImpl<ArticleLibrary,St
...
@@ -95,12 +95,14 @@ public class ArticleLibrarySerivceImpl extends BaseServiceImpl<ArticleLibrary,St
audio
.
setTimeLength
(
form
.
getTimeLength
());
audio
.
setTimeLength
(
form
.
getTimeLength
());
audio
.
setAudio
(
form
.
getAudio
());
audio
.
setAudio
(
form
.
getAudio
());
audio
.
setName
(
form
.
getAudioName
());
audio
.
setName
(
form
.
getAudioName
());
audio
.
setObjectId
(
entity
.
getId
());
audioLibraryMapper
.
insertSelective
(
audio
);
audioLibraryMapper
.
insertSelective
(
audio
);
}
}
if
(
form
.
getPdf
()!=
null
)
{
if
(
form
.
getPdf
()!=
null
)
{
PdfLibrary
pdf
=
new
PdfLibrary
();
PdfLibrary
pdf
=
new
PdfLibrary
();
pdf
.
setPdf
(
form
.
getPdfName
());
pdf
.
setPdf
(
form
.
getPdfName
());
pdf
.
setName
(
form
.
getPdfName
());
pdf
.
setName
(
form
.
getPdfName
());
pdf
.
setObjectId
(
entity
.
getId
());
pdfLibraryMapper
.
insertSelective
(
pdf
);
pdfLibraryMapper
.
insertSelective
(
pdf
);
}
}
if
(
form
.
getVideo
()!=
null
)
{
if
(
form
.
getVideo
()!=
null
)
{
...
@@ -109,6 +111,7 @@ public class ArticleLibrarySerivceImpl extends BaseServiceImpl<ArticleLibrary,St
...
@@ -109,6 +111,7 @@ public class ArticleLibrarySerivceImpl extends BaseServiceImpl<ArticleLibrary,St
video
.
setTimeLength
(
form
.
getTimeLength
());
video
.
setTimeLength
(
form
.
getTimeLength
());
video
.
setVideo
(
form
.
getVideo
());
video
.
setVideo
(
form
.
getVideo
());
video
.
setName
(
form
.
getVideoName
());
video
.
setName
(
form
.
getVideoName
());
video
.
setObjectId
(
entity
.
getId
());
videoLibraryMapper
.
insertSelective
(
video
);
videoLibraryMapper
.
insertSelective
(
video
);
}
}
return
true
;
return
true
;
...
@@ -128,8 +131,30 @@ public class ArticleLibrarySerivceImpl extends BaseServiceImpl<ArticleLibrary,St
...
@@ -128,8 +131,30 @@ public class ArticleLibrarySerivceImpl extends BaseServiceImpl<ArticleLibrary,St
if
(
entity
.
getStatus
()
==
LibraryStatusEnum
.
STATUS_1
.
getCode
())
{
if
(
entity
.
getStatus
()
==
LibraryStatusEnum
.
STATUS_1
.
getCode
())
{
throw
new
BusinessValidateException
(
"不能删除已上架的资源"
);
throw
new
BusinessValidateException
(
"不能删除已上架的资源"
);
}
}
Example
example1
=
createExample
();
example1
.
createCriteria
().
andEqualTo
(
"objectId"
,
entity
.
getId
());
//逻辑删除视频
if
(
entity
.
getVideo
()!=
null
&&
entity
.
getVideo
()!=
""
){
VideoLibrary
videoLibrary
=
videoLibraryMapper
.
selectOneByExample
(
example1
);
videoLibrary
.
setIsDelete
(
2
);
videoLibraryMapper
.
updateByExample
(
videoLibrary
,
example1
);
}
//逻辑删除音频
if
(
entity
.
getAudio
()!=
null
&&
entity
.
getAudio
()!=
""
){
AudioLibrary
audioLibrary
=
audioLibraryMapper
.
selectOneByExample
(
example1
);
audioLibrary
.
setIsDelete
(
2
);
audioLibraryMapper
.
updateByExample
(
audioLibrary
,
example1
);
}
//逻辑删除pdf
if
(
entity
.
getPdf
()!=
null
&&
entity
.
getPdf
()!=
""
){
PdfLibrary
pdfLibrary
=
pdfLibraryMapper
.
selectOneByExample
(
example1
);
pdfLibrary
.
setIsDelete
(
2
);
pdfLibraryMapper
.
updateByExample
(
pdfLibrary
,
example1
);
}
//逻辑删除文章
entity
.
setIsDelete
(
2
);
entity
.
setIsDelete
(
2
);
mapper
.
updateByPrimaryKey
(
entity
);
mapper
.
updateByPrimaryKey
(
entity
);
}
}
return
true
;
return
true
;
}
}
...
...
com.zrqx.resource/src/main/java/com/zrqx/resource/fg/controller/articlelibrary/FgArticleLibraryController.java
浏览文件 @
4572297c
...
@@ -118,7 +118,6 @@ public class FgArticleLibraryController {
...
@@ -118,7 +118,6 @@ public class FgArticleLibraryController {
List
<
ArticleLibrary
>
vos
=
service
.
selectByExample
(
example
);
List
<
ArticleLibrary
>
vos
=
service
.
selectByExample
(
example
);
return
CallBack
.
success
(
vos
);
return
CallBack
.
success
(
vos
);
}
}
@ApiOperation
(
value
=
"相关文章"
,
notes
=
"图书详情页-相关文章列表"
)
@ApiOperation
(
value
=
"相关文章"
,
notes
=
"图书详情页-相关文章列表"
)
@GetMapping
(
value
=
ResourceRequestPath
.
RELATION_RESOURCE
+
ResourceRequestPath
.
GET_OID
)
@GetMapping
(
value
=
ResourceRequestPath
.
RELATION_RESOURCE
+
ResourceRequestPath
.
GET_OID
)
public
CallBack
<
List
<
FgArticleLibraryListVO
>>
queryRelatedArticles
(
FgQueryRelatedArticleForm
form
){
public
CallBack
<
List
<
FgArticleLibraryListVO
>>
queryRelatedArticles
(
FgQueryRelatedArticleForm
form
){
...
...
com.zrqx.sysuser/src/main/java/com/zrqx/sysuser/fg/controller/information/FgInformationController.java
浏览文件 @
4572297c
...
@@ -2,6 +2,7 @@ package com.zrqx.sysuser.fg.controller.information;
...
@@ -2,6 +2,7 @@ package com.zrqx.sysuser.fg.controller.information;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
java.util.List
;
import
java.util.List
;
...
@@ -9,10 +10,14 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -9,10 +10,14 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.zrqx.core.constant.sysuser.SysUserRequestPath
;
import
com.zrqx.core.constant.sysuser.SysUserRequestPath
;
import
com.zrqx.core.exception.LoginValidateException
;
import
com.zrqx.core.exception.ParameterValidateException
;
import
com.zrqx.core.form.sysuser.fg.bulletin.FgQueryBulletinForm
;
import
com.zrqx.core.form.sysuser.fg.bulletin.FgQueryBulletinForm
;
import
com.zrqx.core.form.sysuser.fg.message.FgQueryMessageForm
;
import
com.zrqx.core.form.sysuser.fg.message.FgQueryMessageForm
;
import
com.zrqx.core.model.sysuser.bulletin.BulletinContent
;
import
com.zrqx.core.model.sysuser.bulletin.BulletinContent
;
...
@@ -22,6 +27,7 @@ import com.zrqx.core.util.response.CallBack;
...
@@ -22,6 +27,7 @@ import com.zrqx.core.util.response.CallBack;
import
com.zrqx.core.vo.sysuser.fg.bulletin.FgBulletinContentListVo
;
import
com.zrqx.core.vo.sysuser.fg.bulletin.FgBulletinContentListVo
;
import
com.zrqx.core.vo.sysuser.fg.bulletin.FgBulletinContentVo
;
import
com.zrqx.core.vo.sysuser.fg.bulletin.FgBulletinContentVo
;
import
com.zrqx.core.vo.sysuser.fg.message.FgMessageListVO
;
import
com.zrqx.core.vo.sysuser.fg.message.FgMessageListVO
;
import
com.zrqx.sysuser.commons.redis.Redis
;
import
com.zrqx.sysuser.fg.service.bulletin.FgBulletinContentService
;
import
com.zrqx.sysuser.fg.service.bulletin.FgBulletinContentService
;
import
com.zrqx.sysuser.fg.service.message.FgMessageService
;
import
com.zrqx.sysuser.fg.service.message.FgMessageService
;
...
@@ -46,7 +52,7 @@ public class FgInformationController {
...
@@ -46,7 +52,7 @@ public class FgInformationController {
return
CallBack
.
success
(
service
.
list
(
form
));
return
CallBack
.
success
(
service
.
list
(
form
));
}
}
@ApiOperation
(
value
=
"
医药资讯/考试专栏列表"
,
notes
=
"根据栏目名查询公告
"
)
@ApiOperation
(
value
=
"
资讯列表"
,
notes
=
"根据栏目名查询资讯
"
)
@GetMapping
(
value
=
SysUserRequestPath
.
BULLETIN_CONTENT
+
SysUserRequestPath
.
PAGE
)
@GetMapping
(
value
=
SysUserRequestPath
.
BULLETIN_CONTENT
+
SysUserRequestPath
.
PAGE
)
public
CallBack
<
List
<
FgBulletinContentVo
>>
queryBulletinContentList
(
String
name
,
PageParam
pageParam
)
{
public
CallBack
<
List
<
FgBulletinContentVo
>>
queryBulletinContentList
(
String
name
,
PageParam
pageParam
)
{
if
(
null
!=
pageParam
&&
StringUtils
.
isBlank
(
pageParam
.
getOrderBy
()))
{
if
(
null
!=
pageParam
&&
StringUtils
.
isBlank
(
pageParam
.
getOrderBy
()))
{
...
@@ -55,10 +61,18 @@ public class FgInformationController {
...
@@ -55,10 +61,18 @@ public class FgInformationController {
return
CallBack
.
success
(
service
.
page
(
name
,
pageParam
));
return
CallBack
.
success
(
service
.
page
(
name
,
pageParam
));
}
}
@ApiOperation
(
value
=
"
查询医药资讯/考试专栏的内容详情
"
,
notes
=
"根据ID查询"
)
@ApiOperation
(
value
=
"
资讯详情页
"
,
notes
=
"根据ID查询"
)
@GetMapping
(
value
=
SysUserRequestPath
.
BULLETIN_CONTENT
+
SysUserRequestPath
.
OID
)
@GetMapping
(
value
=
SysUserRequestPath
.
BULLETIN_CONTENT
+
SysUserRequestPath
.
OID
)
public
CallBack
<
BulletinContent
>
getById
(
@PathVariable
Integer
oid
)
{
public
CallBack
<
BulletinContent
>
getById
(
@PathVariable
Integer
oid
)
{
return
CallBack
.
success
(
service
.
selectByPrimaryKey
(
oid
));
BulletinContent
vo
=
service
.
selectByPrimaryKey
(
oid
);
// 更新浏览量
service
.
updateBrowseNum
(
oid
);
return
CallBack
.
success
(
vo
);
}
@ApiOperation
(
value
=
"资讯点赞"
,
notes
=
"根据id点赞"
)
@PostMapping
(
SysUserRequestPath
.
AGREE
)
public
CallBack
<?>
agreeInformation
(
@ApiParam
(
"资讯id"
)
@RequestParam
(
required
=
true
)
Integer
oid
){
return
service
.
agreeInformation
(
oid
)
?
CallBack
.
success
()
:
CallBack
.
fail
();
}
}
@ApiOperation
(
value
=
"在线咨询列表"
,
notes
=
"分页查询"
)
@ApiOperation
(
value
=
"在线咨询列表"
,
notes
=
"分页查询"
)
...
@@ -69,6 +83,7 @@ public class FgInformationController {
...
@@ -69,6 +83,7 @@ public class FgInformationController {
}
}
return
CallBack
.
success
(
messageService
.
queryMessageList
(
form
,
pageParam
));
return
CallBack
.
success
(
messageService
.
queryMessageList
(
form
,
pageParam
));
}
}
/*
/*
@ApiOperation(value = "查看提问", notes = "根据ID查询")
@ApiOperation(value = "查看提问", notes = "根据ID查询")
@GetMapping(value = SysUserRequestPath.MESSAGE + SysUserRequestPath.OID)
@GetMapping(value = SysUserRequestPath.MESSAGE + SysUserRequestPath.OID)
...
...
com.zrqx.sysuser/src/main/java/com/zrqx/sysuser/fg/service/bulletin/FgBulletinContentService.java
浏览文件 @
4572297c
...
@@ -34,4 +34,20 @@ public interface FgBulletinContentService extends
...
@@ -34,4 +34,20 @@ public interface FgBulletinContentService extends
* @date: 2018年8月10日 下午4:40:38
* @date: 2018年8月10日 下午4:40:38
*/
*/
List
<
FgBulletinContentVo
>
page
(
String
name
,
PageParam
pageParam
);
List
<
FgBulletinContentVo
>
page
(
String
name
,
PageParam
pageParam
);
/**
* 资讯点赞
* @param oid
* @return
* @author rjc
* @date: 2019年3月12日 下午1:49:26
*/
public
boolean
agreeInformation
(
Integer
oid
);
/**
* 更新浏览量
* @param oid
* @return
* @author rjc
* @date: 2019年3月12日 下午2:16:32
*/
boolean
updateBrowseNum
(
Integer
oid
);
}
}
com.zrqx.sysuser/src/main/java/com/zrqx/sysuser/fg/service/bulletin/FgFgBulletinContentServiceImpl.java
浏览文件 @
4572297c
...
@@ -9,6 +9,7 @@ import org.springframework.stereotype.Service;
...
@@ -9,6 +9,7 @@ import org.springframework.stereotype.Service;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.zrqx.core.enums.ResponseCodeEnum
;
import
com.zrqx.core.enums.ResponseCodeEnum
;
import
com.zrqx.core.exception.LoginValidateException
;
import
com.zrqx.core.exception.ParameterValidateException
;
import
com.zrqx.core.exception.ParameterValidateException
;
import
com.zrqx.core.form.sysuser.fg.bulletin.FgQueryBulletinForm
;
import
com.zrqx.core.form.sysuser.fg.bulletin.FgQueryBulletinForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.mapper.BaseMapper
;
...
@@ -17,6 +18,7 @@ import com.zrqx.core.service.BaseServiceImpl;
...
@@ -17,6 +18,7 @@ import com.zrqx.core.service.BaseServiceImpl;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.vo.sysuser.fg.bulletin.FgBulletinContentListVo
;
import
com.zrqx.core.vo.sysuser.fg.bulletin.FgBulletinContentListVo
;
import
com.zrqx.core.vo.sysuser.fg.bulletin.FgBulletinContentVo
;
import
com.zrqx.core.vo.sysuser.fg.bulletin.FgBulletinContentVo
;
import
com.zrqx.sysuser.commons.redis.Redis
;
import
com.zrqx.sysuser.fg.mapper.bulletin.FgBulletinContentMapper
;
import
com.zrqx.sysuser.fg.mapper.bulletin.FgBulletinContentMapper
;
/**
/**
...
@@ -31,6 +33,8 @@ public class FgFgBulletinContentServiceImpl extends
...
@@ -31,6 +33,8 @@ public class FgFgBulletinContentServiceImpl extends
@Autowired
@Autowired
FgBulletinContentMapper
mapper
;
FgBulletinContentMapper
mapper
;
@Autowired
private
Redis
redisManage
;
@Override
@Override
public
BaseMapper
<
BulletinContent
>
getMapper
()
{
public
BaseMapper
<
BulletinContent
>
getMapper
()
{
return
mapper
;
return
mapper
;
...
@@ -80,4 +84,49 @@ public class FgFgBulletinContentServiceImpl extends
...
@@ -80,4 +84,49 @@ public class FgFgBulletinContentServiceImpl extends
}
}
return
voList
;
return
voList
;
}
}
public
boolean
agreeInformation
(
Integer
oid
){
if
(
StringUtils
.
isEmpty
(
redisManage
.
get
(
Redis
.
getFgToken
()))){
throw
new
LoginValidateException
(
1
,
"登录过期或未登录"
);
}
if
(
oid
==
null
){
throw
new
ParameterValidateException
(
2
,
"资讯id不能为空"
);
}
BulletinContent
content
=
mapper
.
selectByPrimaryKey
(
oid
);
content
.
setUserId
(
redisManage
.
getMember
().
getId
().
toString
());
if
(
content
.
getFabulousNum
()==
null
){
content
.
setFabulousNum
(
0
);
}
Integer
num
=
content
.
getFabulousNum
();
num
+=
1
;
content
.
setFabulousNum
(
num
);
mapper
.
updateByPrimaryKey
(
content
);
return
true
;
}
/**
* 更新浏览量
* @see com.zrqx.sysuser.fg.service.bulletin.FgBulletinContentService#updateBrowseNum(java.lang.Integer)
* @param oid
* @return
* @author rjc
* @date: 2019年3月12日 下午2:16:53
*/
public
boolean
updateBrowseNum
(
Integer
oid
)
{
if
(
StringUtils
.
isEmpty
(
redisManage
.
get
(
Redis
.
getFgToken
()))){
throw
new
LoginValidateException
(
1
,
"登录过期或未登录"
);
}
if
(
oid
==
null
){
throw
new
ParameterValidateException
(
2
,
"资讯id不能为空"
);
}
BulletinContent
content
=
mapper
.
selectByPrimaryKey
(
oid
);
content
.
setUserId
(
redisManage
.
getMember
().
getId
().
toString
());
if
(
content
.
getBrowseNum
()==
null
){
content
.
setBrowseNum
(
0
);
}
Integer
num
=
content
.
getBrowseNum
();
num
+=
1
;
content
.
setBrowseNum
(
num
);
mapper
.
updateByPrimaryKey
(
content
);
return
false
;
}
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论