fix: 优化更新促销状态流程,增加促销检查
This commit is contained in:
parent
b2fb415ab5
commit
38ad5bb394
@ -102,6 +102,9 @@ public class CartSkuVO extends CartBase implements Serializable {
|
||||
*/
|
||||
public CartSkuVO(GoodsSku goodsSku) {
|
||||
this.goodsSku = goodsSku;
|
||||
if (goodsSku.getUpdateTime() == null) {
|
||||
this.goodsSku.setUpdateTime(goodsSku.getCreateTime());
|
||||
}
|
||||
this.checked = true;
|
||||
this.invalid = false;
|
||||
//默认时间为0,让系统为此商品更新缓存
|
||||
|
@ -112,6 +112,7 @@ public abstract class AbstractPromotionsServiceImpl<M extends BaseMapper<T>, T e
|
||||
List<T> promotionsList = this.list(new QueryWrapper<T>().in("id", ids));
|
||||
for (T t : promotionsList) {
|
||||
if (startTime != null && endTime != null) {
|
||||
this.checkPromotions(t);
|
||||
t.setStartTime(new Date(startTime));
|
||||
t.setEndTime(new Date(endTime));
|
||||
} else {
|
||||
|
@ -350,6 +350,11 @@ public class EsGoodsIndex implements Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
public EsGoodsIndex(GoodsSku sku, Date createDate) {
|
||||
this(sku);
|
||||
this.releaseTime = createDate.getTime();
|
||||
}
|
||||
|
||||
public void setGoodsSku(GoodsSku sku) {
|
||||
if (sku != null) {
|
||||
this.id = sku.getId();
|
||||
|
Loading…
x
Reference in New Issue
Block a user