ModuleInfoMapper.xml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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.ModuleInfoMapper">
  4. <!-- 通用查询映射结果 -->
  5. <resultMap id="BaseResultMap" type="com.diagbot.entity.ModuleInfo">
  6. <id column="id" property="id" />
  7. <result column="is_deleted" property="isDeleted" />
  8. <result column="gmt_create" property="gmtCreate" />
  9. <result column="gmt_modified" property="gmtModified" />
  10. <result column="creator" property="creator" />
  11. <result column="modifier" property="modifier" />
  12. <result column="name" property="name" />
  13. <result column="type" property="type" />
  14. <result column="module_type" property="moduleType" />
  15. <result column="relation_id" property="relationId" />
  16. <result column="remark" property="remark" />
  17. </resultMap>
  18. <delete id="deleteByIds" parameterType="java.util.Map">
  19. update `prec_module_info`
  20. set gmt_modified = #{gmtModified}, modifier = #{modifier}, is_deleted = #{delete}
  21. where is_deleted = 'N'
  22. and id in
  23. <foreach item="id" collection="ids" open="(" separator="," close=")" >
  24. #{id}
  25. </foreach>
  26. </delete>
  27. <select id="getModuleInfoListByType" resultType="com.diagbot.dto.ModuleInfoListDTO">
  28. SELECT * FROM `prec_module_info` WHERE is_deleted = 'N'
  29. <if test="name != null and name != ''">
  30. and name = #{name}
  31. </if>
  32. <if test="type != null and type != ''">
  33. and type = #{type}
  34. </if>
  35. <if test="moduleType != null">
  36. and module_type = #{moduleType}
  37. </if>
  38. <if test="relationId != null and relationId != ''">
  39. and relation_id = #{relationId}
  40. </if>
  41. order by gmt_modified desc
  42. </select>
  43. </mapper>