19 changed files with 5808 additions and 80 deletions
@ -0,0 +1,33 @@ |
|||
package cc.hiver.mall.dao.mapper; |
|||
|
|||
import cc.hiver.mall.entity.Sale; |
|||
import cc.hiver.mall.entity.SaleDetail; |
|||
import cc.hiver.mall.entity.SaleDetailExample; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
public interface SaleDetailMapper extends BaseMapper<SaleDetail> { |
|||
long countByExample(SaleDetailExample example); |
|||
|
|||
int deleteByExample(SaleDetailExample example); |
|||
|
|||
int deleteByPrimaryKey(Long id); |
|||
|
|||
int insert(SaleDetail record); |
|||
|
|||
int insertSelective(SaleDetail record); |
|||
|
|||
List<SaleDetail> selectByExample(SaleDetailExample example); |
|||
|
|||
SaleDetail selectByPrimaryKey(Long id); |
|||
|
|||
int updateByExampleSelective(@Param("record") SaleDetail record, @Param("example") SaleDetailExample example); |
|||
|
|||
int updateByExample(@Param("record") SaleDetail record, @Param("example") SaleDetailExample example); |
|||
|
|||
int updateByPrimaryKeySelective(SaleDetail record); |
|||
|
|||
int updateByPrimaryKey(SaleDetail record); |
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
package cc.hiver.mall.dao.mapper; |
|||
|
|||
import cc.hiver.mall.entity.PurchaseDetail; |
|||
import cc.hiver.mall.entity.Sale; |
|||
import cc.hiver.mall.entity.SaleExample; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
public interface SaleMapper extends BaseMapper<Sale> { |
|||
long countByExample(SaleExample example); |
|||
|
|||
int deleteByExample(SaleExample example); |
|||
|
|||
int deleteByPrimaryKey(Long id); |
|||
|
|||
int insert(Sale record); |
|||
|
|||
int insertSelective(Sale record); |
|||
|
|||
List<Sale> selectByExample(SaleExample example); |
|||
|
|||
Sale selectByPrimaryKey(Long id); |
|||
|
|||
int updateByExampleSelective(@Param("record") Sale record, @Param("example") SaleExample example); |
|||
|
|||
int updateByExample(@Param("record") Sale record, @Param("example") SaleExample example); |
|||
|
|||
int updateByPrimaryKeySelective(Sale record); |
|||
|
|||
int updateByPrimaryKey(Sale record); |
|||
} |
|||
File diff suppressed because it is too large
@ -0,0 +1,269 @@ |
|||
package cc.hiver.mall.entity; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
@ApiModel(value = "销售单主表") |
|||
public class Sale implements Serializable { |
|||
private Long id; |
|||
|
|||
private String createBy; |
|||
|
|||
private Date createTime; |
|||
|
|||
private Integer delFlag; |
|||
|
|||
private String updateBy; |
|||
|
|||
private Date updateTime; |
|||
|
|||
@ApiModelProperty(value = "客户ID") |
|||
private Long userId; |
|||
|
|||
@ApiModelProperty(value = "店铺ID") |
|||
private String shopId; |
|||
|
|||
@ApiModelProperty(value = "订单金额") |
|||
private BigDecimal totalAmount; |
|||
|
|||
@ApiModelProperty(value = "折扣") |
|||
private BigDecimal discount; |
|||
|
|||
@ApiModelProperty(value = "优惠金额") |
|||
private BigDecimal discountAmount; |
|||
|
|||
@ApiModelProperty(value = "实收金额") |
|||
private BigDecimal realAmount; |
|||
|
|||
@ApiModelProperty(value = "已收") |
|||
private BigDecimal alreadyEarn; |
|||
|
|||
@ApiModelProperty(value = "未收") |
|||
private BigDecimal noEarn; |
|||
|
|||
@ApiModelProperty(value = "订单状态 0-拣货中 1-已提交抢单 2-已取货 3-已送达") |
|||
private String status; |
|||
|
|||
@ApiModelProperty(value = "物流类别 0-物流 1-快递 2-自提 3-拼单") |
|||
private String transportType; |
|||
|
|||
@ApiModelProperty(value = "拼单店铺地址 为拼单类别时手动输入") |
|||
private String shareAddress; |
|||
|
|||
@ApiModelProperty(value = "收货地址") |
|||
private String receiveAddress; |
|||
|
|||
@ApiModelProperty(value = "省") |
|||
private String province; |
|||
|
|||
@ApiModelProperty(value = "市") |
|||
private String city; |
|||
|
|||
@ApiModelProperty(value = "区县") |
|||
private String area; |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
public Long getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(Long id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public String getCreateBy() { |
|||
return createBy; |
|||
} |
|||
|
|||
public void setCreateBy(String createBy) { |
|||
this.createBy = createBy; |
|||
} |
|||
|
|||
public Date getCreateTime() { |
|||
return createTime; |
|||
} |
|||
|
|||
public void setCreateTime(Date createTime) { |
|||
this.createTime = createTime; |
|||
} |
|||
|
|||
public Integer getDelFlag() { |
|||
return delFlag; |
|||
} |
|||
|
|||
public void setDelFlag(Integer delFlag) { |
|||
this.delFlag = delFlag; |
|||
} |
|||
|
|||
public String getUpdateBy() { |
|||
return updateBy; |
|||
} |
|||
|
|||
public void setUpdateBy(String updateBy) { |
|||
this.updateBy = updateBy; |
|||
} |
|||
|
|||
public Date getUpdateTime() { |
|||
return updateTime; |
|||
} |
|||
|
|||
public void setUpdateTime(Date updateTime) { |
|||
this.updateTime = updateTime; |
|||
} |
|||
|
|||
public Long getUserId() { |
|||
return userId; |
|||
} |
|||
|
|||
public void setUserId(Long userId) { |
|||
this.userId = userId; |
|||
} |
|||
|
|||
public String getShopId() { |
|||
return shopId; |
|||
} |
|||
|
|||
public void setShopId(String shopId) { |
|||
this.shopId = shopId; |
|||
} |
|||
|
|||
public BigDecimal getTotalAmount() { |
|||
return totalAmount; |
|||
} |
|||
|
|||
public void setTotalAmount(BigDecimal totalAmount) { |
|||
this.totalAmount = totalAmount; |
|||
} |
|||
|
|||
public BigDecimal getDiscount() { |
|||
return discount; |
|||
} |
|||
|
|||
public void setDiscount(BigDecimal discount) { |
|||
this.discount = discount; |
|||
} |
|||
|
|||
public BigDecimal getDiscountAmount() { |
|||
return discountAmount; |
|||
} |
|||
|
|||
public void setDiscountAmount(BigDecimal discountAmount) { |
|||
this.discountAmount = discountAmount; |
|||
} |
|||
|
|||
public BigDecimal getRealAmount() { |
|||
return realAmount; |
|||
} |
|||
|
|||
public void setRealAmount(BigDecimal realAmount) { |
|||
this.realAmount = realAmount; |
|||
} |
|||
|
|||
public BigDecimal getAlreadyEarn() { |
|||
return alreadyEarn; |
|||
} |
|||
|
|||
public void setAlreadyEarn(BigDecimal alreadyEarn) { |
|||
this.alreadyEarn = alreadyEarn; |
|||
} |
|||
|
|||
public BigDecimal getNoEarn() { |
|||
return noEarn; |
|||
} |
|||
|
|||
public void setNoEarn(BigDecimal noEarn) { |
|||
this.noEarn = noEarn; |
|||
} |
|||
|
|||
public String getStatus() { |
|||
return status; |
|||
} |
|||
|
|||
public void setStatus(String status) { |
|||
this.status = status; |
|||
} |
|||
|
|||
public String getTransportType() { |
|||
return transportType; |
|||
} |
|||
|
|||
public void setTransportType(String transportType) { |
|||
this.transportType = transportType; |
|||
} |
|||
|
|||
public String getShareAddress() { |
|||
return shareAddress; |
|||
} |
|||
|
|||
public void setShareAddress(String shareAddress) { |
|||
this.shareAddress = shareAddress; |
|||
} |
|||
|
|||
public String getReceiveAddress() { |
|||
return receiveAddress; |
|||
} |
|||
|
|||
public void setReceiveAddress(String receiveAddress) { |
|||
this.receiveAddress = receiveAddress; |
|||
} |
|||
|
|||
public String getProvince() { |
|||
return province; |
|||
} |
|||
|
|||
public void setProvince(String province) { |
|||
this.province = province; |
|||
} |
|||
|
|||
public String getCity() { |
|||
return city; |
|||
} |
|||
|
|||
public void setCity(String city) { |
|||
this.city = city; |
|||
} |
|||
|
|||
public String getArea() { |
|||
return area; |
|||
} |
|||
|
|||
public void setArea(String area) { |
|||
this.area = area; |
|||
} |
|||
|
|||
@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(", createBy=").append(createBy); |
|||
sb.append(", createTime=").append(createTime); |
|||
sb.append(", delFlag=").append(delFlag); |
|||
sb.append(", updateBy=").append(updateBy); |
|||
sb.append(", updateTime=").append(updateTime); |
|||
sb.append(", userId=").append(userId); |
|||
sb.append(", shopId=").append(shopId); |
|||
sb.append(", totalAmount=").append(totalAmount); |
|||
sb.append(", discount=").append(discount); |
|||
sb.append(", discountAmount=").append(discountAmount); |
|||
sb.append(", realAmount=").append(realAmount); |
|||
sb.append(", alreadyEarn=").append(alreadyEarn); |
|||
sb.append(", noEarn=").append(noEarn); |
|||
sb.append(", status=").append(status); |
|||
sb.append(", transportType=").append(transportType); |
|||
sb.append(", shareAddress=").append(shareAddress); |
|||
sb.append(", receiveAddress=").append(receiveAddress); |
|||
sb.append(", province=").append(province); |
|||
sb.append(", city=").append(city); |
|||
sb.append(", area=").append(area); |
|||
sb.append(", serialVersionUID=").append(serialVersionUID); |
|||
sb.append("]"); |
|||
return sb.toString(); |
|||
} |
|||
} |
|||
@ -0,0 +1,221 @@ |
|||
package cc.hiver.mall.entity; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
@ApiModel(value = "销售单明细表") |
|||
public class SaleDetail implements Serializable { |
|||
private Long id; |
|||
|
|||
private String createBy; |
|||
|
|||
private Date createTime; |
|||
|
|||
private Integer delFlag; |
|||
|
|||
private String updateBy; |
|||
|
|||
private Date updateTime; |
|||
|
|||
@ApiModelProperty(value = "销售单ID") |
|||
private Long saleId; |
|||
|
|||
@ApiModelProperty(value = "商品ID") |
|||
private Long productId; |
|||
|
|||
@ApiModelProperty(value = "商品名称") |
|||
private String productName; |
|||
|
|||
@ApiModelProperty(value = "单位") |
|||
private String unit; |
|||
|
|||
@ApiModelProperty(value = "店铺ID") |
|||
private String shopId; |
|||
|
|||
@ApiModelProperty(value = "商品分类") |
|||
private Long categoryId; |
|||
|
|||
@ApiModelProperty(value = "商品属性列表") |
|||
private String attributeList; |
|||
|
|||
@ApiModelProperty(value = "市场价") |
|||
private BigDecimal price; |
|||
|
|||
@ApiModelProperty(value = "采购价") |
|||
private BigDecimal purchasePrice; |
|||
|
|||
@ApiModelProperty(value = "批发价") |
|||
private BigDecimal wholesalePrice; |
|||
|
|||
@ApiModelProperty(value = "销售数量") |
|||
private Integer productCount; |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
public Long getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(Long id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public String getCreateBy() { |
|||
return createBy; |
|||
} |
|||
|
|||
public void setCreateBy(String createBy) { |
|||
this.createBy = createBy; |
|||
} |
|||
|
|||
public Date getCreateTime() { |
|||
return createTime; |
|||
} |
|||
|
|||
public void setCreateTime(Date createTime) { |
|||
this.createTime = createTime; |
|||
} |
|||
|
|||
public Integer getDelFlag() { |
|||
return delFlag; |
|||
} |
|||
|
|||
public void setDelFlag(Integer delFlag) { |
|||
this.delFlag = delFlag; |
|||
} |
|||
|
|||
public String getUpdateBy() { |
|||
return updateBy; |
|||
} |
|||
|
|||
public void setUpdateBy(String updateBy) { |
|||
this.updateBy = updateBy; |
|||
} |
|||
|
|||
public Date getUpdateTime() { |
|||
return updateTime; |
|||
} |
|||
|
|||
public void setUpdateTime(Date updateTime) { |
|||
this.updateTime = updateTime; |
|||
} |
|||
|
|||
public Long getSaleId() { |
|||
return saleId; |
|||
} |
|||
|
|||
public void setSaleId(Long saleId) { |
|||
this.saleId = saleId; |
|||
} |
|||
|
|||
public Long getProductId() { |
|||
return productId; |
|||
} |
|||
|
|||
public void setProductId(Long productId) { |
|||
this.productId = productId; |
|||
} |
|||
|
|||
public String getProductName() { |
|||
return productName; |
|||
} |
|||
|
|||
public void setProductName(String productName) { |
|||
this.productName = productName; |
|||
} |
|||
|
|||
public String getUnit() { |
|||
return unit; |
|||
} |
|||
|
|||
public void setUnit(String unit) { |
|||
this.unit = unit; |
|||
} |
|||
|
|||
public String getShopId() { |
|||
return shopId; |
|||
} |
|||
|
|||
public void setShopId(String shopId) { |
|||
this.shopId = shopId; |
|||
} |
|||
|
|||
public Long getCategoryId() { |
|||
return categoryId; |
|||
} |
|||
|
|||
public void setCategoryId(Long categoryId) { |
|||
this.categoryId = categoryId; |
|||
} |
|||
|
|||
public String getAttributeList() { |
|||
return attributeList; |
|||
} |
|||
|
|||
public void setAttributeList(String attributeList) { |
|||
this.attributeList = attributeList; |
|||
} |
|||
|
|||
public BigDecimal getPrice() { |
|||
return price; |
|||
} |
|||
|
|||
public void setPrice(BigDecimal price) { |
|||
this.price = price; |
|||
} |
|||
|
|||
public BigDecimal getPurchasePrice() { |
|||
return purchasePrice; |
|||
} |
|||
|
|||
public void setPurchasePrice(BigDecimal purchasePrice) { |
|||
this.purchasePrice = purchasePrice; |
|||
} |
|||
|
|||
public BigDecimal getWholesalePrice() { |
|||
return wholesalePrice; |
|||
} |
|||
|
|||
public void setWholesalePrice(BigDecimal wholesalePrice) { |
|||
this.wholesalePrice = wholesalePrice; |
|||
} |
|||
|
|||
public Integer getProductCount() { |
|||
return productCount; |
|||
} |
|||
|
|||
public void setProductCount(Integer productCount) { |
|||
this.productCount = productCount; |
|||
} |
|||
|
|||
@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(", createBy=").append(createBy); |
|||
sb.append(", createTime=").append(createTime); |
|||
sb.append(", delFlag=").append(delFlag); |
|||
sb.append(", updateBy=").append(updateBy); |
|||
sb.append(", updateTime=").append(updateTime); |
|||
sb.append(", saleId=").append(saleId); |
|||
sb.append(", productId=").append(productId); |
|||
sb.append(", productName=").append(productName); |
|||
sb.append(", unit=").append(unit); |
|||
sb.append(", shopId=").append(shopId); |
|||
sb.append(", categoryId=").append(categoryId); |
|||
sb.append(", attributeList=").append(attributeList); |
|||
sb.append(", price=").append(price); |
|||
sb.append(", purchasePrice=").append(purchasePrice); |
|||
sb.append(", wholesalePrice=").append(wholesalePrice); |
|||
sb.append(", productCount=").append(productCount); |
|||
sb.append(", serialVersionUID=").append(serialVersionUID); |
|||
sb.append("]"); |
|||
return sb.toString(); |
|||
} |
|||
} |
|||
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -0,0 +1,13 @@ |
|||
package cc.hiver.mall.service.mybatis; |
|||
|
|||
import cc.hiver.core.common.vo.Result; |
|||
import cc.hiver.mall.entity.Sale; |
|||
import cc.hiver.mall.entity.Stock; |
|||
import cc.hiver.mall.pojo.vo.PurchaseVo; |
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
|
|||
public interface SaleService extends IService<Sale> { |
|||
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,25 @@ |
|||
package cc.hiver.mall.serviceimpl.mybatis; |
|||
|
|||
import cc.hiver.core.common.utils.BeanUtils; |
|||
import cc.hiver.core.common.utils.ResultUtil; |
|||
import cc.hiver.core.common.vo.Result; |
|||
import cc.hiver.mall.dao.mapper.SaleMapper; |
|||
import cc.hiver.mall.dao.mapper.StockMapper; |
|||
import cc.hiver.mall.entity.*; |
|||
import cc.hiver.mall.pojo.vo.PurchaseVo; |
|||
import cc.hiver.mall.service.mybatis.*; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Service |
|||
public class SaleServiceImpl extends ServiceImpl<SaleMapper, Sale> implements SaleService { |
|||
|
|||
|
|||
|
|||
} |
|||
@ -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="cc.hiver.mall.dao.mapper.SaleDetailMapper"> |
|||
<resultMap id="BaseResultMap" type="cc.hiver.mall.entity.SaleDetail"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="create_by" jdbcType="VARCHAR" property="createBy" /> |
|||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> |
|||
<result column="del_flag" jdbcType="INTEGER" property="delFlag" /> |
|||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" /> |
|||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> |
|||
<result column="sale_id" jdbcType="BIGINT" property="saleId" /> |
|||
<result column="product_id" jdbcType="BIGINT" property="productId" /> |
|||
<result column="product_name" jdbcType="VARCHAR" property="productName" /> |
|||
<result column="unit" jdbcType="VARCHAR" property="unit" /> |
|||
<result column="shop_id" jdbcType="VARCHAR" property="shopId" /> |
|||
<result column="category_id" jdbcType="BIGINT" property="categoryId" /> |
|||
<result column="attribute_list" jdbcType="VARCHAR" property="attributeList" /> |
|||
<result column="price" jdbcType="DECIMAL" property="price" /> |
|||
<result column="purchase_price" jdbcType="DECIMAL" property="purchasePrice" /> |
|||
<result column="wholesale_price" jdbcType="DECIMAL" property="wholesalePrice" /> |
|||
<result column="product_count" jdbcType="INTEGER" property="productCount" /> |
|||
</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, create_by, create_time, del_flag, update_by, update_time, sale_id, product_id, |
|||
product_name, unit, shop_id, category_id, attribute_list, price, purchase_price, |
|||
wholesale_price, product_count |
|||
</sql> |
|||
<select id="selectByExample" parameterType="cc.hiver.mall.entity.SaleDetailExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_sale_detail |
|||
<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 t_sale_detail |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_sale_detail |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="cc.hiver.mall.entity.SaleDetailExample"> |
|||
delete from t_sale_detail |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="cc.hiver.mall.entity.SaleDetail"> |
|||
insert into t_sale_detail (id, create_by, create_time, |
|||
del_flag, update_by, update_time, |
|||
sale_id, product_id, product_name, |
|||
unit, shop_id, category_id, |
|||
attribute_list, price, purchase_price, |
|||
wholesale_price, product_count) |
|||
values (#{id,jdbcType=BIGINT}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, |
|||
#{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, |
|||
#{saleId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{productName,jdbcType=VARCHAR}, |
|||
#{unit,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR}, #{categoryId,jdbcType=BIGINT}, |
|||
#{attributeList,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL}, #{purchasePrice,jdbcType=DECIMAL}, |
|||
#{wholesalePrice,jdbcType=DECIMAL}, #{productCount,jdbcType=INTEGER}) |
|||
</insert> |
|||
<insert id="insertSelective" parameterType="cc.hiver.mall.entity.SaleDetail"> |
|||
insert into t_sale_detail |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="createBy != null"> |
|||
create_by, |
|||
</if> |
|||
<if test="createTime != null"> |
|||
create_time, |
|||
</if> |
|||
<if test="delFlag != null"> |
|||
del_flag, |
|||
</if> |
|||
<if test="updateBy != null"> |
|||
update_by, |
|||
</if> |
|||
<if test="updateTime != null"> |
|||
update_time, |
|||
</if> |
|||
<if test="saleId != null"> |
|||
sale_id, |
|||
</if> |
|||
<if test="productId != null"> |
|||
product_id, |
|||
</if> |
|||
<if test="productName != null"> |
|||
product_name, |
|||
</if> |
|||
<if test="unit != null"> |
|||
unit, |
|||
</if> |
|||
<if test="shopId != null"> |
|||
shop_id, |
|||
</if> |
|||
<if test="categoryId != null"> |
|||
category_id, |
|||
</if> |
|||
<if test="attributeList != null"> |
|||
attribute_list, |
|||
</if> |
|||
<if test="price != null"> |
|||
price, |
|||
</if> |
|||
<if test="purchasePrice != null"> |
|||
purchase_price, |
|||
</if> |
|||
<if test="wholesalePrice != null"> |
|||
wholesale_price, |
|||
</if> |
|||
<if test="productCount != null"> |
|||
product_count, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="createBy != null"> |
|||
#{createBy,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="createTime != null"> |
|||
#{createTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="delFlag != null"> |
|||
#{delFlag,jdbcType=INTEGER}, |
|||
</if> |
|||
<if test="updateBy != null"> |
|||
#{updateBy,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="updateTime != null"> |
|||
#{updateTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="saleId != null"> |
|||
#{saleId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="productId != null"> |
|||
#{productId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="productName != null"> |
|||
#{productName,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="unit != null"> |
|||
#{unit,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="shopId != null"> |
|||
#{shopId,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="categoryId != null"> |
|||
#{categoryId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="attributeList != null"> |
|||
#{attributeList,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="price != null"> |
|||
#{price,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="purchasePrice != null"> |
|||
#{purchasePrice,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="wholesalePrice != null"> |
|||
#{wholesalePrice,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="productCount != null"> |
|||
#{productCount,jdbcType=INTEGER}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="cc.hiver.mall.entity.SaleDetailExample" resultType="java.lang.Long"> |
|||
select count(*) from t_sale_detail |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_sale_detail |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.createBy != null"> |
|||
create_by = #{record.createBy,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.createTime != null"> |
|||
create_time = #{record.createTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.delFlag != null"> |
|||
del_flag = #{record.delFlag,jdbcType=INTEGER}, |
|||
</if> |
|||
<if test="record.updateBy != null"> |
|||
update_by = #{record.updateBy,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.updateTime != null"> |
|||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.saleId != null"> |
|||
sale_id = #{record.saleId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.productId != null"> |
|||
product_id = #{record.productId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.productName != null"> |
|||
product_name = #{record.productName,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.unit != null"> |
|||
unit = #{record.unit,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.shopId != null"> |
|||
shop_id = #{record.shopId,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.categoryId != null"> |
|||
category_id = #{record.categoryId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.attributeList != null"> |
|||
attribute_list = #{record.attributeList,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.price != null"> |
|||
price = #{record.price,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="record.purchasePrice != null"> |
|||
purchase_price = #{record.purchasePrice,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="record.wholesalePrice != null"> |
|||
wholesale_price = #{record.wholesalePrice,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="record.productCount != null"> |
|||
product_count = #{record.productCount,jdbcType=INTEGER}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
update t_sale_detail |
|||
set id = #{record.id,jdbcType=BIGINT}, |
|||
create_by = #{record.createBy,jdbcType=VARCHAR}, |
|||
create_time = #{record.createTime,jdbcType=TIMESTAMP}, |
|||
del_flag = #{record.delFlag,jdbcType=INTEGER}, |
|||
update_by = #{record.updateBy,jdbcType=VARCHAR}, |
|||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, |
|||
sale_id = #{record.saleId,jdbcType=BIGINT}, |
|||
product_id = #{record.productId,jdbcType=BIGINT}, |
|||
product_name = #{record.productName,jdbcType=VARCHAR}, |
|||
unit = #{record.unit,jdbcType=VARCHAR}, |
|||
shop_id = #{record.shopId,jdbcType=VARCHAR}, |
|||
category_id = #{record.categoryId,jdbcType=BIGINT}, |
|||
attribute_list = #{record.attributeList,jdbcType=VARCHAR}, |
|||
price = #{record.price,jdbcType=DECIMAL}, |
|||
purchase_price = #{record.purchasePrice,jdbcType=DECIMAL}, |
|||
wholesale_price = #{record.wholesalePrice,jdbcType=DECIMAL}, |
|||
product_count = #{record.productCount,jdbcType=INTEGER} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="cc.hiver.mall.entity.SaleDetail"> |
|||
update t_sale_detail |
|||
<set> |
|||
<if test="createBy != null"> |
|||
create_by = #{createBy,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="createTime != null"> |
|||
create_time = #{createTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="delFlag != null"> |
|||
del_flag = #{delFlag,jdbcType=INTEGER}, |
|||
</if> |
|||
<if test="updateBy != null"> |
|||
update_by = #{updateBy,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="updateTime != null"> |
|||
update_time = #{updateTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="saleId != null"> |
|||
sale_id = #{saleId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="productId != null"> |
|||
product_id = #{productId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="productName != null"> |
|||
product_name = #{productName,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="unit != null"> |
|||
unit = #{unit,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="shopId != null"> |
|||
shop_id = #{shopId,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="categoryId != null"> |
|||
category_id = #{categoryId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="attributeList != null"> |
|||
attribute_list = #{attributeList,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="price != null"> |
|||
price = #{price,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="purchasePrice != null"> |
|||
purchase_price = #{purchasePrice,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="wholesalePrice != null"> |
|||
wholesale_price = #{wholesalePrice,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="productCount != null"> |
|||
product_count = #{productCount,jdbcType=INTEGER}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="cc.hiver.mall.entity.SaleDetail"> |
|||
update t_sale_detail |
|||
set create_by = #{createBy,jdbcType=VARCHAR}, |
|||
create_time = #{createTime,jdbcType=TIMESTAMP}, |
|||
del_flag = #{delFlag,jdbcType=INTEGER}, |
|||
update_by = #{updateBy,jdbcType=VARCHAR}, |
|||
update_time = #{updateTime,jdbcType=TIMESTAMP}, |
|||
sale_id = #{saleId,jdbcType=BIGINT}, |
|||
product_id = #{productId,jdbcType=BIGINT}, |
|||
product_name = #{productName,jdbcType=VARCHAR}, |
|||
unit = #{unit,jdbcType=VARCHAR}, |
|||
shop_id = #{shopId,jdbcType=VARCHAR}, |
|||
category_id = #{categoryId,jdbcType=BIGINT}, |
|||
attribute_list = #{attributeList,jdbcType=VARCHAR}, |
|||
price = #{price,jdbcType=DECIMAL}, |
|||
purchase_price = #{purchasePrice,jdbcType=DECIMAL}, |
|||
wholesale_price = #{wholesalePrice,jdbcType=DECIMAL}, |
|||
product_count = #{productCount,jdbcType=INTEGER} |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
</mapper> |
|||
@ -0,0 +1,465 @@ |
|||
<?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="cc.hiver.mall.dao.mapper.SaleMapper"> |
|||
<resultMap id="BaseResultMap" type="cc.hiver.mall.entity.Sale"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="create_by" jdbcType="VARCHAR" property="createBy" /> |
|||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> |
|||
<result column="del_flag" jdbcType="INTEGER" property="delFlag" /> |
|||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" /> |
|||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> |
|||
<result column="user_id" jdbcType="BIGINT" property="userId" /> |
|||
<result column="shop_id" jdbcType="VARCHAR" property="shopId" /> |
|||
<result column="total_amount" jdbcType="DECIMAL" property="totalAmount" /> |
|||
<result column="discount" jdbcType="DECIMAL" property="discount" /> |
|||
<result column="discount_amount" jdbcType="DECIMAL" property="discountAmount" /> |
|||
<result column="real_amount" jdbcType="DECIMAL" property="realAmount" /> |
|||
<result column="already_earn" jdbcType="DECIMAL" property="alreadyEarn" /> |
|||
<result column="no_earn" jdbcType="DECIMAL" property="noEarn" /> |
|||
<result column="status" jdbcType="VARCHAR" property="status" /> |
|||
<result column="transport_type" jdbcType="VARCHAR" property="transportType" /> |
|||
<result column="share_address" jdbcType="VARCHAR" property="shareAddress" /> |
|||
<result column="receive_address" jdbcType="VARCHAR" property="receiveAddress" /> |
|||
<result column="province" jdbcType="VARCHAR" property="province" /> |
|||
<result column="city" jdbcType="VARCHAR" property="city" /> |
|||
<result column="area" jdbcType="VARCHAR" property="area" /> |
|||
</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, create_by, create_time, del_flag, update_by, update_time, user_id, shop_id, total_amount, |
|||
discount, discount_amount, real_amount, already_earn, no_earn, status, transport_type, |
|||
share_address, receive_address, province, city, area |
|||
</sql> |
|||
<select id="selectByExample" parameterType="cc.hiver.mall.entity.SaleExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_sale |
|||
<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 t_sale |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_sale |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="cc.hiver.mall.entity.SaleExample"> |
|||
delete from t_sale |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="cc.hiver.mall.entity.Sale"> |
|||
insert into t_sale (id, create_by, create_time, |
|||
del_flag, update_by, update_time, |
|||
user_id, shop_id, total_amount, |
|||
discount, discount_amount, real_amount, |
|||
already_earn, no_earn, status, |
|||
transport_type, share_address, receive_address, |
|||
province, city, area |
|||
) |
|||
values (#{id,jdbcType=BIGINT}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, |
|||
#{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, |
|||
#{userId,jdbcType=BIGINT}, #{shopId,jdbcType=VARCHAR}, #{totalAmount,jdbcType=DECIMAL}, |
|||
#{discount,jdbcType=DECIMAL}, #{discountAmount,jdbcType=DECIMAL}, #{realAmount,jdbcType=DECIMAL}, |
|||
#{alreadyEarn,jdbcType=DECIMAL}, #{noEarn,jdbcType=DECIMAL}, #{status,jdbcType=VARCHAR}, |
|||
#{transportType,jdbcType=VARCHAR}, #{shareAddress,jdbcType=VARCHAR}, #{receiveAddress,jdbcType=VARCHAR}, |
|||
#{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, #{area,jdbcType=VARCHAR} |
|||
) |
|||
</insert> |
|||
<insert id="insertSelective" parameterType="cc.hiver.mall.entity.Sale"> |
|||
insert into t_sale |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="createBy != null"> |
|||
create_by, |
|||
</if> |
|||
<if test="createTime != null"> |
|||
create_time, |
|||
</if> |
|||
<if test="delFlag != null"> |
|||
del_flag, |
|||
</if> |
|||
<if test="updateBy != null"> |
|||
update_by, |
|||
</if> |
|||
<if test="updateTime != null"> |
|||
update_time, |
|||
</if> |
|||
<if test="userId != null"> |
|||
user_id, |
|||
</if> |
|||
<if test="shopId != null"> |
|||
shop_id, |
|||
</if> |
|||
<if test="totalAmount != null"> |
|||
total_amount, |
|||
</if> |
|||
<if test="discount != null"> |
|||
discount, |
|||
</if> |
|||
<if test="discountAmount != null"> |
|||
discount_amount, |
|||
</if> |
|||
<if test="realAmount != null"> |
|||
real_amount, |
|||
</if> |
|||
<if test="alreadyEarn != null"> |
|||
already_earn, |
|||
</if> |
|||
<if test="noEarn != null"> |
|||
no_earn, |
|||
</if> |
|||
<if test="status != null"> |
|||
status, |
|||
</if> |
|||
<if test="transportType != null"> |
|||
transport_type, |
|||
</if> |
|||
<if test="shareAddress != null"> |
|||
share_address, |
|||
</if> |
|||
<if test="receiveAddress != null"> |
|||
receive_address, |
|||
</if> |
|||
<if test="province != null"> |
|||
province, |
|||
</if> |
|||
<if test="city != null"> |
|||
city, |
|||
</if> |
|||
<if test="area != null"> |
|||
area, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="createBy != null"> |
|||
#{createBy,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="createTime != null"> |
|||
#{createTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="delFlag != null"> |
|||
#{delFlag,jdbcType=INTEGER}, |
|||
</if> |
|||
<if test="updateBy != null"> |
|||
#{updateBy,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="updateTime != null"> |
|||
#{updateTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="userId != null"> |
|||
#{userId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="shopId != null"> |
|||
#{shopId,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="totalAmount != null"> |
|||
#{totalAmount,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="discount != null"> |
|||
#{discount,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="discountAmount != null"> |
|||
#{discountAmount,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="realAmount != null"> |
|||
#{realAmount,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="alreadyEarn != null"> |
|||
#{alreadyEarn,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="noEarn != null"> |
|||
#{noEarn,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="status != null"> |
|||
#{status,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="transportType != null"> |
|||
#{transportType,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="shareAddress != null"> |
|||
#{shareAddress,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="receiveAddress != null"> |
|||
#{receiveAddress,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="province != null"> |
|||
#{province,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="city != null"> |
|||
#{city,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="area != null"> |
|||
#{area,jdbcType=VARCHAR}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="cc.hiver.mall.entity.SaleExample" resultType="java.lang.Long"> |
|||
select count(*) from t_sale |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_sale |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.createBy != null"> |
|||
create_by = #{record.createBy,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.createTime != null"> |
|||
create_time = #{record.createTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.delFlag != null"> |
|||
del_flag = #{record.delFlag,jdbcType=INTEGER}, |
|||
</if> |
|||
<if test="record.updateBy != null"> |
|||
update_by = #{record.updateBy,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.updateTime != null"> |
|||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.userId != null"> |
|||
user_id = #{record.userId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.shopId != null"> |
|||
shop_id = #{record.shopId,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.totalAmount != null"> |
|||
total_amount = #{record.totalAmount,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="record.discount != null"> |
|||
discount = #{record.discount,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="record.discountAmount != null"> |
|||
discount_amount = #{record.discountAmount,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="record.realAmount != null"> |
|||
real_amount = #{record.realAmount,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="record.alreadyEarn != null"> |
|||
already_earn = #{record.alreadyEarn,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="record.noEarn != null"> |
|||
no_earn = #{record.noEarn,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="record.status != null"> |
|||
status = #{record.status,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.transportType != null"> |
|||
transport_type = #{record.transportType,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.shareAddress != null"> |
|||
share_address = #{record.shareAddress,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.receiveAddress != null"> |
|||
receive_address = #{record.receiveAddress,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.province != null"> |
|||
province = #{record.province,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.city != null"> |
|||
city = #{record.city,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.area != null"> |
|||
area = #{record.area,jdbcType=VARCHAR}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
update t_sale |
|||
set id = #{record.id,jdbcType=BIGINT}, |
|||
create_by = #{record.createBy,jdbcType=VARCHAR}, |
|||
create_time = #{record.createTime,jdbcType=TIMESTAMP}, |
|||
del_flag = #{record.delFlag,jdbcType=INTEGER}, |
|||
update_by = #{record.updateBy,jdbcType=VARCHAR}, |
|||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, |
|||
user_id = #{record.userId,jdbcType=BIGINT}, |
|||
shop_id = #{record.shopId,jdbcType=VARCHAR}, |
|||
total_amount = #{record.totalAmount,jdbcType=DECIMAL}, |
|||
discount = #{record.discount,jdbcType=DECIMAL}, |
|||
discount_amount = #{record.discountAmount,jdbcType=DECIMAL}, |
|||
real_amount = #{record.realAmount,jdbcType=DECIMAL}, |
|||
already_earn = #{record.alreadyEarn,jdbcType=DECIMAL}, |
|||
no_earn = #{record.noEarn,jdbcType=DECIMAL}, |
|||
status = #{record.status,jdbcType=VARCHAR}, |
|||
transport_type = #{record.transportType,jdbcType=VARCHAR}, |
|||
share_address = #{record.shareAddress,jdbcType=VARCHAR}, |
|||
receive_address = #{record.receiveAddress,jdbcType=VARCHAR}, |
|||
province = #{record.province,jdbcType=VARCHAR}, |
|||
city = #{record.city,jdbcType=VARCHAR}, |
|||
area = #{record.area,jdbcType=VARCHAR} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="cc.hiver.mall.entity.Sale"> |
|||
update t_sale |
|||
<set> |
|||
<if test="createBy != null"> |
|||
create_by = #{createBy,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="createTime != null"> |
|||
create_time = #{createTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="delFlag != null"> |
|||
del_flag = #{delFlag,jdbcType=INTEGER}, |
|||
</if> |
|||
<if test="updateBy != null"> |
|||
update_by = #{updateBy,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="updateTime != null"> |
|||
update_time = #{updateTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="userId != null"> |
|||
user_id = #{userId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="shopId != null"> |
|||
shop_id = #{shopId,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="totalAmount != null"> |
|||
total_amount = #{totalAmount,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="discount != null"> |
|||
discount = #{discount,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="discountAmount != null"> |
|||
discount_amount = #{discountAmount,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="realAmount != null"> |
|||
real_amount = #{realAmount,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="alreadyEarn != null"> |
|||
already_earn = #{alreadyEarn,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="noEarn != null"> |
|||
no_earn = #{noEarn,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="status != null"> |
|||
status = #{status,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="transportType != null"> |
|||
transport_type = #{transportType,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="shareAddress != null"> |
|||
share_address = #{shareAddress,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="receiveAddress != null"> |
|||
receive_address = #{receiveAddress,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="province != null"> |
|||
province = #{province,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="city != null"> |
|||
city = #{city,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="area != null"> |
|||
area = #{area,jdbcType=VARCHAR}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="cc.hiver.mall.entity.Sale"> |
|||
update t_sale |
|||
set create_by = #{createBy,jdbcType=VARCHAR}, |
|||
create_time = #{createTime,jdbcType=TIMESTAMP}, |
|||
del_flag = #{delFlag,jdbcType=INTEGER}, |
|||
update_by = #{updateBy,jdbcType=VARCHAR}, |
|||
update_time = #{updateTime,jdbcType=TIMESTAMP}, |
|||
user_id = #{userId,jdbcType=BIGINT}, |
|||
shop_id = #{shopId,jdbcType=VARCHAR}, |
|||
total_amount = #{totalAmount,jdbcType=DECIMAL}, |
|||
discount = #{discount,jdbcType=DECIMAL}, |
|||
discount_amount = #{discountAmount,jdbcType=DECIMAL}, |
|||
real_amount = #{realAmount,jdbcType=DECIMAL}, |
|||
already_earn = #{alreadyEarn,jdbcType=DECIMAL}, |
|||
no_earn = #{noEarn,jdbcType=DECIMAL}, |
|||
status = #{status,jdbcType=VARCHAR}, |
|||
transport_type = #{transportType,jdbcType=VARCHAR}, |
|||
share_address = #{shareAddress,jdbcType=VARCHAR}, |
|||
receive_address = #{receiveAddress,jdbcType=VARCHAR}, |
|||
province = #{province,jdbcType=VARCHAR}, |
|||
city = #{city,jdbcType=VARCHAR}, |
|||
area = #{area,jdbcType=VARCHAR} |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
</mapper> |
|||
Loading…
Reference in new issue