小程序公告/swagger注释增加

This commit is contained in:
kuang.yife 2024-03-12 14:22:02 +08:00
parent 6f1d1f2be1
commit 39b7a362c2
10 changed files with 115 additions and 6 deletions

View File

@ -2,7 +2,7 @@ package com.playlet.web.controller.app;
import com.playlet.common.core.domain.Result;
import com.playlet.system.domain.PlayletBanner;
import com.playlet.web.service.app.PlayletBannerService;
import com.playlet.web.service.app.PlayletBannerAppService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
@ -19,7 +19,7 @@ import java.util.List;
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class PlayletBannerAppController {
private final PlayletBannerService playletBannerService;
private final PlayletBannerAppService playletBannerService;
@ResponseBody
@PostMapping(value = "/getBannerList")

View File

@ -0,0 +1,35 @@
package com.playlet.web.controller.app;
import com.playlet.common.core.domain.Result;
import com.playlet.system.domain.PlayletMessage;
import com.playlet.web.service.app.PlayletMessageAppService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@Slf4j
@Api(tags = "小程序*短剧公告接口")
@RestController
@RequestMapping(value = "/app/message")
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class PlayletMessageAppController {
private final PlayletMessageAppService playletMessageAppService;
@ResponseBody
@PostMapping(value = "/getMessageList")
@ApiOperation(value = "获取短剧公告列表", httpMethod = "POST")
public Result<List<PlayletMessage>> getMessageList(@RequestBody PlayletMessage playletMessage){
try {
return Result.success(playletMessageAppService.getMessageList(playletMessage));
}catch (Exception e){
return Result.error(e.getMessage());
}
}
}

View File

@ -1,7 +1,6 @@
package com.playlet.web.service.app;
import com.playlet.system.domain.PlayletBanner;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
@ -9,7 +8,7 @@ import java.util.List;
* <p>短剧公告app的service类</p>
* @author clunt
*/
public interface PlayletBannerService {
public interface PlayletBannerAppService {
/**
* @param playletBanner 轮播图查询条件

View File

@ -0,0 +1,16 @@
package com.playlet.web.service.app;
import com.playlet.system.domain.PlayletBanner;
import com.playlet.system.domain.PlayletMessage;
import java.util.List;
public interface PlayletMessageAppService {
/**
* @param playletMessage 短剧公告
* @return 公告列表
*/
List<PlayletMessage> getMessageList(PlayletMessage playletMessage);
}

View File

@ -2,7 +2,7 @@ package com.playlet.web.service.app.impl;
import com.playlet.system.domain.PlayletBanner;
import com.playlet.system.service.IPlayletBannerService;
import com.playlet.web.service.app.PlayletBannerService;
import com.playlet.web.service.app.PlayletBannerAppService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@ -16,7 +16,7 @@ import java.util.List;
@Slf4j
@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class PlayletBannerServiceImpl implements PlayletBannerService {
public class PlayletBannerAppServiceImpl implements PlayletBannerAppService {
private final IPlayletBannerService iPlayletBannerService;

View File

@ -0,0 +1,29 @@
package com.playlet.web.service.app.impl;
import com.playlet.system.domain.PlayletBanner;
import com.playlet.system.domain.PlayletMessage;
import com.playlet.system.service.IPlayletMessageService;
import com.playlet.web.service.app.PlayletMessageAppService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>公告小程序类</p>
* @author clunt
*/
@Slf4j
@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class PlayletMessageAppServiceImpl implements PlayletMessageAppService {
private final IPlayletMessageService iPlayletMessageService;
@Override
public List<PlayletMessage> getMessageList(PlayletMessage playletMessage) {
return iPlayletMessageService.selectPlayletMessageList(playletMessage);
}
}

View File

@ -1,7 +1,11 @@
package com.playlet.system.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.playlet.common.core.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.playlet.common.annotation.Excel;
@ -15,27 +19,34 @@ import com.playlet.common.annotation.Excel;
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "playlet_banner")
@ApiModel(value = "短剧广告管理对象")
public class PlayletBanner extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
@TableId(value = "id", type = IdType.AUTO)
@ApiModelProperty(value = "id")
private Long id;
/** 广告名称 */
@Excel(name = "广告名称")
@ApiModelProperty(value = "广告名称")
private String name;
/** 广告url */
@Excel(name = "广告url")
@ApiModelProperty(value = "广告url")
private String url;
/** 详情页url */
@Excel(name = "详情页url")
@ApiModelProperty(value = "详情页url")
private String detailUrl;
/** 序号,1.2.3.4 */
@Excel(name = "序号,1.2.3.4")
@ApiModelProperty(value = "序号,1.2.3.4")
private Long seq;
}

View File

@ -1,7 +1,11 @@
package com.playlet.system.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.playlet.common.core.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.playlet.common.annotation.Excel;
@ -15,27 +19,34 @@ import com.playlet.common.annotation.Excel;
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "playlet_message")
@ApiModel(value = "短剧公告对象")
public class PlayletMessage extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
@TableId(value = "id", type = IdType.AUTO)
@ApiModelProperty(value = "id")
private Long id;
/** 消息名称 */
@Excel(name = "消息名称")
@ApiModelProperty(value = "消息名称")
private String name;
/** 标题 */
@Excel(name = "标题")
@ApiModelProperty(value = "标题")
private String title;
/** 公告详情 */
@Excel(name = "公告详情")
@ApiModelProperty(value = "公告详情")
private String detail;
/** 是否弹出显示 01.否 02.是 */
@Excel(name = "是否弹出显示 01.否 02.是")
@ApiModelProperty(value = "是否弹出显示 01.否 02.是")
private String type;
}

View File

@ -1,7 +1,10 @@
package com.playlet.system.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.playlet.common.core.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.playlet.common.annotation.Excel;
@ -15,11 +18,13 @@ import com.playlet.common.annotation.Excel;
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "playlet_realization_project")
@ApiModel(value = "变现项目对象")
public class PlayletRealizationProject extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/** 变现项目名称 */

View File

@ -1,6 +1,8 @@
package com.playlet.system.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.playlet.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
@ -24,6 +26,7 @@ public class PlayletUser extends BaseEntity
private static final long serialVersionUID = 1L;
/** 主键 */
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/** 手机号 */