From 3ac30b4c17cf071ce9c66a59c069ab83efae6d2d Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期一, 14 十月 2019 17:44:13 +0800 Subject: [PATCH] Merge branch 'div' of ssh://193.112.35.168:29418/fanli-server into div --- fanli/src/main/java/com/yeshi/fanli/mapping/elme/ElmeHongBaoOrderMapMapper.xml | 177 +++++++++++++++++++++++++++++++++++++---------------------- 1 files changed, 111 insertions(+), 66 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/mapping/elme/ElmeHongBaoOrderMapMapper.xml b/fanli/src/main/java/com/yeshi/fanli/mapping/elme/ElmeHongBaoOrderMapMapper.xml index bcad77a..95e2402 100644 --- a/fanli/src/main/java/com/yeshi/fanli/mapping/elme/ElmeHongBaoOrderMapMapper.xml +++ b/fanli/src/main/java/com/yeshi/fanli/mapping/elme/ElmeHongBaoOrderMapMapper.xml @@ -1,66 +1,111 @@ -<?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> -- Gitblit v1.8.0