商品多余字段删除
This commit is contained in:
parent
be8c796254
commit
5bf6bc4fed
|
|
@ -1,45 +1,26 @@
|
|||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbProduct;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs;
|
||||
import com.chaozhanggui.system.cashierservice.entity.po.ProConsSkuInfo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TbProductMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(TbProductWithBLOBs record);
|
||||
|
||||
int insertSelective(TbProductWithBLOBs record);
|
||||
|
||||
TbProductWithBLOBs selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(TbProductWithBLOBs record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(TbProductWithBLOBs record);
|
||||
|
||||
int updateByPrimaryKey(TbProduct record);
|
||||
|
||||
|
||||
List<TbProductWithBLOBs> selectByShopId(@Param("shopId") String shopId,@Param("commdityName") String commdityName);
|
||||
List<TbProductWithBLOBs> selectByShopIdAndCheckGrounding(@Param("shopId") String shopId,@Param("commdityName") String commdityName);
|
||||
|
||||
|
||||
|
||||
List<TbProductWithBLOBs> selectByShopIdAndShopType(@Param("shopId") String shopId, @Param("categoryId") String categoryId,@Param("commdityName") String commdityName);
|
||||
List<TbProductWithBLOBs> selectByShopIdAndShopTypeCheckGrounding(@Param("shopId") String shopId, @Param("categoryId") String categoryId,@Param("commdityName") String commdityName);
|
||||
List<TbProductWithBLOBs> selectByShopIdAndShopTypeUnGrounding(@Param("shopId") String shopId,@Param("commdityName") String commdityName);
|
||||
TbProduct selectByPrimaryKey(Integer id);
|
||||
|
||||
List<TbProduct> selectByShopId(@Param("shopId") String shopId,@Param("commdityName") String commdityName);
|
||||
List<TbProduct> selectByShopIdAndCheckGrounding(@Param("shopId") String shopId,@Param("commdityName") String commdityName);
|
||||
|
||||
List<TbProduct> selectByShopIdAndShopType(@Param("shopId") String shopId, @Param("categoryId") String categoryId,@Param("commdityName") String commdityName);
|
||||
List<TbProduct> selectByShopIdAndShopTypeCheckGrounding(@Param("shopId") String shopId, @Param("categoryId") String categoryId,@Param("commdityName") String commdityName);
|
||||
List<TbProduct> selectByShopIdAndShopTypeUnGrounding(@Param("shopId") String shopId,@Param("commdityName") String commdityName);
|
||||
|
||||
Integer countOrderByshopIdAndProductId(@Param("shopId") String shopId, @Param("productId") String productId, @Param("masterId") String masterId,@Param("day") String day, @Param("tableId") String tableId);
|
||||
|
||||
@Update("update tb_product set stock_number = stock_number - #{num,jdbcType=INTEGER} where id = #{productId}")
|
||||
void updateStockById(@Param("productId")Integer productId, @Param("num")Integer num);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,154 +1,160 @@
|
|||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import lombok.Data;
|
||||
import org.springframework.data.annotation.Transient;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class TbProduct implements Serializable {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 商品分类
|
||||
*/
|
||||
private String categoryId;
|
||||
|
||||
/**
|
||||
* 商品规格
|
||||
*/
|
||||
private Integer specId;
|
||||
|
||||
private String sourcePath;
|
||||
|
||||
private Integer brandId;
|
||||
|
||||
/**
|
||||
* 商户Id
|
||||
*/
|
||||
private String merchantId;
|
||||
|
||||
private String shopId;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 短标题--促销语
|
||||
*/
|
||||
private String shortTitle;
|
||||
|
||||
/**
|
||||
* 商品类型(属性):REAL- 实物商品 VIR---虚拟商品
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 包装费
|
||||
*/
|
||||
private BigDecimal packFee;
|
||||
|
||||
/**
|
||||
* 商品最低价
|
||||
*/
|
||||
private BigDecimal lowPrice;
|
||||
|
||||
private BigDecimal lowMemberPrice;
|
||||
|
||||
private String unitId;
|
||||
|
||||
private String unitSnap;
|
||||
|
||||
private String coverImg;
|
||||
|
||||
private String shareImg;
|
||||
|
||||
private String videoCoverImg;
|
||||
|
||||
private Integer sort;
|
||||
|
||||
private Integer limitNumber;
|
||||
|
||||
private Integer productScore;
|
||||
|
||||
private Byte status;
|
||||
|
||||
private String failMsg;
|
||||
|
||||
private Byte isRecommend;
|
||||
|
||||
private Byte isHot;
|
||||
|
||||
private Byte isNew;
|
||||
|
||||
private Byte isOnSale;
|
||||
|
||||
private Byte isShow;
|
||||
|
||||
private String typeEnum;
|
||||
|
||||
/**
|
||||
* 是否共享库存
|
||||
* 单位Id
|
||||
*/
|
||||
private Byte isDistribute;
|
||||
|
||||
private Byte isDel;
|
||||
|
||||
private Byte isStock;
|
||||
|
||||
private Byte isPauseSale;
|
||||
|
||||
private Byte isFreeFreight;
|
||||
|
||||
private Long freightId;
|
||||
|
||||
private String strategyType;
|
||||
|
||||
private Integer strategyId;
|
||||
|
||||
private Byte isVip;
|
||||
|
||||
private Byte isDelete;
|
||||
private Integer unitId;
|
||||
private String unitSnap;
|
||||
/**
|
||||
* 商品封面图
|
||||
*/
|
||||
private String coverImg;
|
||||
/**
|
||||
* 商品图片(第一张为缩略图,其他为详情)
|
||||
*/
|
||||
private String images;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
/**
|
||||
* 0--待审核 1审核通过 -1审核失败 -2违规下架
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 审核失败原因
|
||||
*/
|
||||
private String failMsg;
|
||||
/**
|
||||
* 是否热销
|
||||
*/
|
||||
private Integer isHot;
|
||||
/**
|
||||
* 计量商品 normal
|
||||
* 称重商品 weight
|
||||
* 多规格商品 sku
|
||||
* 套餐商品 group
|
||||
* 时价商品 currentPrice
|
||||
*/
|
||||
private String typeEnum;
|
||||
/**
|
||||
* 是否回收站 0-否,1回收站
|
||||
*/
|
||||
private Integer isDel;
|
||||
/**
|
||||
* 是否开启库存
|
||||
*/
|
||||
private Integer isStock;
|
||||
/**
|
||||
* 是否暂停销售
|
||||
*/
|
||||
private Integer isPauseSale;
|
||||
/**
|
||||
* 是否删除0不删1删除
|
||||
*/
|
||||
private Integer isDelete;
|
||||
|
||||
private Long createdAt;
|
||||
|
||||
private Long updatedAt;
|
||||
|
||||
private Double baseSalesNumber;
|
||||
|
||||
private Integer realSalesNumber;
|
||||
|
||||
private Integer salesNumber;
|
||||
|
||||
private Integer thumbCount;
|
||||
|
||||
private Integer storeCount;
|
||||
|
||||
private Integer furnishMeal;
|
||||
|
||||
private Integer furnishExpress;
|
||||
|
||||
private Integer furnishDraw;
|
||||
|
||||
private Integer furnishVir;
|
||||
|
||||
private Byte isCombo;
|
||||
|
||||
private Byte isShowCash;
|
||||
|
||||
private Byte isShowMall;
|
||||
|
||||
private Byte isNeedExamine;
|
||||
|
||||
private Byte showOnMallStatus;
|
||||
|
||||
private Long showOnMallTime;
|
||||
|
||||
private String showOnMallErrorMsg;
|
||||
|
||||
private Byte enableLabel;
|
||||
|
||||
private String taxConfigId;
|
||||
|
||||
/**
|
||||
* 套餐内容
|
||||
*/
|
||||
private String groupSnap;
|
||||
/**
|
||||
* 规格详情
|
||||
*/
|
||||
private String specInfo;
|
||||
/**
|
||||
* 已选择的规格
|
||||
*/
|
||||
private String selectSpec;
|
||||
/**
|
||||
* 已选规格表格头部
|
||||
*/
|
||||
private String specTableHeaders;
|
||||
|
||||
/**
|
||||
* 团购卷分类,可有多个分类
|
||||
*/
|
||||
private String groupCategoryId;
|
||||
/**
|
||||
* 销量
|
||||
*/
|
||||
private Integer realSalesNumber;
|
||||
/**
|
||||
* 商品级库存数量
|
||||
*/
|
||||
private Integer stockNumber;
|
||||
/**
|
||||
* 是否上架
|
||||
*/
|
||||
private Integer isGrounding;
|
||||
/**
|
||||
* 退款是否退回库存
|
||||
*/
|
||||
private Integer isRefundStock;
|
||||
/**
|
||||
* 库存警戒线
|
||||
*/
|
||||
private Integer warnLine;
|
||||
|
||||
private Integer warnLine = 0;
|
||||
|
||||
@Transient
|
||||
@TableField(exist = false)
|
||||
private int orderCount;
|
||||
|
||||
|
||||
@Transient
|
||||
@TableField(exist = false)
|
||||
private TbProductSpec tbProductSpec;
|
||||
|
||||
@Transient
|
||||
@TableField(exist = false)
|
||||
private TbProductSkuResult productSkuResult;
|
||||
|
||||
private Object groundingSpecInfo;
|
||||
private List<?> skuList;
|
||||
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ public class TbProductStockDetail implements Serializable {
|
|||
|
||||
private String productName;
|
||||
|
||||
private Byte isStock;
|
||||
private Integer isStock;
|
||||
|
||||
private String specSnap;
|
||||
|
||||
|
|
@ -90,11 +90,11 @@ public class TbProductStockDetail implements Serializable {
|
|||
this.productName = productName == null ? null : productName.trim();
|
||||
}
|
||||
|
||||
public Byte getIsStock() {
|
||||
public Integer getIsStock() {
|
||||
return isStock;
|
||||
}
|
||||
|
||||
public void setIsStock(Byte isStock) {
|
||||
public void setIsStock(Integer isStock) {
|
||||
this.isStock = isStock;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,58 +0,0 @@
|
|||
package com.chaozhanggui.system.cashierservice.entity;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
public class TbProductWithBLOBs extends TbProduct implements Serializable {
|
||||
private Object groundingSpecInfo;
|
||||
private String images;
|
||||
|
||||
private String video;
|
||||
|
||||
private String notice;
|
||||
|
||||
private String groupSnap;
|
||||
|
||||
private String specInfo;
|
||||
|
||||
private String selectSpec;
|
||||
|
||||
private List<?> skuList;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public void setGroundingSpecInfo(Object groundingSpecInfo) {
|
||||
this.groundingSpecInfo = groundingSpecInfo;
|
||||
}
|
||||
|
||||
public void setSkuList(List<?> skuList) {
|
||||
this.skuList = skuList;
|
||||
}
|
||||
|
||||
public void setImages(String images) {
|
||||
this.images = images == null ? null : images.trim();
|
||||
}
|
||||
|
||||
public void setVideo(String video) {
|
||||
this.video = video == null ? null : video.trim();
|
||||
}
|
||||
|
||||
public void setNotice(String notice) {
|
||||
this.notice = notice == null ? null : notice.trim();
|
||||
}
|
||||
|
||||
public void setGroupSnap(String groupSnap) {
|
||||
this.groupSnap = groupSnap == null ? null : groupSnap.trim();
|
||||
}
|
||||
|
||||
public void setSpecInfo(String specInfo) {
|
||||
this.specInfo = specInfo == null ? null : specInfo.trim();
|
||||
}
|
||||
|
||||
public void setSelectSpec(String selectSpec) {
|
||||
this.selectSpec = selectSpec == null ? null : selectSpec.trim();
|
||||
}
|
||||
}
|
||||
|
|
@ -108,7 +108,7 @@ public class ConsMsgConsumer {
|
|||
return;
|
||||
}
|
||||
|
||||
TbProductWithBLOBs product = tbProductMapper.selectByPrimaryKey(Integer.valueOf(skuWithBLOBs.getProductId()));
|
||||
TbProduct product = tbProductMapper.selectByPrimaryKey(Integer.valueOf(skuWithBLOBs.getProductId()));
|
||||
if (Objects.isNull(product)) {
|
||||
log.info("商品信息不存在");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -386,7 +386,7 @@ public class DutyService {
|
|||
if (tbProductSku == null) {
|
||||
return;
|
||||
}
|
||||
TbProductWithBLOBs product = productMapper.selectByPrimaryKey(Integer.valueOf(tbProductSku.getProductId()));
|
||||
TbProduct product = productMapper.selectByPrimaryKey(Integer.valueOf(tbProductSku.getProductId()));
|
||||
|
||||
|
||||
if (ObjectUtil.isNotEmpty(product)) {
|
||||
|
|
|
|||
|
|
@ -601,7 +601,7 @@ public class OrderService {
|
|||
if (Objects.nonNull(skuWithBLOBs)) {
|
||||
cashierCart.setSkuName(skuWithBLOBs.getSpecSnap());
|
||||
}
|
||||
TbProductWithBLOBs tbProduct = tbProductMapper.selectByPrimaryKey(Integer.valueOf(cashierCart.getProductId()));
|
||||
TbProduct tbProduct = tbProductMapper.selectByPrimaryKey(Integer.valueOf(cashierCart.getProductId()));
|
||||
if (Objects.nonNull(tbProduct)) {
|
||||
cashierCart.setSelectSpec(tbProduct.getSelectSpec());
|
||||
if (tbProduct.getSpecId() != null) {
|
||||
|
|
@ -643,7 +643,7 @@ public class OrderService {
|
|||
return Result.success(CodeEnum.SUCCESS, returnCart(dto));
|
||||
}
|
||||
|
||||
TbProductWithBLOBs product = tbProductMapper.selectByPrimaryKey(Integer.valueOf(cashierCart.getProductId()));
|
||||
TbProduct product = tbProductMapper.selectByPrimaryKey(Integer.valueOf(cashierCart.getProductId()));
|
||||
if (ObjectUtil.isEmpty(product)) {
|
||||
return Result.fail(CodeEnum.PRODUCTINFOERROR);
|
||||
}
|
||||
|
|
@ -901,7 +901,7 @@ public class OrderService {
|
|||
orderDetail.setPlaceNum(currentPlaceNum);
|
||||
}
|
||||
|
||||
TbProductWithBLOBs product = tbProductMapper.selectByPrimaryKey(Integer.valueOf(cashierCart.getProductId()));
|
||||
TbProduct product = tbProductMapper.selectByPrimaryKey(Integer.valueOf(cashierCart.getProductId()));
|
||||
if ("takeaway".equals(orderVo.getSendType()) || "takeself".equals(orderVo.getSendType())) {
|
||||
if (Objects.nonNull(product.getPackFee())) {
|
||||
packAMount = packAMount.add(product.getPackFee());
|
||||
|
|
@ -1269,7 +1269,7 @@ public class OrderService {
|
|||
}
|
||||
List<TbCashierCart> list = cashierCartMapper.selectAllByMarketId(day, String.valueOf(cartVo.getShopId()), cartVo.getMasterId());
|
||||
for (TbCashierCart cashierCart : list) {
|
||||
TbProductWithBLOBs product = tbProductMapper.selectByPrimaryKey(Integer.valueOf(cashierCart.getProductId()));
|
||||
TbProduct product = tbProductMapper.selectByPrimaryKey(Integer.valueOf(cashierCart.getProductId()));
|
||||
if ("true".equals(cartVo.getStatus())) {
|
||||
cashierCart.setTotalAmount(new BigDecimal(cashierCart.getTotalNumber()).multiply(cashierCart.getSalePrice().add(product.getPackFee())));
|
||||
cashierCart.setPackFee(new BigDecimal(cashierCart.getTotalNumber()).multiply(product.getPackFee()));
|
||||
|
|
|
|||
|
|
@ -1424,7 +1424,7 @@ public class PayService {
|
|||
detail = tbOrderDetailMapper.selectByPrimaryKey(detail.getId());
|
||||
|
||||
TbProductSku productSku = productSkuMapper.selectByPrimaryKey(detail.getProductSkuId());
|
||||
TbProductWithBLOBs product = productMapper.selectByPrimaryKey(detail.getProductId());
|
||||
TbProduct product = productMapper.selectByPrimaryKey(detail.getProductId());
|
||||
|
||||
TbProductStockDetail tbProductStockDetail = new TbProductStockDetail();
|
||||
tbProductStockDetail.setCreatedAt(System.currentTimeMillis());
|
||||
|
|
|
|||
|
|
@ -71,16 +71,16 @@ public class ProductService {
|
|||
|
||||
|
||||
public Result queryCommodityInfo(String shopId, String categoryId, String commdityName, Integer page, Integer pageSize, String masterId){
|
||||
List<TbProductWithBLOBs> tbProductWithBLOBs=null;
|
||||
List<TbProduct> TbProduct=null;
|
||||
if(ObjectUtil.isEmpty(categoryId)){
|
||||
tbProductWithBLOBs=tbProductMapper.selectByShopId(shopId,commdityName);
|
||||
TbProduct=tbProductMapper.selectByShopId(shopId,commdityName);
|
||||
}else {
|
||||
tbProductWithBLOBs=tbProductMapper.selectByShopIdAndShopType(shopId,categoryId,commdityName);
|
||||
TbProduct=tbProductMapper.selectByShopIdAndShopType(shopId,categoryId,commdityName);
|
||||
}
|
||||
|
||||
String day = DateUtils.getDay();
|
||||
if(ObjectUtil.isNotEmpty(tbProductWithBLOBs)){
|
||||
tbProductWithBLOBs.parallelStream().forEach(it->{
|
||||
if(ObjectUtil.isNotEmpty(TbProduct)){
|
||||
TbProduct.parallelStream().forEach(it->{
|
||||
Integer orderCount=tbProductMapper.countOrderByshopIdAndProductId(it.getShopId(),it.getId().toString(),masterId,day, "");
|
||||
it.setOrderCount((ObjectUtil.isNull(orderCount)||ObjectUtil.isEmpty(orderCount))?0:orderCount);
|
||||
TbProductSpec tbProductSpec= tbProductSpecMapper.selectByPrimaryKey(it.getSpecId());
|
||||
|
|
@ -96,7 +96,7 @@ public class ProductService {
|
|||
it.setProductSkuResult(skuResult);
|
||||
});
|
||||
}
|
||||
return Result.success(CodeEnum.SUCCESS,tbProductWithBLOBs);
|
||||
return Result.success(CodeEnum.SUCCESS,TbProduct);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -111,21 +111,21 @@ public class ProductService {
|
|||
}
|
||||
|
||||
public Result queryNewCommodityInfo(String shopId, String categoryId, String commdityName, String tableId, int page, int pageSize, String masterId) {
|
||||
List<TbProductWithBLOBs> tbProductWithBLOBs=null;
|
||||
List<TbProduct> tbProducts=null;
|
||||
PageHelperUtil.startPage(page,pageSize);
|
||||
if(ObjectUtil.isEmpty(categoryId)){
|
||||
tbProductWithBLOBs=tbProductMapper.selectByShopIdAndCheckGrounding(shopId,commdityName);
|
||||
tbProducts=tbProductMapper.selectByShopIdAndCheckGrounding(shopId,commdityName);
|
||||
}else {
|
||||
if (Integer.valueOf(categoryId).equals(-1)) {
|
||||
tbProductWithBLOBs = tbProductMapper.selectByShopIdAndShopTypeUnGrounding(shopId,commdityName);
|
||||
tbProducts = tbProductMapper.selectByShopIdAndShopTypeUnGrounding(shopId,commdityName);
|
||||
}else {
|
||||
tbProductWithBLOBs=tbProductMapper.selectByShopIdAndShopTypeCheckGrounding(shopId,categoryId,commdityName);
|
||||
tbProducts=tbProductMapper.selectByShopIdAndShopTypeCheckGrounding(shopId,categoryId,commdityName);
|
||||
}
|
||||
}
|
||||
|
||||
String day = DateUtils.getDay();
|
||||
if(ObjectUtil.isNotEmpty(tbProductWithBLOBs)){
|
||||
tbProductWithBLOBs.parallelStream().forEach(it->{
|
||||
if(ObjectUtil.isNotEmpty(tbProducts)){
|
||||
tbProducts.parallelStream().forEach(it->{
|
||||
Integer orderCount=tbProductMapper.countOrderByshopIdAndProductId(it.getShopId(),it.getId().toString(),masterId,day, tableId);
|
||||
it.setOrderCount((ObjectUtil.isNull(orderCount)||ObjectUtil.isEmpty(orderCount))?0:orderCount);
|
||||
TbProductSpec tbProductSpec= tbProductSpecMapper.selectByPrimaryKey(it.getSpecId());
|
||||
|
|
@ -143,7 +143,7 @@ public class ProductService {
|
|||
it.setGroundingSpecInfo(querySpec(Integer.valueOf(shopId), it.getId()));
|
||||
});
|
||||
}
|
||||
PageInfo pageInfo=new PageInfo(tbProductWithBLOBs);
|
||||
PageInfo pageInfo=new PageInfo(tbProducts);
|
||||
return Result.success(CodeEnum.SUCCESS,pageInfo);
|
||||
}
|
||||
|
||||
|
|
@ -152,7 +152,7 @@ public class ProductService {
|
|||
}
|
||||
|
||||
public void decrStock(String productId, String skuId, int decrNum) {
|
||||
TbProductWithBLOBs product = tbProductMapper.selectByPrimaryKey(Integer.valueOf(productId));
|
||||
TbProduct product = tbProductMapper.selectByPrimaryKey(Integer.valueOf(productId));
|
||||
if (product.getIsStock() == 1) {
|
||||
if (tbProductMapper.decrStock(productId, decrNum) < 1) {
|
||||
throw new MsgException("库存不足,下单失败");
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public class TbGroupOrderInfoService {
|
|||
*/
|
||||
public Result queryById(Integer id) {
|
||||
TbGroupOrderInfo tbGroupOrderInfo = tbGroupOrderInfoMapper.queryById(id);
|
||||
TbProductWithBLOBs tbProduct = productMapper.selectByPrimaryKey(tbGroupOrderInfo.getProId());
|
||||
TbProduct tbProduct = productMapper.selectByPrimaryKey(tbGroupOrderInfo.getProId());
|
||||
TbProductSkuWithBLOBs tbProductSku = skuMapper.selectByProduct(tbGroupOrderInfo.getProId());
|
||||
|
||||
GroupOrderInfoVo productInfo = new GroupOrderInfoVo();
|
||||
|
|
|
|||
|
|
@ -1,913 +1,55 @@
|
|||
<?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.chaozhanggui.system.cashierservice.dao.TbProductMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbProduct">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="category_id" jdbcType="VARCHAR" property="categoryId" />
|
||||
<result column="spec_id" jdbcType="INTEGER" property="specId" />
|
||||
<result column="source_path" jdbcType="VARCHAR" property="sourcePath" />
|
||||
<result column="brand_id" jdbcType="INTEGER" property="brandId" />
|
||||
<result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
|
||||
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="short_title" jdbcType="VARCHAR" property="shortTitle" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="pack_fee" jdbcType="DECIMAL" property="packFee" />
|
||||
<result column="low_price" jdbcType="DECIMAL" property="lowPrice" />
|
||||
<result column="low_member_price" jdbcType="DECIMAL" property="lowMemberPrice" />
|
||||
<result column="unit_id" jdbcType="VARCHAR" property="unitId" />
|
||||
<result column="unit_snap" jdbcType="VARCHAR" property="unitSnap" />
|
||||
<result column="cover_img" jdbcType="VARCHAR" property="coverImg" />
|
||||
<result column="share_img" jdbcType="VARCHAR" property="shareImg" />
|
||||
<result column="video_cover_img" jdbcType="VARCHAR" property="videoCoverImg" />
|
||||
<result column="sort" jdbcType="INTEGER" property="sort" />
|
||||
<result column="limit_number" jdbcType="INTEGER" property="limitNumber" />
|
||||
<result column="product_score" jdbcType="INTEGER" property="productScore" />
|
||||
<result column="status" jdbcType="TINYINT" property="status" />
|
||||
<result column="fail_msg" jdbcType="VARCHAR" property="failMsg" />
|
||||
<result column="is_recommend" jdbcType="TINYINT" property="isRecommend" />
|
||||
<result column="is_hot" jdbcType="TINYINT" property="isHot" />
|
||||
<result column="is_new" jdbcType="TINYINT" property="isNew" />
|
||||
<result column="is_on_sale" jdbcType="TINYINT" property="isOnSale" />
|
||||
<result column="is_show" jdbcType="TINYINT" property="isShow" />
|
||||
<result column="type_enum" jdbcType="VARCHAR" property="typeEnum" />
|
||||
<result column="is_distribute" jdbcType="TINYINT" property="isDistribute" />
|
||||
<result column="is_del" jdbcType="TINYINT" property="isDel" />
|
||||
<result column="is_stock" jdbcType="TINYINT" property="isStock" />
|
||||
<result column="is_pause_sale" jdbcType="TINYINT" property="isPauseSale" />
|
||||
<result column="is_free_freight" jdbcType="TINYINT" property="isFreeFreight" />
|
||||
<result column="freight_id" jdbcType="BIGINT" property="freightId" />
|
||||
<result column="strategy_type" jdbcType="VARCHAR" property="strategyType" />
|
||||
<result column="strategy_id" jdbcType="INTEGER" property="strategyId" />
|
||||
<result column="is_vip" jdbcType="TINYINT" property="isVip" />
|
||||
<result column="is_delete" jdbcType="TINYINT" property="isDelete" />
|
||||
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
|
||||
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
|
||||
<result column="base_sales_number" jdbcType="DOUBLE" property="baseSalesNumber" />
|
||||
<result column="real_sales_number" jdbcType="INTEGER" property="realSalesNumber" />
|
||||
<result column="sales_number" jdbcType="INTEGER" property="salesNumber" />
|
||||
<result column="thumb_count" jdbcType="INTEGER" property="thumbCount" />
|
||||
<result column="store_count" jdbcType="INTEGER" property="storeCount" />
|
||||
<result column="furnish_meal" jdbcType="INTEGER" property="furnishMeal" />
|
||||
<result column="furnish_express" jdbcType="INTEGER" property="furnishExpress" />
|
||||
<result column="furnish_draw" jdbcType="INTEGER" property="furnishDraw" />
|
||||
<result column="furnish_vir" jdbcType="INTEGER" property="furnishVir" />
|
||||
<result column="is_combo" jdbcType="TINYINT" property="isCombo" />
|
||||
<result column="is_show_cash" jdbcType="TINYINT" property="isShowCash" />
|
||||
<result column="is_show_mall" jdbcType="TINYINT" property="isShowMall" />
|
||||
<result column="is_need_examine" jdbcType="TINYINT" property="isNeedExamine" />
|
||||
<result column="show_on_mall_status" jdbcType="TINYINT" property="showOnMallStatus" />
|
||||
<result column="show_on_mall_time" jdbcType="BIGINT" property="showOnMallTime" />
|
||||
<result column="show_on_mall_error_msg" jdbcType="VARCHAR" property="showOnMallErrorMsg" />
|
||||
<result column="enable_label" jdbcType="TINYINT" property="enableLabel" />
|
||||
<result column="tax_config_id" jdbcType="VARCHAR" property="taxConfigId" />
|
||||
<result column="spec_table_headers" jdbcType="VARCHAR" property="specTableHeaders" />
|
||||
<result column="stock_number" jdbcType="INTEGER" property="stockNumber" />
|
||||
<result column="warn_line" jdbcType="INTEGER" property="warnLine" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
|
||||
<result column="images" jdbcType="LONGVARCHAR" property="images" />
|
||||
<result column="video" jdbcType="LONGVARCHAR" property="video" />
|
||||
<result column="notice" jdbcType="LONGVARCHAR" property="notice" />
|
||||
<result column="group_snap" jdbcType="LONGVARCHAR" property="groupSnap" />
|
||||
<result column="spec_info" jdbcType="LONGVARCHAR" property="specInfo" />
|
||||
<result column="select_spec" jdbcType="LONGVARCHAR" property="selectSpec" />
|
||||
<resultMap type="com.chaozhanggui.system.cashierservice.entity.TbProduct" id="BaseResultMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="categoryId" column="category_id" jdbcType="VARCHAR"/>
|
||||
<result property="specId" column="spec_id" jdbcType="INTEGER"/>
|
||||
<result property="merchantId" column="merchant_id" jdbcType="VARCHAR"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="VARCHAR"/>
|
||||
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||
<result property="shortTitle" column="short_title" jdbcType="VARCHAR"/>
|
||||
<result property="type" column="type" jdbcType="VARCHAR"/>
|
||||
<result property="packFee" column="pack_fee" jdbcType="DECIMAL"/>
|
||||
<result property="lowPrice" column="low_price" jdbcType="DECIMAL"/>
|
||||
<result property="lowMemberPrice" column="low_member_price" jdbcType="DECIMAL"/>
|
||||
<result property="unitId" column="unit_id" jdbcType="INTEGER"/>
|
||||
<result property="coverImg" column="cover_img" jdbcType="VARCHAR"/>
|
||||
<result property="images" column="images" jdbcType="VARCHAR"/>
|
||||
<result property="sort" column="sort" jdbcType="INTEGER"/>
|
||||
<result property="status" column="status" jdbcType="INTEGER"/>
|
||||
<result property="failMsg" column="fail_msg" jdbcType="VARCHAR"/>
|
||||
<result property="isHot" column="is_hot" jdbcType="INTEGER"/>
|
||||
<result property="typeEnum" column="type_enum" jdbcType="VARCHAR"/>
|
||||
<result property="isDel" column="is_del" jdbcType="INTEGER"/>
|
||||
<result property="isStock" column="is_stock" jdbcType="INTEGER"/>
|
||||
<result property="isPauseSale" column="is_pause_sale" jdbcType="INTEGER"/>
|
||||
<result property="isDelete" column="is_delete" jdbcType="INTEGER"/>
|
||||
<result property="createdAt" column="created_at" jdbcType="INTEGER"/>
|
||||
<result property="updatedAt" column="updated_at" jdbcType="INTEGER"/>
|
||||
<result property="specTableHeaders" column="spec_table_headers" jdbcType="VARCHAR"/>
|
||||
<result property="realSalesNumber" column="real_sales_number" jdbcType="INTEGER"/>
|
||||
<result property="stockNumber" column="stock_number" jdbcType="INTEGER"/>
|
||||
<result property="isGrounding" column="is_grounding" jdbcType="INTEGER"/>
|
||||
<result property="isRefundStock" column="is_refund_stock" jdbcType="INTEGER"/>
|
||||
<result property="warnLine" column="warn_line" jdbcType="INTEGER"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, category_id, spec_id, source_path, brand_id, merchant_id, shop_id, name, short_title,
|
||||
type, pack_fee, low_price, low_member_price, unit_id, unit_snap, cover_img, share_img,
|
||||
video_cover_img, sort, limit_number, product_score, status, fail_msg, is_recommend,
|
||||
is_hot, is_new, is_on_sale, is_show, type_enum, is_distribute, is_del, is_stock,
|
||||
is_pause_sale, is_free_freight, freight_id, strategy_type, strategy_id, is_vip, is_delete,
|
||||
created_at, updated_at, base_sales_number, real_sales_number, sales_number, thumb_count,
|
||||
store_count, furnish_meal, furnish_express, furnish_draw, furnish_vir, is_combo,
|
||||
is_show_cash, is_show_mall, is_need_examine, show_on_mall_status, show_on_mall_time,
|
||||
show_on_mall_error_msg, enable_label, tax_config_id, spec_table_headers, stock_number,warn_line
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
images, video, notice, group_snap, spec_info, select_spec
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
|
||||
id
|
||||
, category_id, spec_id, merchant_id, shop_id, name, short_title, type, pack_fee, low_price, low_member_price,
|
||||
unit_id, cover_img, images, sort, status, fail_msg, is_hot, type_enum, is_del, is_stock, is_pause_sale, is_delete,
|
||||
created_at, updated_at, group_snap, spec_info, select_spec,
|
||||
spec_table_headers, group_category_id, real_sales_number, stock_number, is_grounding, is_refund_stock, warn_line </sql>
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from tb_product
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tb_product
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
|
||||
insert into tb_product (id, category_id, spec_id,
|
||||
source_path, brand_id, merchant_id,
|
||||
shop_id, name, short_title,
|
||||
type, pack_fee, low_price,
|
||||
low_member_price, unit_id, unit_snap,
|
||||
cover_img, share_img, video_cover_img,
|
||||
sort, limit_number, product_score,
|
||||
status, fail_msg, is_recommend,
|
||||
is_hot, is_new, is_on_sale,
|
||||
is_show, type_enum, is_distribute,
|
||||
is_del, is_stock, is_pause_sale,
|
||||
is_free_freight, freight_id, strategy_type,
|
||||
strategy_id, is_vip, is_delete,
|
||||
created_at, updated_at, base_sales_number,
|
||||
real_sales_number, sales_number, thumb_count,
|
||||
store_count, furnish_meal, furnish_express,
|
||||
furnish_draw, furnish_vir, is_combo,
|
||||
is_show_cash, is_show_mall, is_need_examine,
|
||||
show_on_mall_status, show_on_mall_time, show_on_mall_error_msg,
|
||||
enable_label, tax_config_id, spec_table_headers,
|
||||
images, video, notice,
|
||||
group_snap, spec_info, select_spec, stock_number,warn_line
|
||||
)
|
||||
values (#{id,jdbcType=INTEGER}, #{categoryId,jdbcType=VARCHAR}, #{specId,jdbcType=INTEGER},
|
||||
#{sourcePath,jdbcType=VARCHAR}, #{brandId,jdbcType=INTEGER}, #{merchantId,jdbcType=VARCHAR},
|
||||
#{shopId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{shortTitle,jdbcType=VARCHAR},
|
||||
#{type,jdbcType=VARCHAR}, #{packFee,jdbcType=DECIMAL}, #{lowPrice,jdbcType=DECIMAL},
|
||||
#{lowMemberPrice,jdbcType=DECIMAL}, #{unitId,jdbcType=VARCHAR}, #{unitSnap,jdbcType=VARCHAR},
|
||||
#{coverImg,jdbcType=VARCHAR}, #{shareImg,jdbcType=VARCHAR}, #{videoCoverImg,jdbcType=VARCHAR},
|
||||
#{sort,jdbcType=INTEGER}, #{limitNumber,jdbcType=INTEGER}, #{productScore,jdbcType=INTEGER},
|
||||
#{status,jdbcType=TINYINT}, #{failMsg,jdbcType=VARCHAR}, #{isRecommend,jdbcType=TINYINT},
|
||||
#{isHot,jdbcType=TINYINT}, #{isNew,jdbcType=TINYINT}, #{isOnSale,jdbcType=TINYINT},
|
||||
#{isShow,jdbcType=TINYINT}, #{typeEnum,jdbcType=VARCHAR}, #{isDistribute,jdbcType=TINYINT},
|
||||
#{isDel,jdbcType=TINYINT}, #{isStock,jdbcType=TINYINT}, #{isPauseSale,jdbcType=TINYINT},
|
||||
#{isFreeFreight,jdbcType=TINYINT}, #{freightId,jdbcType=BIGINT}, #{strategyType,jdbcType=VARCHAR},
|
||||
#{strategyId,jdbcType=INTEGER}, #{isVip,jdbcType=TINYINT}, #{isDelete,jdbcType=TINYINT},
|
||||
#{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{baseSalesNumber,jdbcType=DOUBLE},
|
||||
#{realSalesNumber,jdbcType=INTEGER}, #{salesNumber,jdbcType=INTEGER}, #{thumbCount,jdbcType=INTEGER},
|
||||
#{storeCount,jdbcType=INTEGER}, #{furnishMeal,jdbcType=INTEGER}, #{furnishExpress,jdbcType=INTEGER},
|
||||
#{furnishDraw,jdbcType=INTEGER}, #{furnishVir,jdbcType=INTEGER}, #{isCombo,jdbcType=TINYINT},
|
||||
#{isShowCash,jdbcType=TINYINT}, #{isShowMall,jdbcType=TINYINT}, #{isNeedExamine,jdbcType=TINYINT},
|
||||
#{showOnMallStatus,jdbcType=TINYINT}, #{showOnMallTime,jdbcType=BIGINT}, #{showOnMallErrorMsg,jdbcType=VARCHAR},
|
||||
#{enableLabel,jdbcType=TINYINT}, #{taxConfigId,jdbcType=VARCHAR}, #{specTableHeaders,jdbcType=VARCHAR},
|
||||
#{images,jdbcType=LONGVARCHAR}, #{video,jdbcType=LONGVARCHAR}, #{notice,jdbcType=LONGVARCHAR},
|
||||
#{groupSnap,jdbcType=LONGVARCHAR}, #{specInfo,jdbcType=LONGVARCHAR}, #{selectSpec,jdbcType=LONGVARCHAR},
|
||||
#{stockNumber,jdbcType=INTEGER},#{warnLine,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
|
||||
insert into tb_product
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="categoryId != null">
|
||||
category_id,
|
||||
</if>
|
||||
<if test="specId != null">
|
||||
spec_id,
|
||||
</if>
|
||||
<if test="sourcePath != null">
|
||||
source_path,
|
||||
</if>
|
||||
<if test="brandId != null">
|
||||
brand_id,
|
||||
</if>
|
||||
<if test="merchantId != null">
|
||||
merchant_id,
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
shop_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="shortTitle != null">
|
||||
short_title,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type,
|
||||
</if>
|
||||
<if test="packFee != null">
|
||||
pack_fee,
|
||||
</if>
|
||||
<if test="lowPrice != null">
|
||||
low_price,
|
||||
</if>
|
||||
<if test="lowMemberPrice != null">
|
||||
low_member_price,
|
||||
</if>
|
||||
<if test="unitId != null">
|
||||
unit_id,
|
||||
</if>
|
||||
<if test="unitSnap != null">
|
||||
unit_snap,
|
||||
</if>
|
||||
<if test="coverImg != null">
|
||||
cover_img,
|
||||
</if>
|
||||
<if test="shareImg != null">
|
||||
share_img,
|
||||
</if>
|
||||
<if test="videoCoverImg != null">
|
||||
video_cover_img,
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
sort,
|
||||
</if>
|
||||
<if test="limitNumber != null">
|
||||
limit_number,
|
||||
</if>
|
||||
<if test="productScore != null">
|
||||
product_score,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="failMsg != null">
|
||||
fail_msg,
|
||||
</if>
|
||||
<if test="isRecommend != null">
|
||||
is_recommend,
|
||||
</if>
|
||||
<if test="isHot != null">
|
||||
is_hot,
|
||||
</if>
|
||||
<if test="isNew != null">
|
||||
is_new,
|
||||
</if>
|
||||
<if test="isOnSale != null">
|
||||
is_on_sale,
|
||||
</if>
|
||||
<if test="isShow != null">
|
||||
is_show,
|
||||
</if>
|
||||
<if test="typeEnum != null">
|
||||
type_enum,
|
||||
</if>
|
||||
<if test="isDistribute != null">
|
||||
is_distribute,
|
||||
</if>
|
||||
<if test="isDel != null">
|
||||
is_del,
|
||||
</if>
|
||||
<if test="isStock != null">
|
||||
is_stock,
|
||||
</if>
|
||||
<if test="isPauseSale != null">
|
||||
is_pause_sale,
|
||||
</if>
|
||||
<if test="isFreeFreight != null">
|
||||
is_free_freight,
|
||||
</if>
|
||||
<if test="freightId != null">
|
||||
freight_id,
|
||||
</if>
|
||||
<if test="strategyType != null">
|
||||
strategy_type,
|
||||
</if>
|
||||
<if test="strategyId != null">
|
||||
strategy_id,
|
||||
</if>
|
||||
<if test="isVip != null">
|
||||
is_vip,
|
||||
</if>
|
||||
<if test="isDelete != null">
|
||||
is_delete,
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at,
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at,
|
||||
</if>
|
||||
<if test="baseSalesNumber != null">
|
||||
base_sales_number,
|
||||
</if>
|
||||
<if test="realSalesNumber != null">
|
||||
real_sales_number,
|
||||
</if>
|
||||
<if test="salesNumber != null">
|
||||
sales_number,
|
||||
</if>
|
||||
<if test="thumbCount != null">
|
||||
thumb_count,
|
||||
</if>
|
||||
<if test="storeCount != null">
|
||||
store_count,
|
||||
</if>
|
||||
<if test="furnishMeal != null">
|
||||
furnish_meal,
|
||||
</if>
|
||||
<if test="furnishExpress != null">
|
||||
furnish_express,
|
||||
</if>
|
||||
<if test="furnishDraw != null">
|
||||
furnish_draw,
|
||||
</if>
|
||||
<if test="furnishVir != null">
|
||||
furnish_vir,
|
||||
</if>
|
||||
<if test="isCombo != null">
|
||||
is_combo,
|
||||
</if>
|
||||
<if test="isShowCash != null">
|
||||
is_show_cash,
|
||||
</if>
|
||||
<if test="isShowMall != null">
|
||||
is_show_mall,
|
||||
</if>
|
||||
<if test="isNeedExamine != null">
|
||||
is_need_examine,
|
||||
</if>
|
||||
<if test="showOnMallStatus != null">
|
||||
show_on_mall_status,
|
||||
</if>
|
||||
<if test="showOnMallTime != null">
|
||||
show_on_mall_time,
|
||||
</if>
|
||||
<if test="showOnMallErrorMsg != null">
|
||||
show_on_mall_error_msg,
|
||||
</if>
|
||||
<if test="enableLabel != null">
|
||||
enable_label,
|
||||
</if>
|
||||
<if test="taxConfigId != null">
|
||||
tax_config_id,
|
||||
</if>
|
||||
<if test="specTableHeaders != null">
|
||||
spec_table_headers,
|
||||
</if>
|
||||
<if test="images != null">
|
||||
images,
|
||||
</if>
|
||||
<if test="video != null">
|
||||
video,
|
||||
</if>
|
||||
<if test="notice != null">
|
||||
notice,
|
||||
</if>
|
||||
<if test="groupSnap != null">
|
||||
group_snap,
|
||||
</if>
|
||||
<if test="specInfo != null">
|
||||
spec_info,
|
||||
</if>
|
||||
<if test="selectSpec != null">
|
||||
select_spec,
|
||||
</if>
|
||||
<if test="stockNumber != null">
|
||||
stock_number,
|
||||
</if>
|
||||
<if test="warnLine != null">
|
||||
warn_line,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="categoryId != null">
|
||||
#{categoryId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="specId != null">
|
||||
#{specId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="sourcePath != null">
|
||||
#{sourcePath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="brandId != null">
|
||||
#{brandId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="merchantId != null">
|
||||
#{merchantId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
#{shopId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="shortTitle != null">
|
||||
#{shortTitle,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="packFee != null">
|
||||
#{packFee,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="lowPrice != null">
|
||||
#{lowPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="lowMemberPrice != null">
|
||||
#{lowMemberPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="unitId != null">
|
||||
#{unitId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="unitSnap != null">
|
||||
#{unitSnap,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="coverImg != null">
|
||||
#{coverImg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="shareImg != null">
|
||||
#{shareImg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="videoCoverImg != null">
|
||||
#{videoCoverImg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
#{sort,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="limitNumber != null">
|
||||
#{limitNumber,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="productScore != null">
|
||||
#{productScore,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="failMsg != null">
|
||||
#{failMsg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isRecommend != null">
|
||||
#{isRecommend,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isHot != null">
|
||||
#{isHot,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isNew != null">
|
||||
#{isNew,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isOnSale != null">
|
||||
#{isOnSale,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isShow != null">
|
||||
#{isShow,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="typeEnum != null">
|
||||
#{typeEnum,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isDistribute != null">
|
||||
#{isDistribute,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isDel != null">
|
||||
#{isDel,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isStock != null">
|
||||
#{isStock,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isPauseSale != null">
|
||||
#{isPauseSale,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isFreeFreight != null">
|
||||
#{isFreeFreight,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="freightId != null">
|
||||
#{freightId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="strategyType != null">
|
||||
#{strategyType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="strategyId != null">
|
||||
#{strategyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isVip != null">
|
||||
#{isVip,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isDelete != null">
|
||||
#{isDelete,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
#{createdAt,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
#{updatedAt,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="baseSalesNumber != null">
|
||||
#{baseSalesNumber,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="realSalesNumber != null">
|
||||
#{realSalesNumber,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="salesNumber != null">
|
||||
#{salesNumber,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="thumbCount != null">
|
||||
#{thumbCount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="storeCount != null">
|
||||
#{storeCount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="furnishMeal != null">
|
||||
#{furnishMeal,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="furnishExpress != null">
|
||||
#{furnishExpress,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="furnishDraw != null">
|
||||
#{furnishDraw,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="furnishVir != null">
|
||||
#{furnishVir,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isCombo != null">
|
||||
#{isCombo,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isShowCash != null">
|
||||
#{isShowCash,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isShowMall != null">
|
||||
#{isShowMall,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isNeedExamine != null">
|
||||
#{isNeedExamine,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="showOnMallStatus != null">
|
||||
#{showOnMallStatus,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="showOnMallTime != null">
|
||||
#{showOnMallTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="showOnMallErrorMsg != null">
|
||||
#{showOnMallErrorMsg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="enableLabel != null">
|
||||
#{enableLabel,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="taxConfigId != null">
|
||||
#{taxConfigId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="specTableHeaders != null">
|
||||
#{specTableHeaders,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="images != null">
|
||||
#{images,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="video != null">
|
||||
#{video,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="notice != null">
|
||||
#{notice,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="groupSnap != null">
|
||||
#{groupSnap,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="specInfo != null">
|
||||
#{specInfo,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="selectSpec != null">
|
||||
#{selectSpec,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="stockNumber != null">
|
||||
#{stockNumber,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="warnLine != null">
|
||||
#{warnLine,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
|
||||
update tb_product
|
||||
<set>
|
||||
<if test="categoryId != null">
|
||||
category_id = #{categoryId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="specId != null">
|
||||
spec_id = #{specId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="sourcePath != null">
|
||||
source_path = #{sourcePath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="brandId != null">
|
||||
brand_id = #{brandId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="merchantId != null">
|
||||
merchant_id = #{merchantId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
shop_id = #{shopId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="shortTitle != null">
|
||||
short_title = #{shortTitle,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="packFee != null">
|
||||
pack_fee = #{packFee,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="lowPrice != null">
|
||||
low_price = #{lowPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="lowMemberPrice != null">
|
||||
low_member_price = #{lowMemberPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="unitId != null">
|
||||
unit_id = #{unitId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="unitSnap != null">
|
||||
unit_snap = #{unitSnap,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="coverImg != null">
|
||||
cover_img = #{coverImg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="shareImg != null">
|
||||
share_img = #{shareImg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="videoCoverImg != null">
|
||||
video_cover_img = #{videoCoverImg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
sort = #{sort,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="limitNumber != null">
|
||||
limit_number = #{limitNumber,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="productScore != null">
|
||||
product_score = #{productScore,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="failMsg != null">
|
||||
fail_msg = #{failMsg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isRecommend != null">
|
||||
is_recommend = #{isRecommend,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isHot != null">
|
||||
is_hot = #{isHot,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isNew != null">
|
||||
is_new = #{isNew,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isOnSale != null">
|
||||
is_on_sale = #{isOnSale,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isShow != null">
|
||||
is_show = #{isShow,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="typeEnum != null">
|
||||
type_enum = #{typeEnum,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isDistribute != null">
|
||||
is_distribute = #{isDistribute,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isDel != null">
|
||||
is_del = #{isDel,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isStock != null">
|
||||
is_stock = #{isStock,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isPauseSale != null">
|
||||
is_pause_sale = #{isPauseSale,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isFreeFreight != null">
|
||||
is_free_freight = #{isFreeFreight,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="freightId != null">
|
||||
freight_id = #{freightId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="strategyType != null">
|
||||
strategy_type = #{strategyType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="strategyId != null">
|
||||
strategy_id = #{strategyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isVip != null">
|
||||
is_vip = #{isVip,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isDelete != null">
|
||||
is_delete = #{isDelete,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at = #{createdAt,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at = #{updatedAt,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="baseSalesNumber != null">
|
||||
base_sales_number = #{baseSalesNumber,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="realSalesNumber != null">
|
||||
real_sales_number = #{realSalesNumber,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="salesNumber != null">
|
||||
sales_number = #{salesNumber,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="thumbCount != null">
|
||||
thumb_count = #{thumbCount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="storeCount != null">
|
||||
store_count = #{storeCount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="furnishMeal != null">
|
||||
furnish_meal = #{furnishMeal,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="furnishExpress != null">
|
||||
furnish_express = #{furnishExpress,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="furnishDraw != null">
|
||||
furnish_draw = #{furnishDraw,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="furnishVir != null">
|
||||
furnish_vir = #{furnishVir,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isCombo != null">
|
||||
is_combo = #{isCombo,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isShowCash != null">
|
||||
is_show_cash = #{isShowCash,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isShowMall != null">
|
||||
is_show_mall = #{isShowMall,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isNeedExamine != null">
|
||||
is_need_examine = #{isNeedExamine,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="showOnMallStatus != null">
|
||||
show_on_mall_status = #{showOnMallStatus,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="showOnMallTime != null">
|
||||
show_on_mall_time = #{showOnMallTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="showOnMallErrorMsg != null">
|
||||
show_on_mall_error_msg = #{showOnMallErrorMsg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="enableLabel != null">
|
||||
enable_label = #{enableLabel,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="taxConfigId != null">
|
||||
tax_config_id = #{taxConfigId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="specTableHeaders != null">
|
||||
spec_table_headers = #{specTableHeaders,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="images != null">
|
||||
images = #{images,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="video != null">
|
||||
video = #{video,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="notice != null">
|
||||
notice = #{notice,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="groupSnap != null">
|
||||
group_snap = #{groupSnap,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="specInfo != null">
|
||||
spec_info = #{specInfo,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="selectSpec != null">
|
||||
select_spec = #{selectSpec,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="stockNumber != null">
|
||||
stock_number = #{stockNumber,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="warnLine != null">
|
||||
warn_line = #{warnLine,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
|
||||
update tb_product
|
||||
set category_id = #{categoryId,jdbcType=VARCHAR},
|
||||
spec_id = #{specId,jdbcType=INTEGER},
|
||||
source_path = #{sourcePath,jdbcType=VARCHAR},
|
||||
brand_id = #{brandId,jdbcType=INTEGER},
|
||||
merchant_id = #{merchantId,jdbcType=VARCHAR},
|
||||
shop_id = #{shopId,jdbcType=VARCHAR},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
short_title = #{shortTitle,jdbcType=VARCHAR},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
pack_fee = #{packFee,jdbcType=DECIMAL},
|
||||
low_price = #{lowPrice,jdbcType=DECIMAL},
|
||||
low_member_price = #{lowMemberPrice,jdbcType=DECIMAL},
|
||||
unit_id = #{unitId,jdbcType=VARCHAR},
|
||||
unit_snap = #{unitSnap,jdbcType=VARCHAR},
|
||||
cover_img = #{coverImg,jdbcType=VARCHAR},
|
||||
share_img = #{shareImg,jdbcType=VARCHAR},
|
||||
video_cover_img = #{videoCoverImg,jdbcType=VARCHAR},
|
||||
sort = #{sort,jdbcType=INTEGER},
|
||||
limit_number = #{limitNumber,jdbcType=INTEGER},
|
||||
product_score = #{productScore,jdbcType=INTEGER},
|
||||
status = #{status,jdbcType=TINYINT},
|
||||
fail_msg = #{failMsg,jdbcType=VARCHAR},
|
||||
is_recommend = #{isRecommend,jdbcType=TINYINT},
|
||||
is_hot = #{isHot,jdbcType=TINYINT},
|
||||
is_new = #{isNew,jdbcType=TINYINT},
|
||||
is_on_sale = #{isOnSale,jdbcType=TINYINT},
|
||||
is_show = #{isShow,jdbcType=TINYINT},
|
||||
type_enum = #{typeEnum,jdbcType=VARCHAR},
|
||||
is_distribute = #{isDistribute,jdbcType=TINYINT},
|
||||
is_del = #{isDel,jdbcType=TINYINT},
|
||||
is_stock = #{isStock,jdbcType=TINYINT},
|
||||
is_pause_sale = #{isPauseSale,jdbcType=TINYINT},
|
||||
is_free_freight = #{isFreeFreight,jdbcType=TINYINT},
|
||||
freight_id = #{freightId,jdbcType=BIGINT},
|
||||
strategy_type = #{strategyType,jdbcType=VARCHAR},
|
||||
strategy_id = #{strategyId,jdbcType=INTEGER},
|
||||
is_vip = #{isVip,jdbcType=TINYINT},
|
||||
is_delete = #{isDelete,jdbcType=TINYINT},
|
||||
created_at = #{createdAt,jdbcType=BIGINT},
|
||||
updated_at = #{updatedAt,jdbcType=BIGINT},
|
||||
base_sales_number = #{baseSalesNumber,jdbcType=DOUBLE},
|
||||
real_sales_number = #{realSalesNumber,jdbcType=INTEGER},
|
||||
sales_number = #{salesNumber,jdbcType=INTEGER},
|
||||
thumb_count = #{thumbCount,jdbcType=INTEGER},
|
||||
store_count = #{storeCount,jdbcType=INTEGER},
|
||||
furnish_meal = #{furnishMeal,jdbcType=INTEGER},
|
||||
furnish_express = #{furnishExpress,jdbcType=INTEGER},
|
||||
furnish_draw = #{furnishDraw,jdbcType=INTEGER},
|
||||
furnish_vir = #{furnishVir,jdbcType=INTEGER},
|
||||
is_combo = #{isCombo,jdbcType=TINYINT},
|
||||
is_show_cash = #{isShowCash,jdbcType=TINYINT},
|
||||
is_show_mall = #{isShowMall,jdbcType=TINYINT},
|
||||
is_need_examine = #{isNeedExamine,jdbcType=TINYINT},
|
||||
show_on_mall_status = #{showOnMallStatus,jdbcType=TINYINT},
|
||||
show_on_mall_time = #{showOnMallTime,jdbcType=BIGINT},
|
||||
show_on_mall_error_msg = #{showOnMallErrorMsg,jdbcType=VARCHAR},
|
||||
enable_label = #{enableLabel,jdbcType=TINYINT},
|
||||
tax_config_id = #{taxConfigId,jdbcType=VARCHAR},
|
||||
spec_table_headers = #{specTableHeaders,jdbcType=VARCHAR},
|
||||
images = #{images,jdbcType=LONGVARCHAR},
|
||||
video = #{video,jdbcType=LONGVARCHAR},
|
||||
notice = #{notice,jdbcType=LONGVARCHAR},
|
||||
group_snap = #{groupSnap,jdbcType=LONGVARCHAR},
|
||||
spec_info = #{specInfo,jdbcType=LONGVARCHAR},
|
||||
select_spec = #{selectSpec,jdbcType=LONGVARCHAR},
|
||||
stock_number = #{stockNumber,jdbcType=INTEGER},
|
||||
warn_line = #{warnLine,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProduct">
|
||||
update tb_product
|
||||
set category_id = #{categoryId,jdbcType=VARCHAR},
|
||||
spec_id = #{specId,jdbcType=INTEGER},
|
||||
source_path = #{sourcePath,jdbcType=VARCHAR},
|
||||
brand_id = #{brandId,jdbcType=INTEGER},
|
||||
merchant_id = #{merchantId,jdbcType=VARCHAR},
|
||||
shop_id = #{shopId,jdbcType=VARCHAR},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
short_title = #{shortTitle,jdbcType=VARCHAR},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
pack_fee = #{packFee,jdbcType=DECIMAL},
|
||||
low_price = #{lowPrice,jdbcType=DECIMAL},
|
||||
low_member_price = #{lowMemberPrice,jdbcType=DECIMAL},
|
||||
unit_id = #{unitId,jdbcType=VARCHAR},
|
||||
unit_snap = #{unitSnap,jdbcType=VARCHAR},
|
||||
cover_img = #{coverImg,jdbcType=VARCHAR},
|
||||
share_img = #{shareImg,jdbcType=VARCHAR},
|
||||
video_cover_img = #{videoCoverImg,jdbcType=VARCHAR},
|
||||
sort = #{sort,jdbcType=INTEGER},
|
||||
limit_number = #{limitNumber,jdbcType=INTEGER},
|
||||
product_score = #{productScore,jdbcType=INTEGER},
|
||||
status = #{status,jdbcType=TINYINT},
|
||||
fail_msg = #{failMsg,jdbcType=VARCHAR},
|
||||
is_recommend = #{isRecommend,jdbcType=TINYINT},
|
||||
is_hot = #{isHot,jdbcType=TINYINT},
|
||||
is_new = #{isNew,jdbcType=TINYINT},
|
||||
is_on_sale = #{isOnSale,jdbcType=TINYINT},
|
||||
is_show = #{isShow,jdbcType=TINYINT},
|
||||
type_enum = #{typeEnum,jdbcType=VARCHAR},
|
||||
is_distribute = #{isDistribute,jdbcType=TINYINT},
|
||||
is_del = #{isDel,jdbcType=TINYINT},
|
||||
is_stock = #{isStock,jdbcType=TINYINT},
|
||||
is_pause_sale = #{isPauseSale,jdbcType=TINYINT},
|
||||
is_free_freight = #{isFreeFreight,jdbcType=TINYINT},
|
||||
freight_id = #{freightId,jdbcType=BIGINT},
|
||||
strategy_type = #{strategyType,jdbcType=VARCHAR},
|
||||
strategy_id = #{strategyId,jdbcType=INTEGER},
|
||||
is_vip = #{isVip,jdbcType=TINYINT},
|
||||
is_delete = #{isDelete,jdbcType=TINYINT},
|
||||
created_at = #{createdAt,jdbcType=BIGINT},
|
||||
updated_at = #{updatedAt,jdbcType=BIGINT},
|
||||
base_sales_number = #{baseSalesNumber,jdbcType=DOUBLE},
|
||||
real_sales_number = #{realSalesNumber,jdbcType=INTEGER},
|
||||
sales_number = #{salesNumber,jdbcType=INTEGER},
|
||||
thumb_count = #{thumbCount,jdbcType=INTEGER},
|
||||
store_count = #{storeCount,jdbcType=INTEGER},
|
||||
furnish_meal = #{furnishMeal,jdbcType=INTEGER},
|
||||
furnish_express = #{furnishExpress,jdbcType=INTEGER},
|
||||
furnish_draw = #{furnishDraw,jdbcType=INTEGER},
|
||||
furnish_vir = #{furnishVir,jdbcType=INTEGER},
|
||||
is_combo = #{isCombo,jdbcType=TINYINT},
|
||||
is_show_cash = #{isShowCash,jdbcType=TINYINT},
|
||||
is_show_mall = #{isShowMall,jdbcType=TINYINT},
|
||||
is_need_examine = #{isNeedExamine,jdbcType=TINYINT},
|
||||
show_on_mall_status = #{showOnMallStatus,jdbcType=TINYINT},
|
||||
show_on_mall_time = #{showOnMallTime,jdbcType=BIGINT},
|
||||
show_on_mall_error_msg = #{showOnMallErrorMsg,jdbcType=VARCHAR},
|
||||
enable_label = #{enableLabel,jdbcType=TINYINT},
|
||||
tax_config_id = #{taxConfigId,jdbcType=VARCHAR},
|
||||
spec_table_headers = #{specTableHeaders,jdbcType=VARCHAR},
|
||||
stock_number = #{stockNumber,jdbcType=INTEGER},
|
||||
warn_line = #{warnLine,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
<select id="selectByShopId" resultMap="ResultMapWithBLOBs">
|
||||
<select id="selectByShopId" resultMap="BaseResultMap">
|
||||
select * from tb_product where shop_id=#{shopId} and status=1 and is_show_cash = 1 and type_enum in ('normal','sku','currentPrice','weight')
|
||||
<if test="commdityName != null and commdityName!='' ">
|
||||
and name like CONCAT('%',#{commdityName},'%')
|
||||
|
|
@ -915,7 +57,7 @@
|
|||
order by `sort` asc
|
||||
|
||||
</select>
|
||||
<select id="selectByShopIdAndCheckGrounding" resultMap="ResultMapWithBLOBs">
|
||||
<select id="selectByShopIdAndCheckGrounding" resultMap="BaseResultMap">
|
||||
select a.* from tb_product as a
|
||||
left join tb_product_sku as b on a.id = b.product_id
|
||||
where a.shop_id=#{shopId} and a.status=1 and a.is_show_cash = 1 and a.type_enum in ('normal','sku','currentPrice','weight')
|
||||
|
|
@ -927,7 +69,7 @@
|
|||
|
||||
</select>
|
||||
|
||||
<select id="selectByShopIdAndShopType" resultMap="ResultMapWithBLOBs">
|
||||
<select id="selectByShopIdAndShopType" resultMap="BaseResultMap">
|
||||
|
||||
select * from tb_product where shop_id=#{shopId} and status=1 and category_id=#{categoryId} and is_show_cash = 1 and type_enum in ('normal','sku','currentPrice','weight')
|
||||
|
||||
|
|
@ -939,7 +81,7 @@
|
|||
|
||||
</select>
|
||||
|
||||
<select id="selectByShopIdAndShopTypeCheckGrounding" resultMap="ResultMapWithBLOBs">
|
||||
<select id="selectByShopIdAndShopTypeCheckGrounding" resultMap="BaseResultMap">
|
||||
|
||||
select a.* from tb_product as a
|
||||
left join tb_product_sku as b on a.id = b.product_id
|
||||
|
|
@ -951,7 +93,7 @@
|
|||
and b.is_grounding=1 GROUP BY a.id ORDER BY a.`sort`
|
||||
|
||||
</select>
|
||||
<select id="selectByShopIdAndShopTypeUnGrounding" resultMap="ResultMapWithBLOBs">
|
||||
<select id="selectByShopIdAndShopTypeUnGrounding" resultMap="BaseResultMap">
|
||||
|
||||
select a.* from tb_product as a
|
||||
left join tb_product_sku as b on a.id = b.product_id
|
||||
|
|
@ -979,12 +121,6 @@
|
|||
group by shop_id,product_id
|
||||
</select>
|
||||
|
||||
<update id="updateStockById">
|
||||
update tb_product
|
||||
set stock_number = stock_number - #{num,jdbcType=INTEGER}
|
||||
where id = #{productId}
|
||||
</update>
|
||||
|
||||
<select id="selectBySkuId" resultType="com.chaozhanggui.system.cashierservice.entity.po.ProConsSkuInfo">
|
||||
SELECT
|
||||
c.shop_id,
|
||||
|
|
|
|||
Loading…
Reference in New Issue