fix
This commit is contained in:
parent
55f335d630
commit
7258bbafa4
|
|
@ -86,6 +86,12 @@ public class PlayletPublicDetailController extends BaseController
|
|||
{
|
||||
startPage();
|
||||
List<PlayletPublicDetail> list = playletPublicDetailService.selectPlayletPublicDetailList(playletPublicDetail);
|
||||
list.forEach(model->{
|
||||
PlayletPublicAccount account = playletPublicAccountService.getById(model.getPublicId());
|
||||
if(account != null){
|
||||
model.setPublicName(account.getName());
|
||||
}
|
||||
});
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ public class PublicCommentResponseController extends BaseController
|
|||
}
|
||||
PublicDetailComment comment = publicDetailCommentService.getById(publicCommentResponse.getCommentId());
|
||||
if(comment != null){
|
||||
comment.setRemark("已回复,回复时间:" + DateUtil.format(new Date(), "yyyy-MM-dd HH:mm"));
|
||||
comment.setRemark(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
|
||||
publicDetailCommentService.updateById(comment);
|
||||
}
|
||||
return AjaxResult.success();
|
||||
|
|
|
|||
|
|
@ -71,6 +71,9 @@ public class PublicDetailCommentController extends BaseController
|
|||
.eq(PublicCommentResponse::getCommentId, model.getId()).one();
|
||||
if(publicCommentResponse != null){
|
||||
model.setCommentResponseContent(publicCommentResponse.getResponseContent());
|
||||
model.setIsResponse("02");
|
||||
}else {
|
||||
model.setIsResponse("01");
|
||||
}
|
||||
});
|
||||
return getDataTable(list);
|
||||
|
|
|
|||
|
|
@ -35,10 +35,23 @@ public class PublicDetailShareAppServiceImpl implements PublicDetailShareAppServ
|
|||
if(userTwo != null){
|
||||
publicDetailShare.setReaderTwoName(userTwo.getName());
|
||||
}
|
||||
// 查询是否二次记录
|
||||
long readCount = iPublicDetailShareService.lambdaQuery()
|
||||
.eq(PublicDetailShare::getReaderOneId, publicDetailShare.getReaderOneId())
|
||||
.eq(PublicDetailShare::getReaderTwoId, publicDetailShare.getReaderTwoId())
|
||||
.count();
|
||||
|
||||
long beReadCount = iPublicDetailShareService.lambdaQuery()
|
||||
.eq(PublicDetailShare::getReaderOneId, publicDetailShare.getReaderTwoId())
|
||||
.eq(PublicDetailShare::getReaderTwoId, publicDetailShare.getReaderOneId())
|
||||
.count();
|
||||
// 已经阅读或者查看过了
|
||||
boolean flag = readCount + beReadCount > 0;
|
||||
iPublicDetailShareService.insertPublicDetailShare(publicDetailShare);
|
||||
|
||||
// 添加浏览记录时,同时需要增加一下文章表上面的阅读次数
|
||||
PlayletPublicDetail playletPublicDetail = iPlayletPublicDetailService.getById(publicDetailShare.getDetailId());
|
||||
if(playletPublicDetail != null){
|
||||
if(playletPublicDetail != null && !flag){
|
||||
if(playletPublicDetail.getTransmitCount() == null){
|
||||
playletPublicDetail.setTransmitCount(1L);
|
||||
}else {
|
||||
|
|
|
|||
|
|
@ -53,6 +53,13 @@ public class PublicStarRecordAppServiceImpl implements PublicStarRecordAppServic
|
|||
.one();
|
||||
if(record != null){
|
||||
iPublicStarRecordService.removeById(record.getId());
|
||||
|
||||
// 增加文章点赞数量
|
||||
PlayletPublicDetail detail = iPlayletPublicDetailService.getById(publicStarRecord.getDetailId());
|
||||
if(detail != null){
|
||||
detail.setStarCount(String.valueOf(Long.parseLong(detail.getStarCount()) - 1));
|
||||
}
|
||||
iPlayletPublicDetailService.updateById(detail);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -70,11 +70,12 @@
|
|||
},
|
||||
{
|
||||
field: 'publicId',
|
||||
title: '公众号id'
|
||||
title: '公众号id',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'readCount',
|
||||
title: '阅读人数'
|
||||
field: 'publicName',
|
||||
title: '公众号'
|
||||
},
|
||||
{
|
||||
field: 'content',
|
||||
|
|
@ -87,7 +88,11 @@
|
|||
},
|
||||
{
|
||||
field: 'authorAlias',
|
||||
title: '作者花名'
|
||||
title: '作者'
|
||||
},
|
||||
{
|
||||
field: 'readCount',
|
||||
title: '阅读人数'
|
||||
},
|
||||
{
|
||||
field: 'starCount',
|
||||
|
|
|
|||
|
|
@ -14,6 +14,12 @@
|
|||
<label>用户昵称:</label>
|
||||
<input type="text" name="userName"/>
|
||||
</li>
|
||||
<li>
|
||||
是否回复:<select name="isResponse" th:with="type=${@dict.getType('sys_comment_status')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
|
|
@ -46,6 +52,7 @@
|
|||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('public:comment:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('public:comment:remove')}]];
|
||||
var commentDict = [[${@dict.getType('sys_comment_status')}]];
|
||||
var prefix = ctx + "system/public/comment";
|
||||
|
||||
$(function() {
|
||||
|
|
@ -99,9 +106,17 @@
|
|||
field: 'commentResponseContent',
|
||||
title: "回复内容"
|
||||
},
|
||||
{
|
||||
field: 'isResponse',
|
||||
title: "是否回复",
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(commentDict, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
title: '回复状态'
|
||||
title: '回复时间'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
|
|
|
|||
|
|
@ -38,6 +38,9 @@ public class PlayletPublicDetail extends BaseEntity
|
|||
@ApiModelProperty(value = "公众号id")
|
||||
private Long publicId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String publicName;
|
||||
|
||||
/** 公众号id */
|
||||
@Excel(name = "短剧id")
|
||||
@ApiModelProperty(value = "短剧id")
|
||||
|
|
|
|||
|
|
@ -70,4 +70,8 @@ public class PublicDetailComment extends BaseEntity
|
|||
@TableField(exist = false)
|
||||
private String commentResponseContent;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "是否回复 01.未回复 02.已回复")
|
||||
private String isResponse;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,12 @@
|
|||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="content != null and content != ''"> and content = #{content}</if>
|
||||
<if test="starCount != null "> and star_count = #{starCount}</if>
|
||||
<if test="isResponse == '02'">
|
||||
and remark is not null
|
||||
</if>
|
||||
<if test="isResponse == '01'">
|
||||
and remark is null
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue