From e65037e672ecab852e2a6c5b242cdadfd1a58b33 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期一, 25 十一月 2019 09:30:24 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div --- fanli/src/main/java/com/yeshi/fanli/mapping/redpack/RedPackWinInviteMapper.xml | 27 +++++++++++++++++++++------ 1 files changed, 21 insertions(+), 6 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/mapping/redpack/RedPackWinInviteMapper.xml b/fanli/src/main/java/com/yeshi/fanli/mapping/redpack/RedPackWinInviteMapper.xml index c7b12f3..c58121d 100644 --- a/fanli/src/main/java/com/yeshi/fanli/mapping/redpack/RedPackWinInviteMapper.xml +++ b/fanli/src/main/java/com/yeshi/fanli/mapping/redpack/RedPackWinInviteMapper.xml @@ -1,6 +1,5 @@ <?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.redpack.RedPackWinInviteMapper"> <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.redpack.RedPackWinInvite"> <id column="rwr_id" property="id" jdbcType="BIGINT"/> @@ -8,17 +7,18 @@ <result column="rwr_team_uid" property="teamUid" jdbcType="BIGINT"/> <result column="rwr_money" property="money" jdbcType="DECIMAL"/> <result column="rwr_source" property="source" jdbcType="INTEGER"/> + <result column="rwr_identify_code" property="identifyCode" jdbcType="VARCHAR"/> <result column="rwr_order_no" property="orderNo" jdbcType="VARCHAR"/> <result column="rwr_create_time" property="createTime" jdbcType="TIMESTAMP"/> <result column="rwr_update_time" property="updateTime" jdbcType="TIMESTAMP"/> - <result column="rwr_type" property="type" typeHandler="com.yeshi.fanli.util.mybatishandler.redpack.RedPackWinInviteTypeEnumHandler"/> + <result column="rwr_type" property="type" typeHandler="com.yeshi.fanli.util.mybatishandler.redpack.RedPackWinInviteTypeEnumHandler"/> </resultMap> - <sql id="Base_Column_List">rwr_id,rwr_uid,rwr_team_uid,rwr_money,rwr_type,rwr_source,rwr_order_no,rwr_create_time,rwr_update_time</sql> + <sql id="Base_Column_List">rwr_id,rwr_uid,rwr_team_uid,rwr_money,rwr_type,rwr_source,rwr_identify_code,rwr_order_no,rwr_create_time,rwr_update_time</sql> <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select <include refid="Base_Column_List"/>from yeshi_ec_red_pack_win_invite where rwr_id = #{id,jdbcType=BIGINT} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_red_pack_win_invite where rwr_id = #{id,jdbcType=BIGINT}</delete> - <insert id="insert" parameterType="com.yeshi.fanli.entity.redpack.RedPackWinInvite" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_red_pack_win_invite (rwr_id,rwr_uid,rwr_team_uid,rwr_money,rwr_type,rwr_source,rwr_order_no,rwr_create_time,rwr_update_time) values (#{id,jdbcType=BIGINT},#{uid,jdbcType=BIGINT},#{teamUid,jdbcType=BIGINT},#{money,jdbcType=DECIMAL},#{type,jdbcType=VARCHAR},#{source,jdbcType=INTEGER},#{orderNo,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert> + <insert id="insert" parameterType="com.yeshi.fanli.entity.redpack.RedPackWinInvite" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_red_pack_win_invite (rwr_id,rwr_uid,rwr_team_uid,rwr_money,rwr_type,rwr_source,rwr_identify_code,rwr_order_no,rwr_create_time,rwr_update_time) values (#{id,jdbcType=BIGINT},#{uid,jdbcType=BIGINT},#{teamUid,jdbcType=BIGINT},#{money,jdbcType=DECIMAL},#{type,jdbcType=VARCHAR},#{source,jdbcType=INTEGER},#{identifyCode,jdbcType=VARCHAR},#{orderNo,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert> <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.redpack.RedPackWinInvite" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_red_pack_win_invite <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null">rwr_id,</if> @@ -27,6 +27,7 @@ <if test="money != null">rwr_money,</if> <if test="type != null">rwr_type,</if> <if test="source != null">rwr_source,</if> + <if test="identifyCode != null">rwr_identify_code,</if> <if test="orderNo != null">rwr_order_no,</if> <if test="createTime != null">rwr_create_time,</if> <if test="updateTime != null">rwr_update_time,</if> @@ -38,12 +39,13 @@ <if test="money != null">#{money,jdbcType=DECIMAL},</if> <if test="type != null">#{type,jdbcType=VARCHAR},</if> <if test="source != null">#{source,jdbcType=INTEGER},</if> + <if test="identifyCode != null">#{identifyCode,jdbcType=VARCHAR},</if> <if test="orderNo != null">#{orderNo,jdbcType=VARCHAR},</if> <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> </trim> </insert> - <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.redpack.RedPackWinInvite">update yeshi_ec_red_pack_win_invite set rwr_uid = #{uid,jdbcType=BIGINT},rwr_team_uid = #{teamUid,jdbcType=BIGINT},rwr_money = #{money,jdbcType=DECIMAL},rwr_type = #{type,jdbcType=VARCHAR},rwr_source = #{source,jdbcType=INTEGER},rwr_order_no = #{orderNo,jdbcType=VARCHAR},rwr_create_time = #{createTime,jdbcType=TIMESTAMP},rwr_update_time = #{updateTime,jdbcType=TIMESTAMP} where rwr_id = #{id,jdbcType=BIGINT}</update> + <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.redpack.RedPackWinInvite">update yeshi_ec_red_pack_win_invite set rwr_uid = #{uid,jdbcType=BIGINT},rwr_team_uid = #{teamUid,jdbcType=BIGINT},rwr_money = #{money,jdbcType=DECIMAL},rwr_type = #{type,jdbcType=VARCHAR},rwr_source = #{source,jdbcType=INTEGER},rwr_identify_code = #{identifyCode,jdbcType=VARCHAR},rwr_order_no = #{orderNo,jdbcType=VARCHAR},rwr_create_time = #{createTime,jdbcType=TIMESTAMP},rwr_update_time = #{updateTime,jdbcType=TIMESTAMP} where rwr_id = #{id,jdbcType=BIGINT}</update> <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.redpack.RedPackWinInvite">update yeshi_ec_red_pack_win_invite <set> <if test="uid != null">rwr_uid=#{uid,jdbcType=BIGINT},</if> @@ -51,6 +53,7 @@ <if test="money != null">rwr_money=#{money,jdbcType=DECIMAL},</if> <if test="type != null">rwr_type=#{type,jdbcType=VARCHAR},</if> <if test="source != null">rwr_source=#{source,jdbcType=INTEGER},</if> + <if test="identifyCode != null">rwr_identify_code=#{identifyCode,jdbcType=VARCHAR},</if> <if test="orderNo != null">rwr_order_no=#{orderNo,jdbcType=VARCHAR},</if> <if test="createTime != null">rwr_create_time=#{createTime,jdbcType=TIMESTAMP},</if> <if test="updateTime != null">rwr_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> @@ -65,6 +68,19 @@ <select id="countByUidAndTeamUidAndType" resultType="Integer"> SELECT IFNULL(COUNT(d.`rwr_id`),0) FROM yeshi_ec_red_pack_win_invite d WHERE d.`rwr_uid` = #{uid} AND d.`rwr_team_uid` = #{teamUid} AND d.`rwr_type` = #{type} + </select> + + <select id="getByUidAndTeamUidAndType" resultMap="BaseResultMap"> + SELECT * FROM yeshi_ec_red_pack_win_invite d + WHERE d.`rwr_uid` = #{uid} AND d.`rwr_team_uid` = #{teamUid} AND d.`rwr_type` = #{type} + LIMIT 1 + </select> + + <select id="getByUidAndTeamUidAndTypeMonth" resultMap="BaseResultMap"> + SELECT * FROM yeshi_ec_red_pack_win_invite d + WHERE d.`rwr_uid` = #{uid} AND d.`rwr_team_uid` = #{teamUid} AND d.`rwr_type` = #{type} + AND DATE_FORMAT(d.rwr_create_time,'%Y%m') = DATE_FORMAT(CURDATE(),'%Y%m') + LIMIT 1 </select> <select id="getByUidAndTeamUidAndType" resultMap="BaseResultMap"> @@ -96,5 +112,4 @@ SELECT IFNULL(SUM(d.`rwr_money`),0) FROM yeshi_ec_red_pack_win_invite d WHERE d.`rwr_uid` = #{uid} </select> - </mapper> -- Gitblit v1.8.0