Commit 62a03742 by XiaHou

权星相关接口修复

parent 68176206
package com.macro.mall.mapper;
import com.macro.mall.model.OmsChoseProduct;
import com.macro.mall.model.OmsChoseProductExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface OmsChoseProductMapper {
long countByExample(OmsChoseProductExample example);
int deleteByExample(OmsChoseProductExample example);
int deleteByPrimaryKey(Long id);
int insert(OmsChoseProduct record);
int insertSelective(OmsChoseProduct record);
List<OmsChoseProduct> selectByExample(OmsChoseProductExample example);
OmsChoseProduct selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") OmsChoseProduct record, @Param("example") OmsChoseProductExample example);
int updateByExample(@Param("record") OmsChoseProduct record, @Param("example") OmsChoseProductExample example);
int updateByPrimaryKeySelective(OmsChoseProduct record);
int updateByPrimaryKey(OmsChoseProduct record);
}
\ No newline at end of file
package com.macro.mall.model;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import org.springframework.format.annotation.DateTimeFormat;
@Entity
public class OmsChoseProduct implements Serializable {
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
private Long id;
@ApiModelProperty(value = "商品id")
private Long productId;
@ApiModelProperty(value = "会员id")
private Long memberId;
@ApiModelProperty(value = "创建时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createtime;
@ApiModelProperty(value = "更新时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updatetime;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getProductId() {
return productId;
}
public void setProductId(Long productId) {
this.productId = productId;
}
public Long getMemberId() {
return memberId;
}
public void setMemberId(Long memberId) {
this.memberId = memberId;
}
public Date getCreatetime() {
return createtime;
}
public void setCreatetime(Date createtime) {
this.createtime = createtime;
}
public Date getUpdatetime() {
return updatetime;
}
public void setUpdatetime(Date updatetime) {
this.updatetime = updatetime;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", productId=").append(productId);
sb.append(", memberId=").append(memberId);
sb.append(", createtime=").append(createtime);
sb.append(", updatetime=").append(updatetime);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
<?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.macro.mall.mapper.OmsChoseProductMapper">
<resultMap id="BaseResultMap" type="com.macro.mall.model.OmsChoseProduct">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="product_id" jdbcType="BIGINT" property="productId" />
<result column="member_id" jdbcType="BIGINT" property="memberId" />
<result column="createtime" jdbcType="TIMESTAMP" property="createtime" />
<result column="updatetime" jdbcType="TIMESTAMP" property="updatetime" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, product_id, member_id, createtime, updatetime
</sql>
<select id="selectByExample" parameterType="com.macro.mall.model.OmsChoseProductExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from oms_chose_product
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from oms_chose_product
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from oms_chose_product
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.macro.mall.model.OmsChoseProductExample">
delete from oms_chose_product
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.macro.mall.model.OmsChoseProduct">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into oms_chose_product (product_id, member_id, createtime,
updatetime)
values (#{productId,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{createtime,jdbcType=TIMESTAMP},
#{updatetime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.OmsChoseProduct">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into oms_chose_product
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="productId != null">
product_id,
</if>
<if test="memberId != null">
member_id,
</if>
<if test="createtime != null">
createtime,
</if>
<if test="updatetime != null">
updatetime,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="productId != null">
#{productId,jdbcType=BIGINT},
</if>
<if test="memberId != null">
#{memberId,jdbcType=BIGINT},
</if>
<if test="createtime != null">
#{createtime,jdbcType=TIMESTAMP},
</if>
<if test="updatetime != null">
#{updatetime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.macro.mall.model.OmsChoseProductExample" resultType="java.lang.Long">
select count(*) from oms_chose_product
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update oms_chose_product
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.productId != null">
product_id = #{record.productId,jdbcType=BIGINT},
</if>
<if test="record.memberId != null">
member_id = #{record.memberId,jdbcType=BIGINT},
</if>
<if test="record.createtime != null">
createtime = #{record.createtime,jdbcType=TIMESTAMP},
</if>
<if test="record.updatetime != null">
updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update oms_chose_product
set id = #{record.id,jdbcType=BIGINT},
product_id = #{record.productId,jdbcType=BIGINT},
member_id = #{record.memberId,jdbcType=BIGINT},
createtime = #{record.createtime,jdbcType=TIMESTAMP},
updatetime = #{record.updatetime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.macro.mall.model.OmsChoseProduct">
update oms_chose_product
<set>
<if test="productId != null">
product_id = #{productId,jdbcType=BIGINT},
</if>
<if test="memberId != null">
member_id = #{memberId,jdbcType=BIGINT},
</if>
<if test="createtime != null">
createtime = #{createtime,jdbcType=TIMESTAMP},
</if>
<if test="updatetime != null">
updatetime = #{updatetime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.macro.mall.model.OmsChoseProduct">
update oms_chose_product
set product_id = #{productId,jdbcType=BIGINT},
member_id = #{memberId,jdbcType=BIGINT},
createtime = #{createtime,jdbcType=TIMESTAMP},
updatetime = #{updatetime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment