feat(content): 增加 vlog 列表筛选功能并修复保存逻辑
- 在 VlogBO 中添加 startTime 和 endTime 字段的格式说明 - 在 VlogMapperCustom.xml 中添加 startTime、endTime 和 mobile 的筛选条件 - 修复 VlogServiceImpl 中 vlog 保存逻辑的错误: - 将自动生成的 vid 设置为 vlog 的 id - 将 vlogBO 的 url 设置为 vlog 的 url - 移除重复设置 id 的错误代码
This commit is contained in:
parent
3354e5e410
commit
4749f2b413
@ -63,10 +63,10 @@ public class VlogBO extends BaseBO {
|
||||
@ApiModelProperty("视频状态(精确查询)")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("创建时间范围-开始时间")
|
||||
@ApiModelProperty("创建时间范围-开始时间,格式:yyyy-MM-dd HH:MM:ss")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@ApiModelProperty("创建时间范围-结束时间")
|
||||
@ApiModelProperty("创建时间范围-结束时间,格式:yyyy-MM-dd HH:MM:ss")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
private List<String> blockVd;
|
||||
|
@ -149,11 +149,10 @@ public class VlogServiceImpl extends ServiceImpl<VlogMapper, Vlog> implements Vl
|
||||
String vid = sid.nextShort();
|
||||
Vlog vlog = vlogConvert.toPo(vlogBO);
|
||||
vlog.setId(vid);
|
||||
vlog.setUrl("#");
|
||||
vlog.setUrl(vlogBO.getUrl());
|
||||
vlog.setLikeCounts(0);
|
||||
vlog.setCommentsCounts(0);
|
||||
vlog.setStatus(0);
|
||||
vlog.setId(vlogBO.getUrl());
|
||||
vlog.setIsPrivate(YesOrNo.NO.type);
|
||||
|
||||
vlog.setMemberId(loginUser.getUserId()+"");
|
||||
|
@ -47,6 +47,15 @@
|
||||
<if test="bo.title != null and bo.title != ''">
|
||||
AND v.title like '%${bo.title}%'
|
||||
</if>
|
||||
<if test="bo.startTime != null ">
|
||||
AND v.create_time >= #{bo.startTime}
|
||||
</if>
|
||||
<if test="bo.endTime != null ">
|
||||
AND #{bo.endTime} >= v.create_time
|
||||
</if>
|
||||
<if test="bo.mobile != null and bo.mobile != ''">
|
||||
AND m.phone_encrypted like '%${bo.mobile}%'
|
||||
</if>
|
||||
<if test="bo.blockVd != null and bo.blockVd.size() > 0">
|
||||
AND v.id NOT IN
|
||||
<foreach collection="bo.blockVd" item="vlogId" open="(" separator="," close=")">
|
||||
|
Loading…
x
Reference in New Issue
Block a user