File was renamed from ycl-platform/src/main/resources/mapper/NewsDepartmentInformationDao.xml |
| | |
| | | <?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.NewsDepartmentInformationDao">
|
| | |
|
| | | <resultMap type="com.ycl.entity.NewsDepartmentInformation" id="NewsDepartmentInformationMap">
|
| | | <result property="id" column="id" jdbcType="INTEGER"/>
|
| | | <result property="newsDepartmentId" column="news_department_id" jdbcType="INTEGER"/>
|
| | | <result property="newsPoliceId" column="news_police_id" jdbcType="INTEGER"/>
|
| | | <result property="isSign" column="is_sign" jdbcType="INTEGER"/>
|
| | | </resultMap>
|
| | |
|
| | | <!-- 批量插入 -->
|
| | | <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
| | | insert into news_website.news_department_information(news_department_id, news_police_id, is_sign)
|
| | | values
|
| | | <foreach collection="entities" item="entity" separator=",">
|
| | | (#{entity.newsDepartmentId}, #{entity.newsPoliceId}, #{entity.isSign})
|
| | | </foreach>
|
| | | </insert>
|
| | | <!-- 批量插入或按主键更新 -->
|
| | | <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
| | | insert into news_website.news_department_information(news_department_id, news_police_id, is_sign)
|
| | | values
|
| | | <foreach collection="entities" item="entity" separator=",">
|
| | | (#{entity.newsDepartmentId}, #{entity.newsPoliceId}, #{entity.isSign})
|
| | | </foreach>
|
| | | on duplicate key update
|
| | | news_department_id = values(news_department_id) , news_police_id = values(news_police_id) , is_sign = values(is_sign) </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.mapper.NewsDepartmentInformationDao"> |
| | | |
| | | <resultMap type="com.ycl.entity.NewsDepartmentInformation" id="NewsDepartmentInformationMap"> |
| | | <result property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="newsDepartmentId" column="news_department_id" jdbcType="INTEGER"/> |
| | | <result property="newsPoliceId" column="news_police_id" jdbcType="INTEGER"/> |
| | | <result property="isSign" column="is_sign" jdbcType="INTEGER"/> |
| | | </resultMap> |
| | | |
| | | <!-- 批量插入 --> |
| | | <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into news_website.news_department_information(news_department_id, news_police_id, is_sign) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.newsDepartmentId}, #{entity.newsPoliceId}, #{entity.isSign}) |
| | | </foreach> |
| | | </insert> |
| | | <!-- 批量插入或按主键更新 --> |
| | | <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into news_website.news_department_information(news_department_id, news_police_id, is_sign) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.newsDepartmentId}, #{entity.newsPoliceId}, #{entity.isSign}) |
| | | </foreach> |
| | | on duplicate key update |
| | | news_department_id = values(news_department_id) , news_police_id = values(news_police_id) , is_sign = values(is_sign) </insert> |
| | | |
| | | </mapper> |
| | | |