<?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.cyksj.mapper.BackInfoTranslationsMapper">


    <insert id="batchInsertOrUpdate">
        insert into `back_info_translations`(`type`,`func_id`,`field_name`,`desp`,`lang`,`created_time`,`update_time`)
        values
        <foreach collection="list" item="item" separator=",">
            (#{type},#{funcId},#{item.fieldName},#{item.desp},#{lang},now(),now())
        </foreach>
        ON DUPLICATE KEY UPDATE `desp` = VALUES(`desp`),
        update_time = VALUES(update_time)
    </insert>
</mapper>