[fix]修改vlog内容
This commit is contained in:
parent
4957cd8023
commit
ae61377c73
12
pom.xml
12
pom.xml
@ -101,6 +101,18 @@
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
|
||||
<!-- knife4j 接口文档工具 -->
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||
<version>2.0.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-springdoc-ui</artifactId>
|
||||
<version>3.0.3</version>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringBoot的依赖配置-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
@ -134,9 +134,9 @@ mybatis-plus:
|
||||
# 自定义配置 是否全局开启逻辑删除 关闭后 所有逻辑删除功能将失效
|
||||
enableLogicDelete: true
|
||||
# 多包名使用 例如 org.dromara.**.mapper,org.xxx.**.mapper
|
||||
mapperPackage: org.dromara.**.mapper
|
||||
mapperPackage: org.dromara.**.mapper,com.wzj.soopin.**.mapper
|
||||
# 对应的 XML 文件位置
|
||||
mapperLocations: classpath*:mapper/**/*Mapper.xml
|
||||
mapperLocations: classpath*:mapper/**/*Mapper.xml,classpath*:mapper/**/*.xml
|
||||
# 实体扫描,多个package用逗号或者分号分隔
|
||||
typeAliasesPackage: org.dromara.**.domain,com.wzj.soopin.**
|
||||
global-config:
|
||||
|
@ -0,0 +1,18 @@
|
||||
package org.dromara.common.core.enums;
|
||||
|
||||
/**
|
||||
* @Desc: 性别 枚举
|
||||
*/
|
||||
public enum Sex {
|
||||
woman(0, "女"),
|
||||
man(1, "男"),
|
||||
secret(2, "保密");
|
||||
|
||||
public final Integer type;
|
||||
public final String value;
|
||||
|
||||
Sex(Integer type, String value) {
|
||||
this.type = type;
|
||||
this.value = value;
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package org.dromara.common.core.enums;
|
||||
|
||||
/**
|
||||
* @Desc: 是否 枚举
|
||||
*/
|
||||
public enum YesOrNo {
|
||||
NO(0, "否"),
|
||||
YES(1, "是");
|
||||
|
||||
public final Integer type;
|
||||
public final String value;
|
||||
|
||||
YesOrNo(Integer type, String value) {
|
||||
this.type = type;
|
||||
this.value = value;
|
||||
}
|
||||
}
|
@ -98,6 +98,27 @@
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-sse</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
<version>3.25.3</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-springdoc-ui</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-content</artifactId>
|
||||
<version>5.3.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
|
@ -1,12 +0,0 @@
|
||||
package com.wzj.soopin.consumer.content.controller;
|
||||
|
||||
//public class BaseController {
|
||||
//
|
||||
// @Autowired
|
||||
// public RedisOperator redis;
|
||||
//
|
||||
// public static final String MOBILE_SMSCODE = "mobile:smscode";
|
||||
// public static final String REDIS_USER_TOKEN = "redis_user_token";
|
||||
// public static final String REDIS_USER_INFO = "redis_user_info";
|
||||
//
|
||||
//}
|
@ -1,46 +0,0 @@
|
||||
package com.wzj.soopin.consumer.content.controller;//package com.imooc.controller;
|
||||
//
|
||||
//import com.github.pagehelper.PageInfo;
|
||||
//import com.imooc.utils.RedisOperator;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.validation.BindingResult;
|
||||
//import org.springframework.validation.FieldError;
|
||||
//
|
||||
//import java.util.HashMap;
|
||||
//import java.util.List;
|
||||
//import java.util.Map;
|
||||
//
|
||||
//public class BaseInfoProperties {
|
||||
//
|
||||
// @Autowired
|
||||
// public RedisOperator redis;
|
||||
//
|
||||
// public static final Integer COMMON_START_PAGE = 1;
|
||||
// public static final Integer COMMON_PAGE_SIZE = 10;
|
||||
//
|
||||
// public static final String MOBILE_SMSCODE = "mobile:smscode";
|
||||
// public static final String REDIS_USER_TOKEN = "redis_user_token";
|
||||
// public static final String REDIS_USER_INFO = "redis_user_info";
|
||||
//
|
||||
//
|
||||
// //我的关注总数
|
||||
// public static final String REDIS_MY_FOLLOWS_COUNTS = "redis_my_follows_counts";
|
||||
// // 我的粉丝总数
|
||||
// public static final String REDIS_MY_FANS_COUNTS = "redis_my_fans_counts";
|
||||
//
|
||||
// // 视频和发布者获赞数
|
||||
// public static final String REDIS_VLOG_BE_LIKED_COUNTS = "redis_vlog_be_liked_counts";
|
||||
// public static final String REDIS_VLOGER_BE_LIKED_COUNTS = "redis_vloger_be_liked_counts";
|
||||
//
|
||||
// public PagedGridResult setterPagedGrid(List<?> list,
|
||||
// Integer page) {
|
||||
// PageInfo<?> pageList = new PageInfo<>(list);
|
||||
// PagedGridResult gridResult = new PagedGridResult();
|
||||
// gridResult.setRows(list);
|
||||
// gridResult.setPage(page);
|
||||
// gridResult.setRecords(pageList.getTotal());
|
||||
// gridResult.setTotal(pageList.getPages());
|
||||
// return gridResult;
|
||||
// }
|
||||
//
|
||||
//}
|
@ -1,22 +1,20 @@
|
||||
package com.wzj.soopin.consumer.content.controller;
|
||||
|
||||
import com.imooc.base.BaseInfoProperties;
|
||||
import com.imooc.bo.CommentBO;
|
||||
import com.imooc.enums.MessageEnum;
|
||||
import com.imooc.grace.result.GraceJSONResult;
|
||||
import com.imooc.pojo.Comment;
|
||||
import com.imooc.pojo.Vlog;
|
||||
import com.imooc.service.CommentService;
|
||||
import com.imooc.service.MsgService;
|
||||
import com.imooc.service.VlogService;
|
||||
import com.imooc.vo.CommentVO;
|
||||
|
||||
import com.wzj.soopin.content.domain.bo.CommentBO;
|
||||
import com.wzj.soopin.content.domain.vo.CommentVO;
|
||||
import com.wzj.soopin.content.service.CommentService;
|
||||
import com.wzj.soopin.content.service.MsgService;
|
||||
import com.wzj.soopin.content.service.VlogService;
|
||||
import io.swagger.annotations.Api;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@ -24,7 +22,7 @@ import java.util.Map;
|
||||
@Api(tags = "CommentController 评论模块的接口")
|
||||
@RequestMapping("comment")
|
||||
@RestController
|
||||
public class CommentController extends BaseInfoProperties {
|
||||
public class CommentController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private CommentService commentService;
|
||||
@ -34,31 +32,31 @@ public class CommentController extends BaseInfoProperties {
|
||||
private VlogService vlogService;
|
||||
//
|
||||
@PostMapping("create")
|
||||
public GraceJSONResult create(@RequestBody @Valid CommentBO commentBO)
|
||||
public R create(@RequestBody @Valid CommentBO commentBO)
|
||||
throws Exception {
|
||||
|
||||
CommentVO commentVO = commentService.createComment(commentBO);
|
||||
return GraceJSONResult.ok(commentVO);
|
||||
return R.ok(commentVO);
|
||||
}
|
||||
//
|
||||
@GetMapping("counts")
|
||||
public GraceJSONResult counts(@RequestParam String vlogId) {
|
||||
public R counts(@RequestParam String vlogId) {
|
||||
|
||||
String countsStr = redis.get(REDIS_VLOG_COMMENT_COUNTS + ":" + vlogId);
|
||||
if (StringUtils.isBlank(countsStr)) {
|
||||
countsStr = "0";
|
||||
}
|
||||
|
||||
return GraceJSONResult.ok(Integer.valueOf(countsStr));
|
||||
return R.ok(Integer.valueOf(countsStr));
|
||||
}
|
||||
|
||||
@GetMapping("list")
|
||||
public GraceJSONResult list(@RequestParam String vlogId,
|
||||
public R list(@RequestParam String vlogId,
|
||||
@RequestParam(defaultValue = "") String userId,
|
||||
@RequestParam Integer page,
|
||||
@RequestParam Integer pageSize) {
|
||||
|
||||
return GraceJSONResult.ok(
|
||||
return R.ok(
|
||||
commentService.queryVlogComments(
|
||||
vlogId,
|
||||
userId,
|
||||
@ -67,17 +65,17 @@ public class CommentController extends BaseInfoProperties {
|
||||
}
|
||||
|
||||
@DeleteMapping("delete")
|
||||
public GraceJSONResult delete(@RequestParam String commentUserId,
|
||||
public R delete(@RequestParam String commentUserId,
|
||||
@RequestParam String commentId,
|
||||
@RequestParam String vlogId) {
|
||||
commentService.deleteComment(commentUserId,
|
||||
commentId,
|
||||
vlogId);
|
||||
return GraceJSONResult.ok();
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@PostMapping("like")
|
||||
public GraceJSONResult like(@RequestParam String commentId,
|
||||
public R like(@RequestParam String commentId,
|
||||
@RequestParam String userId) {
|
||||
|
||||
// 故意犯错,bigkey
|
||||
@ -99,16 +97,16 @@ public class CommentController extends BaseInfoProperties {
|
||||
msgContent);
|
||||
|
||||
|
||||
return GraceJSONResult.ok();
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@PostMapping("unlike")
|
||||
public GraceJSONResult unlike(@RequestParam String commentId,
|
||||
public R unlike(@RequestParam String commentId,
|
||||
@RequestParam String userId) {
|
||||
|
||||
redis.decrementHash(REDIS_VLOG_COMMENT_LIKED_COUNTS, commentId, 1);
|
||||
redis.hdel(REDIS_USER_LIKE_COMMENT, userId + ":" + commentId);
|
||||
|
||||
return GraceJSONResult.ok();
|
||||
return R.ok();
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@Api(tags = "FansController 粉丝相关业务功能的接口")
|
||||
@RequestMapping("fans")
|
||||
@RestController
|
||||
public class FansController extends BaseInfoProperties {
|
||||
|
@ -17,7 +17,6 @@ import java.io.OutputStream;
|
||||
|
||||
|
||||
@Slf4j
|
||||
@Api(tags = "FileController 文件上传测试的接口")
|
||||
@RestController
|
||||
public class FileController {
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
package com.wzj.soopin.content.domain.bo;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
@ -1,12 +1,12 @@
|
||||
package com.wzj.soopin.content.domain.bo;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 密码登陆中, 对前端数据映射的实体类.
|
||||
|
@ -1,12 +1,12 @@
|
||||
package com.wzj.soopin.content.domain.bo;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
@Data
|
||||
@ToString
|
||||
|
@ -5,8 +5,6 @@ import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
import org.springframework.data.mongodb.core.mapping.Field;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
@ -15,7 +13,7 @@ import java.util.Map;
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ToString
|
||||
@Document("message")
|
||||
//@Document("message")
|
||||
public class MessageMO {
|
||||
|
||||
@Id
|
||||
|
@ -0,0 +1,56 @@
|
||||
package com.wzj.soopin.content.domain.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@TableName("t_comment")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class Comment extends TenantEntity {
|
||||
@TableId
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 评论的视频是哪个作者(vloger)的关联id
|
||||
*/
|
||||
@TableField( "vloger_id")
|
||||
private String vlogerId;
|
||||
|
||||
/**
|
||||
* 如果是回复留言,则本条为子留言,需要关联查询
|
||||
*/
|
||||
private String fatherCommentId;
|
||||
|
||||
/**
|
||||
* 回复的那个视频id
|
||||
*/
|
||||
@TableField( "vlog_id")
|
||||
private String vlogId;
|
||||
|
||||
/**
|
||||
* 发布留言的用户id
|
||||
*/
|
||||
private String commentUserId;
|
||||
|
||||
/**
|
||||
* 留言内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 留言的点赞总数
|
||||
*/
|
||||
private Integer likeCounts;
|
||||
|
||||
/**
|
||||
* 留言时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package com.wzj.soopin.content.domain.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@TableName( "t_fans")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class Fans extends TenantEntity {
|
||||
@TableId
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 作家用户id
|
||||
*/
|
||||
@TableField( "vloger_id")
|
||||
private String vlogerId;
|
||||
|
||||
private Date createdTime;
|
||||
|
||||
|
||||
/**
|
||||
* 粉丝用户id
|
||||
*/
|
||||
private String fanId;
|
||||
|
||||
/**
|
||||
* 粉丝是否是vloger的朋友,如果成为朋友,则本表的双方此字段都需要设置为1,如果有一人取关,则两边都需要设置为0
|
||||
*/
|
||||
private Integer isFanFriendOfMine;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.wzj.soopin.content.domain.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@TableName("t_my_liked_vlog")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MyLikedVlog extends TenantEntity {
|
||||
@TableId
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 喜欢的短视频id
|
||||
*/
|
||||
@TableField("vlog_id")
|
||||
private String vlogId;
|
||||
|
||||
private Date createdTime;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.wzj.soopin.content.domain.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName( "r_user_member")
|
||||
public class UserMember extends TenantEntity {
|
||||
private String userId;
|
||||
private String memberId;
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.wzj.soopin.content.domain.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@TableName("t_users")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class Users extends TenantEntity {
|
||||
@TableId
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
private String mobile;
|
||||
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 昵称,媒体号
|
||||
*/
|
||||
private String nickname;
|
||||
|
||||
|
||||
/**
|
||||
* 慕课号,类似头条号,抖音号,公众号,唯一标识,需要限制修改次数,比如终生1次,每年1次,每半年1次等,可以用于付费修改。
|
||||
*/
|
||||
@TableField( "imooc_num")
|
||||
private String imoocNum;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
private String face;
|
||||
|
||||
/**
|
||||
* 性别 1:男 0:女 2:保密
|
||||
*/
|
||||
private Integer sex;
|
||||
|
||||
/**
|
||||
* 生日
|
||||
*/
|
||||
private Date birthday;
|
||||
|
||||
/**
|
||||
* 国家
|
||||
*/
|
||||
private String country;
|
||||
|
||||
/**
|
||||
* 省份
|
||||
*/
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 城市
|
||||
*/
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 区县
|
||||
*/
|
||||
private String district;
|
||||
|
||||
/**
|
||||
* 简介
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 个人介绍的背景图
|
||||
*/
|
||||
private String bgImg;
|
||||
|
||||
/**
|
||||
* 慕课号能否被修改,1:默认,可以修改;0,无法修改
|
||||
*/
|
||||
private Integer canImoocNumBeUpdated;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,91 @@
|
||||
package com.wzj.soopin.content.domain.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
|
||||
@TableName("t_vlog")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class Vlog extends TenantEntity {
|
||||
@TableId
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 对应用户表id,vlog视频发布者
|
||||
*/
|
||||
@TableField( "vloger_id")
|
||||
private String vlogerId;
|
||||
|
||||
/**
|
||||
* 视频播放地址
|
||||
*/
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* 视频封面
|
||||
*/
|
||||
private String cover;
|
||||
|
||||
/**
|
||||
* 视频标题,可以为空
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 视频width
|
||||
*/
|
||||
private Integer width;
|
||||
|
||||
/**
|
||||
* 视频height
|
||||
*/
|
||||
private Integer height;
|
||||
|
||||
/**
|
||||
* 点赞总数
|
||||
*/
|
||||
private Integer likeCounts;
|
||||
|
||||
/**
|
||||
* 评论总数
|
||||
*/
|
||||
private Integer commentsCounts;
|
||||
|
||||
/**
|
||||
* 是否私密,用户可以设置私密,如此可以不公开给比人看
|
||||
*/
|
||||
private Integer isPrivate;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 视频状态
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 云点播文件ID
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 审核结果
|
||||
*/
|
||||
private String reason;
|
||||
|
||||
/**
|
||||
* 视频归属地
|
||||
*/
|
||||
private Integer cityCode;
|
||||
|
||||
/**
|
||||
* 首帧图
|
||||
*/
|
||||
private String firstFrameImg;
|
||||
|
||||
|
||||
}
|
@ -1,193 +0,0 @@
|
||||
package com.wzj.soopin.content.domain.pojo;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import java.util.Date;
|
||||
|
||||
@Table(name="t_comment")
|
||||
public class Comment {
|
||||
@Id
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 评论的视频是哪个作者(vloger)的关联id
|
||||
*/
|
||||
@Column(name = "vloger_id")
|
||||
private String vlogerId;
|
||||
|
||||
/**
|
||||
* 如果是回复留言,则本条为子留言,需要关联查询
|
||||
*/
|
||||
@Column(name = "father_comment_id")
|
||||
private String fatherCommentId;
|
||||
|
||||
/**
|
||||
* 回复的那个视频id
|
||||
*/
|
||||
@Column(name = "vlog_id")
|
||||
private String vlogId;
|
||||
|
||||
/**
|
||||
* 发布留言的用户id
|
||||
*/
|
||||
@Column(name = "comment_user_id")
|
||||
private String commentUserId;
|
||||
|
||||
/**
|
||||
* 留言内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 留言的点赞总数
|
||||
*/
|
||||
@Column(name = "like_counts")
|
||||
private Integer likeCounts;
|
||||
|
||||
/**
|
||||
* 留言时间
|
||||
*/
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* @return id
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id
|
||||
*/
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取评论的视频是哪个作者(vloger)的关联id
|
||||
*
|
||||
* @return vloger_id - 评论的视频是哪个作者(vloger)的关联id
|
||||
*/
|
||||
public String getVlogerId() {
|
||||
return vlogerId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置评论的视频是哪个作者(vloger)的关联id
|
||||
*
|
||||
* @param vlogerId 评论的视频是哪个作者(vloger)的关联id
|
||||
*/
|
||||
public void setVlogerId(String vlogerId) {
|
||||
this.vlogerId = vlogerId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取如果是回复留言,则本条为子留言,需要关联查询
|
||||
*
|
||||
* @return father_comment_id - 如果是回复留言,则本条为子留言,需要关联查询
|
||||
*/
|
||||
public String getFatherCommentId() {
|
||||
return fatherCommentId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置如果是回复留言,则本条为子留言,需要关联查询
|
||||
*
|
||||
* @param fatherCommentId 如果是回复留言,则本条为子留言,需要关联查询
|
||||
*/
|
||||
public void setFatherCommentId(String fatherCommentId) {
|
||||
this.fatherCommentId = fatherCommentId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取回复的那个视频id
|
||||
*
|
||||
* @return vlog_id - 回复的那个视频id
|
||||
*/
|
||||
public String getVlogId() {
|
||||
return vlogId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置回复的那个视频id
|
||||
*
|
||||
* @param vlogId 回复的那个视频id
|
||||
*/
|
||||
public void setVlogId(String vlogId) {
|
||||
this.vlogId = vlogId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取发布留言的用户id
|
||||
*
|
||||
* @return comment_user_id - 发布留言的用户id
|
||||
*/
|
||||
public String getCommentUserId() {
|
||||
return commentUserId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置发布留言的用户id
|
||||
*
|
||||
* @param commentUserId 发布留言的用户id
|
||||
*/
|
||||
public void setCommentUserId(String commentUserId) {
|
||||
this.commentUserId = commentUserId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取留言内容
|
||||
*
|
||||
* @return content - 留言内容
|
||||
*/
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置留言内容
|
||||
*
|
||||
* @param content 留言内容
|
||||
*/
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取留言的点赞总数
|
||||
*
|
||||
* @return like_counts - 留言的点赞总数
|
||||
*/
|
||||
public Integer getLikeCounts() {
|
||||
return likeCounts;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置留言的点赞总数
|
||||
*
|
||||
* @param likeCounts 留言的点赞总数
|
||||
*/
|
||||
public void setLikeCounts(Integer likeCounts) {
|
||||
this.likeCounts = likeCounts;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取留言时间
|
||||
*
|
||||
* @return create_time - 留言时间
|
||||
*/
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置留言时间
|
||||
*
|
||||
* @param createTime 留言时间
|
||||
*/
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
}
|
@ -1,114 +0,0 @@
|
||||
package com.wzj.soopin.content.domain.pojo;
|
||||
|
||||
import org.springframework.data.annotation.Id;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Table;
|
||||
import java.util.Date;
|
||||
|
||||
@Table(name = "t_fans")
|
||||
public class Fans {
|
||||
@Id
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 作家用户id
|
||||
*/
|
||||
@Column(name = "vloger_id")
|
||||
private String vlogerId;
|
||||
|
||||
@Column(name = "created_time")
|
||||
private Date createdTime;
|
||||
|
||||
|
||||
/**
|
||||
* 粉丝用户id
|
||||
*/
|
||||
@Column(name = "fan_id")
|
||||
private String fanId;
|
||||
|
||||
/**
|
||||
* 粉丝是否是vloger的朋友,如果成为朋友,则本表的双方此字段都需要设置为1,如果有一人取关,则两边都需要设置为0
|
||||
*/
|
||||
@Column(name = "is_fan_friend_of_mine")
|
||||
private Integer isFanFriendOfMine;
|
||||
|
||||
/**
|
||||
* @return id
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id
|
||||
*/
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取作家用户id
|
||||
*
|
||||
* @return vloger_id - 作家用户id
|
||||
*/
|
||||
public String getVlogerId() {
|
||||
return vlogerId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置作家用户id
|
||||
*
|
||||
* @param vlogerId 作家用户id
|
||||
*/
|
||||
public void setVlogerId(String vlogerId) {
|
||||
this.vlogerId = vlogerId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取粉丝用户id
|
||||
*
|
||||
* @return fan_id - 粉丝用户id
|
||||
*/
|
||||
public String getFanId() {
|
||||
return fanId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置粉丝用户id
|
||||
*
|
||||
* @param fanId 粉丝用户id
|
||||
*/
|
||||
public void setFanId(String fanId) {
|
||||
this.fanId = fanId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取粉丝是否是vloger的朋友,如果成为朋友,则本表的双方此字段都需要设置为1,如果有一人取关,则两边都需要设置为0
|
||||
*
|
||||
* @return is_fan_friend_of_mine - 粉丝是否是vloger的朋友,如果成为朋友,则本表的双方此字段都需要设置为1,如果有一人取关,则两边都需要设置为0
|
||||
*/
|
||||
public Integer getIsFanFriendOfMine() {
|
||||
return isFanFriendOfMine;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置粉丝是否是vloger的朋友,如果成为朋友,则本表的双方此字段都需要设置为1,如果有一人取关,则两边都需要设置为0
|
||||
*
|
||||
* @param isFanFriendOfMine 粉丝是否是vloger的朋友,如果成为朋友,则本表的双方此字段都需要设置为1,如果有一人取关,则两边都需要设置为0
|
||||
*/
|
||||
public void setIsFanFriendOfMine(Integer isFanFriendOfMine) {
|
||||
this.isFanFriendOfMine = isFanFriendOfMine;
|
||||
}
|
||||
|
||||
public void setCreateTime() {
|
||||
}
|
||||
|
||||
public Date getCreatedTime() {
|
||||
return createdTime;
|
||||
}
|
||||
|
||||
public void setCreatedTime(Date createdTime) {
|
||||
this.createdTime = createdTime;
|
||||
}
|
||||
}
|
@ -1,83 +0,0 @@
|
||||
package com.wzj.soopin.content.domain.pojo;
|
||||
|
||||
import org.springframework.data.annotation.Id;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Table;
|
||||
import java.util.Date;
|
||||
|
||||
@Table(name = "t_my_liked_vlog")
|
||||
public class MyLikedVlog {
|
||||
@Id
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@Column(name = "user_id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 喜欢的短视频id
|
||||
*/
|
||||
@Column(name = "vlog_id")
|
||||
private String vlogId;
|
||||
|
||||
@Column(name = "created_time")
|
||||
private Date createdTime;
|
||||
|
||||
/**
|
||||
* @return id
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id
|
||||
*/
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户id
|
||||
*
|
||||
* @return user_id - 用户id
|
||||
*/
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置用户id
|
||||
*
|
||||
* @param userId 用户id
|
||||
*/
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取喜欢的短视频id
|
||||
*
|
||||
* @return vlog_id - 喜欢的短视频id
|
||||
*/
|
||||
public String getVlogId() {
|
||||
return vlogId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置喜欢的短视频id
|
||||
*
|
||||
* @param vlogId 喜欢的短视频id
|
||||
*/
|
||||
public void setVlogId(String vlogId) {
|
||||
this.vlogId = vlogId;
|
||||
}
|
||||
|
||||
|
||||
public void setCreatedTime(Date date) {
|
||||
this.createdTime = date;
|
||||
}
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
package com.wzj.soopin.content.domain.pojo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.Table;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Table(name = "r_user_member")
|
||||
public class UserMember {
|
||||
private String userId;
|
||||
private String memberId;
|
||||
}
|
@ -1,387 +0,0 @@
|
||||
package com.wzj.soopin.content.domain.pojo;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import java.util.Date;
|
||||
|
||||
@Table(name="t_users")
|
||||
public class Users {
|
||||
@Id
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
private String mobile;
|
||||
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 昵称,媒体号
|
||||
*/
|
||||
private String nickname;
|
||||
|
||||
|
||||
/**
|
||||
* 慕课号,类似头条号,抖音号,公众号,唯一标识,需要限制修改次数,比如终生1次,每年1次,每半年1次等,可以用于付费修改。
|
||||
*/
|
||||
@Column(name = "imooc_num")
|
||||
private String imoocNum;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
private String face;
|
||||
|
||||
/**
|
||||
* 性别 1:男 0:女 2:保密
|
||||
*/
|
||||
private Integer sex;
|
||||
|
||||
/**
|
||||
* 生日
|
||||
*/
|
||||
private Date birthday;
|
||||
|
||||
/**
|
||||
* 国家
|
||||
*/
|
||||
private String country;
|
||||
|
||||
/**
|
||||
* 省份
|
||||
*/
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 城市
|
||||
*/
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 区县
|
||||
*/
|
||||
private String district;
|
||||
|
||||
/**
|
||||
* 简介
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 个人介绍的背景图
|
||||
*/
|
||||
@Column(name = "bg_img")
|
||||
private String bgImg;
|
||||
|
||||
/**
|
||||
* 慕课号能否被修改,1:默认,可以修改;0,无法修改
|
||||
*/
|
||||
@Column(name = "can_imooc_num_be_updated")
|
||||
private Integer canImoocNumBeUpdated;
|
||||
|
||||
/**
|
||||
* 创建时间 创建时间
|
||||
*/
|
||||
@Column(name = "created_time")
|
||||
private Date createdTime;
|
||||
|
||||
/**
|
||||
* 更新时间 更新时间
|
||||
*/
|
||||
@Column(name = "updated_time")
|
||||
private Date updatedTime;
|
||||
|
||||
/**
|
||||
* @return id
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id
|
||||
*/
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取手机号
|
||||
*
|
||||
* @return mobile - 手机号
|
||||
*/
|
||||
public String getMobile() {
|
||||
return mobile;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置手机号
|
||||
*
|
||||
* @param mobile 手机号
|
||||
*/
|
||||
public void setMobile(String mobile) {
|
||||
this.mobile = mobile;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取昵称,媒体号
|
||||
*
|
||||
* @return nickname - 昵称,媒体号
|
||||
*/
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置昵称,媒体号
|
||||
*
|
||||
* @param nickname 昵称,媒体号
|
||||
*/
|
||||
public void setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取慕课号,类似头条号,抖音号,公众号,唯一标识,需要限制修改次数,比如终生1次,每年1次,每半年1次等,可以用于付费修改。
|
||||
*
|
||||
* @return imooc_num - 慕课号,类似头条号,抖音号,公众号,唯一标识,需要限制修改次数,比如终生1次,每年1次,每半年1次等,可以用于付费修改。
|
||||
*/
|
||||
public String getImoocNum() {
|
||||
return imoocNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置慕课号,类似头条号,抖音号,公众号,唯一标识,需要限制修改次数,比如终生1次,每年1次,每半年1次等,可以用于付费修改。
|
||||
*
|
||||
* @param imoocNum 慕课号,类似头条号,抖音号,公众号,唯一标识,需要限制修改次数,比如终生1次,每年1次,每半年1次等,可以用于付费修改。
|
||||
*/
|
||||
public void setImoocNum(String imoocNum) {
|
||||
this.imoocNum = imoocNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取头像
|
||||
*
|
||||
* @return face - 头像
|
||||
*/
|
||||
public String getFace() {
|
||||
return face;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置头像
|
||||
*
|
||||
* @param face 头像
|
||||
*/
|
||||
public void setFace(String face) {
|
||||
this.face = face;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取性别 1:男 0:女 2:保密
|
||||
*
|
||||
* @return sex - 性别 1:男 0:女 2:保密
|
||||
*/
|
||||
public Integer getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置性别 1:男 0:女 2:保密
|
||||
*
|
||||
* @param sex 性别 1:男 0:女 2:保密
|
||||
*/
|
||||
public void setSex(Integer sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取生日
|
||||
*
|
||||
* @return birthday - 生日
|
||||
*/
|
||||
public Date getBirthday() {
|
||||
return birthday;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置生日
|
||||
*
|
||||
* @param birthday 生日
|
||||
*/
|
||||
public void setBirthday(Date birthday) {
|
||||
this.birthday = birthday;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取国家
|
||||
*
|
||||
* @return country - 国家
|
||||
*/
|
||||
public String getCountry() {
|
||||
return country;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置国家
|
||||
*
|
||||
* @param country 国家
|
||||
*/
|
||||
public void setCountry(String country) {
|
||||
this.country = country;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取省份
|
||||
*
|
||||
* @return province - 省份
|
||||
*/
|
||||
public String getProvince() {
|
||||
return province;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置省份
|
||||
*
|
||||
* @param province 省份
|
||||
*/
|
||||
public void setProvince(String province) {
|
||||
this.province = province;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取城市
|
||||
*
|
||||
* @return city - 城市
|
||||
*/
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置城市
|
||||
*
|
||||
* @param city 城市
|
||||
*/
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取区县
|
||||
*
|
||||
* @return district - 区县
|
||||
*/
|
||||
public String getDistrict() {
|
||||
return district;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置区县
|
||||
*
|
||||
* @param district 区县
|
||||
*/
|
||||
public void setDistrict(String district) {
|
||||
this.district = district;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取简介
|
||||
*
|
||||
* @return description - 简介
|
||||
*/
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置简介
|
||||
*
|
||||
* @param description 简介
|
||||
*/
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取个人介绍的背景图
|
||||
*
|
||||
* @return bg_img - 个人介绍的背景图
|
||||
*/
|
||||
public String getBgImg() {
|
||||
return bgImg;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置个人介绍的背景图
|
||||
*
|
||||
* @param bgImg 个人介绍的背景图
|
||||
*/
|
||||
public void setBgImg(String bgImg) {
|
||||
this.bgImg = bgImg;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取慕课号能否被修改,1:默认,可以修改;0,无法修改
|
||||
*
|
||||
* @return can_imooc_num_be_updated - 慕课号能否被修改,1:默认,可以修改;0,无法修改
|
||||
*/
|
||||
public Integer getCanImoocNumBeUpdated() {
|
||||
return canImoocNumBeUpdated;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置慕课号能否被修改,1:默认,可以修改;0,无法修改
|
||||
*
|
||||
* @param canImoocNumBeUpdated 慕课号能否被修改,1:默认,可以修改;0,无法修改
|
||||
*/
|
||||
public void setCanImoocNumBeUpdated(Integer canImoocNumBeUpdated) {
|
||||
this.canImoocNumBeUpdated = canImoocNumBeUpdated;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取创建时间 创建时间
|
||||
*
|
||||
* @return created_time - 创建时间 创建时间
|
||||
*/
|
||||
public Date getCreatedTime() {
|
||||
return createdTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置创建时间 创建时间
|
||||
*
|
||||
* @param createdTime 创建时间 创建时间
|
||||
*/
|
||||
public void setCreatedTime(Date createdTime) {
|
||||
this.createdTime = createdTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取更新时间 更新时间
|
||||
*
|
||||
* @return updated_time - 更新时间 更新时间
|
||||
*/
|
||||
public Date getUpdatedTime() {
|
||||
return updatedTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置更新时间 更新时间
|
||||
*
|
||||
* @param updatedTime 更新时间 更新时间
|
||||
*/
|
||||
public void setUpdatedTime(Date updatedTime) {
|
||||
this.updatedTime = updatedTime;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
}
|
@ -1,361 +0,0 @@
|
||||
package com.wzj.soopin.content.domain.pojo;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import java.util.Date;
|
||||
|
||||
@Table(name="t_vlog")
|
||||
public class Vlog {
|
||||
@Id
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 对应用户表id,vlog视频发布者
|
||||
*/
|
||||
@Column(name = "vloger_id")
|
||||
private String vlogerId;
|
||||
|
||||
/**
|
||||
* 视频播放地址
|
||||
*/
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* 视频封面
|
||||
*/
|
||||
private String cover;
|
||||
|
||||
/**
|
||||
* 视频标题,可以为空
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 视频width
|
||||
*/
|
||||
private Integer width;
|
||||
|
||||
/**
|
||||
* 视频height
|
||||
*/
|
||||
private Integer height;
|
||||
|
||||
/**
|
||||
* 点赞总数
|
||||
*/
|
||||
@Column(name = "like_counts")
|
||||
private Integer likeCounts;
|
||||
|
||||
/**
|
||||
* 评论总数
|
||||
*/
|
||||
@Column(name = "comments_counts")
|
||||
private Integer commentsCounts;
|
||||
|
||||
/**
|
||||
* 是否私密,用户可以设置私密,如此可以不公开给比人看
|
||||
*/
|
||||
@Column(name = "is_private")
|
||||
private Integer isPrivate;
|
||||
|
||||
/**
|
||||
* 创建时间 创建时间
|
||||
*/
|
||||
@Column(name = "created_time")
|
||||
private Date createdTime;
|
||||
|
||||
/**
|
||||
* 更新时间 更新时间
|
||||
*/
|
||||
@Column(name = "updated_time")
|
||||
private Date updatedTime;
|
||||
|
||||
/**
|
||||
* 视频状态
|
||||
*/
|
||||
@Column(name = "status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 云点播文件ID
|
||||
*/
|
||||
@Column(name = "file_id")
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 审核结果
|
||||
*/
|
||||
@Column(name = "reason")
|
||||
private String reason;
|
||||
|
||||
/**
|
||||
* 视频归属地
|
||||
*/
|
||||
@Column(name = "city_code")
|
||||
private Integer cityCode;
|
||||
|
||||
/**
|
||||
* 首帧图
|
||||
*/
|
||||
@Column(name = "first_frame_img")
|
||||
private String firstFrameImg;
|
||||
|
||||
/**
|
||||
* @return id
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id
|
||||
*/
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取对应用户表id,vlog视频发布者
|
||||
*
|
||||
* @return vloger_id - 对应用户表id,vlog视频发布者
|
||||
*/
|
||||
public String getVlogerId() {
|
||||
return vlogerId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置对应用户表id,vlog视频发布者
|
||||
*
|
||||
* @param vlogerId 对应用户表id,vlog视频发布者
|
||||
*/
|
||||
public void setVlogerId(String vlogerId) {
|
||||
this.vlogerId = vlogerId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取视频播放地址
|
||||
*
|
||||
* @return url - 视频播放地址
|
||||
*/
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置视频播放地址
|
||||
*
|
||||
* @param url 视频播放地址
|
||||
*/
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取视频封面
|
||||
*
|
||||
* @return cover - 视频封面
|
||||
*/
|
||||
public String getCover() {
|
||||
return cover;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置视频封面
|
||||
*
|
||||
* @param cover 视频封面
|
||||
*/
|
||||
public void setCover(String cover) {
|
||||
this.cover = cover;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取视频标题,可以为空
|
||||
*
|
||||
* @return title - 视频标题,可以为空
|
||||
*/
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置视频标题,可以为空
|
||||
*
|
||||
* @param title 视频标题,可以为空
|
||||
*/
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取视频width
|
||||
*
|
||||
* @return width - 视频width
|
||||
*/
|
||||
public Integer getWidth() {
|
||||
return width;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置视频width
|
||||
*
|
||||
* @param width 视频width
|
||||
*/
|
||||
public void setWidth(Integer width) {
|
||||
this.width = width;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取视频height
|
||||
*
|
||||
* @return height - 视频height
|
||||
*/
|
||||
public Integer getHeight() {
|
||||
return height;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置视频height
|
||||
*
|
||||
* @param height 视频height
|
||||
*/
|
||||
public void setHeight(Integer height) {
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取点赞总数
|
||||
*
|
||||
* @return like_counts - 点赞总数
|
||||
*/
|
||||
public Integer getLikeCounts() {
|
||||
return likeCounts;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置点赞总数
|
||||
*
|
||||
* @param likeCounts 点赞总数
|
||||
*/
|
||||
public void setLikeCounts(Integer likeCounts) {
|
||||
this.likeCounts = likeCounts;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取评论总数
|
||||
*
|
||||
* @return comments_counts - 评论总数
|
||||
*/
|
||||
public Integer getCommentsCounts() {
|
||||
return commentsCounts;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置评论总数
|
||||
*
|
||||
* @param commentsCounts 评论总数
|
||||
*/
|
||||
public void setCommentsCounts(Integer commentsCounts) {
|
||||
this.commentsCounts = commentsCounts;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取是否私密,用户可以设置私密,如此可以不公开给比人看
|
||||
*
|
||||
* @return is_private - 是否私密,用户可以设置私密,如此可以不公开给比人看
|
||||
*/
|
||||
public Integer getIsPrivate() {
|
||||
return isPrivate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置是否私密,用户可以设置私密,如此可以不公开给比人看
|
||||
*
|
||||
* @param isPrivate 是否私密,用户可以设置私密,如此可以不公开给比人看
|
||||
*/
|
||||
public void setIsPrivate(Integer isPrivate) {
|
||||
this.isPrivate = isPrivate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取创建时间 创建时间
|
||||
*
|
||||
* @return created_time - 创建时间 创建时间
|
||||
*/
|
||||
public Date getCreatedTime() {
|
||||
return createdTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置创建时间 创建时间
|
||||
*
|
||||
* @param createdTime 创建时间 创建时间
|
||||
*/
|
||||
public void setCreatedTime(Date createdTime) {
|
||||
this.createdTime = createdTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取更新时间 更新时间
|
||||
*
|
||||
* @return updated_time - 更新时间 更新时间
|
||||
*/
|
||||
public Date getUpdatedTime() {
|
||||
return updatedTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置更新时间 更新时间
|
||||
*
|
||||
* @param updatedTime 更新时间 更新时间
|
||||
*/
|
||||
public void setUpdatedTime(Date updatedTime) {
|
||||
this.updatedTime = updatedTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置视频状态
|
||||
*/
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置视频状态
|
||||
*/
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public String getFileId() {
|
||||
return fileId;
|
||||
}
|
||||
|
||||
public void setFileId(String fileId) {
|
||||
this.fileId = fileId;
|
||||
}
|
||||
|
||||
public String getReason() {
|
||||
return reason;
|
||||
}
|
||||
|
||||
public void setReason(String reason) {
|
||||
this.reason = reason;
|
||||
}
|
||||
|
||||
public Integer getCityCode() {
|
||||
return cityCode;
|
||||
}
|
||||
|
||||
public void setCityCode(Integer cityCode) {
|
||||
this.cityCode = cityCode;
|
||||
}
|
||||
|
||||
public String getFirstFrameImg() {
|
||||
return firstFrameImg;
|
||||
}
|
||||
|
||||
public void setFirstFrameImg(String firstFrameImg) {
|
||||
this.firstFrameImg = firstFrameImg;
|
||||
}
|
||||
}
|
@ -1,8 +1,10 @@
|
||||
package com.wzj.soopin.content.mapper.mapper;
|
||||
|
||||
import com.imooc.pojo.Comment;
|
||||
import com.wzj.soopin.content.domain.po.Comment;
|
||||
import com.wzj.soopin.content.domain.vo.CommentVO;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface CommentMapper extends MyMapper<Comment> {
|
||||
public interface CommentMapper extends BaseMapperPlus<Comment, CommentVO> {
|
||||
}
|
||||
|
@ -1,14 +1,16 @@
|
||||
package com.wzj.soopin.content.mapper.mapper;
|
||||
|
||||
import com.imooc.vo.CommentVO;
|
||||
import com.wzj.soopin.content.domain.po.Comment;
|
||||
import com.wzj.soopin.content.domain.vo.CommentVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Repository
|
||||
public interface CommentMapperCustom {
|
||||
public interface CommentMapperCustom extends BaseMapperPlus<Comment, CommentVO> {
|
||||
|
||||
public List<CommentVO> getCommentList(@Param("paramMap") Map<String, Object> map);
|
||||
|
||||
|
@ -1,42 +1,18 @@
|
||||
package com.wzj.soopin.content.mapper.mapper;
|
||||
|
||||
import com.imooc.pojo.Fans;
|
||||
import com.imooc.vo.VlogerVO;
|
||||
import com.wzj.soopin.content.domain.po.Fans;
|
||||
import com.wzj.soopin.content.domain.po.Vlog;
|
||||
import com.wzj.soopin.content.domain.vo.FansVO;
|
||||
import com.wzj.soopin.content.domain.vo.VlogerVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
//@Repository
|
||||
//public interface FansMapper extends MyMapper<Fans> {
|
||||
// int updateByPrimaryKeySelective(Fans record);
|
||||
//
|
||||
//
|
||||
// @Select("<script> " +
|
||||
// "SELECT vloger_id, is_fan_friend_of_mine FROM t_fans " +
|
||||
// "WHERE fan_id = #{currentUserId} " +
|
||||
// "AND vloger_id IN " +
|
||||
// "<foreach collection='vlogerIds' item='vlogerId' open='(' separator=',' close=')'> " +
|
||||
// "#{vlogerId} " +
|
||||
// "</foreach> " +
|
||||
// "</script>")
|
||||
// List<Map<String, Object>> getFollowedVlogerIds(@Param("currentUserId")String currentUserId,@Param("vlogerIds")List<String> vlogerIds);
|
||||
//// Set<String> getFollowedVlogerIds(
|
||||
//// @Param("currentUserId") String currentUserId,
|
||||
//// @Param("vlogerIds") List<String> vlogerIds
|
||||
//// );
|
||||
//
|
||||
//}
|
||||
|
||||
@Repository
|
||||
public interface FansMapper {
|
||||
int updateByPrimaryKeySelective(Fans record);
|
||||
public interface FansMapper extends BaseMapperPlus<Fans, FansVO> {
|
||||
public List<Map<String, Object>> getFollowedVlogerIds(@Param("currentUserId")String currentUserId,@Param("vlogerIds")List<String> vlogerIds);
|
||||
|
||||
int insert(@Param("fansData") Map<String, Object> vlogData);
|
||||
|
||||
public List<VlogerVO> selectByExample(@Param("paramMap") Map<String, Object> map);
|
||||
|
||||
int delete(@Param("id") String id);
|
||||
}
|
||||
|
@ -1,16 +1,18 @@
|
||||
package com.wzj.soopin.content.mapper.mapper;
|
||||
|
||||
import com.imooc.pojo.Fans;
|
||||
import com.imooc.vo.FansVO;
|
||||
import com.imooc.vo.VlogerVO;
|
||||
import com.wzj.soopin.content.domain.po.Fans;
|
||||
import com.wzj.soopin.content.domain.po.Vlog;
|
||||
import com.wzj.soopin.content.domain.vo.FansVO;
|
||||
import com.wzj.soopin.content.domain.vo.VlogerVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Repository
|
||||
public interface FansMapperCustom extends MyMapper<Fans> {
|
||||
public interface FansMapperCustom extends BaseMapperPlus<Vlog, VlogerVO> {
|
||||
|
||||
public List<VlogerVO> queryMyFollows(@Param("paramMap") Map<String, Object> map);
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
package com.wzj.soopin.content.mapper.mapper;
|
||||
|
||||
import com.imooc.pojo.MyLikedVlog;
|
||||
import com.wzj.soopin.content.domain.po.MyLikedVlog;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface MyLikedVlogMapper extends MyMapper<MyLikedVlog> {
|
||||
public interface MyLikedVlogMapper extends BaseMapperPlus<MyLikedVlog,MyLikedVlog> {
|
||||
}
|
||||
|
@ -1,34 +0,0 @@
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2014-2016 abel533@gmail.com
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package com.wzj.soopin.content.mapper.mapper;
|
||||
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
import tk.mybatis.mapper.common.MySqlMapper;
|
||||
|
||||
/**
|
||||
* 继承自己的MyMapper
|
||||
*/
|
||||
public interface MyMapper<T> extends Mapper<T>, MySqlMapper<T> {
|
||||
}
|
@ -1,14 +1,15 @@
|
||||
package com.wzj.soopin.content.mapper.mapper;
|
||||
|
||||
import com.imooc.pojo.UserMember;
|
||||
import com.imooc.pojo.Users;
|
||||
import com.wzj.soopin.content.domain.po.Users;
|
||||
import com.wzj.soopin.content.domain.vo.UsersVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 短视频用户与商城会员数据处理层
|
||||
*/
|
||||
@Mapper
|
||||
public interface UserMemberMapper extends MyMapper<UserMember> {
|
||||
public interface UserMemberMapper extends BaseMapperPlus<Users, UsersVO> {
|
||||
|
||||
Users getUserByMemberId(String memberId);
|
||||
}
|
||||
|
@ -1,17 +1,18 @@
|
||||
package com.wzj.soopin.content.mapper.mapper;
|
||||
|
||||
import com.imooc.bo.UpdatedUserBO;
|
||||
import com.imooc.pojo.Users;
|
||||
import com.imooc.vo.UsersVO;
|
||||
import com.wzj.soopin.content.domain.bo.UpdatedUserBO;
|
||||
import com.wzj.soopin.content.domain.po.Users;
|
||||
import com.wzj.soopin.content.domain.vo.UsersVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface UsersMapper extends MyMapper<Users> {
|
||||
public interface UsersMapper extends BaseMapperPlus<Users, UsersVO> {
|
||||
|
||||
@Select("SELECT * FROM t_users WHERE nickname LIKE CONCAT('%', #{nickname}, '%')")
|
||||
List<UsersVO> searchByNickname(String nickname);
|
||||
|
@ -1,56 +1,20 @@
|
||||
package com.wzj.soopin.content.mapper.mapper;
|
||||
|
||||
import com.imooc.vo.IndexVlogVO;
|
||||
import com.wzj.soopin.content.domain.po.Vlog;
|
||||
import com.wzj.soopin.content.domain.vo.IndexVlogVO;
|
||||
import com.wzj.soopin.content.domain.vo.VlogerVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
//@Repository
|
||||
//public interface VlogMapper extends MyMapper<Vlog> {
|
||||
//}
|
||||
@Repository
|
||||
public interface VlogMapper {
|
||||
// public List<IndexVlogVO> updateVlogStatus(@Param("paramMap") Map<String, Object> map);
|
||||
/**
|
||||
* 通用动态更新方法
|
||||
* @param primaryKey 主键字段名
|
||||
* @param idValue 主键值
|
||||
* @param updateFields 待更新的字段Map(key=字段名, value=字段值)
|
||||
* @return 影响的行数
|
||||
*/
|
||||
int dynamicUpdate(
|
||||
@Param("primaryKey") String primaryKey,
|
||||
@Param("idValue") Object idValue,
|
||||
@Param("updateFields") Map<String, Object> updateFields
|
||||
);
|
||||
public interface VlogMapper extends BaseMapperPlus<Vlog, VlogerVO> {
|
||||
|
||||
/**
|
||||
* Vlog表多条件动态更新
|
||||
* @param updateFields 需要更新的字段及值(Map结构)
|
||||
* @param conditions 更新条件(Map结构)
|
||||
* @return 受影响的行数
|
||||
*/
|
||||
int updateVlogByConditions(
|
||||
@Param("updates") Map<String, Object> updateFields,
|
||||
@Param("conditions") Map<String, Object> conditions
|
||||
);
|
||||
|
||||
/**
|
||||
* 单条插入vlog记录
|
||||
* @param vlogData 插入数据的键值对(key=列名, value=列值)
|
||||
* @return 影响的行数
|
||||
*/
|
||||
int dynamicInsert(@Param("vlogData") Map<String, Object> vlogData);
|
||||
|
||||
/**
|
||||
* 批量插入vlog记录
|
||||
* @param vlogList 插入数据列表(每个Map代表一行数据)
|
||||
* @return 影响的行数
|
||||
*/
|
||||
int dynamicBatchInsert(@Param("vlogList") List<Map<String, Object>> vlogList);
|
||||
|
||||
public List<IndexVlogVO> selectMyPublic(@Param("paramMap")Map<String, Object> map);
|
||||
public List<IndexVlogVO> getVlogDetailFromId(@Param("paramMap")Map<String, Object> map);
|
||||
|
@ -1,14 +1,17 @@
|
||||
package com.wzj.soopin.content.mapper.mapper;
|
||||
|
||||
import com.imooc.vo.IndexVlogVO;
|
||||
import com.wzj.soopin.content.domain.po.Vlog;
|
||||
import com.wzj.soopin.content.domain.vo.IndexVlogVO;
|
||||
import com.wzj.soopin.content.domain.vo.VlogerVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Repository
|
||||
public interface VlogMapperCustom {
|
||||
public interface VlogMapperCustom extends BaseMapperPlus<Vlog, VlogerVO> {
|
||||
|
||||
public List<IndexVlogVO> getIndexVlogList(@Param("paramMap")Map<String, Object> map);
|
||||
|
||||
|
@ -1,8 +1,7 @@
|
||||
package com.wzj.soopin.content.mapper.repository;
|
||||
|
||||
import com.imooc.mo.MessageMO;
|
||||
import com.wzj.soopin.content.domain.mo.MessageMO;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.mongodb.repository.MongoRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,9 +1,10 @@
|
||||
package com.wzj.soopin.content.service;
|
||||
|
||||
import com.imooc.bo.CommentBO;
|
||||
import com.imooc.pojo.Comment;
|
||||
import com.imooc.utils.PagedGridResult;
|
||||
import com.imooc.vo.CommentVO;
|
||||
|
||||
import com.wzj.soopin.content.domain.bo.CommentBO;
|
||||
import com.wzj.soopin.content.domain.po.Comment;
|
||||
import com.wzj.soopin.content.domain.vo.CommentVO;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
public interface CommentService {
|
||||
|
||||
@ -15,10 +16,10 @@ public interface CommentService {
|
||||
/**
|
||||
* 查询评论的列表
|
||||
*/
|
||||
public PagedGridResult queryVlogComments(String vlogId,
|
||||
String userId,
|
||||
Integer page,
|
||||
Integer pageSize);
|
||||
public TableDataInfo<CommentVO> queryVlogComments(String vlogId,
|
||||
String userId,
|
||||
Integer page,
|
||||
Integer pageSize);
|
||||
|
||||
/**
|
||||
* 删除评论
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.wzj.soopin.content.service;
|
||||
|
||||
import com.imooc.utils.PagedGridResult;
|
||||
import com.wzj.soopin.content.domain.vo.FansVO;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
public interface FansService {
|
||||
|
||||
@ -22,14 +24,14 @@ public interface FansService {
|
||||
/**
|
||||
* 查询我关注的博主列表
|
||||
*/
|
||||
public PagedGridResult queryMyFollows(String myId,
|
||||
Integer page,
|
||||
Integer pageSize);
|
||||
public TableDataInfo<FansVO> queryMyFollows(String myId,
|
||||
Integer page,
|
||||
Integer pageSize);
|
||||
|
||||
/**
|
||||
* 查询我的粉丝列表
|
||||
*/
|
||||
public PagedGridResult queryMyFans(String myId,
|
||||
public TableDataInfo<FansVO> queryMyFans(String myId,
|
||||
Integer page,
|
||||
Integer pageSize);
|
||||
}
|
||||
|
@ -1,23 +1,21 @@
|
||||
package com.wzj.soopin.content.service.impl;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.imooc.base.BaseInfoProperties;
|
||||
import com.imooc.base.RabbitMQConfig;
|
||||
import com.imooc.enums.MessageEnum;
|
||||
import com.imooc.enums.YesOrNo;
|
||||
import com.imooc.mapper.FansMapper;
|
||||
import com.imooc.mapper.FansMapperCustom;
|
||||
import com.imooc.mo.MessageMO;
|
||||
import com.imooc.pojo.Fans;
|
||||
import com.imooc.service.FansService;
|
||||
import com.imooc.service.MsgService;
|
||||
import com.imooc.utils.JsonUtils;
|
||||
import com.imooc.utils.PagedGridResult;
|
||||
import com.imooc.vo.FansVO;
|
||||
import com.imooc.vo.VlogerVO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wzj.soopin.content.domain.mo.MessageMO;
|
||||
import com.wzj.soopin.content.domain.po.Fans;
|
||||
import com.wzj.soopin.content.domain.vo.FansVO;
|
||||
import com.wzj.soopin.content.domain.vo.VlogerVO;
|
||||
import com.wzj.soopin.content.mapper.mapper.FansMapper;
|
||||
import com.wzj.soopin.content.mapper.mapper.FansMapperCustom;
|
||||
import com.wzj.soopin.content.service.FansService;
|
||||
import com.wzj.soopin.content.service.MsgService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.n3r.idworker.Sid;
|
||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||
import org.dromara.common.core.enums.YesOrNo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@ -28,18 +26,19 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class FansServiceImpl extends BaseInfoProperties implements FansService {
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class FansServiceImpl implements FansService {
|
||||
|
||||
@Autowired
|
||||
private FansMapper fansMapper;
|
||||
@Autowired
|
||||
private FansMapperCustom fansMapperCustom;
|
||||
private final FansMapper fansMapper;
|
||||
|
||||
private final FansMapperCustom fansMapperCustom;
|
||||
//
|
||||
@Autowired
|
||||
private MsgService msgService;
|
||||
|
||||
@Autowired
|
||||
public RabbitTemplate rabbitTemplate;
|
||||
private final MsgService msgService;
|
||||
|
||||
|
||||
private final RabbitTemplate rabbitTemplate;
|
||||
//
|
||||
@Autowired
|
||||
private Sid sid;
|
||||
@ -56,24 +55,22 @@ public class FansServiceImpl extends BaseInfoProperties implements FansService {
|
||||
// fans.setVlogerId(vlogerId);
|
||||
// fans.setCreatedTime(new Date());
|
||||
|
||||
Map<String, Object> fans = new HashMap<>();
|
||||
fans.put("id", fid);
|
||||
fans.put("fan_id", myId);
|
||||
fans.put("vloger_id", vlogerId);
|
||||
fans.put("created_time", new Date());
|
||||
Fans fans = new Fans();
|
||||
fans.setId( fid);
|
||||
fans.setFanId( myId);
|
||||
fans.setVlogerId( vlogerId);
|
||||
|
||||
// 判断对方是否关注我,如果关注我,那么双方都要互为朋友关系
|
||||
Fans vloger = queryFansRelationship(vlogerId, myId);
|
||||
System.out.println(vloger);
|
||||
if (vloger != null) {
|
||||
// fans.setIsFanFriendOfMine(YesOrNo.YES.type);
|
||||
fans.put("is_fan_friend_of_mine",YesOrNo.YES.type);
|
||||
fans.setIsFanFriendOfMine( YesOrNo.YES.type);
|
||||
vloger.setIsFanFriendOfMine(YesOrNo.YES.type);
|
||||
fansMapper.updateByPrimaryKeySelective(vloger);
|
||||
System.out.println(vloger.getIsFanFriendOfMine());
|
||||
fansMapper.updateById(vloger);
|
||||
} else {
|
||||
// fans.setIsFanFriendOfMine(YesOrNo.NO.type);
|
||||
fans.put("is_fan_friend_of_mine",YesOrNo.NO.type);
|
||||
fans.setIsFanFriendOfMine(YesOrNo.NO.type);
|
||||
}
|
||||
fansMapper.insert(fans);
|
||||
|
||||
@ -136,17 +133,16 @@ public class FansServiceImpl extends BaseInfoProperties implements FansService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public PagedGridResult queryMyFollows(String myId,
|
||||
Integer page,
|
||||
Integer pageSize) {
|
||||
public TableDataInfo<VlogerVO> queryMyFollows(String myId,
|
||||
Integer page,
|
||||
Integer pageSize) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("myId", myId);
|
||||
|
||||
PageHelper.startPage(page, pageSize);
|
||||
Page<VlogerVO> pageData = fansMapperCustom.selectVoPage(new PageQuery(pageSize,page).build(),
|
||||
new QueryWrapper<Fans>().eq("myId",myId));
|
||||
return TableDataInfo.build(pageData);
|
||||
|
||||
List<VlogerVO> list = fansMapperCustom.queryMyFollows(map);
|
||||
|
||||
return setterPagedGrid(list, page);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,54 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.imooc.mapper.FansMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.imooc.pojo.Fans" >
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" property="id" jdbcType="VARCHAR" />
|
||||
<result column="vloger_id" property="vlogerId" jdbcType="VARCHAR" />
|
||||
<result column="fan_id" property="fanId" jdbcType="VARCHAR" />
|
||||
<result column="is_fan_friend_of_mine" property="isFanFriendOfMine" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.imooc.pojo.Fans">
|
||||
UPDATE t_fans
|
||||
<set>
|
||||
<if test="vlogerId != null"> vloger_id = #{vlogerId}, </if>
|
||||
<if test="fanId != null"> fan_id = #{fanId}, </if>
|
||||
<if test="isFanFriendOfMine != null"> is_fan_friend_of_mine = #{isFanFriendOfMine}, </if>
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 单条插入 -->
|
||||
<insert id="insert">
|
||||
INSERT INTO t_fans
|
||||
<foreach collection="fansData.keys" item="key" open="(" separator="," close=")">
|
||||
${key}
|
||||
</foreach>
|
||||
VALUES
|
||||
<foreach collection="fansData.values" item="value" open="(" separator="," close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!-- 查询 -->
|
||||
<select id="selectByExample" resultType="com.imooc.pojo.Fans" parameterType="map">
|
||||
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
t_fans f
|
||||
WHERE
|
||||
vloger_id = #{paramMap.vlogerId}
|
||||
AND fan_id = #{paramMap.fanId}
|
||||
|
||||
</select>
|
||||
|
||||
<delete id="delete" parameterType="com.imooc.pojo.Fans">
|
||||
DELETE FROM t_fans
|
||||
WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<select id="getFollowedVlogerIds" resultType="com.imooc.pojo.Fans" parameterType="map">
|
||||
|
||||
@ -60,14 +15,5 @@
|
||||
</foreach>
|
||||
|
||||
</select>
|
||||
<!-- <select id="getFollowedVlogerIds" resultType="com.imooc.pojo.Fans" parameterType="map">-->
|
||||
<!-- SELECT vloger_id, MAX(is_fan_friend_of_mine) AS is_fan_friend_of_mine-->
|
||||
<!-- FROM t_fans-->
|
||||
<!-- WHERE fan_id = #{currentUserId}-->
|
||||
<!-- AND vloger_id IN-->
|
||||
<!-- <foreach collection='vlogerIds' item='vlogerId' open='(' separator=',' close=')'>-->
|
||||
<!-- #{vlogerId}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- GROUP BY vloger_id-->
|
||||
<!-- </select>-->
|
||||
</mapper>
|
||||
|
||||
</mapper>
|
||||
|
Loading…
x
Reference in New Issue
Block a user