添加购物车表
This commit is contained in:
parent
983293ff48
commit
96fc2c6d52
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,30 @@
|
|||||||
|
package com.macro.mall.mapper;
|
||||||
|
|
||||||
|
import com.macro.mall.model.OmsCartItem;
|
||||||
|
import com.macro.mall.model.OmsCartItemExample;
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
public interface OmsCartItemMapper {
|
||||||
|
int countByExample(OmsCartItemExample example);
|
||||||
|
|
||||||
|
int deleteByExample(OmsCartItemExample example);
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
int insert(OmsCartItem record);
|
||||||
|
|
||||||
|
int insertSelective(OmsCartItem record);
|
||||||
|
|
||||||
|
List<OmsCartItem> selectByExample(OmsCartItemExample example);
|
||||||
|
|
||||||
|
OmsCartItem selectByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
int updateByExampleSelective(@Param("record") OmsCartItem record, @Param("example") OmsCartItemExample example);
|
||||||
|
|
||||||
|
int updateByExample(@Param("record") OmsCartItem record, @Param("example") OmsCartItemExample example);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(OmsCartItem record);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(OmsCartItem record);
|
||||||
|
}
|
272
mall-mbg/src/main/java/com/macro/mall/model/OmsCartItem.java
Normal file
272
mall-mbg/src/main/java/com/macro/mall/model/OmsCartItem.java
Normal file
@ -0,0 +1,272 @@
|
|||||||
|
package com.macro.mall.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class OmsCartItem implements Serializable {
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private Long productId;
|
||||||
|
|
||||||
|
private Long productSkuId;
|
||||||
|
|
||||||
|
private Long memberId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 购买数量
|
||||||
|
*
|
||||||
|
* @mbggenerated
|
||||||
|
*/
|
||||||
|
private Integer quantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加到购物车的价格
|
||||||
|
*
|
||||||
|
* @mbggenerated
|
||||||
|
*/
|
||||||
|
private BigDecimal price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 销售属性1
|
||||||
|
*
|
||||||
|
* @mbggenerated
|
||||||
|
*/
|
||||||
|
private String sp1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 销售属性2
|
||||||
|
*
|
||||||
|
* @mbggenerated
|
||||||
|
*/
|
||||||
|
private String sp2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 销售属性3
|
||||||
|
*
|
||||||
|
* @mbggenerated
|
||||||
|
*/
|
||||||
|
private String sp3;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品主图
|
||||||
|
*
|
||||||
|
* @mbggenerated
|
||||||
|
*/
|
||||||
|
private String productPic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品名称
|
||||||
|
*
|
||||||
|
* @mbggenerated
|
||||||
|
*/
|
||||||
|
private String productName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品副标题(卖点)
|
||||||
|
*
|
||||||
|
* @mbggenerated
|
||||||
|
*/
|
||||||
|
private String productSubTitle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品sku条码
|
||||||
|
*
|
||||||
|
* @mbggenerated
|
||||||
|
*/
|
||||||
|
private String productSkuCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会员昵称
|
||||||
|
*
|
||||||
|
* @mbggenerated
|
||||||
|
*/
|
||||||
|
private String memberNickname;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*
|
||||||
|
* @mbggenerated
|
||||||
|
*/
|
||||||
|
private Date createDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*
|
||||||
|
* @mbggenerated
|
||||||
|
*/
|
||||||
|
private Date modifyDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否删除
|
||||||
|
*
|
||||||
|
* @mbggenerated
|
||||||
|
*/
|
||||||
|
private Integer deleteStatus;
|
||||||
|
|
||||||
|
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 getProductSkuId() {
|
||||||
|
return productSkuId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductSkuId(Long productSkuId) {
|
||||||
|
this.productSkuId = productSkuId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getMemberId() {
|
||||||
|
return memberId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMemberId(Long memberId) {
|
||||||
|
this.memberId = memberId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getQuantity() {
|
||||||
|
return quantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQuantity(Integer quantity) {
|
||||||
|
this.quantity = quantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPrice() {
|
||||||
|
return price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrice(BigDecimal price) {
|
||||||
|
this.price = price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSp1() {
|
||||||
|
return sp1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSp1(String sp1) {
|
||||||
|
this.sp1 = sp1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSp2() {
|
||||||
|
return sp2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSp2(String sp2) {
|
||||||
|
this.sp2 = sp2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSp3() {
|
||||||
|
return sp3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSp3(String sp3) {
|
||||||
|
this.sp3 = sp3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProductPic() {
|
||||||
|
return productPic;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductPic(String productPic) {
|
||||||
|
this.productPic = productPic;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProductName() {
|
||||||
|
return productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductName(String productName) {
|
||||||
|
this.productName = productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProductSubTitle() {
|
||||||
|
return productSubTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductSubTitle(String productSubTitle) {
|
||||||
|
this.productSubTitle = productSubTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProductSkuCode() {
|
||||||
|
return productSkuCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductSkuCode(String productSkuCode) {
|
||||||
|
this.productSkuCode = productSkuCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMemberNickname() {
|
||||||
|
return memberNickname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMemberNickname(String memberNickname) {
|
||||||
|
this.memberNickname = memberNickname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateDate() {
|
||||||
|
return createDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateDate(Date createDate) {
|
||||||
|
this.createDate = createDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getModifyDate() {
|
||||||
|
return modifyDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModifyDate(Date modifyDate) {
|
||||||
|
this.modifyDate = modifyDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDeleteStatus() {
|
||||||
|
return deleteStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeleteStatus(Integer deleteStatus) {
|
||||||
|
this.deleteStatus = deleteStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
@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(", productSkuId=").append(productSkuId);
|
||||||
|
sb.append(", memberId=").append(memberId);
|
||||||
|
sb.append(", quantity=").append(quantity);
|
||||||
|
sb.append(", price=").append(price);
|
||||||
|
sb.append(", sp1=").append(sp1);
|
||||||
|
sb.append(", sp2=").append(sp2);
|
||||||
|
sb.append(", sp3=").append(sp3);
|
||||||
|
sb.append(", productPic=").append(productPic);
|
||||||
|
sb.append(", productName=").append(productName);
|
||||||
|
sb.append(", productSubTitle=").append(productSubTitle);
|
||||||
|
sb.append(", productSkuCode=").append(productSkuCode);
|
||||||
|
sb.append(", memberNickname=").append(memberNickname);
|
||||||
|
sb.append(", createDate=").append(createDate);
|
||||||
|
sb.append(", modifyDate=").append(modifyDate);
|
||||||
|
sb.append(", deleteStatus=").append(deleteStatus);
|
||||||
|
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||||
|
sb.append("]");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
}
|
1302
mall-mbg/src/main/java/com/macro/mall/model/OmsCartItemExample.java
Normal file
1302
mall-mbg/src/main/java/com/macro/mall/model/OmsCartItemExample.java
Normal file
File diff suppressed because it is too large
Load Diff
@ -10,7 +10,7 @@ public class PmsProductAttributeValue implements Serializable {
|
|||||||
private Long productAttributeId;
|
private Long productAttributeId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 存储的值
|
* 手动添加规格或参数的值,参数单值,规格有多个时以逗号隔开
|
||||||
*
|
*
|
||||||
* @mbggenerated
|
* @mbggenerated
|
||||||
*/
|
*/
|
||||||
|
@ -0,0 +1,401 @@
|
|||||||
|
<?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.OmsCartItemMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.macro.mall.model.OmsCartItem">
|
||||||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
|
<result column="product_id" jdbcType="BIGINT" property="productId" />
|
||||||
|
<result column="product_sku_id" jdbcType="BIGINT" property="productSkuId" />
|
||||||
|
<result column="member_id" jdbcType="BIGINT" property="memberId" />
|
||||||
|
<result column="quantity" jdbcType="INTEGER" property="quantity" />
|
||||||
|
<result column="price" jdbcType="DECIMAL" property="price" />
|
||||||
|
<result column="sp1" jdbcType="VARCHAR" property="sp1" />
|
||||||
|
<result column="sp2" jdbcType="VARCHAR" property="sp2" />
|
||||||
|
<result column="sp3" jdbcType="VARCHAR" property="sp3" />
|
||||||
|
<result column="product_pic" jdbcType="VARCHAR" property="productPic" />
|
||||||
|
<result column="product_name" jdbcType="VARCHAR" property="productName" />
|
||||||
|
<result column="product_sub_title" jdbcType="VARCHAR" property="productSubTitle" />
|
||||||
|
<result column="product_sku_code" jdbcType="VARCHAR" property="productSkuCode" />
|
||||||
|
<result column="member_nickname" jdbcType="VARCHAR" property="memberNickname" />
|
||||||
|
<result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
|
||||||
|
<result column="modify_date" jdbcType="TIMESTAMP" property="modifyDate" />
|
||||||
|
<result column="delete_status" jdbcType="INTEGER" property="deleteStatus" />
|
||||||
|
</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, product_sku_id, member_id, quantity, price, sp1, sp2, sp3, product_pic,
|
||||||
|
product_name, product_sub_title, product_sku_code, member_nickname, create_date,
|
||||||
|
modify_date, delete_status
|
||||||
|
</sql>
|
||||||
|
<select id="selectByExample" parameterType="com.macro.mall.model.OmsCartItemExample" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<if test="distinct">
|
||||||
|
distinct
|
||||||
|
</if>
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from oms_cart_item
|
||||||
|
<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_cart_item
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||||
|
delete from oms_cart_item
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</delete>
|
||||||
|
<delete id="deleteByExample" parameterType="com.macro.mall.model.OmsCartItemExample">
|
||||||
|
delete from oms_cart_item
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" parameterType="com.macro.mall.model.OmsCartItem">
|
||||||
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||||
|
SELECT LAST_INSERT_ID()
|
||||||
|
</selectKey>
|
||||||
|
insert into oms_cart_item (product_id, product_sku_id, member_id,
|
||||||
|
quantity, price, sp1,
|
||||||
|
sp2, sp3, product_pic,
|
||||||
|
product_name, product_sub_title, product_sku_code,
|
||||||
|
member_nickname, create_date, modify_date,
|
||||||
|
delete_status)
|
||||||
|
values (#{productId,jdbcType=BIGINT}, #{productSkuId,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT},
|
||||||
|
#{quantity,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL}, #{sp1,jdbcType=VARCHAR},
|
||||||
|
#{sp2,jdbcType=VARCHAR}, #{sp3,jdbcType=VARCHAR}, #{productPic,jdbcType=VARCHAR},
|
||||||
|
#{productName,jdbcType=VARCHAR}, #{productSubTitle,jdbcType=VARCHAR}, #{productSkuCode,jdbcType=VARCHAR},
|
||||||
|
#{memberNickname,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{modifyDate,jdbcType=TIMESTAMP},
|
||||||
|
#{deleteStatus,jdbcType=INTEGER})
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" parameterType="com.macro.mall.model.OmsCartItem">
|
||||||
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||||
|
SELECT LAST_INSERT_ID()
|
||||||
|
</selectKey>
|
||||||
|
insert into oms_cart_item
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="productId != null">
|
||||||
|
product_id,
|
||||||
|
</if>
|
||||||
|
<if test="productSkuId != null">
|
||||||
|
product_sku_id,
|
||||||
|
</if>
|
||||||
|
<if test="memberId != null">
|
||||||
|
member_id,
|
||||||
|
</if>
|
||||||
|
<if test="quantity != null">
|
||||||
|
quantity,
|
||||||
|
</if>
|
||||||
|
<if test="price != null">
|
||||||
|
price,
|
||||||
|
</if>
|
||||||
|
<if test="sp1 != null">
|
||||||
|
sp1,
|
||||||
|
</if>
|
||||||
|
<if test="sp2 != null">
|
||||||
|
sp2,
|
||||||
|
</if>
|
||||||
|
<if test="sp3 != null">
|
||||||
|
sp3,
|
||||||
|
</if>
|
||||||
|
<if test="productPic != null">
|
||||||
|
product_pic,
|
||||||
|
</if>
|
||||||
|
<if test="productName != null">
|
||||||
|
product_name,
|
||||||
|
</if>
|
||||||
|
<if test="productSubTitle != null">
|
||||||
|
product_sub_title,
|
||||||
|
</if>
|
||||||
|
<if test="productSkuCode != null">
|
||||||
|
product_sku_code,
|
||||||
|
</if>
|
||||||
|
<if test="memberNickname != null">
|
||||||
|
member_nickname,
|
||||||
|
</if>
|
||||||
|
<if test="createDate != null">
|
||||||
|
create_date,
|
||||||
|
</if>
|
||||||
|
<if test="modifyDate != null">
|
||||||
|
modify_date,
|
||||||
|
</if>
|
||||||
|
<if test="deleteStatus != null">
|
||||||
|
delete_status,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="productId != null">
|
||||||
|
#{productId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="productSkuId != null">
|
||||||
|
#{productSkuId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="memberId != null">
|
||||||
|
#{memberId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="quantity != null">
|
||||||
|
#{quantity,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="price != null">
|
||||||
|
#{price,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
|
<if test="sp1 != null">
|
||||||
|
#{sp1,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="sp2 != null">
|
||||||
|
#{sp2,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="sp3 != null">
|
||||||
|
#{sp3,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="productPic != null">
|
||||||
|
#{productPic,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="productName != null">
|
||||||
|
#{productName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="productSubTitle != null">
|
||||||
|
#{productSubTitle,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="productSkuCode != null">
|
||||||
|
#{productSkuCode,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="memberNickname != null">
|
||||||
|
#{memberNickname,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="createDate != null">
|
||||||
|
#{createDate,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="modifyDate != null">
|
||||||
|
#{modifyDate,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="deleteStatus != null">
|
||||||
|
#{deleteStatus,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<select id="countByExample" parameterType="com.macro.mall.model.OmsCartItemExample" resultType="java.lang.Integer">
|
||||||
|
select count(*) from oms_cart_item
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<update id="updateByExampleSelective" parameterType="map">
|
||||||
|
update oms_cart_item
|
||||||
|
<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.productSkuId != null">
|
||||||
|
product_sku_id = #{record.productSkuId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.memberId != null">
|
||||||
|
member_id = #{record.memberId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.quantity != null">
|
||||||
|
quantity = #{record.quantity,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="record.price != null">
|
||||||
|
price = #{record.price,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
|
<if test="record.sp1 != null">
|
||||||
|
sp1 = #{record.sp1,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.sp2 != null">
|
||||||
|
sp2 = #{record.sp2,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.sp3 != null">
|
||||||
|
sp3 = #{record.sp3,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.productPic != null">
|
||||||
|
product_pic = #{record.productPic,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.productName != null">
|
||||||
|
product_name = #{record.productName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.productSubTitle != null">
|
||||||
|
product_sub_title = #{record.productSubTitle,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.productSkuCode != null">
|
||||||
|
product_sku_code = #{record.productSkuCode,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.memberNickname != null">
|
||||||
|
member_nickname = #{record.memberNickname,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.createDate != null">
|
||||||
|
create_date = #{record.createDate,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="record.modifyDate != null">
|
||||||
|
modify_date = #{record.modifyDate,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="record.deleteStatus != null">
|
||||||
|
delete_status = #{record.deleteStatus,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByExample" parameterType="map">
|
||||||
|
update oms_cart_item
|
||||||
|
set id = #{record.id,jdbcType=BIGINT},
|
||||||
|
product_id = #{record.productId,jdbcType=BIGINT},
|
||||||
|
product_sku_id = #{record.productSkuId,jdbcType=BIGINT},
|
||||||
|
member_id = #{record.memberId,jdbcType=BIGINT},
|
||||||
|
quantity = #{record.quantity,jdbcType=INTEGER},
|
||||||
|
price = #{record.price,jdbcType=DECIMAL},
|
||||||
|
sp1 = #{record.sp1,jdbcType=VARCHAR},
|
||||||
|
sp2 = #{record.sp2,jdbcType=VARCHAR},
|
||||||
|
sp3 = #{record.sp3,jdbcType=VARCHAR},
|
||||||
|
product_pic = #{record.productPic,jdbcType=VARCHAR},
|
||||||
|
product_name = #{record.productName,jdbcType=VARCHAR},
|
||||||
|
product_sub_title = #{record.productSubTitle,jdbcType=VARCHAR},
|
||||||
|
product_sku_code = #{record.productSkuCode,jdbcType=VARCHAR},
|
||||||
|
member_nickname = #{record.memberNickname,jdbcType=VARCHAR},
|
||||||
|
create_date = #{record.createDate,jdbcType=TIMESTAMP},
|
||||||
|
modify_date = #{record.modifyDate,jdbcType=TIMESTAMP},
|
||||||
|
delete_status = #{record.deleteStatus,jdbcType=INTEGER}
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.macro.mall.model.OmsCartItem">
|
||||||
|
update oms_cart_item
|
||||||
|
<set>
|
||||||
|
<if test="productId != null">
|
||||||
|
product_id = #{productId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="productSkuId != null">
|
||||||
|
product_sku_id = #{productSkuId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="memberId != null">
|
||||||
|
member_id = #{memberId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="quantity != null">
|
||||||
|
quantity = #{quantity,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="price != null">
|
||||||
|
price = #{price,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
|
<if test="sp1 != null">
|
||||||
|
sp1 = #{sp1,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="sp2 != null">
|
||||||
|
sp2 = #{sp2,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="sp3 != null">
|
||||||
|
sp3 = #{sp3,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="productPic != null">
|
||||||
|
product_pic = #{productPic,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="productName != null">
|
||||||
|
product_name = #{productName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="productSubTitle != null">
|
||||||
|
product_sub_title = #{productSubTitle,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="productSkuCode != null">
|
||||||
|
product_sku_code = #{productSkuCode,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="memberNickname != null">
|
||||||
|
member_nickname = #{memberNickname,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="createDate != null">
|
||||||
|
create_date = #{createDate,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="modifyDate != null">
|
||||||
|
modify_date = #{modifyDate,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="deleteStatus != null">
|
||||||
|
delete_status = #{deleteStatus,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="com.macro.mall.model.OmsCartItem">
|
||||||
|
update oms_cart_item
|
||||||
|
set product_id = #{productId,jdbcType=BIGINT},
|
||||||
|
product_sku_id = #{productSkuId,jdbcType=BIGINT},
|
||||||
|
member_id = #{memberId,jdbcType=BIGINT},
|
||||||
|
quantity = #{quantity,jdbcType=INTEGER},
|
||||||
|
price = #{price,jdbcType=DECIMAL},
|
||||||
|
sp1 = #{sp1,jdbcType=VARCHAR},
|
||||||
|
sp2 = #{sp2,jdbcType=VARCHAR},
|
||||||
|
sp3 = #{sp3,jdbcType=VARCHAR},
|
||||||
|
product_pic = #{productPic,jdbcType=VARCHAR},
|
||||||
|
product_name = #{productName,jdbcType=VARCHAR},
|
||||||
|
product_sub_title = #{productSubTitle,jdbcType=VARCHAR},
|
||||||
|
product_sku_code = #{productSkuCode,jdbcType=VARCHAR},
|
||||||
|
member_nickname = #{memberNickname,jdbcType=VARCHAR},
|
||||||
|
create_date = #{createDate,jdbcType=TIMESTAMP},
|
||||||
|
modify_date = #{modifyDate,jdbcType=TIMESTAMP},
|
||||||
|
delete_status = #{deleteStatus,jdbcType=INTEGER}
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
Loading…
x
Reference in New Issue
Block a user