OfficialDocumentPostMapper.xml 465 B

12345678910
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.xjrsoft.module.oa.mapper.OfficialDocumentPostMapper">
  6. <select id="getMaxPostNumber" resultType="java.lang.Integer">
  7. SELECT IFNULL(MAX(SUBSTR(post_number, 6, 3)), 0) + 1 FROM official_document_post WHERE YEAR(post_date) = YEAR(NOW())
  8. </select>
  9. </mapper>