GoodsCategoryMapper.xml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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.mdd.common.mapper.category.GoodsCategoryMapper">
  4. <!-- 通用查询映射结果 -->
  5. <resultMap id="BaseResultMap" type="com.mdd.common.entity.category.GoodsCategory">
  6. <!-- <id column="id" property="id"/>
  7. <result column="create_id" property="createId"/>
  8. <result column="create_time" property="createTime"/>
  9. <result column="update_id" property="updateId"/>
  10. <result column="update_time" property="updateTime"/>
  11. <result column="company_id" property="companyId"/>
  12. <result column="account_id" property="accountId"/>
  13. <result column="account_chart_id" property="accountChartId"/>
  14. <result column="is_add_next_level" property="isAddNextLevel"/>
  15. <result column="is_reallocate" property="isReallocate"/>
  16. <result column="tenant_id" property="tenantId"/>-->
  17. </resultMap>
  18. <select id="listByIds" resultType="com.mdd.common.entity.category.GoodsCategory">
  19. select id,
  20. name,
  21. pid,
  22. level,
  23. image,
  24. sort,
  25. is_show as isShow,
  26. is_recommend as isRecommed,
  27. create_time as createTime,
  28. update_time as updateTime,
  29. delete_time as deleteTime,
  30. is_delete as isDelete
  31. from la_goods_category
  32. <where>
  33. <if test="ids != null and ids.size() != 0">
  34. id in
  35. <foreach collection="ids" item="id" open="(" close=")" separator=",">
  36. #{id}
  37. </foreach>
  38. </if>
  39. </where>
  40. </select>
  41. </mapper>