商品模板支持虚拟商品
This commit is contained in:
parent
a51e86fd98
commit
cf4f9dd6bc
@ -151,4 +151,10 @@ public class DraftGoods extends BaseEntity {
|
|||||||
@ApiModelProperty(value = "sku列表JSON")
|
@ApiModelProperty(value = "sku列表JSON")
|
||||||
private String skuListJson;
|
private String skuListJson;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see cn.lili.modules.goods.entity.enums.GoodsTypeEnum
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "商品类型", required = true)
|
||||||
|
private String goodsType;
|
||||||
|
|
||||||
}
|
}
|
@ -16,7 +16,6 @@ import cn.lili.modules.goods.service.GoodsGalleryService;
|
|||||||
import cn.lili.modules.goods.service.GoodsSkuService;
|
import cn.lili.modules.goods.service.GoodsSkuService;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@ -70,7 +69,7 @@ public class DraftGoodsServiceImpl extends ServiceImpl<DraftGoodsMapper, DraftGo
|
|||||||
draftGoods.setGoodsGalleryListJson(JSONUtil.toJsonStr(draftGoods.getGoodsGalleryList()));
|
draftGoods.setGoodsGalleryListJson(JSONUtil.toJsonStr(draftGoods.getGoodsGalleryList()));
|
||||||
draftGoods.setSkuListJson(JSONUtil.toJsonStr(this.getGoodsSkuList(draftGoods.getSkuList())));
|
draftGoods.setSkuListJson(JSONUtil.toJsonStr(this.getGoodsSkuList(draftGoods.getSkuList())));
|
||||||
draftGoods.setGoodsParamsListJson(JSONUtil.toJsonStr(draftGoods.getGoodsParamsList()));
|
draftGoods.setGoodsParamsListJson(JSONUtil.toJsonStr(draftGoods.getGoodsParamsList()));
|
||||||
this.saveOrUpdate(draftGoods);
|
this.save(draftGoods);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -334,12 +334,12 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|||||||
//判断商品类型
|
//判断商品类型
|
||||||
switch (goods.getGoodsType()) {
|
switch (goods.getGoodsType()) {
|
||||||
case "PHYSICAL_GOODS":
|
case "PHYSICAL_GOODS":
|
||||||
if (goods.getTemplateId() == null) {
|
if (goods.getTemplateId().equals("0")) {
|
||||||
throw new ServiceException("实物商品需选择配送模板");
|
throw new ServiceException("实物商品需选择配送模板");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "VIRTUAL_GOODS":
|
case "VIRTUAL_GOODS":
|
||||||
if (goods.getTemplateId() != null) {
|
if (!goods.getTemplateId().equals("0")) {
|
||||||
throw new ServiceException("虚拟商品不需要选择配送模板");
|
throw new ServiceException("虚拟商品不需要选择配送模板");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -8,7 +8,6 @@ import cn.lili.modules.goods.entity.dos.GoodsSku;
|
|||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
import org.springframework.data.annotation.Id;
|
import org.springframework.data.annotation.Id;
|
||||||
@ -225,6 +224,12 @@ public class EsGoodsIndex implements Serializable {
|
|||||||
@Field(type = FieldType.Date, format = DateFormat.basic_date_time)
|
@Field(type = FieldType.Date, format = DateFormat.basic_date_time)
|
||||||
private Date releaseTime;
|
private Date releaseTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see cn.lili.modules.goods.entity.enums.GoodsTypeEnum
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "商品类型", required = true)
|
||||||
|
private String goodsType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品属性(参数和规格)
|
* 商品属性(参数和规格)
|
||||||
*/
|
*/
|
||||||
|
@ -51,12 +51,9 @@ public class BillServiceImpl extends ServiceImpl<BillMapper, Bill> implements Bi
|
|||||||
//商家流水
|
//商家流水
|
||||||
@Autowired
|
@Autowired
|
||||||
private StoreFlowService storeFlowService;
|
private StoreFlowService storeFlowService;
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
//结算单
|
//结算单
|
||||||
@Resource
|
@Resource
|
||||||
private BillMapper billMapper;
|
private BillMapper billMapper;
|
||||||
>>>>>>> master
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createBill(String storeId, Date startTime, DateTime endTime) {
|
public void createBill(String storeId, Date startTime, DateTime endTime) {
|
||||||
@ -86,10 +83,6 @@ public class BillServiceImpl extends ServiceImpl<BillMapper, Bill> implements Bi
|
|||||||
.eq("store_id",storeId)
|
.eq("store_id",storeId)
|
||||||
.eq("flow_type",FlowTypeEnum.PAY.name())
|
.eq("flow_type",FlowTypeEnum.PAY.name())
|
||||||
.between("create_time",startTime,endTime));
|
.between("create_time",startTime,endTime));
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
=======
|
|
||||||
>>>>>>> master
|
|
||||||
Double orderPrice = 0D;
|
Double orderPrice = 0D;
|
||||||
if (orderBill != null) {
|
if (orderBill != null) {
|
||||||
bill.setOrderPrice(orderBill.getOrderPrice());
|
bill.setOrderPrice(orderBill.getOrderPrice());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user