You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.8 KiB

1 year ago
1 year ago
1 year ago
  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.gaotao.modules.part.mapper.ExternalLabelTemplateMapper">
  4. <select id="queryLabelTemplate" resultType="com.gaotao.modules.part.entity.ExternalLabelTemplate">
  5. select template_no, template_name, template_url, sort_no
  6. from external_label_template
  7. <if test="partNo!= null and partNo != '' and site!= null and site!= ''">
  8. where template_no in (select template_no from external_part_picture where site = #{site} and part_no = #{partNo} and picture_classify = 'ProPicture' group by template_no)
  9. </if>
  10. group by template_no, template_name, template_url, sort_no
  11. order by sort_no
  12. </select>
  13. <select id="queryLabelTemplateByPosition" resultType="com.gaotao.modules.part.entity.ExternalPartPicture">
  14. select elt.template_no,
  15. elt.picture_position,
  16. elt.template_name,
  17. epp.picture_url,
  18. epp.site,
  19. epp.part_no,
  20. epp.picture_no,
  21. epp.picture_desc,
  22. epp.create_by,
  23. epp.create_time,
  24. bp.certification_no
  25. from external_label_template elt
  26. left join external_part_picture epp
  27. on epp.template_no = elt.template_no
  28. and epp.picture_position = elt.picture_position
  29. and epp.part_no = #{partNo}
  30. and epp.site = #{site}
  31. and epp.picture_classify = 'ProPicture'
  32. left join base_picture bp on epp.base_picture_no = bp.picture_no
  33. where elt.template_no = #{templateNo}
  34. order by elt.sort_no
  35. </select>
  36. </mapper>