admin
2019-01-08 c84d8ecd97d111b01db9cfd807300d0491a95bc8
fanli/src/main/java/com/yeshi/fanli/mapping/hongbao/HongBaoV2Mapper.xml
@@ -99,8 +99,7 @@
   </select>
   <select id="listCanBalanceHongBaoByType" resultMap="BaseResultMap"
      parameterType="java.lang.Long">
   <select id="listCanBalanceHongBaoByType" resultMap="BaseResultMap">
      select
      <include refid="Base_Column_List" />
      FROM yeshi_ec_hongbao_v2 h WHERE h.`hb_version`=2 AND
@@ -216,7 +215,7 @@
   <select id="listCanBalanceHongBaoByTypeAndUid" resultMap="BaseResultMap">
      select
      <include refid="Base_Column_List" />
      from yeshi_ec_hongbao_v2 where hb_uid=#{uid} and `version`=2
      from yeshi_ec_hongbao_v2 where hb_uid=#{uid} and `hb_version`=2
      <foreach collection="types" item="type" open=" and ("
         separator=" or " close=")">
@@ -231,6 +230,16 @@
      NOW()>=hb_pre_get_time limit
      #{count}
   </select>
   <select id="countInviteOrderCountByUidAndSettleTime" resultType="java.lang.Long">
      SELECT COUNT(h.hb_id) FROM yeshi_ec_hongbao_v2 h LEFT JOIN
      yeshi_ec_hongbao_order ho ON h.`hb_pid`=ho.`ho_hongbao_id` LEFT JOIN
      yeshi_ec_common_order co ON co.`co_id`=ho.`ho_order_id` WHERE
      h.`hb_uid`=#{uid} and (h.`hb_type`=6 or h.`hb_type`=7 OR
      h.`hb_type`=21 OR h.`hb_type`=22) and co.`co_state`=#{state} and
      co.`co_settle_time` is not null and co.`co_settle_time`>=#{minDate}
      and #{maxDate}>co.`co_settle_time`;
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from