<?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.trade.service.serialNum.mapper.SystemSerialNumMapper">

	<resultMap id="sysSerialNumResult" type="com.trade.service.serialNum.domain.SystemSerialNum">
		<result property="id" column="id" />
		<result property="name" column="name" />
		<result property="curNum" column="cur_num" />
		<result property="step" column="step" />
		<result property="remark" column="remark" />
		<result property="gmtCreate" column="gmt_create" />
		<result property="gmtModified" column="gmt_modified" />
		<result property="createBy" column="create_by" />
		<result property="updateBy" column="update_by" />
	</resultMap>

	<sql id="fields">
        n.id,
		n.name,
		n.cur_num,
		n.step,
		n.remark,
		n.gmt_create,
		n.gmt_modified,
		n.create_by,
		n.update_by
    </sql>

	<select id="getByName" resultMap="sysSerialNumResult">
		SELECT <include refid="fields" />
		FROM system_serial_num n
		WHERE n.name=#{value}
	</select>

</mapper>
