新增发布简报功能

This commit is contained in:
RT 2022-08-18 01:08:22 +08:00
parent f5136a89e6
commit 5f9692b8fc
13 changed files with 4358 additions and 7 deletions

View File

@ -185,6 +185,13 @@
<version>${ruoyi.version}</version> <version>${ruoyi.version}</version>
</dependency> </dependency>
<!-- 简报模块-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-news</artifactId>
<version>${ruoyi.version}</version>
</dependency>
<!-- 系统模块--> <!-- 系统模块-->
<dependency> <dependency>
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
@ -206,6 +213,7 @@
<module>ruoyi-admin</module> <module>ruoyi-admin</module>
<module>ruoyi-framework</module> <module>ruoyi-framework</module>
<module>ruoyi-system</module> <module>ruoyi-system</module>
<module>ruoyi-news</module>
<module>ruoyi-quartz</module> <module>ruoyi-quartz</module>
<module>ruoyi-generator</module> <module>ruoyi-generator</module>
<module>ruoyi-common</module> <module>ruoyi-common</module>

View File

@ -67,6 +67,16 @@
<artifactId>ruoyi-generator</artifactId> <artifactId>ruoyi-generator</artifactId>
</dependency> </dependency>
<!-- 简报模块-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-news</artifactId>
</dependency>
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-news</artifactId>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -1,5 +1,3 @@
Application Version: ${ruoyi.version}
Spring Boot Version: ${spring-boot.version}
///////////////////////////////////////// /////////////////////////////////////////
.----------------. .----------------. .----------------. .----------------.
| .--------------. || .--------------. | | .--------------. || .--------------. |

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -870,7 +870,7 @@ var table = {
} }
top.layer.open({ top.layer.open({
type: 2, type: 2,
area: [width + 'px', height + 'px'], area: ['1200' + 'px', height + 'px'],
fix: false, fix: false,
//不固定 //不固定
maxmin: true, maxmin: true,

View File

@ -4,8 +4,8 @@ gen:
# 作者 # 作者
author: ruoyi author: ruoyi
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
packageName: com.ruoyi.system packageName: com.ruoyi.news
# 自动去除表前缀默认是false # 自动去除表前缀默认是false
autoRemovePre: false autoRemovePre: false
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔) # 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
tablePrefix: sys_ tablePrefix: news_

28
ruoyi-news/pom.xml Normal file
View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>ruoyi</artifactId>
<groupId>com.ruoyi</groupId>
<version>4.7.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ruoyi-news</artifactId>
<description>
简报系统模块
</description>
<dependencies>
<!-- 通用工具-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,220 @@
package com.ruoyi.news.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 请填写功能名称对象 news_important_news
*
* @author ruoyi
* @date 2022-08-17
*/
public class NewsImportantNews extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 编号
*/
private Long id;
/**
* 标题
*/
@Excel(name = "标题")
private String title;
/**
* 内容
*/
@Excel(name = "内容")
private String contenu;
/**
* 图文轮播
*/
@Excel(name = "图文轮播")
private String image;
/**
* 创建人ID
*/
@Excel(name = "创建人ID")
private Long auteurid;
/**
* 作者
*/
@Excel(name = "作者")
private String auteur;
/**
* 修改人ID
*/
@Excel(name = "修改人ID")
private Long corrigerid;
/**
* 来源
*/
@Excel(name = "来源")
private String source;
/**
* 点击数量
*/
@Excel(name = "点击数量")
private Long clicks;
/**
* 类型
*/
@Excel(name = "类型")
private Long type;
/**
* 更新日期
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "更新日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date date;
/**
* 分类
*/
@Excel(name = "分类")
private Long classify;
/**
* 状态
*/
@Excel(name = "状态")
private Long status;
public void setId(Long id) {
this.id = id;
}
public Long getId() {
return id;
}
public void setTitle(String title) {
this.title = title;
}
public String getTitle() {
return title;
}
public void setContenu(String contenu) {
this.contenu = contenu;
}
public String getContenu() {
return contenu;
}
public void setImage(String image) {
this.image = image;
}
public String getImage() {
return image;
}
public void setAuteurid(Long auteurid) {
this.auteurid = auteurid;
}
public Long getAuteurid() {
return auteurid;
}
public void setAuteur(String auteur) {
this.auteur = auteur;
}
public String getAuteur() {
return auteur;
}
public void setCorrigerid(Long corrigerid) {
this.corrigerid = corrigerid;
}
public Long getCorrigerid() {
return corrigerid;
}
public void setSource(String source) {
this.source = source;
}
public String getSource() {
return source;
}
public void setClicks(Long clicks) {
this.clicks = clicks;
}
public Long getClicks() {
return clicks;
}
public void setType(Long type) {
this.type = type;
}
public Long getType() {
return type;
}
public void setDate(Date date) {
this.date = date;
}
public Date getDate() {
return date;
}
public void setClassify(Long classify) {
this.classify = classify;
}
public Long getClassify() {
return classify;
}
public void setStatus(Long status) {
this.status = status;
}
public Long getStatus() {
return status;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("title", getTitle())
.append("contenu", getContenu())
.append("image", getImage())
.append("auteurid", getAuteurid())
.append("auteur", getAuteur())
.append("corrigerid", getCorrigerid())
.append("source", getSource())
.append("clicks", getClicks())
.append("type", getType())
.append("date", getDate())
.append("classify", getClassify())
.append("status", getStatus())
.toString();
}
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.news.mapper;
import java.util.List;
import com.ruoyi.news.domain.NewsImportantNews;
/**
* 请填写功能名称Mapper接口
*
* @author ruoyi
* @date 2022-08-17
*/
public interface NewsImportantNewsMapper {
/**
* 查询请填写功能名称
*
* @param id 请填写功能名称主键
* @return 请填写功能名称
*/
public NewsImportantNews selectNewsImportantNewsById(Long id);
/**
* 查询请填写功能名称列表
*
* @param newsImportantNews 请填写功能名称
* @return 请填写功能名称集合
*/
public List<NewsImportantNews> selectNewsImportantNewsList(NewsImportantNews newsImportantNews);
/**
* 新增请填写功能名称
*
* @param newsImportantNews 请填写功能名称
* @return 结果
*/
public int insertNewsImportantNews(NewsImportantNews newsImportantNews);
/**
* 修改请填写功能名称
*
* @param newsImportantNews 请填写功能名称
* @return 结果
*/
public int updateNewsImportantNews(NewsImportantNews newsImportantNews);
/**
* 删除请填写功能名称
*
* @param id 请填写功能名称主键
* @return 结果
*/
public int deleteNewsImportantNewsById(Long id);
/**
* 批量删除请填写功能名称
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteNewsImportantNewsByIds(String[] ids);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.news.service;
import java.util.List;
import com.ruoyi.news.domain.NewsImportantNews;
/**
* 请填写功能名称Service接口
*
* @author ruoyi
* @date 2022-08-17
*/
public interface INewsImportantNewsService {
/**
* 查询请填写功能名称
*
* @param id 请填写功能名称主键
* @return 请填写功能名称
*/
public NewsImportantNews selectNewsImportantNewsById(Long id);
/**
* 查询请填写功能名称列表
*
* @param newsImportantNews 请填写功能名称
* @return 请填写功能名称集合
*/
public List<NewsImportantNews> selectNewsImportantNewsList(NewsImportantNews newsImportantNews);
/**
* 新增请填写功能名称
*
* @param newsImportantNews 请填写功能名称
* @return 结果
*/
public int insertNewsImportantNews(NewsImportantNews newsImportantNews);
/**
* 修改请填写功能名称
*
* @param newsImportantNews 请填写功能名称
* @return 结果
*/
public int updateNewsImportantNews(NewsImportantNews newsImportantNews);
/**
* 批量删除请填写功能名称
*
* @param ids 需要删除的请填写功能名称主键集合
* @return 结果
*/
public int deleteNewsImportantNewsByIds(String ids);
/**
* 删除请填写功能名称信息
*
* @param id 请填写功能名称主键
* @return 结果
*/
public int deleteNewsImportantNewsById(Long id);
}

View File

@ -0,0 +1,88 @@
package com.ruoyi.news.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.news.mapper.NewsImportantNewsMapper;
import com.ruoyi.news.domain.NewsImportantNews;
import com.ruoyi.news.service.INewsImportantNewsService;
import com.ruoyi.common.core.text.Convert;
/**
* 请填写功能名称Service业务层处理
*
* @author ruoyi
* @date 2022-08-17
*/
@Service
public class NewsImportantNewsServiceImpl implements INewsImportantNewsService {
@Autowired
private NewsImportantNewsMapper newsImportantNewsMapper;
/**
* 查询请填写功能名称
*
* @param id 请填写功能名称主键
* @return 请填写功能名称
*/
@Override
public NewsImportantNews selectNewsImportantNewsById(Long id) {
return newsImportantNewsMapper.selectNewsImportantNewsById(id);
}
/**
* 查询请填写功能名称列表
*
* @param newsImportantNews 请填写功能名称
* @return 请填写功能名称
*/
@Override
public List<NewsImportantNews> selectNewsImportantNewsList(NewsImportantNews newsImportantNews) {
return newsImportantNewsMapper.selectNewsImportantNewsList(newsImportantNews);
}
/**
* 新增请填写功能名称
*
* @param newsImportantNews 请填写功能名称
* @return 结果
*/
@Override
public int insertNewsImportantNews(NewsImportantNews newsImportantNews) {
return newsImportantNewsMapper.insertNewsImportantNews(newsImportantNews);
}
/**
* 修改请填写功能名称
*
* @param newsImportantNews 请填写功能名称
* @return 结果
*/
@Override
public int updateNewsImportantNews(NewsImportantNews newsImportantNews) {
return newsImportantNewsMapper.updateNewsImportantNews(newsImportantNews);
}
/**
* 批量删除请填写功能名称
*
* @param ids 需要删除的请填写功能名称主键
* @return 结果
*/
@Override
public int deleteNewsImportantNewsByIds(String ids) {
return newsImportantNewsMapper.deleteNewsImportantNewsByIds(Convert.toStrArray(ids));
}
/**
* 删除请填写功能名称信息
*
* @param id 请填写功能名称主键
* @return 结果
*/
@Override
public int deleteNewsImportantNewsById(Long id) {
return newsImportantNewsMapper.deleteNewsImportantNewsById(id);
}
}

View File

@ -0,0 +1,124 @@
<?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.news.mapper.NewsImportantNewsMapper">
<resultMap type="NewsImportantNews" id="NewsImportantNewsResult">
<result property="id" column="id"/>
<result property="title" column="title"/>
<result property="contenu" column="contenu"/>
<result property="image" column="image"/>
<result property="auteurid" column="auteurid"/>
<result property="auteur" column="auteur"/>
<result property="corrigerid" column="corrigerid"/>
<result property="source" column="source"/>
<result property="clicks" column="clicks"/>
<result property="type" column="type"/>
<result property="date" column="date"/>
<result property="classify" column="classify"/>
<result property="status" column="status"/>
</resultMap>
<sql id="selectNewsImportantNewsVo">
select id,
title,
contenu,
image,
auteurid,
auteur,
corrigerid,
source,
clicks,
type, date, classify, status
from news_important_news
</sql>
<select id="selectNewsImportantNewsList" parameterType="NewsImportantNews" resultMap="NewsImportantNewsResult">
<include refid="selectNewsImportantNewsVo"/>
<where>
<if test="title != null and title != ''">and title = #{title}</if>
<if test="contenu != null and contenu != ''">and contenu = #{contenu}</if>
<if test="image != null and image != ''">and image = #{image}</if>
<if test="auteurid != null ">and auteurid = #{auteurid}</if>
<if test="auteur != null and auteur != ''">and auteur = #{auteur}</if>
<if test="corrigerid != null ">and corrigerid = #{corrigerid}</if>
<if test="source != null and source != ''">and source = #{source}</if>
<if test="clicks != null ">and clicks = #{clicks}</if>
<if test="type != null ">and type = #{type}</if>
<if test="date != null ">and date = #{date}</if>
<if test="classify != null ">and classify = #{classify}</if>
<if test="status != null ">and status = #{status}</if>
</where>
</select>
<select id="selectNewsImportantNewsById" parameterType="Long" resultMap="NewsImportantNewsResult">
<include refid="selectNewsImportantNewsVo"/>
where id = #{id}
</select>
<insert id="insertNewsImportantNews" parameterType="NewsImportantNews" useGeneratedKeys="true" keyProperty="id">
insert into news_important_news
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="title != null">title,</if>
<if test="contenu != null">contenu,</if>
<if test="image != null">image,</if>
<if test="auteurid != null">auteurid,</if>
<if test="auteur != null">auteur,</if>
<if test="corrigerid != null">corrigerid,</if>
<if test="source != null">source,</if>
<if test="clicks != null">clicks,</if>
<if test="type != null">type,</if>
<if test="date != null">date,</if>
<if test="classify != null">classify,</if>
<if test="status != null">status,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="title != null">#{title},</if>
<if test="contenu != null">#{contenu},</if>
<if test="image != null">#{image},</if>
<if test="auteurid != null">#{auteurid},</if>
<if test="auteur != null">#{auteur},</if>
<if test="corrigerid != null">#{corrigerid},</if>
<if test="source != null">#{source},</if>
<if test="clicks != null">#{clicks},</if>
<if test="type != null">#{type},</if>
<if test="date != null">#{date},</if>
<if test="classify != null">#{classify},</if>
<if test="status != null">#{status},</if>
</trim>
</insert>
<update id="updateNewsImportantNews" parameterType="NewsImportantNews">
update news_important_news
<trim prefix="SET" suffixOverrides=",">
<if test="title != null">title = #{title},</if>
<if test="contenu != null">contenu = #{contenu},</if>
<if test="image != null">image = #{image},</if>
<if test="auteurid != null">auteurid = #{auteurid},</if>
<if test="auteur != null">auteur = #{auteur},</if>
<if test="corrigerid != null">corrigerid = #{corrigerid},</if>
<if test="source != null">source = #{source},</if>
<if test="clicks != null">clicks = #{clicks},</if>
<if test="type != null">type = #{type},</if>
<if test="date != null">date = #{date},</if>
<if test="classify != null">classify = #{classify},</if>
<if test="status != null">status = #{status},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteNewsImportantNewsById" parameterType="Long">
delete
from news_important_news
where id = #{id}
</delete>
<delete id="deleteNewsImportantNewsByIds" parameterType="String">
delete from news_important_news where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>