New file |
| | |
| | | package cn.lili.modules.lmk.domain.query; |
| | | |
| | | |
| | | import cn.lili.base.AbsQuery; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * lmk-shop-java |
| | | * |
| | | * @author : zxl |
| | | * @date : 2025-08-14 10:37 |
| | | **/ |
| | | @Data |
| | | @ApiModel(value = "VideoCommentMangerQuery查询参数", description = "管理端视频评论查询参数") |
| | | public class VideoCommentMangerQuery extends AbsQuery { |
| | | |
| | | @ApiModelProperty("视频id") |
| | | private String videoId; |
| | | |
| | | @ApiModelProperty("评论内容") |
| | | private String commentContent; |
| | | |
| | | @ApiModelProperty("用户名称") |
| | | private String nickName; |
| | | |
| | | @ApiModelProperty("起始时间") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date startTime; |
| | | @ApiModelProperty("结束时间") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date endTime; |
| | | |
| | | } |
| | |
| | | package cn.lili.modules.lmk.mapper; |
| | | |
| | | import cn.lili.modules.lmk.domain.entity.VideoComment; |
| | | import cn.lili.modules.lmk.domain.query.VideoCommentMangerQuery; |
| | | import cn.lili.modules.lmk.domain.vo.CollectTypeNumVO; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | |
| | | */ |
| | | VideoCommentVO getById(String id); |
| | | |
| | | |
| | | IPage getManagerPage (IPage page, @Param("query") VideoCommentMangerQuery query); |
| | | |
| | | /** |
| | | * 分页 |
| | | */ |
| | |
| | | import cn.lili.modules.lmk.domain.entity.ThumbsUpRecord; |
| | | import cn.lili.modules.lmk.domain.entity.VideoComment; |
| | | import cn.lili.modules.lmk.domain.form.ThumbsUpRecordForm; |
| | | import cn.lili.modules.lmk.domain.query.VideoCommentMangerQuery; |
| | | import cn.lili.modules.lmk.domain.vo.CollectTypeNumVO; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import cn.lili.base.Result; |
| | |
| | | */ |
| | | public interface VideoCommentService extends IService<VideoComment> { |
| | | |
| | | Result mangerComment(VideoCommentMangerQuery query); |
| | | |
| | | /** |
| | | * 添加 |
| | | * @param form |
| | |
| | | public Result remove(List<String> ids) { |
| | | //判断活动id是否已经存在报名人员 |
| | | for(String id : ids){ |
| | | canDeleteActivity(id); |
| | | |
| | | Result result = canDeleteActivity(id); |
| | | Integer code = (Integer) result.get("CODE"); |
| | | if (code != 200){ |
| | | return result; |
| | | } |
| | | } |
| | | |
| | | return Result.ok("删除成功"); |
| | |
| | | import cn.lili.modules.lmk.constant.RedisKeyExpireConstant; |
| | | import cn.lili.modules.lmk.domain.entity.ThumbsUpRecord; |
| | | import cn.lili.modules.lmk.domain.form.ThumbsUpRecordForm; |
| | | import cn.lili.modules.lmk.domain.query.VideoCommentMangerQuery; |
| | | import cn.lili.modules.lmk.domain.vo.CollectTypeNumVO; |
| | | import cn.lili.modules.lmk.enums.general.VideoCommentStatusEnum; |
| | | import cn.lili.modules.lmk.event.event.VideoCommentNumCacheEvent; |
| | |
| | | private final RocketmqCustomProperties rocketmqCustomProperties; |
| | | private final ApplicationEventPublisher eventPublisher; |
| | | |
| | | @Override |
| | | public Result mangerComment(VideoCommentMangerQuery query) { |
| | | IPage<VideoCommentVO> page = PageUtil.getPage(query, VideoCommentVO.class); |
| | | baseMapper.getManagerPage(page, query); |
| | | return Result.ok().data(page.getRecords()).total(page.getTotal()); |
| | | } |
| | | |
| | | /** |
| | | * 添加 |
| | | * @param form |
| | |
| | | } |
| | | if (VideoContentTypeEnum.VIDEO.getValue().equals(v.getVideoContentType())) { |
| | | v.setVideoUrl(cosUtil.getPreviewUrl(v.getVideoFileKey())); |
| | | |
| | | String coverFileKey = v.getCoverFileKey(); |
| | | v.setCoverUrl(cosUtil.getPreviewUrl(coverFileKey)); |
| | | if (StringUtils.isNotBlank(coverFileKey) && !coverFileKey.contains("http")) { |
| | | v.setCoverUrl(cosUtil.getPreviewUrl(coverFileKey)); |
| | | } |
| | | |
| | | } else if (VideoContentTypeEnum.IMG.getValue().equals(v.getVideoContentType()) && StringUtils.isNotBlank(v.getVideoImgs())) { |
| | | v.setImgs(JSON.parseArray(v.getVideoImgs(), String.class).stream().map(fileKey -> cosUtil.getPreviewUrl(fileKey)).collect(Collectors.toList())); |
| | | } |
| | |
| | | LVC.id = #{id} AND LVC.delete_flag = 0 |
| | | </select> |
| | | |
| | | <select id="getManagerPage" resultMap="BaseResultMap"> |
| | | SELECT |
| | | LVC.video_id, |
| | | LVC.comment_content, |
| | | LVC.reply_id, |
| | | LVC.reply_user_id, |
| | | LVC.reply_user_nickname, |
| | | LVC.master_comment_id, |
| | | LVC.status, |
| | | LVC.thumbs_up_num, |
| | | LVC.id, |
| | | LVC.user_id, |
| | | LVC.user_nickname, |
| | | LVC.user_avatar, |
| | | LVC.create_time |
| | | FROM |
| | | lmk_video_comment LVC |
| | | WHERE |
| | | LVC.video_id = #{query.videoId} AND LVC.delete_flag = 0 |
| | | <if test="query.commentContent != null and query.commentContent !=''"> |
| | | AND LVC.comment_content like concat('%',#{query.commentContent},'%') |
| | | </if> |
| | | <if test="query.nickName != null and query.nickName !=''"> |
| | | AND LVC.user_nickname like concat('%',#{query.nickName},'%') |
| | | </if> |
| | | <if test="query.startTime != null"> |
| | | AND LVC.create_time >= #{query.startTime} |
| | | </if> |
| | | <if test="query.endTime != null"> |
| | | AND LVC.create_time <= #{query.endTime} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getPage" resultMap="BaseResultMap"> |
| | | SELECT |
New file |
| | |
| | | package cn.lili.controller.lmk; |
| | | |
| | | |
| | | import cn.lili.base.Result; |
| | | import cn.lili.modules.lmk.domain.query.VideoCommentMangerQuery; |
| | | import cn.lili.modules.lmk.service.VideoCommentService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * lmk-shop-java |
| | | * 管理端评价管理 |
| | | * |
| | | * @author : zxl |
| | | * @date : 2025-08-14 10:50 |
| | | **/ |
| | | @Validated |
| | | @RequiredArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/manager/lmk/videoComment") |
| | | public class VideoCommentController { |
| | | private final VideoCommentService videoCommentService; |
| | | |
| | | @GetMapping() |
| | | public Result getPage(VideoCommentMangerQuery query){ |
| | | return videoCommentService.mangerComment(query); |
| | | } |
| | | @DeleteMapping("/{id}") |
| | | public Result delete(@PathVariable("id")String id){ |
| | | return videoCommentService.removeById(id); |
| | | } |
| | | } |