<?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.unis.base.server.dao.CommonDao" >
    <select id="getMaxCode" parameterType="java.lang.String" resultType="java.lang.String">
        SELECT
        max(${columnName})
        from
        ${tableName}
        <where>
            <if test="conditionValue1 != null and conditionValue1 !=''">
                and ${conditionName1} like CONCAT(#{conditionValue1,jdbcType=VARCHAR},'%')
            </if>
            <if test="conditionValue2 != null and conditionValue2 !=''">
                and ${conditionName2} like CONCAT(#{conditionValue2,jdbcType=VARCHAR},'%')
            </if>
        </where>
    </select>
</mapper>