小程序获取弹窗接口
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* (TbShopAd)实体类
|
||||
*
|
||||
* @author GYJ
|
||||
* @since 2024-08-19 14:25:09
|
||||
*/
|
||||
@Data
|
||||
public class TbShopAd implements Serializable {
|
||||
private static final long serialVersionUID = -34028307481923067L;
|
||||
/**
|
||||
* 自增id
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 店铺id,如果是通用广告则为0
|
||||
*/
|
||||
private Integer shopId;
|
||||
/**
|
||||
* 广告图片地址
|
||||
*/
|
||||
private String imgUrl;
|
||||
/**
|
||||
* 跳转页面路径
|
||||
*/
|
||||
private String linkPath;
|
||||
/**
|
||||
* 广告展示圆角
|
||||
*/
|
||||
private Integer borderRadius;
|
||||
/**
|
||||
* 弹窗展示位置:home首页,make_order点餐页
|
||||
*/
|
||||
private String showPosition;
|
||||
/**
|
||||
* 显示频率:only_one 仅首次展示, every_show 每次打开都展示,every_day 每天展示一次,three_day 每三天展示一次, seven_day 每七天展示一次, thirty_day 没30天展示一次
|
||||
*/
|
||||
private String frequency;
|
||||
/**
|
||||
* 广告状态:0未启用,1已启用
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity.dto;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopAd;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author GYJ
|
||||
*/
|
||||
@Data
|
||||
public class TbShopAdDto {
|
||||
private Integer id;
|
||||
/**
|
||||
* 店铺id,如果是通用广告则为0
|
||||
*/
|
||||
private Integer shopId;
|
||||
/**
|
||||
* 广告图片地址
|
||||
*/
|
||||
private String imgUrl;
|
||||
/**
|
||||
* 跳转页面路径
|
||||
*/
|
||||
private String linkPath;
|
||||
/**
|
||||
* 广告展示圆角
|
||||
*/
|
||||
private Integer borderRadius;
|
||||
/**
|
||||
* 弹窗展示位置:home首页,make_order点餐页
|
||||
*/
|
||||
private String showPosition;
|
||||
/**
|
||||
* 显示频率:only_one 仅首次展示, every_show 每次打开都展示,every_day 每天展示一次,three_day 每三天展示一次, seven_day 每七天展示一次, thirty_day 没30天展示一次
|
||||
*/
|
||||
private String frequency;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Long updateTime;
|
||||
|
||||
public static List<TbShopAdDto> convertShopAdDoToDtoList(List<TbShopAd> adList) {
|
||||
return adList.stream().map(TbShopAdDto::convertShopAdDoToDto).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public static TbShopAdDto convertShopAdDoToDto(TbShopAd ad) {
|
||||
TbShopAdDto dto = new TbShopAdDto();
|
||||
dto.setId(ad.getId());
|
||||
dto.setShopId(ad.getShopId());
|
||||
dto.setImgUrl(ad.getImgUrl());
|
||||
dto.setLinkPath(ad.getLinkPath());
|
||||
dto.setBorderRadius(ad.getBorderRadius());
|
||||
dto.setShowPosition(ad.getShowPosition());
|
||||
dto.setFrequency(ad.getFrequency());
|
||||
dto.setUpdateTime(ad.getUpdateTime().getTime());
|
||||
return dto;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user