OmsPreItemDao.xml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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.hwrj.cloud.admin.dao.OmsPreItemDao">
  4. <resultMap id="BaseResultMap" type="com.hwrj.cloud.admin.model.OmsPreItem">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="product_id" jdbcType="BIGINT" property="productId" />
  7. <result column="member_id" jdbcType="BIGINT" property="memberId" />
  8. <result column="comp_id" jdbcType="BIGINT" property="compId" />
  9. <result column="push_id" jdbcType="BIGINT" property="pushId" />
  10. <result column="origin_id" jdbcType="BIGINT" property="originId" />
  11. <result column="origin_name" jdbcType="VARCHAR" property="originName" />
  12. <result column="comp_name" jdbcType="VARCHAR" property="compName" />
  13. <result column="price" jdbcType="DECIMAL" property="price" />
  14. <result column="product_pic" jdbcType="VARCHAR" property="productPic" />
  15. <result column="product_name" jdbcType="VARCHAR" property="productName" />
  16. <result column="product_sub_title" jdbcType="VARCHAR" property="productSubTitle" />
  17. <result column="product_sku_code" jdbcType="VARCHAR" property="productSkuCode" />
  18. <result column="member_nickname" jdbcType="VARCHAR" property="memberNickname" />
  19. <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
  20. <result column="modify_date" jdbcType="TIMESTAMP" property="modifyDate" />
  21. <result column="delete_status" jdbcType="INTEGER" property="deleteStatus" />
  22. <result column="product_category_id" jdbcType="BIGINT" property="productCategoryId" />
  23. <result column="product_brand" jdbcType="VARCHAR" property="productBrand" />
  24. <result column="product_sn" jdbcType="VARCHAR" property="productSn" />
  25. <result column="product_attr" jdbcType="VARCHAR" property="productAttr" />
  26. </resultMap>
  27. <select id="searchOmsPreItemDao" resultMap="BaseResultMap">
  28. select * from oms_pre_item
  29. </select>
  30. <delete id="deletePreItemDao" parameterType="java.lang.Long" >
  31. delete from ums_pre_item where id = #{id}
  32. </delete>
  33. <select id="weblist" resultType="com.hwrj.cloud.admin.model.OmsPreItem" parameterType="com.hwrj.cloud.admin.dto.param.PreItemWebPageParm">
  34. SELECT
  35. a.id AS id,
  36. a.product_id AS productId,
  37. a.member_id AS memberId,
  38. a.comp_id AS compId,
  39. a.push_id AS pushId,
  40. a.origin_id AS originId,
  41. a.origin_name AS originName,
  42. a.comp_name AS compName,
  43. a.price AS price,
  44. a.product_pic AS productPic,
  45. a.product_name AS productName,
  46. a.product_sub_title AS productSubTitle,
  47. a.product_sku_code AS productSkuCode,
  48. a.member_nickname AS memberNickname,
  49. a.create_date AS createDate,
  50. a.modify_date AS modifyDate,
  51. a.delete_status AS deleteStatus,
  52. a.product_category_id AS productCategoryId,
  53. a.product_brand AS productBrand,
  54. a.product_sn AS productSn,
  55. a.product_attr AS productAttr
  56. FROM
  57. oms_pre_item a
  58. WHERE
  59. 1 = 1
  60. <if test="compId !=null">
  61. and a.comp_id = #{compId}
  62. </if>
  63. <if test="productName !=null and productName!=''">
  64. and a.product_name LIKE concat("%",#{productName},"%")
  65. </if>
  66. ORDER BY a.create_date DESC
  67. </select>
  68. </mapper>