| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.elme.ElmeHongBaoOrderMapMapper"> |
| | | <resultMap id="BaseResultMap" |
| | | type="com.yeshi.fanli.entity.elme.ElmeHongBaoOrderMap"> |
| | | <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> |
| | | <association property="hongBao" column="eoh_hongbao_id"> |
| | | <id property="id" column="eoh_hongbao_id" /> |
| | | </association> |
| | | |
| | | </resultMap> |
| | | <sql id="Base_Column_List">eoh_id,eoh_order_id,eoh_hongbao_id,eoh_create_time</sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_elme_order_hongbao where eoh_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_elme_order_hongbao where eoh_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.elme.ElmeHongBaoOrderMap" |
| | | useGeneratedKeys="true" keyProperty="id">insert into |
| | | yeshi_ec_elme_order_hongbao |
| | | (eoh_id,eoh_order_id,eoh_hongbao_id,eoh_create_time) values |
| | | (#{id,jdbcType=BIGINT},#{elmeOrder.id,jdbcType=BIGINT},#{hongBao.id,jdbcType=BIGINT},#{createTime,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.elme.ElmeHongBaoOrderMap" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_elme_order_hongbao |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">eoh_id,</if> |
| | | <if test="elmeOrder != null">eoh_order_id,</if> |
| | | <if test="hongBao != null">eoh_hongbao_id,</if> |
| | | <if test="createTime != null">eoh_create_time,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="elmeOrder != null">#{elmeOrder.id,jdbcType=BIGINT},</if> |
| | | <if test="hongBao != null">#{hongBao.id,jdbcType=BIGINT},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.elme.ElmeHongBaoOrderMap">update |
| | | yeshi_ec_elme_order_hongbao set eoh_order_id = |
| | | #{elmeOrder.id,jdbcType=BIGINT},eoh_hongbao_id = |
| | | #{hongBao.id,jdbcType=BIGINT},eoh_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP} where eoh_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.elme.ElmeHongBaoOrderMap"> |
| | | update yeshi_ec_elme_order_hongbao |
| | | <set> |
| | | <if test="elmeOrder != null">eoh_order_id=#{elmeOrder.id,jdbcType=BIGINT},</if> |
| | | <if test="hongBao != null">eoh_hongbao_id=#{hongBao.id,jdbcType=BIGINT},</if> |
| | | <if test="createTime != null">eoh_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | </set> |
| | | where eoh_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
| | |
|
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.elme.ElmeHongBaoOrderMapMapper">
|
| | | <resultMap id="BaseResultMap"
|
| | | type="com.yeshi.fanli.entity.elme.ElmeHongBaoOrderMap">
|
| | | <id column="eoh_id" property="id" jdbcType="BIGINT" />
|
| | | <result column="eoh_create_time" property="createTime"
|
| | | jdbcType="TIMESTAMP" />
|
| | | <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"
|
| | | javaType="com.yeshi.fanli.entity.bus.user.HongBaoV2"
|
| | | select="com.yeshi.fanli.dao.mybatis.HongBaoV2Mapper.selectByPrimaryKey">
|
| | | </association>
|
| | |
|
| | | </resultMap>
|
| | | <sql id="Base_Column_List">eoh_id,eoh_order_id,eoh_hongbao_id,eoh_create_time</sql>
|
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
| | | parameterType="java.lang.Long">
|
| | | select
|
| | | <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>
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.elme.ElmeHongBaoOrderMap"
|
| | | useGeneratedKeys="true" keyProperty="id">insert into
|
| | | yeshi_ec_elme_order_hongbao
|
| | | (eoh_id,eoh_order_id,eoh_hongbao_id,eoh_create_time) values
|
| | | (#{id,jdbcType=BIGINT},#{elmeOrder.id,jdbcType=BIGINT},#{hongBao.id,jdbcType=BIGINT},#{createTime,jdbcType=TIMESTAMP})
|
| | | </insert>
|
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.elme.ElmeHongBaoOrderMap"
|
| | | useGeneratedKeys="true" keyProperty="id">
|
| | | insert into yeshi_ec_elme_order_hongbao
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">eoh_id,</if>
|
| | | <if test="elmeOrder != null">eoh_order_id,</if>
|
| | | <if test="hongBao != null">eoh_hongbao_id,</if>
|
| | | <if test="createTime != null">eoh_create_time,</if>
|
| | | </trim>
|
| | | values
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if>
|
| | | <if test="elmeOrder != null">#{elmeOrder.id,jdbcType=BIGINT},</if>
|
| | | <if test="hongBao != null">#{hongBao.id,jdbcType=BIGINT},</if>
|
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | </trim>
|
| | | </insert>
|
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.elme.ElmeHongBaoOrderMap">update
|
| | | yeshi_ec_elme_order_hongbao set eoh_order_id =
|
| | | #{elmeOrder.id,jdbcType=BIGINT},eoh_hongbao_id =
|
| | | #{hongBao.id,jdbcType=BIGINT},eoh_create_time =
|
| | | #{createTime,jdbcType=TIMESTAMP} where eoh_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.elme.ElmeHongBaoOrderMap">
|
| | | update yeshi_ec_elme_order_hongbao
|
| | | <set>
|
| | | <if test="elmeOrder != null">eoh_order_id=#{elmeOrder.id,jdbcType=BIGINT},</if>
|
| | | <if test="hongBao != null">eoh_hongbao_id=#{hongBao.id,jdbcType=BIGINT},</if>
|
| | | <if test="createTime != null">eoh_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | </set>
|
| | | where eoh_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | | </mapper>
|