BizMeasurementMapper.xml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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="cn.ezhizao.project.business.mapper.BizMeasurementMapper">
  6. <resultMap type="cn.ezhizao.project.business.domain.BizMeasurement" id="BizMeasurementResult">
  7. <id column="id" property="id"/>
  8. </resultMap>
  9. <select id="getList" parameterType="BizMeasurement" resultMap="BizMeasurementResult">
  10. SELECT * FROM biz_measurement
  11. <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
  12. deleted = 0
  13. <if test="code != null "> AND code = #{code}</if>
  14. <if test="numerator != null "> AND numerator = #{numerator}</if>
  15. <if test="denominator != null and denominator != ''"> AND denominator = #{denominator}</if>
  16. <if test="name != null and name != ''"> AND name like concat('%', #{name}, '%')</if>
  17. <if test="remake != null and remake != ''"> AND remake = #{remake}</if>
  18. <if test="group != null and group != ''"> AND group = #{group}</if>
  19. <if test="standard != null and standard != ''"> AND standard = #{standard}</if>
  20. <if test="conversionType != null and conversionType != ''"> AND conversion_type = #{conversionType}</if>
  21. <if test="precision != null "> AND precision = #{precision}</if>
  22. <if test="roundingType != null and roundingType != ''"> AND rounding_type = #{roundingType}</if>
  23. <if test="status != null and status != ''"> AND status = #{status}</if>
  24. <if test="forbidden != null and forbidden != ''"> AND forbidden = #{forbidden}</if>
  25. <if test="createName != null and createName != ''"> AND create_name like concat('%', #{createName}, '%')</if>
  26. <if test="updateName != null and updateName != ''"> AND update_name like concat('%', #{updateName}, '%')</if>
  27. <if test="auditTime != null "> AND audit_time = #{auditTime}</if>
  28. <if test="auditName != null and auditName != ''"> AND audit_name like concat('%', #{auditName}, '%')</if>
  29. <if test="forbiddenTime != null "> AND forbidden_time = #{forbiddenTime}</if>
  30. <if test="forbiddenName != null and forbiddenName != ''"> AND forbidden_name like concat('%', #{forbiddenName}, '%')</if>
  31. <if test="init != null and init != ''"> AND init = #{init}</if>
  32. </trim>
  33. </select>
  34. <delete id="physicalDelete">
  35. DELETE FROM biz_measurement
  36. <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
  37. <if test="id != null">
  38. id = #{id} AND
  39. </if>
  40. <!-- 删除条件为其他外键可以在这里加 -->
  41. </trim>
  42. </delete>
  43. </mapper>