|
|
@@ -802,7 +802,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
|
throw new CustomException("过期商品不允许上架");
|
|
|
}
|
|
|
}
|
|
|
- if ((entity.getStatus() == -1 || entity.getStatus() == 0) && entity.getGoodsId().longValue() > 0 &&entity.getGoodsType()!=7) {
|
|
|
+ if ((entity.getStatus() == -1 || entity.getStatus() == 0) && entity.getGoodsId().longValue() > 0 &&(Validator.isNotEmpty(entity.getGoodsType()) && entity.getGoodsType()!=7)) {
|
|
|
List<Long> payStatus = new ArrayList<>();
|
|
|
payStatus.add(2L);
|
|
|
payStatus.add(3L);
|
|
|
@@ -4410,6 +4410,19 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
|
return BeanUtil.toBean(getById(goodsId),GoodsVo.class);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Long savePointsByAddBo(GoodsAddBo bo) {
|
|
|
+ Goods add = BeanUtil.toBean(bo, Goods.class);
|
|
|
+ add.setCode(ServletUtils.getEncoded("SP"));
|
|
|
+ validEntityBeforeSave(add);
|
|
|
+ add.setCreateTime(DateUtils.getNowTime());
|
|
|
+ add.setUpdateTime(DateUtils.getNowTime());
|
|
|
+ add.setGoodsType(7);
|
|
|
+ add.setUseType("2");
|
|
|
+ boolean result = this.save(add);
|
|
|
+ return add.getGoodsId();
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public boolean updateGoodsRepair(UpdateGoodsRepairBo bo) {
|