ProjectMaterialDao.xml 865 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.modules.company.dao.ProjectMaterialDao">
  4. <select id="findMaterialTemplateByType" resultType="platform.modules.company.entity.ProjectMaterial">
  5. SELECT
  6. t.id as template_id,
  7. t.name as content
  8. FROM template t WHERE t.item_id = #{type} and t.del_flag = 0 and t.is_active = 1 order by create_time
  9. </select>
  10. <select id="findByContentAndApplyId" resultType="platform.modules.company.entity.ProjectMaterial">
  11. select * from project_material where content = #{content} AND apply_id = #{applyId} and del_flag = 0
  12. </select>
  13. <delete id="deleteByApplyId">
  14. DELETE FROM project_material WHERE apply_id = #{id}
  15. </delete>
  16. </mapper>