parent
8a034b5238
commit
334e4a2687
@ -1,118 +1,117 @@
|
|||||||
package com.ruoyi.common.core.domain;
|
package com.ruoyi.common.core.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Entity基类
|
* Entity基类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public class BaseEntity implements Serializable
|
public class BaseEntity implements Serializable {
|
||||||
{
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 搜索值 */
|
/**
|
||||||
|
* 搜索值
|
||||||
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
private String searchValue;
|
private String searchValue;
|
||||||
|
|
||||||
/** 创建者 */
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
private String createBy;
|
private String createBy;
|
||||||
|
|
||||||
/** 创建时间 */
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
/** 更新者 */
|
/**
|
||||||
|
* 更新者
|
||||||
|
*/
|
||||||
private String updateBy;
|
private String updateBy;
|
||||||
|
|
||||||
/** 更新时间 */
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
/** 备注 */
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
/** 请求参数 */
|
/**
|
||||||
|
* 请求参数
|
||||||
|
*/
|
||||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
private Map<String, Object> params;
|
private Map<String, Object> params;
|
||||||
|
|
||||||
public String getSearchValue()
|
public String getSearchValue() {
|
||||||
{
|
|
||||||
return searchValue;
|
return searchValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSearchValue(String searchValue)
|
public void setSearchValue(String searchValue) {
|
||||||
{
|
|
||||||
this.searchValue = searchValue;
|
this.searchValue = searchValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCreateBy()
|
public String getCreateBy() {
|
||||||
{
|
|
||||||
return createBy;
|
return createBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCreateBy(String createBy)
|
public void setCreateBy(String createBy) {
|
||||||
{
|
|
||||||
this.createBy = createBy;
|
this.createBy = createBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getCreateTime()
|
public Date getCreateTime() {
|
||||||
{
|
|
||||||
return createTime;
|
return createTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCreateTime(Date createTime)
|
public void setCreateTime(Date createTime) {
|
||||||
{
|
|
||||||
this.createTime = createTime;
|
this.createTime = createTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUpdateBy()
|
public String getUpdateBy() {
|
||||||
{
|
|
||||||
return updateBy;
|
return updateBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUpdateBy(String updateBy)
|
public void setUpdateBy(String updateBy) {
|
||||||
{
|
|
||||||
this.updateBy = updateBy;
|
this.updateBy = updateBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getUpdateTime()
|
public Date getUpdateTime() {
|
||||||
{
|
|
||||||
return updateTime;
|
return updateTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUpdateTime(Date updateTime)
|
public void setUpdateTime(Date updateTime) {
|
||||||
{
|
|
||||||
this.updateTime = updateTime;
|
this.updateTime = updateTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getRemark()
|
public String getRemark() {
|
||||||
{
|
|
||||||
return remark;
|
return remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRemark(String remark)
|
public void setRemark(String remark) {
|
||||||
{
|
|
||||||
this.remark = remark;
|
this.remark = remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, Object> getParams()
|
public Map<String, Object> getParams() {
|
||||||
{
|
if (params == null) {
|
||||||
if (params == null)
|
|
||||||
{
|
|
||||||
params = new HashMap<>();
|
params = new HashMap<>();
|
||||||
}
|
}
|
||||||
return params;
|
return params;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setParams(Map<String, Object> params)
|
public void setParams(Map<String, Object> params) {
|
||||||
{
|
|
||||||
this.params = params;
|
this.params = params;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,107 @@
|
|||||||
|
package com.ruoyi.system.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告对象 b_poster
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-11-21
|
||||||
|
*/
|
||||||
|
public class Poster extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 5298961068999599481L;
|
||||||
|
/**
|
||||||
|
* $column.columnComment
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "广告名称")
|
||||||
|
private String posterName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 有效起始时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "有效起始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 有效结束时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "有效结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频封面
|
||||||
|
*/
|
||||||
|
@Excel(name = "视频封面")
|
||||||
|
private String videoLogo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频路径
|
||||||
|
*/
|
||||||
|
@Excel(name = "视频路径")
|
||||||
|
private String videoPath;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Poster{" + "id=" + id + ", posterName='" + posterName + '\'' + ", startTime=" + startTime + ", endTime=" + endTime + ", videoLogo='" + videoLogo + '\'' + ", videoPath='" + videoPath + '\'' + '}';
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPosterName() {
|
||||||
|
return posterName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPosterName(String posterName) {
|
||||||
|
this.posterName = posterName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getStartTime() {
|
||||||
|
return startTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStartTime(Date startTime) {
|
||||||
|
this.startTime = startTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getEndTime() {
|
||||||
|
return endTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEndTime(Date endTime) {
|
||||||
|
this.endTime = endTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVideoLogo() {
|
||||||
|
return videoLogo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVideoLogo(String videoLogo) {
|
||||||
|
this.videoLogo = videoLogo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVideoPath() {
|
||||||
|
return videoPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVideoPath(String videoPath) {
|
||||||
|
this.videoPath = videoPath;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.ruoyi.system.domain.Poster;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-11-21
|
||||||
|
*/
|
||||||
|
public interface SysPosterMapper {
|
||||||
|
/**
|
||||||
|
* 查询最新一条广告
|
||||||
|
*
|
||||||
|
* @return 广告
|
||||||
|
*/
|
||||||
|
Poster findByOne();
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.system.mapper.SysPosterMapper">
|
||||||
|
|
||||||
|
<resultMap type="Poster" id="BPosterResult">
|
||||||
|
<result property="id" column="id"/>
|
||||||
|
<result property="posterName" column="poster_name"/>
|
||||||
|
<result property="startTime" column="start_time"/>
|
||||||
|
<result property="endTime" column="end_time"/>
|
||||||
|
<result property="videoLogo" column="video_logo"/>
|
||||||
|
<result property="videoPath" column="video_path"/>
|
||||||
|
<result property="createBy" column="create_by"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="updateBy" column="update_by"/>
|
||||||
|
<result property="updateTime" column="update_time"/>
|
||||||
|
<result property="remark" column="remark"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="findByOne" resultType="com.ruoyi.system.domain.Poster">
|
||||||
|
select id,
|
||||||
|
poster_name,
|
||||||
|
start_time,
|
||||||
|
end_time,
|
||||||
|
video_logo,
|
||||||
|
video_path,
|
||||||
|
create_by,
|
||||||
|
create_time,
|
||||||
|
update_by,
|
||||||
|
update_time,
|
||||||
|
remark
|
||||||
|
from b_poster
|
||||||
|
order by id desc
|
||||||
|
limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
Reference in new issue