Commit 530e1c58 authored by 刘基明's avatar 刘基明

feign相关

parent bdbff526
...@@ -2,10 +2,16 @@ package com.tanpu.community.api.beans; ...@@ -2,10 +2,16 @@ package com.tanpu.community.api.beans;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotEmpty;
@Data @Data
public class ForwardThemeDTO { public class ForwardThemeReq {
@NotEmpty(message = "转发对象id不能为空")
private String formerThemeId; private String formerThemeId;
@NotEmpty(message = "内容不能为空")
private String content; private String content;
private String topicId; private String topicId;
} }
package com.tanpu.community.api.beans.qo;
import io.swagger.annotations.ApiModelProperty;
/**
* 正文
*/
public class MainTextQo {
@ApiModelProperty(value = "标题")
private String title;
@ApiModelProperty(value = "类型 1:讨论无标题 2:长文有标题")
private Integer themeType;
@ApiModelProperty(value = "文本内容")
private String content;
@ApiModelProperty(value = "作者id")
private String authorId;
@ApiModelProperty(value = "所属的话题")
private String topicId;
@ApiModelProperty(value = "昵称")
private String nickName;
@ApiModelProperty(value = "用户头像")
private String userImg;
@ApiModelProperty(value = "认证")
private String authLabel;
@ApiModelProperty(value = "发表时间")
private String upToNowTime;
@ApiModelProperty(value = "被转发的主题")
private String formerThemeId;
}
package com.tanpu.community.api.constants;
public class ClientConstant {
private static final String PRODUCT_SERVICE_NAME ="service-product";
private static final String PRODUCT_WEB_BASE_PATH="product";
private static final String PRODUCT_SERVICE_URL = "${tanpu.qm-product.svc}";
private static final String COURSE_SERVICE_NAME ="service-course";
private static final String COURSE_WEB_BASE_PATH="course";
private static final String COURSE_SERVICE_URL = "${tanpu.qm-course.svc}";
private static final String TANPUROOM_SERVICE_NAME ="service-tanpuroom";
private static final String TANPUROOM_WEB_BASE_PATH="tanpuroom";
private static final String TANPUROOM_SERVICE_URL = "${tanpu.qm-tanpuroom.svc}";
private static final String ZHIBO_SERVICE_NAME ="service-zhibo";
private static final String ZHIBO_WEB_BASE_PATH="zhibo";
private static final String ZHIBO_SERVICE_URL = "${tanpu.qm-zhibo.svc}";
}
package com.tanpu.community.api.constants; package com.tanpu.community.api.enums;
public enum BlockTypeEnum { public enum BlockTypeEnum {
USER(1,"屏蔽用户"), USER(1,"屏蔽用户"),
......
package com.tanpu.community.api.constants; package com.tanpu.community.api.enums;
public enum CollectionTypeEnum { public enum CollectionTypeEnum {
......
package com.tanpu.community.api.constants; package com.tanpu.community.api.enums;
public enum CommentTypeEnum { public enum CommentTypeEnum {
......
package com.tanpu.community.api.constants; package com.tanpu.community.api.enums;
public class CurriculumEnum { public class CurriculumEnum {
//课程类型 //课程类型
......
package com.tanpu.community.api.constants; package com.tanpu.community.api.enums;
public enum DeleteTagEnum { public enum DeleteTagEnum {
......
package com.tanpu.community.api.enums;
//1:产品 2:直播 3:短视频 4:课程
public enum ThemeAttachmentEnum {
PRODUCT(1,"产品"),
ZHIBO(2,"直播"),
SHORTVIDEO(3,"短视频"),
COURSE(4,"课程");
private Integer code;
private String type;
ThemeAttachmentEnum(Integer code, String type) {
this.code = code;
this.type = type;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}
package com.tanpu.community.api.enums;
public enum ThemeTypeEnum {
DISCUSSION(1,"讨论无标题"),
LONG_TEXT(2,"长文有标题");
private Integer code;
private String type;
ThemeTypeEnum(Integer code, String type) {
this.code = code;
this.type = type;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}
package com.tanpu.community.api.constants; package com.tanpu.community.api.enums;
public enum TopicStatusEnum { public enum TopicStatusEnum {
......
...@@ -110,6 +110,11 @@ ...@@ -110,6 +110,11 @@
<artifactId>spring-cloud-starter-openfeign</artifactId> <artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
</dependency>
<dependency> <dependency>
<groupId>mysql</groupId> <groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId> <artifactId>mysql-connector-java</artifactId>
......
...@@ -3,6 +3,7 @@ package com.tanpu.community; ...@@ -3,6 +3,7 @@ package com.tanpu.community;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.transaction.annotation.EnableTransactionManagement;
...@@ -12,6 +13,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; ...@@ -12,6 +13,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@EnableCaching @EnableCaching
@EnableScheduling @EnableScheduling
@ComponentScan({"com.tanpu.common", "com.tanpu.community"}) @ComponentScan({"com.tanpu.common", "com.tanpu.community"})
@EnableFeignClients
public class CommunityApplication { public class CommunityApplication {
public static void main(String[] args) { public static void main(String[] args) {
......
...@@ -2,18 +2,22 @@ package com.tanpu.community.controller; ...@@ -2,18 +2,22 @@ package com.tanpu.community.controller;
import com.tanpu.common.api.CommonResp; import com.tanpu.common.api.CommonResp;
import com.tanpu.community.api.beans.ForwardThemeReq;
import com.tanpu.community.api.beans.qo.MainTextQo;
import com.tanpu.community.api.beans.qo.ThemeQo;
import com.tanpu.community.api.beans.req.CreateCommentReq; import com.tanpu.community.api.beans.req.CreateCommentReq;
import com.tanpu.community.api.beans.req.CreateThemeReq; import com.tanpu.community.api.beans.req.CreateThemeReq;
import com.tanpu.community.api.beans.ForwardThemeDTO;
import com.tanpu.community.api.beans.qo.ThemeQo;
import com.tanpu.community.manager.ThemeManager; import com.tanpu.community.manager.ThemeManager;
import com.tanpu.community.service.FansRelService; import com.tanpu.community.service.FansRelService;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
@RestController @RestController
@Slf4j @Slf4j
...@@ -26,46 +30,55 @@ public class ThemeController { ...@@ -26,46 +30,55 @@ public class ThemeController {
@Autowired @Autowired
private FansRelService fansRelService; private FansRelService fansRelService;
@ApiOperation("新增主题") @ApiOperation("发表主题")
@PostMapping(value = "/add") @PostMapping(value = "/publish")
@ResponseBody @ResponseBody
public CommonResp insertTheme(@RequestBody CreateThemeReq req){ public CommonResp publishTheme(@RequestBody CreateThemeReq req) {
String userId="liujm"; String userId = "liujm";
themeManager.createTheme(req,userId); themeManager.publishTheme(req, userId);
return CommonResp.success(); return CommonResp.success();
} }
@ApiOperation("圈子首页-推荐") @ApiOperation("圈子首页-推荐")
@RequestMapping(value = "/recmend_list") @RequestMapping(value = "/recmend_list")
@ResponseBody @ResponseBody
public List<ThemeQo> selectHotList(){ public List<ThemeQo> selectHotList() {
String userId="liujm"; String userId = "liujm";
return themeManager.selectHotThemes(userId); return themeManager.selectHotThemes(userId);
} }
@ApiOperation("圈子首页-关注") @ApiOperation("圈子首页-关注")
@RequestMapping(value = "/interest_list") @RequestMapping(value = "/interest_list")
@ResponseBody @ResponseBody
public List<ThemeQo> selectInterestList(){ public List<ThemeQo> selectInterestList() {
String userId="liujm012"; String userId = "liujm012";
return themeManager.selectInterestThemes(userId); return themeManager.selectInterestThemes(userId);
} }
@ApiOperation("评论") @ApiOperation("评论")
@RequestMapping(value = "/comment") @RequestMapping(value = "/comment")
@ResponseBody @ResponseBody
public CommonResp commetOnTheme(@RequestBody CreateCommentReq req){ public CommonResp commetOnTheme(@RequestBody CreateCommentReq req) {
String userId="liujm"; String userId = "liujm";
themeManager.comment(req,userId); themeManager.comment(req, userId);
return CommonResp.success(); return CommonResp.success();
} }
@ApiOperation("主题正文")
@RequestMapping(value = "/main_text")
@ResponseBody
public CommonResp getThemeMainText(@RequestParam String topicId) {
String userId = "liujm";
MainTextQo mainTextQo = themeManager.getMainText(topicId);
return CommonResp.success(mainTextQo);
}
@ApiOperation("转发主题") @ApiOperation("转发主题")
@RequestMapping(value = "/forward") @RequestMapping(value = "/forward")
@ResponseBody @ResponseBody
public CommonResp forwardTheme(ForwardThemeDTO forwardThemeDTO){ public CommonResp forwardTheme(@Validated @RequestBody ForwardThemeReq forwardThemeReq) {
String userId="liujm"; String userId = "liujm";
themeManager.forward(forwardThemeDTO,userId); themeManager.forward(forwardThemeReq, userId);
return CommonResp.success(); return CommonResp.success();
} }
...@@ -73,24 +86,24 @@ public class ThemeController { ...@@ -73,24 +86,24 @@ public class ThemeController {
@ApiOperation("点赞主题") @ApiOperation("点赞主题")
@GetMapping(value = "/like") @GetMapping(value = "/like")
@ResponseBody @ResponseBody
public CommonResp likeOnTheme(@RequestParam String themeId){ public CommonResp likeOnTheme(@RequestParam String themeId) {
String user="liujm"; String user = "liujm";
themeManager.like(themeId,user); themeManager.like(themeId, user);
return CommonResp.success(); return CommonResp.success();
} }
@ApiOperation("分享主题") @ApiOperation("分享主题")
@GetMapping(value = "/share") @GetMapping(value = "/share")
@ResponseBody @ResponseBody
public CommonResp shareTheme(String themeId){ public CommonResp shareTheme(String themeId) {
return CommonResp.success(); return CommonResp.success();
} }
@ApiOperation("收藏主题") @ApiOperation("收藏主题")
@RequestMapping(value = "/book") @RequestMapping(value = "/book")
@ResponseBody @ResponseBody
public CommonResp bookTheme(String themeId){ public CommonResp bookTheme(String themeId) {
String user="liujm"; String user = "liujm";
// themeManager.book(themeId,user); // themeManager.book(themeId,user);
return CommonResp.success(); return CommonResp.success();
} }
...@@ -98,7 +111,7 @@ public class ThemeController { ...@@ -98,7 +111,7 @@ public class ThemeController {
@ApiOperation("举报主题") @ApiOperation("举报主题")
@GetMapping(value = "/complaint") @GetMapping(value = "/complaint")
@ResponseBody @ResponseBody
public CommonResp complaintTheme(@RequestParam String themeId){ public CommonResp complaintTheme(@RequestParam String themeId) {
return CommonResp.failed("功能暂未开放"); return CommonResp.failed("功能暂未开放");
} }
...@@ -106,9 +119,17 @@ public class ThemeController { ...@@ -106,9 +119,17 @@ public class ThemeController {
@ApiOperation("屏蔽") @ApiOperation("屏蔽")
@RequestMapping(value = "/conceal") @RequestMapping(value = "/conceal")
@ResponseBody @ResponseBody
public CommonResp concealTheme(String themeId){ public CommonResp concealTheme(String themeId) {
String user="liujm"; String user = "liujm";
// themeManager.blockContent(themeId,user); // themeManager.blockContent(themeId,user);
return CommonResp.success(); return CommonResp.success();
} }
@GetMapping(value = "/text")
@ResponseBody
public Map<String,String> test(@RequestParam String themeId) {
HashMap<String, String> result = new HashMap<>();
result.put("k","v");
return result;
}
} }
package com.tanpu.community.feign.course;
import com.tanpu.common.api.CommonResp;
import com.tanpu.community.feign.course.vo.CourseDetailExt;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Slf4j
@Component
public class FeignBackClientForCourse implements FallbackFactory<FeignClientForCourse> {
@Override
public FeignClientForCourse create(Throwable throwable) {
return new FeignClientForCourse() {
@Override
public CommonResp<CourseDetailExt> getCourseIdDetailInfo(String id, String packageId) {
log.error("请求信息", throwable);
log.error("FeignClientForCourse.getCourseIdDetailInfo-查询课程id:{},package:{}", id,packageId);
return null;
}
};
}
}
package com.tanpu.community.feign.course;
import com.tanpu.common.api.CommonResp;
import com.tanpu.community.feign.course.vo.CourseDetailExt;
import com.tanpu.community.feign.product.FeignBackClientForProducts;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
//@FeignClient(value = "service-product", contextId = "product",fallbackFactory = FeignBackClientForProducts.class, path = "/product")
@FeignClient(value = "service-course", contextId = "course", fallbackFactory = FeignBackClientForProducts.class, url = "http://127.0.0.1:8198/course")
public interface FeignClientForCourse {
@ApiOperation("courseId 详情页")
@GetMapping("/course/detail/info")
CommonResp<CourseDetailExt> getCourseIdDetailInfo(@ApiParam("课程详情id") @RequestParam("id") String id,
@ApiParam("课程包id") @RequestParam("packageId") String packageId);
}
package com.tanpu.community.feign.course.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("栏目信息")
@Data
public class ColumnVO {
@ApiModelProperty("栏目id")
private String id;
@ApiModelProperty("名称")
private String title;
}
package com.tanpu.community.feign.course.vo;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* @author: zhoupeng
* <p>
* =========================================
* =========================================
* ======== ========
* ======= ========== ======= =======
* ====== ===== == ==== ======
* ===== ===== == === =====
* ===== ===== == === =====
* ===== ===== == === =====
* ====== ========== == ======
* ======= =======
* =========================================
* =========================================
* <p>
* @email: zhoupeng_08@163.com
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class Course extends Progression {
// private List<>
}
package com.tanpu.community.feign.course.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
/**
* @author: zhoupeng
* <p>
* =========================================
* =========================================
* ======== ========
* ======= ========== ======= =======
* ====== ===== == ==== ======
* ===== ===== == === =====
* ===== ===== == === =====
* ===== ===== == === =====
* ====== ========== == ======
* ======= =======
* =========================================
* =========================================
* <p>
* @email: zhoupeng_08@163.com
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class CourseDetailExt extends CourseExt {
@ApiModelProperty("附件信息")
private List<FileMetadata> resourcePayResps;
@ApiModelProperty("上线时间")
private Long lineTimeLong;
@ApiModelProperty("下一节")
private CourseResExt nextCourseResExt;
@ApiModelProperty("上一节")
private CourseResExt preCourseResExt;
@ApiModelProperty("背景图")
private String cover;
@ApiModelProperty("讲师名称")
private String lecturerName;
@ApiModelProperty("课程文本信息")
private String courseContext;
}
package com.tanpu.community.feign.course.vo; import io.swagger.annotations.ApiModelProperty;import lombok.Data;import lombok.EqualsAndHashCode; /** * @author: zyh * @date: 2021-04-13 3:20 下午 * @description: */@EqualsAndHashCode(callSuper = true)@Datapublic class CourseExt extends Course { @ApiModelProperty("章节-小节ID") private String coursePackageId; @Deprecated @ApiModelProperty("相关性知识课程小节类型 - 1:音频 2:视频") private Integer relType; @ApiModelProperty("相关性知识课程小节类型 扩展") private Integer relTypeExt; @Deprecated @ApiModelProperty("章节-小节 音/视频类型 1:音频 2:视频") private Integer type; @ApiModelProperty("章节-小节 音/视频类型 扩展") private Integer typeExt; @ApiModelProperty("章节-小节 音/视频地址") private String url; @ApiModelProperty("相关性知识地址") private String relUrl; @ApiModelProperty("相关性知识 - 课程包ID") private String relPackageId; @ApiModelProperty("相关性知识音/视频时长") private Integer relLengthTime; @ApiModelProperty("多少人已学习") private Integer readNum; @ApiModelProperty("课程时长 单位s") private Integer lengthTime; @ApiModelProperty("讲师信息") private LecturerResp lecturer;}
\ No newline at end of file
package com.tanpu.community.feign.course.vo;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author: zhoupeng
* <p>
* =========================================
* =========================================
* ======== ========
* ======= ========== ======= =======
* ====== ===== == ==== ======
* ===== ===== == === =====
* ===== ===== == === =====
* ===== ===== == === =====
* ====== ========== == ======
* ======= =======
* =========================================
* =========================================
* <p>
* @email: zhoupeng_08@163.com
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class CourseResExt {
private String id;
private Integer type;
}
package com.tanpu.community.feign.course.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@ApiModel
@Data
public class FileMetadata {
@ApiModelProperty(value = "ID")
private String id;
@ApiModelProperty(value = "文件标识")
private String fileId;
@ApiModelProperty(value = "文件名")
private String fileName;
@ApiModelProperty(value = "文件大小(单位:字节)")
private Integer fileSize;
@ApiModelProperty(value = "文件类型")
private String fileType;
@ApiModelProperty(value = "预览链接")
private String previewLink;
@ApiModelProperty(value = "预览链接列表(多张图片预览)")
private List<String> previewLinks;
@ApiModelProperty(value = "原文件链接")
private String link;
@ApiModelProperty(value = "文档转换状态")
private Integer status;
@ApiModelProperty("需不需要支付 1:需要 2:不需要")
private Integer needBuy;
@ApiModelProperty("付费模式 1:免费 2:积分 3:现金")
private Integer chargeMode;
@ApiModelProperty("价格")
private String price;
@ApiModelProperty("积分")
private Integer score;
@ApiModelProperty("有没有支付 1:未购买 2:已购买")
private Integer isBuy;
}
package com.tanpu.community.feign.course.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author: zhoupeng
* <p>
* =========================================
* =========================================
* ======== ========
* ======= ========== ======= =======
* ====== ===== == ==== ======
* ===== ===== == === =====
* ===== ===== == === =====
* ===== ===== == === =====
* ====== ========== == ======
* ======= =======
* =========================================
* =========================================
* <p>
* @email: zhoupeng_08@163.com
*/
@Data
@ApiModel("讲师信息 LecturerResp")
public class LecturerResp {
@ApiModelProperty("讲师ID")
private String id;
@ApiModelProperty("讲师姓名")
private String name;
@ApiModelProperty("讲师头像")
private String img;
@ApiModelProperty("讲师背景图")
private String bgImg;
@ApiModelProperty("讲师描述")
private String desc;
}
package com.tanpu.community.feign.course.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author: zhoupeng
* <p>
* =========================================
* =========================================
* ======== ========
* ======= ========== ======= =======
* ====== ===== == ==== ======
* ===== ===== == === =====
* ===== ===== == === =====
* ===== ===== == === =====
* ====== ========== == ======
* ======= =======
* =========================================
* =========================================
* <p>
* @email: zhoupeng_08@163.com
*/
@ApiModel("发刊词信息 Progression")
@Data
public class Progression {
@ApiModelProperty("发刊词状态 1:有发刊词 2:没有发刊词")
private Integer progressionStatus;
@ApiModelProperty("名称")
private String progressionName;
@ApiModelProperty("时间")
private Long time;
@ApiModelProperty("发刊词地址")
private String progressionURL;
}
package com.tanpu.community.feign.product;
import com.tanpu.common.api.CommonResp;
import com.tanpu.community.feign.vo.ProductInfoVO;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.util.List;
@Slf4j
@Component
public class FeignBackClientForProducts implements FallbackFactory<FeignClientForProducts> {
@Override
public FeignClientForProducts create(Throwable throwable) {
return new FeignClientForProducts() {
@Override
public CommonResp<ProductInfoVO> getProductDetailInfo(String id) {
log.error("请求信息", throwable);
log.error("FeignClientForProducts.getProductDetailInfo-查询产品id:{}", id);
return null;
}
@Override
public CommonResp<List<ProductInfoVO>> getProductInfoByIds(List<String> ids) {
log.error("请求信息", throwable);
log.error("FeignClientForProducts.getProductInfoByIds-查询产品ids:{}", ids);
return null;
}
};
}
}
package com.tanpu.community.feign.product;
import com.tanpu.common.api.CommonResp;
import com.tanpu.community.feign.vo.ProductInfoVO;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
//@FeignClient(value = "service-product", contextId = "product",fallbackFactory = FeignBackClientForProducts.class, path = "/product")
@FeignClient(value = "service-product", contextId = "product", fallbackFactory = FeignBackClientForProducts.class, url = "http://127.0.0.1:8194/product")
public interface FeignClientForProducts {
@ApiOperation("获取产品详情")
@GetMapping("/product/detail")
CommonResp<ProductInfoVO> getProductDetailInfo(@ApiParam("产品id") @RequestParam("id") String id);
@ApiOperation("根据id查询列表")
@GetMapping("/getProductInfoByIds")
CommonResp<List<ProductInfoVO>> getProductInfoByIds(@ApiParam("产品id") @RequestParam("fundIds") List<String> fundIds);
}
package com.tanpu.community.feign.tanpuroom;
import com.tanpu.common.api.CommonResp;
import com.tanpu.community.feign.tanpuroom.vo.CurriCulumInfoDetailDto;
import com.tanpu.community.feign.tanpuroom.vo.CurriculumDetailVo;
import com.tanpu.community.feign.vo.ShortVideoBaseInfoResp;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.util.List;
@Slf4j
@Component
public class FeignBackClientForTanpuroom implements FallbackFactory<FeignClientForTanpuroom> {
@Override
public FeignClientForTanpuroom create(Throwable throwable) {
return new FeignClientForTanpuroom() {
@Override
public CommonResp<List<ShortVideoBaseInfoResp>> getShortVideoBaseInfo(List<String> sourceIds) {
log.error("请求信息", throwable);
log.error("FeignBackClientForTanpuroom.getShortVideoBaseInfo-查询短视频ids:{}", sourceIds);
return null;
}
@Override
public CommonResp<CurriculumDetailVo> queryCurriculumDetail(CurriCulumInfoDetailDto req) {
log.error("请求信息", throwable);
log.error("FeignBackClientForTanpuroom.getShortVideoBaseInfo-查询课程req:{}", req);
return null;
}
};
}
}
package com.tanpu.community.feign.tanpuroom;
import com.tanpu.common.api.CommonResp;
import com.tanpu.community.feign.tanpuroom.vo.CurriCulumInfoDetailDto;
import com.tanpu.community.feign.tanpuroom.vo.CurriculumDetailVo;
import com.tanpu.community.feign.vo.ShortVideoBaseInfoResp;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
//@FeignClient(value = "service-tanpuroom", contextId = "tanpuroom", fallbackFactory = FeignBackClientForTanpuroom.class, path = "/tanpuroom")
@FeignClient(value = "service-tanpuroom", contextId = "tanpuroom", fallbackFactory = FeignBackClientForTanpuroom.class, path = "http://127.0.0.1:8194/tanpuroom")
public interface FeignClientForTanpuroom {
@ApiOperation("短视频基础信息")
@GetMapping("/shortVideo/getShortVideoBaseInfo")
CommonResp<List<ShortVideoBaseInfoResp>> getShortVideoBaseInfo(@RequestParam("sourceIds") List<String> sourceIds);
@ApiOperation(value = "查询精品课详情")
@PostMapping(value = "/curriculumInfos/detail", produces = {"application/json"})
CommonResp<CurriculumDetailVo> queryCurriculumDetail(@RequestBody CurriCulumInfoDetailDto req);
}
package com.tanpu.community.feign.tanpuroom.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@ApiModel("查询精品课详情")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class CurriCulumInfoDetailDto {
@ApiModelProperty(value = "课程ID")
private String curriculumId;
@ApiModelProperty(value = "用户ID")
private String userId;
}
package com.tanpu.community.feign.tanpuroom.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ApiModel(description = "精品课章节")
@Data
public class CurriculumChapterVo {
@ApiModelProperty("id")
private String id;
@ApiModelProperty("章节标题")
private String title;
@ApiModelProperty("推荐图")
private String baking;
@ApiModelProperty("学习人数")
private Long readNum;
@ApiModelProperty("讲师介绍")
private String teacherIntroduct;
@ApiModelProperty("推荐理由")
private String operatorsInfo;
@ApiModelProperty("所属标签")
private String label;
@ApiModelProperty("推荐图片")
private String recommendCover;
}
package com.tanpu.community.feign.tanpuroom.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@ApiModel(description = "精品课信息")
@Data
public class CurriculumDetailVo {
@ApiModelProperty("课程标题")
private String ciTitle;
@ApiModelProperty("封面图")
private String ciCover;
@ApiModelProperty("运营推荐话语")
private String ciOperatorsReason;
@ApiModelProperty("课程介绍")
private String ciBriefintro;
@ApiModelProperty("是否推荐课程")
private int ciIsrecommend;
@ApiModelProperty("学习人数")
private int ccReadActualnum;
@ApiModelProperty("讲师介绍")
private String ciTeacherInfo;
@ApiModelProperty("推荐码")
private String ciIntroduceCode;
@ApiModelProperty("推荐课程图片")
private String introduceImg;
@ApiModelProperty("推荐章节")
private List<CurriculumChapterVo> operatorsReason;
@ApiModelProperty("是否常听")
private String isOften;
@ApiModelProperty
private String ciFeeType;
}
package com.tanpu.community.feign.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel("净值")
@Data
@Builder
@AllArgsConstructor
public class Net {
@ApiModelProperty("基金ID")
private String fundId;
@ApiModelProperty("净值日期 返回时间戳")
private Long netDate;
@ApiModelProperty("单位净值")
private String netValue;
@ApiModelProperty("累计净值(分红再投)")
private String cumulativeNav;
public Net() {
}
public Net(Long netDate, String netValue, String cumulativeNav) {
this.netDate = netDate;
this.netValue = netValue;
this.cumulativeNav = cumulativeNav;
}
}
package com.tanpu.community.feign.vo;
import com.tanpu.community.feign.course.vo.ColumnVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
@ApiModel("产品信息")
@Data
public class ProductInfoVO {
@ApiModelProperty("产品名称")
private String productName;
@ApiModelProperty("产品名称 (同productName) 请忽略此字段")
private String fundName;
@ApiModelProperty("产品id")
private String fundId;
@ApiModelProperty("对比产品id")
private String ratioId;
@ApiModelProperty("累计收益")
private String cumulativeProfit;
@ApiModelProperty("运行时间")
private String runTime;
@ApiModelProperty("产品编码")
private String productCode;
@ApiModelProperty("近一个月收益率")
private String ret1m;
@ApiModelProperty("最近一年")
private String ret1y;
@ApiModelProperty("最近一年")
private BigDecimal ret1ySort;
@ApiModelProperty("近一年收益 (同最近一年) 请忽略此字段")
private String near1YearProfit;
@ApiModelProperty("今年以来")
private String retYtd;
@ApiModelProperty("成立以来收益率")
private String retIncep;
@ApiModelProperty("成立以来")
private BigDecimal retIncepSort;
@ApiModelProperty("最新净值")
private Net net;
@ApiModelProperty("风险等级")
private Integer riskLevel;
@ApiModelProperty("基金类型名称")
private String fundTypeName;
@ApiModelProperty("起投金额 单位:万")
private String money;
@ApiModelProperty("初始规模")
private String initialSize;
@ApiModelProperty("最低追加金额")
private String minMoney;
@ApiModelProperty("封闭期")
private Integer lockupPeriod;
@ApiModelProperty("开放日")
private String openDay;
@ApiModelProperty("开放日")
private String redeemDayStr;
@ApiModelProperty("申购日")
private Long applyDay;
@ApiModelProperty("赎回日")
private Long redeemDay;
@ApiModelProperty("产品标签")
private List<ProductLabel> productLabels;
@ApiModelProperty("管理人的解答")
private List<String> problems;
@ApiModelProperty("回答总数")
private Integer answerCount;
@ApiModelProperty("描述")
private String desc;
@ApiModelProperty("产品来源 1:探普 2:私募排排 -1:自建产品")
private Integer dataSources;
@ApiModelProperty("产品类型 0:公募 1:私募 2:白名单 3:私有基金")
private Integer productType;
@ApiModelProperty("策略类型")
private String strategy;
@ApiModelProperty("策略类型")
private String substrategy;
@ApiModelProperty("策略类型")
private String substrategyName;
@ApiModelProperty("策略类型名称")
private String strategyName;
@ApiModelProperty("基金公司id")
private String trustId;
@ApiModelProperty("基金公司名称")
private String trustName;
@ApiModelProperty("是否可预约 0:不可预约 1:可预约")
private Integer isAppoint;
@ApiModelProperty("是否有研报 0:没有 1:有研报")
private Integer isReport;
private String dailyIncrease;
private Type type;
@ApiModelProperty("栏目信息")
private List<ColumnVO> vos;
@ApiModelProperty("成立日期")
private Long inceptionDate;
@ApiModelProperty("备案编码")
private String registerNumber;
@ApiModelProperty("经理id")
private String managerId;
@ApiModelProperty("经理姓名")
private String managerName;
@ApiModelProperty("经理数量")
private Integer managerNum;
@ApiModelProperty("基金数量")
private Integer fundNum;
@ApiModelProperty("公司资产规模")
private Integer companyAssetSize;
@ApiModelProperty("点评")
private List<Type> commentContent;
@ApiModelProperty("热推 1:表示热推")
private Integer hotPush = 0;
/**
* 是否推荐 0 否 1:是
*/
private Integer isRecommend;
/**
* 推荐
*/
private String recommend;
/**
* 基金文件
*/
private String fundFile;
}
package com.tanpu.community.feign.vo;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
//@ApiModel("产品标签")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class ProductLabel {
// @ApiModelProperty("标签编码")
private String labelCode;
// @ApiModelProperty("标签名称")
private String labelName;
}
package com.tanpu.community.feign.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@ApiModel("短视频(基础信息)")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class ShortVideoBaseInfoResp {
@ApiModelProperty("资源id")
private String sourceId;
@ApiModelProperty("关联栏目id")
private String columnRelId;
@ApiModelProperty("视频标题")
private String title;
@ApiModelProperty("封面")
private String cover;
@ApiModelProperty("视频url")
private String videoUrl;
@ApiModelProperty("视频url")
private Integer relType;
@ApiModelProperty(value = "讲师")
private String managerName;
@ApiModelProperty(value = "时间")
private Long createTime;
}
package com.tanpu.community.feign.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
@ApiModel("类型")
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
public class Type {
@ApiModelProperty("类型id")
private String id;
@ApiModelProperty("类型value")
private String value;
@ApiModelProperty("资源数量")
private Integer resourceNum;
@ApiModelProperty("扩展字段")
private String ext;
@ApiModelProperty("产品名称")
private String productName;
}
package com.tanpu.community.feign.zhibo;
import com.tanpu.common.api.CommonResp;
import com.tanpu.community.feign.zhibo.vo.ZhiboDetailVO;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
@FeignClient(value = "service-zhibo", fallbackFactory = FeignbackForZhibo.class, path = "/zhibo")
//@FeignClient(value = "service-zhibo", fallbackFactory = FeignbackForZhibo.class, url = "http://127.0.0.1:8183/zhibo")
public interface FeignClientForZhibo {
@ApiOperation(value = "根据直播间id查询直播间信息")
@GetMapping("/theme/{roomId}/detail")
CommonResp<ZhiboDetailVO> queryZhiboDetail(@ApiParam(value = "直播房间", required = true) @PathVariable("roomId") String roomId);
@ApiOperation(value = "根据id获取直播信息")
@PostMapping("/theme/zhibo/detail")
CommonResp<List<ZhiboDetailVO>> getZhiBoByIds(@RequestBody List<String> ids);
}
package com.tanpu.community.feign.zhibo;
import com.tanpu.common.api.CommonResp;
import com.tanpu.community.feign.zhibo.vo.ZhiboDetailVO;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.util.List;
@Slf4j
@Component
public class FeignbackForZhibo implements FallbackFactory<FeignClientForZhibo> {
@Override
public FeignClientForZhibo create(Throwable throwable) {
return new FeignClientForZhibo() {
@Override
public CommonResp queryZhiboDetail(String roomId) {
log.error("请求信息", throwable);
log.error("FeignClientForZhiboTheme.queryZhiboDetail探普学堂-查询直播id:{}", roomId);
return null;
}
@Override
public CommonResp<List<ZhiboDetailVO>> getZhiBoByIds(List<String> ids) {
log.error("请求信息", throwable);
log.error("FeignClientForZhiboTheme.queryZhiboDetail探普学堂-查询直播ids:{}", ids);
return null;
}
};
}
}
package com.tanpu.community.feign.zhibo.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ApiModel(description = "根据类型获取直播信息")
@Data
public class ZhiboDetailVO {
@ApiModelProperty("房间id")
private String id;
@ApiModelProperty("直播名称")
private String ztName;
@ApiModelProperty("开播时间")
private Long ztStarttime;
@ApiModelProperty("结束时间")
private Long ztEndtime;
@ApiModelProperty("主讲人信息")
private String ztUname;
@ApiModelProperty("直播状态")
private String ztStatus;
@ApiModelProperty("封面链接")
private String ztImg;
@ApiModelProperty("源封面")
private String sourceImg;
@ApiModelProperty("直播类型 1探普之夜,2探普八点半")
private String ztType;
@ApiModelProperty("直播l类型 name")
private String ztTypeName;
@ApiModelProperty("讲师介绍")
private String managerName;
@ApiModelProperty("预约人数")
private Integer reservationNum;
@ApiModelProperty("展示参与人次")
private Integer participantsNum;
@ApiModelProperty("参与人次")
private Integer participantsPv;
@ApiModelProperty("直播标签")
private String ztTag;
@ApiModelProperty("参与人次基数")
private Integer ztCardinal;
@ApiModelProperty("开始时间")
private String startTime;
@ApiModelProperty("直播间描述")
private String ztDesc;
@ApiModelProperty("周几")
private Integer weekDay;
@ApiModelProperty(value = "探普云参与权限 1所有人,2仅注册用户,3仅探普会员")
private Integer participationRigth;
@ApiModelProperty(value = "备注")
private String explain;
@ApiModelProperty("是否大于指定时间 0:不大于 1:大于")
private Integer isThanTime;
@ApiModelProperty(value = "内容")
private String ztInfo;
@ApiModelProperty("可转播设置 1:可转播 0:不可转播")
private Integer canBroadcast;
}
package com.tanpu.community.service; package com.tanpu.community.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.tanpu.community.api.constants.BlockTypeEnum; import com.tanpu.common.exception.BizException;
import com.tanpu.community.api.enums.BlockTypeEnum;
import com.tanpu.community.api.enums.DeleteTagEnum;
import com.tanpu.community.dao.entity.community.BlackListEntity; import com.tanpu.community.dao.entity.community.BlackListEntity;
import com.tanpu.community.dao.mapper.community.BlackListMapper; import com.tanpu.community.dao.mapper.community.BlackListMapper;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -14,26 +16,38 @@ public class BlackListService { ...@@ -14,26 +16,38 @@ public class BlackListService {
private BlackListMapper blackListMapper; private BlackListMapper blackListMapper;
public void addBlock(String blockId, String userId, BlockTypeEnum type) { public void addBlock(String blockId, String userId, BlockTypeEnum type) {
BlackListEntity blackListEntity = BlackListEntity.builder()
.blocker(userId)
.blockedId(blockId)
.blockedType(type.getCode())
.build();
blackListMapper.insert(blackListEntity); BlackListEntity selected = selectOne(blockId, userId, type.getCode());
//如果数据已存在,则修改delete_tag
if (selected != null) {
selected.setDeleteTag(DeleteTagEnum.NOT_DELETED.getCode());
blackListMapper.updateById(selected);
} else {
BlackListEntity blackListEntity = BlackListEntity.builder()
.blocker(userId)
.blockedId(blockId)
.blockedType(type.getCode())
.build();
blackListMapper.insert(blackListEntity);
}
} }
public BlackListEntity selectOne(String blocker, Integer blockType, String blockId) { public BlackListEntity selectOne(String blockId, String blocker, Integer blockType) {
return blackListMapper.selectOne(new LambdaQueryWrapper<BlackListEntity>() return blackListMapper.selectOne(new LambdaQueryWrapper<BlackListEntity>()
.eq(BlackListEntity::getBlocker, blocker) .eq(BlackListEntity::getBlocker, blocker)
.eq(BlackListEntity::getBlockedId, blockId) .eq(BlackListEntity::getBlockedId, blockId)
.eq(BlackListEntity::getBlockedType, blockType)); .eq(BlackListEntity::getBlockedType, blockType)
.eq(BlackListEntity::getDeleteTag, DeleteTagEnum.NOT_DELETED.getCode()));
} }
public void removeBlackList(String blocker, String blockId, BlockTypeEnum blockType) { public void removeBlackList(String blocker, String blockId, BlockTypeEnum blockType) {
blackListMapper.delete(new LambdaQueryWrapper<BlackListEntity>() BlackListEntity selected = selectOne(blockId, blocker, blockType.getCode());
.eq(BlackListEntity::getBlocker, blocker) if (selected == null) {
.eq(BlackListEntity::getBlockedId, blockId) throw new BizException("black_list数据不存在");
.eq(BlackListEntity::getBlockedType, blockType.getCode())); } else {
selected.setDeleteTag(DeleteTagEnum.DELETED.getCode());
blackListMapper.updateById(selected);
}
} }
} }
package com.tanpu.community.service; package com.tanpu.community.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.tanpu.community.api.constants.CollectionTypeEnum; import com.tanpu.community.api.enums.CollectionTypeEnum;
import com.tanpu.community.api.constants.DeleteTagEnum; import com.tanpu.community.api.enums.DeleteTagEnum;
import com.tanpu.community.dao.entity.community.CollectionEntity; import com.tanpu.community.dao.entity.community.CollectionEntity;
import com.tanpu.community.dao.mapper.community.CollectionMapper; import com.tanpu.community.dao.mapper.community.CollectionMapper;
import com.tanpu.community.util.ConvertUtil; import com.tanpu.community.util.ConvertUtil;
......
package com.tanpu.community.service; package com.tanpu.community.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.tanpu.community.api.constants.CurriculumEnum; import com.tanpu.community.api.enums.CurriculumEnum;
import com.tanpu.community.api.constants.DeleteTagEnum; import com.tanpu.community.api.enums.DeleteTagEnum;
import com.tanpu.community.dao.entity.user.CurriculumResEntity; import com.tanpu.community.dao.entity.user.CurriculumResEntity;
import com.tanpu.community.dao.mapper.user.CurriculumResMapper; import com.tanpu.community.dao.mapper.user.CurriculumResMapper;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
......
package com.tanpu.community.service; package com.tanpu.community.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.tanpu.community.api.constants.DeleteTagEnum; import com.tanpu.community.api.enums.DeleteTagEnum;
import com.tanpu.community.dao.entity.user.OrderFlowEntity; import com.tanpu.community.dao.entity.user.OrderFlowEntity;
import com.tanpu.community.dao.mapper.user.OrderFlowMapper; import com.tanpu.community.dao.mapper.user.OrderFlowMapper;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
......
...@@ -2,8 +2,8 @@ package com.tanpu.community.service; ...@@ -2,8 +2,8 @@ package com.tanpu.community.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.tanpu.community.api.constants.DeleteTagEnum; import com.tanpu.community.api.enums.DeleteTagEnum;
import com.tanpu.community.api.constants.TopicStatusEnum; import com.tanpu.community.api.enums.TopicStatusEnum;
import com.tanpu.community.dao.entity.community.TopicEntity; import com.tanpu.community.dao.entity.community.TopicEntity;
import com.tanpu.community.dao.mapper.community.TopicMapper; import com.tanpu.community.dao.mapper.community.TopicMapper;
import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.annotation.EnableCaching;
......
...@@ -5,7 +5,7 @@ import com.tanpu.community.api.beans.req.CreateThemeReq; ...@@ -5,7 +5,7 @@ import com.tanpu.community.api.beans.req.CreateThemeReq;
import com.tanpu.community.api.beans.qo.ThemeQo; import com.tanpu.community.api.beans.qo.ThemeQo;
import com.tanpu.community.api.beans.TopicBriefInfoDTO; import com.tanpu.community.api.beans.TopicBriefInfoDTO;
import com.tanpu.community.api.beans.TopicDTO; import com.tanpu.community.api.beans.TopicDTO;
import com.tanpu.community.api.constants.DeleteTagEnum; import com.tanpu.community.api.enums.DeleteTagEnum;
import com.tanpu.community.dao.entity.community.HomePageEntity; import com.tanpu.community.dao.entity.community.HomePageEntity;
import com.tanpu.community.dao.entity.community.ThemeAttachmentEntity; import com.tanpu.community.dao.entity.community.ThemeAttachmentEntity;
import com.tanpu.community.dao.entity.community.ThemeEntity; import com.tanpu.community.dao.entity.community.ThemeEntity;
......
...@@ -37,7 +37,7 @@ CREATE TABLE `theme` ( ...@@ -37,7 +37,7 @@ CREATE TABLE `theme` (
`attach_type` int(4) NOT NULL COMMENT '附件类型', `attach_type` int(4) NOT NULL COMMENT '附件类型',
`attachment` text NOT NULL COMMENT '附件内容', `attachment` text NOT NULL COMMENT '附件内容',
`author_id` varchar(64) NOT NULL COMMENT '作者id', `author_id` varchar(64) NOT NULL COMMENT '作者id',
`former_theme_id` varchar(64) NOT NULL COMMENT '被转发的主题', `former_theme_id` varchar(64) COMMENT '被转发的主题',
`topic_id` varchar(64) NOT NULL COMMENT '所属的话题', `topic_id` varchar(64) NOT NULL COMMENT '所属的话题',
`create_by` varchar(64) DEFAULT '', `create_by` varchar(64) DEFAULT '',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment