MaterialAttributeMapperEx.xml 972 B

1234567891011121314151617181920212223242526
  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.jsh.erp.datasource.mappers.MaterialAttributeMapperEx">
  4. <select id="selectByConditionMaterialAttribute" resultType="com.jsh.erp.datasource.entities.MaterialAttribute">
  5. select * from jsh_material_attribute ma
  6. where 1=1
  7. <if test="attributeName != null">
  8. <bind name="bindAttributeName" value="'%'+attributeName+'%'"/>
  9. and ma.attribute_name like #{bindAttributeName}
  10. </if>
  11. and ifnull(ma.delete_flag,'0') !='1'
  12. order by ma.id desc
  13. </select>
  14. <update id="batchDeleteMaterialAttributeByIds">
  15. update jsh_material_attribute
  16. set delete_flag='1'
  17. where 1=1
  18. and id in (
  19. <foreach collection="ids" item="id" separator=",">
  20. #{id}
  21. </foreach>
  22. )
  23. </update>
  24. </mapper>