yujian
2019-10-14 3ac30b4c17cf071ce9c66a59c069ab83efae6d2d
fanli/src/main/java/com/yeshi/fanli/mapping/elme/ElmeHongBaoOrderMapMapper.xml
@@ -7,11 +7,13 @@
      <id column="eoh_id" property="id" jdbcType="BIGINT" />
      <result column="eoh_create_time" property="createTime"
         jdbcType="TIMESTAMP" />
      <association property="elmeOrder" column="eoh_order_id">
         <id property="id" column="eoh_order_id" />
      <association property="elmeOrder" column="eoh_order_id"
         javaType="com.yeshi.fanli.entity.elme.ElmeOrder"
         select="com.yeshi.fanli.dao.mybatis.elme.ElmeOrderMapper.selectByPrimaryKey">
      </association>
      <association property="hongBao" column="eoh_hongbao_id">
         <id property="id" column="eoh_hongbao_id" />
      <association property="hongBao" column="eoh_hongbao_id"
         javaType="com.yeshi.fanli.entity.bus.user.HongBaoV2"
         select="com.yeshi.fanli.dao.mybatis.HongBaoV2Mapper.selectByPrimaryKey">
      </association>
   </resultMap>
@@ -22,6 +24,49 @@
      <include refid="Base_Column_List" />
      from yeshi_ec_elme_order_hongbao where eoh_id = #{id,jdbcType=BIGINT}
   </select>
   <select id="selectByHongBaoId" resultMap="BaseResultMap"
      parameterType="java.lang.Long">
      select
      <include refid="Base_Column_List" />
      from yeshi_ec_elme_order_hongbao where eoh_hongbao_id = #{0}
   </select>
   <select id="selectByOrderId" resultMap="BaseResultMap"
      parameterType="java.lang.Long">
      select
      <include refid="Base_Column_List" />
      from yeshi_ec_elme_order_hongbao where eoh_order_id = #{0}
   </select>
   <select id="listByHongBaoUid" resultMap="BaseResultMap">
      select
      <include refid="Base_Column_List" />
      from yeshi_ec_elme_order_hongbao left join yeshi_ec_hongbao_v2 v on
      v.hb_id=eoh_hongbao_id where v.hb_uid = #{uid} order by eoh_id desc limit #{start},#{count}
   </select>
   <select id="countByHongBaoUid" resultType="java.lang.Long"
      parameterType="java.lang.Long">
      select
      count(eoh_id)
      from yeshi_ec_elme_order_hongbao left
      join yeshi_ec_hongbao_v2 v on
      v.hb_id=eoh_hongbao_id where v.hb_uid =
      #{0}
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
      yeshi_ec_elme_order_hongbao where eoh_id = #{id,jdbcType=BIGINT}
   </delete>