Commit 9b9d7302 authored by 刘基明's avatar 刘基明

字段修改

parent 7d7f4d03
...@@ -26,6 +26,9 @@ public class TopicRankQo { ...@@ -26,6 +26,9 @@ public class TopicRankQo {
@ApiModelProperty(value = "是否置顶") @ApiModelProperty(value = "是否置顶")
private Integer isTop; private Integer isTop;
@ApiModelProperty(value = "浏览量调整基数")
private Integer viewCntAdjust;
/** /**
* TODO 热度计算算法 * TODO 热度计算算法
* @return * @return
...@@ -35,6 +38,6 @@ public class TopicRankQo { ...@@ -35,6 +38,6 @@ public class TopicRankQo {
if (isTop>0){ if (isTop>0){
return Integer.MAX_VALUE; return Integer.MAX_VALUE;
} }
return this.viewCount+this.disscussCount*3; return this.viewCount+this.disscussCount*3+viewCount;
} }
} }
...@@ -10,8 +10,6 @@ import java.util.List; ...@@ -10,8 +10,6 @@ import java.util.List;
@Data @Data
public class CreateThemeReq { public class CreateThemeReq {
private static final long serialVersionUID = 1L;
@NotNull(message = "类型不能为空") @NotNull(message = "类型不能为空")
@ApiModelProperty(value = "类型 1:讨论无标题 2:长文有标题") @ApiModelProperty(value = "类型 1:讨论无标题 2:长文有标题")
......
...@@ -11,7 +11,7 @@ import java.util.List; ...@@ -11,7 +11,7 @@ import java.util.List;
@ApiModel(value = "主题内容") @ApiModel(value = "主题内容")
public class ThemeContentReq { public class ThemeContentReq {
@ApiModelProperty(value = "RelTypeEnum类型,8:文本,88:产品 3:直播 6:短视频 2:课程,9:图片 10:多图(讨论)") @ApiModelProperty(value = "RelTypeEnum类型,108:文本,88:产品 3:直播 6:短视频 303:新版课程-视频,304: 新版课程-音频,109:单图(长文) 110:多图(讨论))")
private String type; private String type;
@ApiModelProperty(value = "文本的值是内容,附件的值为id") @ApiModelProperty(value = "文本的值是内容,附件的值为id")
......
package com.tanpu.community.api.beans.vo.feign.pay;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "支付详情")
public class PayDetailVO {
private String id;
private String title;
private String cover;
private String info;
private Integer score;
private Long price;
/**
* 划线价
*/
private Long crossedPrice;
private Integer availableScore;
private Integer balance;
/**
* 1:免费 2:积分 3现金
*/
private Integer chargeMode;
/**
* 类型:1:栏目 3:直播 4:视频 5 音频 7:直播课件
*/
private Integer relType;
}
...@@ -8,7 +8,6 @@ import com.tanpu.community.api.beans.qo.ThemeQo; ...@@ -8,7 +8,6 @@ import com.tanpu.community.api.beans.qo.ThemeQo;
import com.tanpu.community.api.beans.req.theme.*; import com.tanpu.community.api.beans.req.theme.*;
import com.tanpu.community.api.beans.resp.CreateThemeResp; import com.tanpu.community.api.beans.resp.CreateThemeResp;
import com.tanpu.community.api.beans.resp.ThemeListResp; import com.tanpu.community.api.beans.resp.ThemeListResp;
import com.tanpu.community.cache.RedisCache;
import com.tanpu.community.manager.ThemeManager; import com.tanpu.community.manager.ThemeManager;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -17,7 +16,6 @@ import org.springframework.validation.annotation.Validated; ...@@ -17,7 +16,6 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List;
@RestController @RestController
@Slf4j @Slf4j
...@@ -77,12 +75,12 @@ public class ThemeController { ...@@ -77,12 +75,12 @@ public class ThemeController {
} }
@AuthLogin @AuthLogin
@ApiOperation("用户删除自有主题") @ApiOperation("用户删除主题")
@GetMapping(value = "/delete") @GetMapping(value = "/delete")
@ResponseBody @ResponseBody
public CommonResp<Void> delete(@RequestParam(value = "themeId") String themeId) { public CommonResp<Void> delete(@RequestParam(value = "themeId") String themeId) {
String userId = userHolder.getUserId(); String userId = userHolder.getUserId();
themeManager.delete(themeId); themeManager.delete(themeId, userId);
return CommonResp.success(); return CommonResp.success();
} }
......
...@@ -17,7 +17,7 @@ import lombok.NoArgsConstructor; ...@@ -17,7 +17,7 @@ import lombok.NoArgsConstructor;
* </p> * </p>
* *
* @author xudong * @author xudong
* @since 2021-07-22 * @since 2021-07-29
*/ */
@TableName("topic") @TableName("topic")
@ApiModel(value="TopicEntity对象", description="话题") @ApiModel(value="TopicEntity对象", description="话题")
...@@ -45,7 +45,7 @@ public class TopicEntity implements Serializable { ...@@ -45,7 +45,7 @@ public class TopicEntity implements Serializable {
private Integer isConceal; private Integer isConceal;
@ApiModelProperty(value = "浏览量调整基数") @ApiModelProperty(value = "浏览量调整基数")
private Long viewCntAdjust; private Integer viewCntAdjust;
private LocalDateTime createTime; private LocalDateTime createTime;
...@@ -94,11 +94,11 @@ public class TopicEntity implements Serializable { ...@@ -94,11 +94,11 @@ public class TopicEntity implements Serializable {
this.isConceal = isConceal; this.isConceal = isConceal;
} }
public Long getViewCntAdjust() { public Integer getViewCntAdjust() {
return viewCntAdjust; return viewCntAdjust;
} }
public void setViewCntAdjust(Long viewCntAdjust) { public void setViewCntAdjust(Integer viewCntAdjust) {
this.viewCntAdjust = viewCntAdjust; this.viewCntAdjust = viewCntAdjust;
} }
......
...@@ -134,7 +134,8 @@ public class ThemeManager { ...@@ -134,7 +134,8 @@ public class ThemeManager {
themeEntity.setContent(JsonUtil.toJson(req.getContent())); themeEntity.setContent(JsonUtil.toJson(req.getContent()));
// 腾讯云敏感词校验 // 腾讯云敏感词校验,
// TODO 图片校验
checkContent(themeEntity.getContent()); checkContent(themeEntity.getContent());
if (StringUtils.isEmpty(req.getEditThemeId())) { if (StringUtils.isEmpty(req.getEditThemeId())) {
...@@ -282,6 +283,7 @@ public class ThemeManager { ...@@ -282,6 +283,7 @@ public class ThemeManager {
// 组装和当前用户相关信息 // 组装和当前用户相关信息
private void buildThemeExtraInfoByUser(String userId, ThemeQo themeQo) { private void buildThemeExtraInfoByUser(String userId, ThemeQo themeQo) {
//todo 批量查询 IN
String themeId = themeQo.getThemeId(); String themeId = themeQo.getThemeId();
// 是否关注作者 // 是否关注作者
themeQo.setFollow(followRelService.checkFollow(themeQo.getAuthorId(), userId)); themeQo.setFollow(followRelService.checkFollow(themeQo.getAuthorId(), userId));
...@@ -413,8 +415,8 @@ public class ThemeManager { ...@@ -413,8 +415,8 @@ public class ThemeManager {
} }
//逻辑删除主题 //逻辑删除主题 TODO
public void delete(String themeId) { public void delete(String themeId,String userId) {
themeService.deleteById(themeId); themeService.deleteById(themeId);
} }
......
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