MedicalRecordContentMapper.xml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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="com.diagbot.mapper.MedicalRecordContentMapper">
  4. <!-- 通用查询映射结果 -->
  5. <resultMap id="BaseResultMap" type="com.diagbot.entity.MedicalRecordContent">
  6. <result column="rec_id" property="recId" />
  7. <result column="hospital_id" property="hospitalId" />
  8. <result column="content_blob" property="contentBlob" typeHandler="org.apache.ibatis.type.BlobTypeHandler"/>
  9. <result column="content_text" property="contentText" />
  10. <result column="html_text" property="htmlText" />
  11. <result column="xml_text" property="xmlText" />
  12. <result column="is_deleted" property="isDeleted" />
  13. <result column="gmt_create" property="gmtCreate" />
  14. <result column="gmt_modified" property="gmtModified" />
  15. <result column="creator" property="creator" />
  16. <result column="modifier" property="modifier" />
  17. </resultMap>
  18. <update id="updateBatchByKey">
  19. <foreach collection="list" item="item" separator=";">
  20. update med_medical_record_content
  21. <set>
  22. <if test="item.htmlText != null">
  23. html_text = #{item.htmlText},
  24. </if>
  25. <if test="item.xmlText != null">
  26. xml_text = #{item.xmlText},
  27. </if>
  28. <if test="item.gmtModified != null">
  29. gmt_modified = #{item.gmtModified},
  30. </if>
  31. <if test="item.modifier != null">
  32. modifier = #{item.modifier},
  33. </if>
  34. </set>
  35. where rec_id = #{item.recId} and hospital_id = #{item.hospitalId}
  36. </foreach>
  37. </update>
  38. </mapper>