From b1516fedd7deedb61641321158fce862f77b4b4d Mon Sep 17 00:00:00 2001
From: fangyuan <527392886@qq.com>
Date: 星期二, 22 十一月 2022 11:51:53 +0800
Subject: [PATCH] 更新访问路径白名单,部分接口修改
---
ycl-platform/src/main/resources/mapper/NewsInformationDao.xml | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/ycl-platform/src/main/resources/mapper/NewsInformationDao.xml b/ycl-platform/src/main/resources/mapper/NewsInformationDao.xml
index a82c74d..a2921bd 100644
--- a/ycl-platform/src/main/resources/mapper/NewsInformationDao.xml
+++ b/ycl-platform/src/main/resources/mapper/NewsInformationDao.xml
@@ -1,6 +1,6 @@
<?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.ycl.dao.NewsInformationDao">
+<mapper namespace="com.ycl.mapper.NewsInformationDao">
<resultMap type="com.ycl.entity.NewsInformation" id="NewsInformationMap">
<result property="id" column="id" jdbcType="VARCHAR"/>
@@ -31,5 +31,22 @@
on duplicate key update
title = values(title) , content = values(content) , publish_time = values(publish_time) , is_sign = values(is_sign) , create_time = values(create_time) , send_to = values(send_to) , image_url = values(image_url) </insert>
+ <insert id="insertOneInformation" keyProperty="id" useGeneratedKeys="true">
+ insert into news_website.news_information(title, content, publish_time, is_sign, create_time, send_to, image_url)
+ values (#{entity.title}, #{entity.content}, #{entity.publishTime}, #{entity.isSign}, #{entity.createTime}, #{entity.sendTo}, #{entity.imageUrl})
+ </insert>
+
+ <select id="selectInformationById" resultType="com.ycl.entity.NewsInformation" parameterType="int">
+ select * from news_information where id=#{InformationId}
+ </select>
+
+ <select id="selectAllInformation" resultType="com.ycl.entity.NewsInformation">
+ select * from news_information
+ </select>
+
+ <update id="updateInformationById" parameterType="com.ycl.entity.NewsInformation">
+ update news_information set title=#{entity.title},content=#{entity.content},publish_time=#{entity.publishTime}, is_sign=#{entity.isSign}, create_time=#{entity.createTime}, send_to=#{entity.sendTo}, image_url=#{entity.imageUrl}
+ where id=#{entity.id}
+ </update>
</mapper>
--
Gitblit v1.8.0