parent
4f25100fcd
commit
e478812dd2
@ -0,0 +1,38 @@
|
||||
package com.ssm.entity;
|
||||
import java.util.Date;
|
||||
|
||||
public class Advertisement {
|
||||
private Integer adId;
|
||||
private String adTitle;
|
||||
private String adUrl;
|
||||
private String adImg;
|
||||
private String status;
|
||||
private Date createTime;
|
||||
|
||||
public Advertisement() {}
|
||||
|
||||
public Integer getAdId() { return adId; }
|
||||
public void setAdId(Integer adId) { this.adId = adId; }
|
||||
public String getAdTitle() { return adTitle; }
|
||||
public void setAdTitle(String adTitle) { this.adTitle = adTitle; }
|
||||
public String getAdUrl() { return adUrl; }
|
||||
public void setAdUrl(String adUrl) { this.adUrl = adUrl; }
|
||||
public String getAdImg() { return adImg; }
|
||||
public void setAdImg(String adImg) { this.adImg = adImg; }
|
||||
public String getStatus() { return status; }
|
||||
public void setStatus(String status) { this.status = status; }
|
||||
public Date getCreateTime() { return createTime; }
|
||||
public void setCreateTime(Date createTime) { this.createTime = createTime; }
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Advertisement{" +
|
||||
"adId=" + adId +
|
||||
", adTitle='" + adTitle + '\'' +
|
||||
", adUrl='" + adUrl + '\'' +
|
||||
", adImg='" + adImg + '\'' +
|
||||
", status='" + status + '\'' +
|
||||
", createTime=" + createTime +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
package com.ssm.entity;
|
||||
|
||||
public class Carousel {
|
||||
private Integer carouselId;
|
||||
private String carouselTitle;
|
||||
private String carouselImg;
|
||||
private String jumpUrl;
|
||||
private Integer sort;
|
||||
private String status;
|
||||
|
||||
public Carousel() {}
|
||||
|
||||
public Integer getCarouselId() { return carouselId; }
|
||||
public void setCarouselId(Integer carouselId) { this.carouselId = carouselId; }
|
||||
public String getCarouselTitle() { return carouselTitle; }
|
||||
public void setCarouselTitle(String carouselTitle) { this.carouselTitle = carouselTitle; }
|
||||
public String getCarouselImg() { return carouselImg; }
|
||||
public void setCarouselImg(String carouselImg) { this.carouselImg = carouselImg; }
|
||||
public String getJumpUrl() { return jumpUrl; }
|
||||
public void setJumpUrl(String jumpUrl) { this.jumpUrl = jumpUrl; }
|
||||
public Integer getSort() { return sort; }
|
||||
public void setSort(Integer sort) { this.sort = sort; }
|
||||
public String getStatus() { return status; }
|
||||
public void setStatus(String status) { this.status = status; }
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Carousel{" +
|
||||
"carouselId=" + carouselId +
|
||||
", carouselTitle='" + carouselTitle + '\'' +
|
||||
", carouselImg='" + carouselImg + '\'' +
|
||||
", jumpUrl='" + jumpUrl + '\'' +
|
||||
", sort=" + sort +
|
||||
", status='" + status + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package com.ssm.mapper;
|
||||
import com.ssm.entity.Advertisement;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import java.util.List;
|
||||
|
||||
public interface AdvertisementMapper {
|
||||
@Select("SELECT * FROM advertisement")
|
||||
List<Advertisement> selectAllAds();
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package com.ssm.mapper;
|
||||
import com.ssm.entity.Carousel;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import java.util.List;
|
||||
|
||||
public interface CarouselMapper {
|
||||
@Select("SELECT * FROM carousel ORDER BY sort")
|
||||
List<Carousel> selectAllCarousels();
|
||||
}
|
||||
Loading…
Reference in new issue