From 04656ebd6d0000dd4653eaf000bf73cb2bd4f521 Mon Sep 17 00:00:00 2001
From: fangyuan <527392886@qq.com>
Date: 星期四, 17 十一月 2022 11:14:14 +0800
Subject: [PATCH] 数据库修改

---
 ycl-platform/src/main/resources/mapper/NewsInformationDao.xml |   71 ++++++++++++++++++-----------------
 1 files changed, 36 insertions(+), 35 deletions(-)

diff --git a/ycl-platform/src/main/resources/mapper/NewsInformationDao.xml b/ycl-platform/src/main/resources/mapper/NewsInformationDao.xml
index 5d3c9fe..a82123f 100644
--- a/ycl-platform/src/main/resources/mapper/NewsInformationDao.xml
+++ b/ycl-platform/src/main/resources/mapper/NewsInformationDao.xml
@@ -1,35 +1,36 @@
-<?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.mapper.NewsInformationDao">
-
-    <resultMap type="com.ycl.entity.NewsInformation" id="NewsInformationMap">
-        <result property="id" column="id" jdbcType="VARCHAR"/>
-        <result property="title" column="title" jdbcType="VARCHAR"/>
-        <result property="content" column="content" jdbcType="VARCHAR"/>
-        <result property="publishTime" column="publish_time" jdbcType="TIMESTAMP"/>
-        <result property="isSign" column="is_sign" jdbcType="INTEGER"/>
-        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
-        <result property="sendTo" column="send_to" jdbcType="VARCHAR"/>
-        <result property="imageUrl" column="image_url" jdbcType="VARCHAR"/>
-    </resultMap>
-
-    <!-- 鎵归噺鎻掑叆 -->
-    <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
-        insert into news_website.news_information(title, content, publish_time, is_sign, create_time, send_to, image_url)
-        values
-        <foreach collection="entities" item="entity" separator=",">
-        (#{entity.title}, #{entity.content}, #{entity.publishTime}, #{entity.isSign}, #{entity.createTime}, #{entity.sendTo}, #{entity.imageUrl})
-        </foreach>
-    </insert>
-    <!-- 鎵归噺鎻掑叆鎴栨寜涓婚敭鏇存柊 -->
-    <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
-        insert into news_website.news_information(title, content, publish_time, is_sign, create_time, send_to, image_url)
-        values
-        <foreach collection="entities" item="entity" separator=",">
-            (#{entity.title}, #{entity.content}, #{entity.publishTime}, #{entity.isSign}, #{entity.createTime}, #{entity.sendTo}, #{entity.imageUrl})
-        </foreach>
-        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>
-
-</mapper>
-
+<?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">
+
+    <resultMap type="com.ycl.entity.NewsInformation" id="NewsInformationMap">
+        <result property="id" column="id" jdbcType="VARCHAR"/>
+        <result property="title" column="title" jdbcType="VARCHAR"/>
+        <result property="content" column="content" jdbcType="VARCHAR"/>
+        <result property="publishTime" column="publish_time" jdbcType="TIMESTAMP"/>
+        <result property="isSign" column="is_sign" jdbcType="INTEGER"/>
+        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+        <result property="sendTo" column="send_to" jdbcType="VARCHAR"/>
+        <result property="imageUrl" column="image_url" jdbcType="VARCHAR"/>
+        <result property="newsDepartmentId" column="news_department_id" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <!-- 鎵归噺鎻掑叆 -->
+    <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
+        insert into news_website.news_information(title, content, publish_time, is_sign, create_time, send_to, image_url, news_department_id)
+        values
+        <foreach collection="entities" item="entity" separator=",">
+        (#{entity.title}, #{entity.content}, #{entity.publishTime}, #{entity.isSign}, #{entity.createTime}, #{entity.sendTo}, #{entity.imageUrl}, #{entity.newsDepartmentId})
+        </foreach>
+    </insert>
+    <!-- 鎵归噺鎻掑叆鎴栨寜涓婚敭鏇存柊 -->
+    <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
+        insert into news_website.news_information(title, content, publish_time, is_sign, create_time, send_to, image_url, news_department_id)
+        values
+        <foreach collection="entities" item="entity" separator=",">
+            (#{entity.title}, #{entity.content}, #{entity.publishTime}, #{entity.isSign}, #{entity.createTime}, #{entity.sendTo}, #{entity.imageUrl}, #{entity.newsDepartmentId})
+        </foreach>
+        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) , news_department_id = values(news_department_id)     </insert>
+
+</mapper>
+

--
Gitblit v1.8.0