admin
2020-03-14 ca27ebe240e90552ea85560c2d6359a25574021c
会员阶段提交
1个文件已修改
2个文件已添加
115 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/entity/order/CommonOrderGoods.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/exception/user/vip/UserVIPPreInfoException.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/user/vip/UserVIPPreInfoMapper.xml 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/order/CommonOrderGoods.java
@@ -54,6 +54,7 @@
    @Column(name = "cog_price")
    private BigDecimal price;
    //实际价格
    @Column(name = "cog_actual_price")
    private BigDecimal actualPrice;
fanli/src/main/java/com/yeshi/fanli/exception/user/vip/UserVIPPreInfoException.java
New file
@@ -0,0 +1,23 @@
package com.yeshi.fanli.exception.user.vip;
import com.yeshi.fanli.exception.BaseException;
/**
 * 用户VIP信息异常
 * @author Administrator
 *
 */
public class UserVIPPreInfoException extends BaseException {
    private static final long serialVersionUID = 1L;
    public UserVIPPreInfoException(int code, String msg) {
        super(code, msg);
    }
    public UserVIPPreInfoException() {
        super();
    }
}
fanli/src/main/java/com/yeshi/fanli/mapping/user/vip/UserVIPPreInfoMapper.xml
New file
@@ -0,0 +1,91 @@
<?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.user.vip.UserVIPPreInfoMapper">
    <resultMap id="BaseResultMap"
        type="com.yeshi.fanli.entity.bus.user.vip.UserVIPPreInfo">
        <id column="vpi_id" property="id" jdbcType="BIGINT" />
        <result column="vpi_uid" property="uid" jdbcType="BIGINT" />
        <result column="vpi_process" property="process" jdbcType="INTEGER" />
        <result column="vpi_beizhu" property="beizhu" jdbcType="VARCHAR" />
        <result column="vpi_create_time" property="createTime"
            jdbcType="TIMESTAMP" />
        <result column="vpi_update_time" property="updateTime"
            jdbcType="TIMESTAMP" />
    </resultMap>
    <sql id="Base_Column_List">vpi_id,vpi_uid,vpi_process,vpi_beizhu,vpi_create_time,vpi_update_time
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_user_vip_pre_info where vpi_id = #{id,jdbcType=BIGINT}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
        yeshi_ec_user_vip_pre_info where vpi_id = #{id,jdbcType=BIGINT}
    </delete>
    <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.user.vip.UserVIPPreInfo"
        useGeneratedKeys="true" keyProperty="id">insert into
        yeshi_ec_user_vip_pre_info
        (vpi_id,vpi_uid,vpi_process,vpi_beizhu,vpi_create_time,vpi_update_time)
        values
        (#{id,jdbcType=BIGINT},#{uid,jdbcType=BIGINT},#{process,jdbcType=INTEGER},#{beizhu,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})
    </insert>
    <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.user.vip.UserVIPPreInfo"
        useGeneratedKeys="true" keyProperty="id">
        insert into yeshi_ec_user_vip_pre_info
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">vpi_id,</if>
            <if test="uid != null">vpi_uid,</if>
            <if test="process != null">vpi_process,</if>
            <if test="beizhu != null">vpi_beizhu,</if>
            <if test="createTime != null">vpi_create_time,</if>
            <if test="updateTime != null">vpi_update_time,</if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id,jdbcType=BIGINT},</if>
            <if test="uid != null">#{uid,jdbcType=BIGINT},</if>
            <if test="process != null">#{process,jdbcType=INTEGER},</if>
            <if test="beizhu != null">#{beizhu,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.bus.user.vip.UserVIPPreInfo">update
        yeshi_ec_user_vip_pre_info set vpi_uid =
        #{uid,jdbcType=BIGINT},vpi_process =
        #{process,jdbcType=INTEGER},vpi_beizhu =
        #{beizhu,jdbcType=VARCHAR},vpi_create_time =
        #{createTime,jdbcType=TIMESTAMP},vpi_update_time =
        #{updateTime,jdbcType=TIMESTAMP} where vpi_id = #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.user.vip.UserVIPPreInfo">
        update yeshi_ec_user_vip_pre_info
        <set>
            <if test="uid != null">vpi_uid=#{uid,jdbcType=BIGINT},</if>
            <if test="process != null">vpi_process=#{process,jdbcType=INTEGER},</if>
            <if test="beizhu != null">vpi_beizhu=#{beizhu,jdbcType=VARCHAR},</if>
            <if test="createTime != null">vpi_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
            <if test="updateTime != null">vpi_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
        </set>
        where vpi_id = #{id,jdbcType=BIGINT}
    </update>
    <select id="selectByUidAndProcess" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_user_vip_pre_info where vpi_uid = #{uid} and
        vpi_process=#{process}
    </select>
    <select id="listByUid" resultMap="BaseResultMap" parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_user_vip_pre_info where vpi_uid = #{uid}
    </select>
</mapper>