Pre Merge pull request !404 from Abdurahman/master
This commit is contained in:
commit
673e31189c
8
pom.xml
8
pom.xml
|
|
@ -185,6 +185,13 @@
|
|||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 简报模块-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-news</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 系统模块-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
|
|
@ -206,6 +213,7 @@
|
|||
<module>ruoyi-admin</module>
|
||||
<module>ruoyi-framework</module>
|
||||
<module>ruoyi-system</module>
|
||||
<module>ruoyi-news</module>
|
||||
<module>ruoyi-quartz</module>
|
||||
<module>ruoyi-generator</module>
|
||||
<module>ruoyi-common</module>
|
||||
|
|
|
|||
|
|
@ -67,6 +67,16 @@
|
|||
<artifactId>ruoyi-generator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 简报模块-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-news</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-news</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
|||
|
|
@ -16,15 +16,17 @@ public class RuoYiApplication
|
|||
{
|
||||
// System.setProperty("spring.devtools.restart.enabled", "false");
|
||||
SpringApplication.run(RuoYiApplication.class, args);
|
||||
System.out.println("(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||
" .-------. ____ __ \n" +
|
||||
" | _ _ \\ \\ \\ / / \n" +
|
||||
" | ( ' ) | \\ _. / ' \n" +
|
||||
" |(_ o _) / _( )_ .' \n" +
|
||||
" | (_,_).' __ ___(_ o _)' \n" +
|
||||
" | |\\ \\ | || |(_,_)' \n" +
|
||||
" | | \\ `' /| `-' / \n" +
|
||||
" | | \\ / \\ / \n" +
|
||||
" ''-' `'-' `-..-' ");
|
||||
System.out.println("====网站启动成功==== \n" +
|
||||
" .----------------. .----------------. \n" +
|
||||
"| .--------------. || .--------------. |\n" +
|
||||
"| | _______ | || | _________ | |\n" +
|
||||
"| | |_ __ \\ | || | | _ _ | | |\n" +
|
||||
"| | | |__) | | || | |_/ | | \\_| | |\n" +
|
||||
"| | | __ / | || | | | | |\n" +
|
||||
"| | _| | \\ \\_ | || | _| |_ | |\n" +
|
||||
"| | |____| |___| | || | |_____| | |\n" +
|
||||
"| | | || | | |\n" +
|
||||
"| '--------------' || '--------------' |\n" +
|
||||
" '----------------' '----------------' ");
|
||||
}
|
||||
}
|
||||
|
|
@ -8,7 +8,7 @@ spring:
|
|||
master:
|
||||
url: jdbc:mysql://localhost:3306/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: password
|
||||
password: Feina1220
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
|
|
|
|||
|
|
@ -1,24 +1,13 @@
|
|||
Application Version: ${ruoyi.version}
|
||||
Spring Boot Version: ${spring-boot.version}
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// _ooOoo_ //
|
||||
// o8888888o //
|
||||
// 88" . "88 //
|
||||
// (| ^_^ |) //
|
||||
// O\ = /O //
|
||||
// ____/`---'\____ //
|
||||
// .' \\| |// `. //
|
||||
// / \\||| : |||// \ //
|
||||
// / _||||| -:- |||||- \ //
|
||||
// | | \\\ - /// | | //
|
||||
// | \_| ''\---/'' | | //
|
||||
// \ .-\__ `-` ___/-. / //
|
||||
// ___`. .' /--.--\ `. . ___ //
|
||||
// ."" '< `.___\_<|>_/___.' >'"". //
|
||||
// | | : `- \`.;`\ _ /`;.`/ - ` : | | //
|
||||
// \ \ `-. \_ __\ /__ _/ .-` / / //
|
||||
// ========`-.____`-.___\_____/___.-`____.-'======== //
|
||||
// `=---=' //
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
|
||||
// 佛祖保佑 永不宕机 永无BUG //
|
||||
////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////
|
||||
.----------------. .----------------.
|
||||
| .--------------. || .--------------. |
|
||||
| | _______ | || | _________ | |
|
||||
| | |_ __ \ | || | | _ _ | | |
|
||||
| | | |__) | | || | |_/ | | \_| | |
|
||||
| | | __ / | || | | | | |
|
||||
| | _| | \ \_ | || | _| |_ | |
|
||||
| | |____| |___| | || | |_____| | |
|
||||
| | | || | | |
|
||||
| '--------------' || '--------------' |
|
||||
'----------------' '----------------'
|
||||
/////////////////////////////////////////
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -870,7 +870,7 @@ var table = {
|
|||
}
|
||||
top.layer.open({
|
||||
type: 2,
|
||||
area: [width + 'px', height + 'px'],
|
||||
area: ['1200' + 'px', height + 'px'],
|
||||
fix: false,
|
||||
//不固定
|
||||
maxmin: true,
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ gen:
|
|||
# 作者
|
||||
author: ruoyi
|
||||
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
|
||||
packageName: com.ruoyi.system
|
||||
packageName: com.ruoyi.news
|
||||
# 自动去除表前缀,默认是false
|
||||
autoRemovePre: false
|
||||
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
|
||||
tablePrefix: sys_
|
||||
tablePrefix: news_
|
||||
|
|
@ -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>
|
||||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
@ -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>
|
||||
Loading…
Reference in New Issue