| | |
| | | typeHandler="com.yeshi.fanli.util.mybatishandler.ShareSourceTypeEnumHandler"/> |
| | | <result column="sgr_picture" property="picture" jdbcType="VARCHAR"/> |
| | | <result column="sgr_title" property="title" jdbcType="VARCHAR"/> |
| | | <result column="sgr_share_state" property="shareState" jdbcType="INTEGER"/> |
| | | <result column="sgr_createtime" property="createTime" jdbcType="TIMESTAMP"/> |
| | | <result column="sgr_updatetime" property="updateTime" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | |
| | | <result column="revenueMoney" property="revenueMoney" jdbcType="DECIMAL"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List">sgr_id,sgr_uid,sgr_source,sgr_picture,sgr_title,sgr_createtime,sgr_updatetime</sql> |
| | | <sql id="Base_Column_List">sgr_id,sgr_uid,sgr_source,sgr_picture,sgr_title,sgr_share_state,sgr_createtime,sgr_updatetime</sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select |
| | | <include refid="Base_Column_List"/>from yeshi_ec_share_goods_record where sgr_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_share_goods_record where sgr_id = #{id,jdbcType=BIGINT}</delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.share.UserShareGoodsRecord" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_share_goods_record (sgr_id,sgr_uid,sgr_source,sgr_picture,sgr_title,sgr_createtime,sgr_updatetime) values (#{id,jdbcType=BIGINT},#{uid,jdbcType=BIGINT},#{source,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{sgr_title,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.share.UserShareGoodsRecord" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_share_goods_record (sgr_id,sgr_uid,sgr_source,sgr_picture,sgr_title,sgr_share_state,sgr_createtime,sgr_updatetime) values (#{id,jdbcType=BIGINT},#{uid,jdbcType=BIGINT},#{source,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{sgr_title,jdbcType=VARCHAR},#{shareState,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.share.UserShareGoodsRecord" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_share_goods_record |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">sgr_id,</if> |
| | | <if test="uid != null">sgr_uid,</if> |
| | | <if test="source != null">sgr_source,</if> |
| | | <if test="picture != null">sgr_picture,</if> |
| | | <if test="title != null">sgr_title,</if> |
| | | <if test="title != null">sgr_title,</if> |
| | | <if test="shareState != null">sgr_share_state,</if> |
| | | <if test="createTime != null">sgr_createtime,</if> |
| | | <if test="updateTime != null">sgr_updatetime,</if> |
| | | </trim>values |
| | |
| | | <if test="source != null">#{source,jdbcType=VARCHAR},</if> |
| | | <if test="picture != null">#{picture,jdbcType=VARCHAR},</if> |
| | | <if test="title != null">#{title,jdbcType=VARCHAR},</if> |
| | | <if test="shareState != null">#{shareState,jdbcType=INTEGER},</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.bus.share.UserShareGoodsRecord">update yeshi_ec_share_goods_record set sgr_uid = #{uid,jdbcType=BIGINT},sgr_source = #{source,jdbcType=VARCHAR},sgr_picture = #{picture,jdbcType=VARCHAR},sgr_title = #{title,jdbcType=VARCHAR},sgr_createtime = #{createTime,jdbcType=TIMESTAMP},sgr_updatetime = #{updateTime,jdbcType=TIMESTAMP} where sgr_id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.share.UserShareGoodsRecord">update yeshi_ec_share_goods_record set sgr_uid = #{uid,jdbcType=BIGINT},sgr_source = #{source,jdbcType=VARCHAR},sgr_picture = #{picture,jdbcType=VARCHAR},sgr_title = #{title,jdbcType=VARCHAR},sgr_share_state = #{shareState,jdbcType=INTEGER},sgr_createtime = #{createTime,jdbcType=TIMESTAMP},sgr_updatetime = #{updateTime,jdbcType=TIMESTAMP} where sgr_id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.share.UserShareGoodsRecord">update yeshi_ec_share_goods_record |
| | | <set> |
| | | <if test="uid != null">sgr_uid=#{uid,jdbcType=BIGINT},</if> |
| | | <if test="source != null">sgr_source=#{source,jdbcType=VARCHAR},</if> |
| | | <if test="picture != null">sgr_picture=#{picture,jdbcType=VARCHAR},</if> |
| | | <if test="title != null">sgr_title=#{title,jdbcType=VARCHAR},</if> |
| | | <if test="shareState != null">sgr_share_state=#{shareState,jdbcType=INTEGER},</if> |
| | | <if test="createTime != null">sgr_createtime=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">sgr_updatetime=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </set> where sgr_id = #{id,jdbcType=BIGINT} |
| | |
| | | |
| | | <select id="listQueryByUid" resultMap="BaseResultMap"> |
| | | SELECT * FROM yeshi_ec_share_goods_record |
| | | WHERE sgr_uid = #{uid} |
| | | WHERE sgr_uid = #{uid} AND sgr_share_state = 1 |
| | | <if test="source != null and source != '' "> |
| | | AND sgr_source = #{source} |
| | | </if> |
| | |
| | | |
| | | <select id="countQueryByUid" resultType="java.lang.Long"> |
| | | SELECT IFNULL(count(sgr_id),0) FROM yeshi_ec_share_goods_record |
| | | WHERE sgr_uid = #{uid} |
| | | WHERE sgr_uid = #{uid} AND sgr_share_state = 1 |
| | | <if test="source != null and source != '' "> |
| | | AND sgr_source = #{source} |
| | | </if> |
| | |
| | | |
| | | |
| | | <select id="listCountTodayBrowse" resultMap="CountRecordMap" parameterType="java.util.List"> |
| | | SELECT g.`gu_record_id`,SUM(g.`gu_today_browse`)AS todayBrowse FROM yeshi_ec_share_goods_group g |
| | | SELECT g.`gu_record_id`AS sgr_id, IFNULL(SUM(g.`gu_today_browse`),0)AS todayBrowse FROM yeshi_ec_share_goods_group g |
| | | WHERE TO_DAYS(g.`gu_browse_time`) = TO_DAYS(NOW()) |
| | | AND g.`gu_record_id` IN <foreach collection="list" item="item" open="(" close=")" |
| | | separator=",">#{item}</foreach> |