templateDao.xml 621 B

12345678910111213141516171819
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="platform.common.base.dao.TemplateDao">
  4. <select id="getTemplateByName" resultType="platform.common.base.model.Template">
  5. select * from template
  6. where
  7. name=#{name}
  8. <if test="itemId!=null and itemId!=''">
  9. and item_id=#{itemId}
  10. </if>
  11. <if test="typeId!=null and typeId!=''">
  12. and type_id=#{typeId}
  13. </if>
  14. and del_flag=0 limit 0,1
  15. </select>
  16. </mapper>