1
0

Mall2ShippingReminderAlarmDao.xml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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.kmall.dao.Mall2ShippingReminderAlarmDao">
  4. <resultMap type="com.kmall.entity.Mall2ShippingReminderAlarmEntity" id="mall2ShippingReminderAlarmMap">
  5. <result property="msraId" column="msra_id"/>
  6. <result property="goodsId" column="goods_id"/>
  7. <result property="goodsName" column="goods_name"/>
  8. <result property="averageSales" column="average_sales"/>
  9. <result property="storeId" column="store_id"/>
  10. <result property="sku" column="sku"/>
  11. <result property="storeName" column="store_name"/>
  12. <result property="stockNum" column="stock_num"/>
  13. <result property="alarmType" column="alarm_type"/>
  14. <result property="alarmTime" column="alarm_time"/>
  15. <result property="isWarning" column="is_warning"/>
  16. <result property="createrSn" column="creater_sn"/>
  17. <result property="createTime" column="create_time"/>
  18. <result property="moderSn" column="moder_sn"/>
  19. <result property="modTime" column="mod_time"/>
  20. <result property="tstm" column="tstm"/>
  21. </resultMap>
  22. <select id="queryObject" resultType="com.kmall.entity.Mall2ShippingReminderAlarmEntity">
  23. select
  24. `msra_id`,
  25. `goods_id`,
  26. `goods_name`,
  27. `average_sales`,
  28. `store_id`,
  29. `sku`,
  30. `store_name`,
  31. `stock_num`,
  32. `alarm_type`,
  33. `alarm_time`,
  34. `is_warning`,
  35. `creater_sn`,
  36. `create_time`,
  37. `moder_sn`,
  38. `mod_time`,
  39. `tstm`
  40. from mall2_shipping_reminder_alarm
  41. where msra_id = #{id}
  42. </select>
  43. <select id="queryList" resultType="com.kmall.entity.Mall2ShippingReminderAlarmEntity">
  44. select
  45. `msra_id`,
  46. `goods_id`,
  47. `goods_name`,
  48. `average_sales`,
  49. `store_id`,
  50. `sku`,
  51. `store_name`,
  52. `stock_num`,
  53. `alarm_type`,
  54. `alarm_time`,
  55. `is_warning`,
  56. `creater_sn`,
  57. `create_time`,
  58. `moder_sn`,
  59. `mod_time`,
  60. `tstm`
  61. from mall2_shipping_reminder_alarm
  62. WHERE 1=1
  63. <if test="name != null and name.trim() != ''">
  64. AND name LIKE concat('%',#{name},'%')
  65. </if>
  66. <choose>
  67. <when test="sidx != null and sidx.trim() != ''">
  68. order by ${sidx} ${order}
  69. </when>
  70. <otherwise>
  71. order by msra_id desc
  72. </otherwise>
  73. </choose>
  74. <if test="offset != null and limit != null">
  75. limit #{offset}, #{limit}
  76. </if>
  77. </select>
  78. <select id="queryTotal" resultType="int">
  79. select count(*) from mall2_shipping_reminder_alarm
  80. WHERE 1=1
  81. <if test="name != null and name.trim() != ''">
  82. AND name LIKE concat('%',#{name},'%')
  83. </if>
  84. </select>
  85. <insert id="save" parameterType="com.kmall.entity.Mall2ShippingReminderAlarmEntity">
  86. insert into mall2_shipping_reminder_alarm(
  87. `msra_id`,
  88. `goods_id`,
  89. `goods_name`,
  90. `average_sales`,
  91. `store_id`,
  92. `sku`,
  93. `store_name`,
  94. `stock_num`,
  95. `alarm_type`,
  96. `alarm_time`,
  97. `is_warning`,
  98. `creater_sn`,
  99. `create_time`,
  100. `moder_sn`,
  101. `mod_time`,
  102. `tstm`)
  103. values(
  104. #{msraId},
  105. #{goodsId},
  106. #{goodsName},
  107. #{averageSales},
  108. #{storeId},
  109. #{sku},
  110. #{storeName},
  111. #{stockNum},
  112. #{alarmType},
  113. #{alarmTime},
  114. #{isWarning},
  115. #{createrSn},
  116. #{createTime},
  117. #{moderSn},
  118. #{modTime},
  119. #{tstm})
  120. </insert>
  121. <update id="update" parameterType="com.kmall.entity.Mall2ShippingReminderAlarmEntity">
  122. update mall2_shipping_reminder_alarm
  123. <set>
  124. <if test="goodsId != null">`goods_id` = #{goodsId}, </if>
  125. <if test="goodsName != null">`goods_name` = #{goodsName}, </if>
  126. <if test="averageSales != null">`average_sales` = #{averageSales}, </if>
  127. <if test="storeId != null">`store_id` = #{storeId}, </if>
  128. <if test="sku != null">`sku` = #{sku}, </if>
  129. <if test="storeName != null">`store_name` = #{storeName}, </if>
  130. <if test="stockNum != null">`stock_num` = #{stockNum}, </if>
  131. <if test="alarmType != null">`alarm_type` = #{alarmType}, </if>
  132. <if test="alarmTime != null">`alarm_time` = #{alarmTime}, </if>
  133. <if test="isWarning != null">`is_warning` = #{isWarning}, </if>
  134. <if test="createrSn != null">`creater_sn` = #{createrSn}, </if>
  135. <if test="createTime != null">`create_time` = #{createTime}, </if>
  136. <if test="moderSn != null">`moder_sn` = #{moderSn}, </if>
  137. <if test="modTime != null">`mod_time` = #{modTime}, </if>
  138. <if test="tstm != null">`tstm` = #{tstm}</if>
  139. </set>
  140. where msra_id = #{msraId}
  141. </update>
  142. <delete id="delete">
  143. delete from mall2_shipping_reminder_alarm where msra_id = #{value}
  144. </delete>
  145. <delete id="deleteBatch">
  146. delete from mall2_shipping_reminder_alarm where msra_id in
  147. <foreach item="msraId" collection="array" open="(" separator="," close=")">
  148. #{msraId}
  149. </foreach>
  150. </delete>
  151. </mapper>