提交
This commit is contained in:
parent
4264bcfd3e
commit
bd9dd194dc
|
@ -1,17 +1,20 @@
|
||||||
package com.ruoyi.system.domain;
|
package com.ruoyi.system.domain;
|
||||||
|
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import com.ruoyi.common.xss.Xss;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
|
||||||
import com.ruoyi.common.xss.Xss;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通知公告表 sys_notice
|
* 通知公告表 sys_notice
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
public class SysNotice extends BaseEntity
|
public class SysNotice extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
@ -20,6 +23,9 @@ public class SysNotice extends BaseEntity
|
||||||
private Long noticeId;
|
private Long noticeId;
|
||||||
|
|
||||||
/** 公告标题 */
|
/** 公告标题 */
|
||||||
|
@Xss(message = "公告标题不能包含脚本字符")
|
||||||
|
@NotBlank(message = "公告标题不能为空")
|
||||||
|
@Size(min = 0, max = 50, message = "公告标题不能超过50个字符")
|
||||||
private String noticeTitle;
|
private String noticeTitle;
|
||||||
|
|
||||||
/** 公告类型(1通知 2公告) */
|
/** 公告类型(1通知 2公告) */
|
||||||
|
@ -31,72 +37,20 @@ public class SysNotice extends BaseEntity
|
||||||
/** 公告状态(0正常 1关闭) */
|
/** 公告状态(0正常 1关闭) */
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
public Long getNoticeId()
|
@Excel(name = "接收方式", readConverterExp = "1=全体用户,2=指定用户")
|
||||||
{
|
@ApiModelProperty("接收方式")
|
||||||
return noticeId;
|
private String receiveType;
|
||||||
}
|
|
||||||
|
|
||||||
public void setNoticeId(Long noticeId)
|
@Excel(name = "跳转URL")
|
||||||
{
|
@ApiModelProperty("跳转URL")
|
||||||
this.noticeId = noticeId;
|
private String url;
|
||||||
}
|
|
||||||
|
|
||||||
public void setNoticeTitle(String noticeTitle)
|
@Excel(name = "URL类型", readConverterExp = "1=公告详情,2=小程序内部URL,3=外部URL")
|
||||||
{
|
@ApiModelProperty("URL类型")
|
||||||
this.noticeTitle = noticeTitle;
|
private String urlType;
|
||||||
}
|
|
||||||
|
|
||||||
@Xss(message = "公告标题不能包含脚本字符")
|
@Excel(name = "发送方式", readConverterExp = "1=小程序内部展示,2=短信,3=公众号")
|
||||||
@NotBlank(message = "公告标题不能为空")
|
@ApiModelProperty("发送方式")
|
||||||
@Size(min = 0, max = 50, message = "公告标题不能超过50个字符")
|
private String sendType;
|
||||||
public String getNoticeTitle()
|
|
||||||
{
|
|
||||||
return noticeTitle;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNoticeType(String noticeType)
|
|
||||||
{
|
|
||||||
this.noticeType = noticeType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getNoticeType()
|
|
||||||
{
|
|
||||||
return noticeType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNoticeContent(String noticeContent)
|
|
||||||
{
|
|
||||||
this.noticeContent = noticeContent;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getNoticeContent()
|
|
||||||
{
|
|
||||||
return noticeContent;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStatus(String status)
|
|
||||||
{
|
|
||||||
this.status = status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStatus()
|
|
||||||
{
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("noticeId", getNoticeId())
|
|
||||||
.append("noticeTitle", getNoticeTitle())
|
|
||||||
.append("noticeType", getNoticeType())
|
|
||||||
.append("noticeContent", getNoticeContent())
|
|
||||||
.append("status", getStatus())
|
|
||||||
.append("createBy", getCreateBy())
|
|
||||||
.append("createTime", getCreateTime())
|
|
||||||
.append("updateBy", getUpdateBy())
|
|
||||||
.append("updateTime", getUpdateTime())
|
|
||||||
.append("remark", getRemark())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
create_time,
|
create_time,
|
||||||
update_by,
|
update_by,
|
||||||
update_time,
|
update_time,
|
||||||
remark
|
remark,
|
||||||
|
receive_type,
|
||||||
|
url,
|
||||||
|
url_type,
|
||||||
|
send_type
|
||||||
from sys_notice
|
from sys_notice
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
@ -41,6 +45,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="status != null and status != ''">
|
<if test="status != null and status != ''">
|
||||||
AND `status` = #{status}
|
AND `status` = #{status}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="receiveType != null and receiveType != ''"> and receive_type = #{receiveType}</if>
|
||||||
|
<if test="url != null and url != ''"> and url like concat('%', #{url},'%')</if>
|
||||||
|
<if test="urlType != null and urlType != ''"> and url_type = #{urlType}</if>
|
||||||
|
<if test="sendType != null and sendType != ''"> and send_type = #{sendType}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -52,6 +60,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="status != null and status != '' ">status, </if>
|
<if test="status != null and status != '' ">status, </if>
|
||||||
<if test="remark != null and remark != ''">remark,</if>
|
<if test="remark != null and remark != ''">remark,</if>
|
||||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
|
<if test="receiveType != null">receive_type,</if>
|
||||||
|
<if test="url != null">url,</if>
|
||||||
|
<if test="urlType != null">url_type,</if>
|
||||||
|
<if test="sendType != null">send_type,</if>
|
||||||
create_time
|
create_time
|
||||||
)values(
|
)values(
|
||||||
<if test="noticeTitle != null and noticeTitle != ''">#{noticeTitle}, </if>
|
<if test="noticeTitle != null and noticeTitle != ''">#{noticeTitle}, </if>
|
||||||
|
@ -60,6 +72,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="status != null and status != ''">#{status}, </if>
|
<if test="status != null and status != ''">#{status}, </if>
|
||||||
<if test="remark != null and remark != ''">#{remark},</if>
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
|
<if test="receiveType != null">#{receiveType},</if>
|
||||||
|
<if test="url != null">#{url},</if>
|
||||||
|
<if test="urlType != null">#{urlType},</if>
|
||||||
|
<if test="sendType != null">#{sendType},</if>
|
||||||
sysdate()
|
sysdate()
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
@ -70,8 +86,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="noticeTitle != null and noticeTitle != ''">notice_title = #{noticeTitle}, </if>
|
<if test="noticeTitle != null and noticeTitle != ''">notice_title = #{noticeTitle}, </if>
|
||||||
<if test="noticeType != null and noticeType != ''">notice_type = #{noticeType}, </if>
|
<if test="noticeType != null and noticeType != ''">notice_type = #{noticeType}, </if>
|
||||||
<if test="noticeContent != null">notice_content = #{noticeContent}, </if>
|
<if test="noticeContent != null">notice_content = #{noticeContent}, </if>
|
||||||
<if test="status != null and status != ''">status = #{status}, </if>
|
<if test="status != null and status != ''">`status` = #{status}, </if>
|
||||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
|
<if test="receiveType != null">receive_type = #{receiveType},</if>
|
||||||
|
<if test="url != null">url = #{url},</if>
|
||||||
|
<if test="urlType != null">url_type = #{urlType},</if>
|
||||||
|
<if test="sendType != null">send_type = #{sendType},</if>
|
||||||
update_time = sysdate()
|
update_time = sysdate()
|
||||||
</set>
|
</set>
|
||||||
where notice_id = #{noticeId}
|
where notice_id = #{noticeId}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user