BaikeMapper.xml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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.caimei.www.mapper.BaikeDao">
  4. <select id="getBaikeProductDetail" resultType="com.caimei.www.pojo.baike.BaikeProduct">
  5. select a.id AS "id",
  6. a.commodityType AS "commodityType",
  7. a.name AS "name",
  8. a.alias AS "alias",
  9. a.discription AS "discription",
  10. a.image AS "image",
  11. a.advantage AS "advantage",
  12. a.disadvantage AS "disadvantage",
  13. a.principle AS "principle",
  14. a.brand AS "brand",
  15. a.producePlace AS "producePlace",
  16. a.marketTime AS "marketTime",
  17. a.company AS "company",
  18. a.nmpaTime AS "nmpaTime",
  19. a.adaptiveMan AS "adaptiveMan",
  20. a.unAdaptiveMan AS "unAdaptiveMan",
  21. a.aroundOperation AS "aroundOperation",
  22. a.publishTime AS "publishTime",
  23. a.basePv AS "basePv",
  24. a.actualPv AS "actualPv",
  25. a.typeId AS "typeId",
  26. a.topPosition AS "topPosition",
  27. a.status AS "status",
  28. a.addTime AS "addTime",
  29. cbt.name as "typeName"
  30. from cm_baike_product a
  31. left join cm_baike_type cbt on a.typeId = cbt.id
  32. where a.id = #{productId} and status =1;
  33. </select>
  34. <select id="findParamList" resultType="com.caimei.www.pojo.baike.BaikeProductParam">
  35. select productId, name, content from cm_baike_product_param where productId = #{id}
  36. </select>
  37. <select id="findImageList" resultType="java.lang.String">
  38. select image from cm_baike_product_image where productId = #{productId} and type = #{imageType}
  39. </select>
  40. <select id="findQuestionList" resultType="com.caimei.www.pojo.baike.BaikeProductQuestion">
  41. select productId, question, answer
  42. from cm_baike_product_question
  43. where productId = #{productId}
  44. </select>
  45. </mapper>