BizMaterialBaseInfoMapper.xml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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.BizMaterialBaseInfoMapper">
  6. <resultMap type="cn.ezhizao.project.business.domain.BizMaterialBaseInfo" id="BizMaterialBaseInfoResult">
  7. <id column="id" property="id"/>
  8. </resultMap>
  9. <select id="getList" parameterType="BizMaterialBaseInfo" resultMap="BizMaterialBaseInfoResult">
  10. SELECT * FROM biz_material_base_info
  11. <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
  12. deleted = 0
  13. <if test="cpart != null and cpart != ''">AND cpart = #{productCode}</if>
  14. <if test="part != null and part != ''">AND part = #{materialCode}</if>
  15. <if test="prloc != null and prloc != ''"> AND prloc = #{prloc}</if>
  16. <if test="gccd != null "> AND gccd = #{gccd}</if>
  17. <if test="ltcd != null and ltcd != ''"> AND ltcd = #{ltcd}</if>
  18. <if test="zlcd != null and zlcd != ''"> AND zlcd = #{zlcd}</if>
  19. <if test="utrate != null "> AND utrate = #{utrate}</if>
  20. <if test="dxqty != null "> AND dxqty = #{dxqty}</if>
  21. <if test="yzj != null "> AND yzj = #{yzj}</if>
  22. <if test="base != null "> AND base = #{base}</if>
  23. <if test="description != null and description != ''"> AND description = #{description}</if>
  24. <if test="bomsta != null and bomsta != ''"> AND bomsta = #{bomsta}</if>
  25. <if test="writeruser != null and writeruser != ''"> AND writeruser = #{writeruser}</if>
  26. <if test="writedate != null "> AND writedate = #{writedate}</if>
  27. </trim>
  28. </select>
  29. <delete id="physicalDelete">
  30. DELETE FROM biz_material_base_info
  31. <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
  32. <if test="id != null">
  33. id = #{id} AND
  34. </if>
  35. <!-- 删除条件为其他外键可以在这里加 -->
  36. </trim>
  37. </delete>
  38. </mapper>