DAY_01作业内容

day_01
yaoxin 2024-02-23 21:05:57 +08:00
parent 955a6b0960
commit c28bb19733
2 changed files with 31 additions and 6 deletions

View File

@ -6,6 +6,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.muyu.common.core.annotation.Excel;
import com.muyu.common.core.web.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;
/**
* book_info
@ -41,10 +42,19 @@ public class BookInfo extends BaseEntity
private String description;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date shelfTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date staTime;
@JsonFormat(pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date endTime;
public void setBid(Long bid)
{
this.bid = bid;
@ -109,6 +119,22 @@ public class BookInfo extends BaseEntity
return shelfTime;
}
public Date getStaTime() {
return staTime;
}
public void setStaTime(Date staTime) {
this.staTime = staTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

View File

@ -26,12 +26,11 @@
<select id="selectBookInfoList" parameterType="com.muyu.system.domain.BookInfo" resultMap="BookInfoResult">
<include refid="selectBookInfoVo"/>
<where>
<if test="title != null and title != ''"> and title = #{title}</if>
<if test="title != null and title != ''"> and title like concat('%',#{title},'%') </if>
<if test="author != null and author != ''"> and author = #{author}</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="image != null and image != ''"> and image = #{image}</if>
<if test="description != null and description != ''"> and description = #{description}</if>
<if test="shelfTime != null "> and shelf_time = #{shelfTime}</if>
<if test="staTime != null"> and shelf_time >= #{staTime}</if>
<if test="endTime != null"> and shelf_time &lt;= #{endTime}</if>
</where>
</select>