<?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.cf.imes.module.system.dal.mysql.assemblyconfig.AssemblyConfigNameSeqMapper">

    <!-- 1. 原子生成序号 -->
    <insert id="nextSeq"
            useGeneratedKeys="true"
            keyProperty="nextNo"
            keyColumn="nextNo">
        INSERT INTO system_config_assembly_name_seq(organ_id, base_name, next_no)
        VALUES (#{organId}, #{baseName}, LAST_INSERT_ID(1))
        ON DUPLICATE KEY UPDATE next_no = LAST_INSERT_ID(next_no + 1)
    </insert>


</mapper>