短剧列表
This commit is contained in:
parent
4328f5c369
commit
ce59fc1916
|
|
@ -1,13 +1,15 @@
|
|||
package com.playlet.web.controller.app;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.playlet.common.core.controller.BaseController;
|
||||
import com.playlet.common.core.page.TableDataInfo;
|
||||
import com.playlet.system.service.IPlayletItemService;
|
||||
import com.playlet.web.resp.PlayletItemSearchRequestResp;
|
||||
import com.playlet.common.core.domain.Result;
|
||||
import com.playlet.system.domain.PlayletItem;
|
||||
import com.playlet.web.req.PlayletItemSearchRequestReq;
|
||||
import com.playlet.web.service.app.PlayletItemAppService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
/**
|
||||
|
|
@ -17,21 +19,24 @@ import org.springframework.web.bind.annotation.*;
|
|||
* @Description: 短剧基础app Controller Controller
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "短剧基础app控制层")
|
||||
@Api(tags = "短剧视频*短剧列表")
|
||||
@RestController
|
||||
@RequestMapping(value = "/app/playlet/item")
|
||||
@RequestMapping(value = "/app/item")
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class PlayletItemAppController extends BaseController {
|
||||
|
||||
private final IPlayletItemService playletItemService;
|
||||
private final PlayletItemAppService playletItemAppService;
|
||||
|
||||
/**
|
||||
* 查询短剧基础列表
|
||||
*/
|
||||
@RequiresPermissions("system:item:list")
|
||||
@PostMapping("/search")
|
||||
@ResponseBody
|
||||
public TableDataInfo search(@RequestBody PlayletItemSearchRequestResp requestResp) {
|
||||
return getDataTableInPage(playletItemService.search(PlayletItemSearchRequestResp.toDto(requestResp)));
|
||||
@PostMapping("/getItemList")
|
||||
@ApiOperation(value = "分页查询短剧基础列表")
|
||||
public Result<PageInfo<PlayletItem>> search(@RequestBody PlayletItem playletItem,
|
||||
@RequestParam(value = "pageNum")Integer pageNum,
|
||||
@RequestParam(value = "pageSize")Integer pageSize) {
|
||||
return Result.success(playletItemAppService.getItemPage(playletItem, pageNum, pageSize));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,43 @@
|
|||
package com.playlet.web.req;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Date: 2024-03-14-23:49
|
||||
* @Author: 但星霖
|
||||
* @Version: v1.0
|
||||
* @Description: 短剧基础对象 查询相应对象
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "短剧视频*分页入参")
|
||||
public class PlayletItemSearchRequestReq {
|
||||
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "视频名称")
|
||||
private String videoName;
|
||||
|
||||
@ApiModelProperty(value = "上映年份")
|
||||
private String releaseDate;
|
||||
|
||||
@ApiModelProperty(value = "地区")
|
||||
private String region;
|
||||
|
||||
@ApiModelProperty(value = "视频类型1 科幻 2 爱情 3 恐怖 4 悬疑..")
|
||||
private Long videoType;
|
||||
|
||||
@ApiModelProperty(value = "评分 大于等于")
|
||||
private Long score;
|
||||
|
||||
@ApiModelProperty(value = "集数 大于等于")
|
||||
private Long numberEpisode;
|
||||
|
||||
@ApiModelProperty(value = "上映时间")
|
||||
private Date releaseTime;
|
||||
|
||||
}
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
package com.playlet.web.resp;
|
||||
|
||||
import com.playlet.common.annotation.Excel;
|
||||
import com.playlet.system.pojo.dto.PlayletItemSearchRequestDTO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Date: 2024-03-14-23:49
|
||||
* @Author: 但星霖
|
||||
* @Version: v1.0
|
||||
* @Description: 短剧基础对象 查询相应对象
|
||||
*/
|
||||
public class PlayletItemSearchRequestResp {
|
||||
|
||||
@Schema(description = "主键id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "视频名称")
|
||||
private String videoName;
|
||||
|
||||
@Schema(description = "上映年份")
|
||||
private String releaseDate;
|
||||
|
||||
@Excel(name = "地区")
|
||||
private String region;
|
||||
|
||||
@Schema(description = "视频类型1 科幻 2 爱情 3 恐怖 4 悬疑..")
|
||||
private Long videoType;
|
||||
|
||||
@Schema(description = "评分 大于等于")
|
||||
private Long score;
|
||||
|
||||
@Schema(description = "集数 大于等于")
|
||||
private Long numberEpisode;
|
||||
|
||||
@Schema(description = "上映时间")
|
||||
private Date releaseTime;
|
||||
|
||||
@Schema(description = "页条数")
|
||||
private Integer pageSize = 10;
|
||||
|
||||
@Schema(description = "当前页")
|
||||
private Integer current = 1;
|
||||
|
||||
public static PlayletItemSearchRequestDTO toDto(PlayletItemSearchRequestResp vo){
|
||||
PlayletItemSearchRequestDTO dto = new PlayletItemSearchRequestDTO();
|
||||
BeanUtils.copyProperties(vo, dto);
|
||||
return dto;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.playlet.web.service.app;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.playlet.system.domain.PlayletItem;
|
||||
import com.playlet.web.req.PlayletItemSearchRequestReq;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public interface PlayletItemAppService {
|
||||
|
||||
PageInfo<PlayletItem> getItemPage(PlayletItem playletItem, Integer pageSize, Integer pageNum);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.playlet.web.service.app.impl;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.playlet.system.domain.PlayletItem;
|
||||
import com.playlet.system.service.IPlayletItemService;
|
||||
import com.playlet.web.service.app.PlayletItemAppService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class PlayletItemAppServiceImpl implements PlayletItemAppService {
|
||||
|
||||
private final IPlayletItemService iPlayletItemService;
|
||||
|
||||
@Override
|
||||
public PageInfo<PlayletItem> getItemPage(PlayletItem playletItem, Integer pageSize, Integer pageNum) {
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
List<PlayletItem> playletItems = iPlayletItemService.selectPlayletItemList(playletItem);
|
||||
return PageInfo.of(playletItems);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,9 +1,13 @@
|
|||
package com.playlet.system.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.playlet.common.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.playlet.common.annotation.Excel;
|
||||
|
|
@ -22,54 +26,67 @@ public class PlayletItem extends BaseEntity{
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键id */
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/** 来源类型 1.抖音 2.快手 3.视频号 */
|
||||
@Excel(name = "来源类型 1.抖音 2.快手 3.视频号")
|
||||
@ApiModelProperty(value = "来源类型 1.抖音 2.快手 3.视频号")
|
||||
private Long sourceType;
|
||||
|
||||
/** 视频名称 */
|
||||
@Excel(name = "视频名称")
|
||||
@ApiModelProperty(value = "视频名称")
|
||||
private String videoName;
|
||||
|
||||
/** 视频是否完结 0 未完结 1 完结 */
|
||||
@Excel(name = "视频是否完结 0 未完结 1 完结 ")
|
||||
@ApiModelProperty(value = "视频是否完结 0 未完结 1 完结")
|
||||
private Long completeNot;
|
||||
|
||||
/** 视频封面图 */
|
||||
@Excel(name = "视频封面图")
|
||||
@ApiModelProperty(value = "视频封面图")
|
||||
private String coverPic;
|
||||
|
||||
/** 连接地址 */
|
||||
@Excel(name = "连接地址")
|
||||
@ApiModelProperty(value = "连接地址")
|
||||
private String connectSite;
|
||||
|
||||
/** 上映年份 */
|
||||
@Excel(name = "上映年份")
|
||||
@ApiModelProperty(value = "上映年份")
|
||||
private String releaseDate;
|
||||
|
||||
/** 地区 */
|
||||
@Excel(name = "地区")
|
||||
@ApiModelProperty(value = "地区")
|
||||
private String region;
|
||||
|
||||
/** 视频类型1 科幻 2 爱情 3 恐怖 4 悬疑.. */
|
||||
@Excel(name = "视频类型1 科幻 2 爱情 3 恐怖 4 悬疑..")
|
||||
@ApiModelProperty(value = "视频类型1 科幻 2 爱情 3 恐怖 4 悬疑..")
|
||||
private Long videoType;
|
||||
|
||||
/** 评分 */
|
||||
@Excel(name = "评分")
|
||||
@ApiModelProperty(value = "评分")
|
||||
private Long score;
|
||||
|
||||
/** 集数 */
|
||||
@Excel(name = "集数")
|
||||
@ApiModelProperty(value = "集数")
|
||||
private Long numberEpisode;
|
||||
|
||||
/** 是否删除 1 正常 0 删除 */
|
||||
@Excel(name = "是否删除 1 正常 0 删除")
|
||||
@ApiModelProperty(value = "是否删除 1 正常 0 删除")
|
||||
private Long isDelete;
|
||||
|
||||
/** 上映时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "上映时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "上映时间")
|
||||
private Date releaseTime;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue