|
|
@@ -1576,6 +1576,7 @@ public class GoodsServiceImpl implements GoodsService {
|
|
|
//做上下架判断
|
|
|
if ((oldStatus.equals(Status.NO_SHELVE.value()) || oldStatus.equals(Status.REMOVED.value())) && (nowGoods.getStatus().equals(Status.AVAILABLE.value()) || nowGoods.getStatus().equals(Status.UNAVAILABLE.value()))) {
|
|
|
goodsHistory = goodsHistoryService.converTGoodsHist(nowGoods, OperateType.Publish.getPhrase(), false);
|
|
|
+ nowGoods.setPublishTime(new Date());
|
|
|
} else if ((nowGoods.getStatus().equals(Status.NO_SHELVE) || nowGoods.getStatus().equals(Status.REMOVED.value())) && (oldStatus.equals(Status.UNAVAILABLE.value()) || oldStatus.equals(Status.AVAILABLE.value()))) {
|
|
|
goodsHistory = goodsHistoryService.converTGoodsHist(nowGoods, OperateType.Down.getPhrase(), false);
|
|
|
}
|
|
|
@@ -3699,12 +3700,12 @@ public class GoodsServiceImpl implements GoodsService {
|
|
|
private void convertPageInfo(PageInfo info, GoodsFilter goodsFilter) {
|
|
|
if (!StringUtils.isEmpty(goodsFilter.getStartTime())) {
|
|
|
java.sql.Date startDate = new java.sql.Date(goodsFilter.getStartTime());
|
|
|
- info.expression(PredicateUtils.gte("updateDate", startDate, true));
|
|
|
+ info.expression(PredicateUtils.gte("publishTime", startDate, true));
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(goodsFilter.getEndTime())) {
|
|
|
// 截止日期是到当天23:59:59,java.sql.Date精确到天,这里采用加一天小于的方法设置截止日期判断
|
|
|
java.sql.Date endDate = new java.sql.Date(goodsFilter.getEndTime() + IntegerConstant.ONE_DAY_MILLISECONDS);
|
|
|
- info.expression(PredicateUtils.lt("updateDate", endDate, true));
|
|
|
+ info.expression(PredicateUtils.lt("publishTime", endDate, true));
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(goodsFilter.getCode())) {
|
|
|
info.filter("code", goodsFilter.getCode());
|