|
|
@@ -1574,10 +1574,10 @@ public class GoodsServiceImpl implements GoodsService {
|
|
|
if (!nowGoods.getStatus().equals(oldStatus)) {
|
|
|
GoodsHistory goodsHistory = null;
|
|
|
//做上下架判断
|
|
|
- if ((oldStatus.equals(Status.NO_SHELVE.value()) || oldStatus.equals(Status.REMOVED.value())) && (nowGoods.getStatus().equals(Status.AVAILABLE.value()) || nowGoods.getStatus().equals(Status.UNAVAILABLE.value()))) {
|
|
|
+ if ((oldStatus.equals(Status.REMOVED.value())) && (nowGoods.getStatus().equals(Status.AVAILABLE.value()) || nowGoods.getStatus().equals(Status.UNAVAILABLE.value()) || nowGoods.getStatus().equals(Status.NO_SHELVE.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()))) {
|
|
|
+ } else if ((nowGoods.getStatus().equals(Status.REMOVED.value())) && (oldStatus.equals(Status.UNAVAILABLE.value()) || oldStatus.equals(Status.AVAILABLE.value()) || oldStatus.equals(Status.NO_SHELVE.value()))) {
|
|
|
goodsHistory = goodsHistoryService.converTGoodsHist(nowGoods, OperateType.Down.getPhrase(), false);
|
|
|
}
|
|
|
if (null != goodsHistory) {
|
|
|
@@ -2934,7 +2934,7 @@ public class GoodsServiceImpl implements GoodsService {
|
|
|
orderService.save(orders);
|
|
|
|
|
|
List<GoodsHistory> histories = new ArrayList<>();
|
|
|
- if (goods.getStatus().equals(Status.AVAILABLE.value()) || goods.getStatus().equals(Status.UNAVAILABLE.value())) {
|
|
|
+ if (goods.getStatus().equals(Status.AVAILABLE.value()) || goods.getStatus().equals(Status.UNAVAILABLE.value()) || goods.getStatus().equals(Status.NO_SHELVE.value())) {
|
|
|
//先做下架记录
|
|
|
goods.setStatus(Status.REMOVED.value());
|
|
|
GoodsHistory goodsHistoryRemoved = goodsHistoryService.converTGoodsHist(goods, OperateType.Down.getPhrase(),false);
|
|
|
@@ -3227,7 +3227,7 @@ public class GoodsServiceImpl implements GoodsService {
|
|
|
orderService.save(orders);
|
|
|
|
|
|
List<GoodsHistory> histories = new ArrayList<>();
|
|
|
- if (goods.getStatus().equals(Status.AVAILABLE.value()) || goods.getStatus().equals(Status.UNAVAILABLE.value())) {
|
|
|
+ if (goods.getStatus().equals(Status.AVAILABLE.value()) || goods.getStatus().equals(Status.UNAVAILABLE.value()) || goods.getStatus().equals(Status.NO_SHELVE.value())) {
|
|
|
//先做下架记录
|
|
|
goods.setStatus(Status.REMOVED.value());
|
|
|
GoodsHistory goodsHistoryRemoved = goodsHistoryService.converTGoodsHist(goods, OperateType.Down.getPhrase(),false);
|
|
|
@@ -3299,7 +3299,7 @@ public class GoodsServiceImpl implements GoodsService {
|
|
|
List<GoodsHistory> histories = new ArrayList<>();
|
|
|
List<Goods> goodses1 = new ArrayList<>();
|
|
|
for (Goods goodse : goodses) {
|
|
|
- if (goodse.getStatus().equals(Status.AVAILABLE.value()) || goodse.getStatus().equals(Status.UNAVAILABLE.value())) {
|
|
|
+ if (goodse.getStatus().equals(Status.AVAILABLE.value()) || goodse.getStatus().equals(Status.UNAVAILABLE.value()) || goodse.getStatus().equals(Status.NO_SHELVE.value())) {
|
|
|
goodse.setStatus(Status.REMOVED.value());
|
|
|
GoodsHistory goodsHistoryRemoved = goodsHistoryService.converTGoodsHist(goodse, OperateType.Down.getPhrase(), false);
|
|
|
goodsHistoryRemoved.setOperateUU(userUU);
|