|
@@ -2,6 +2,7 @@ package cn.newfeifan.mall.module.product.service.spuapply;
|
|
|
|
|
|
import cn.newfeifan.mall.module.product.controller.admin.skuapply.vo.SkuApplySaveReqVO;
|
|
|
import cn.newfeifan.mall.module.product.controller.admin.spu.vo.ProductSpuSaveReqVO;
|
|
|
+import cn.newfeifan.mall.module.product.controller.admin.spu.vo.ProductSpuUpdateStatusReqVO;
|
|
|
import cn.newfeifan.mall.module.product.convert.spuapply.SpuApplyConvert;
|
|
|
import cn.newfeifan.mall.module.product.dal.dataobject.skuapply.SkuApplyDO;
|
|
|
import cn.newfeifan.mall.module.product.dal.dataobject.spu.ProductSpuDO;
|
|
@@ -327,4 +328,18 @@ public class SpuApplyServiceImpl implements SpuApplyService {
|
|
|
return convert;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void updateSpuStatus(ProductSpuUpdateStatusReqVO updateReqVO) {
|
|
|
+ // 校验存在
|
|
|
+ validateSpuApplyExists(updateReqVO.getId());
|
|
|
+ // TODO 非繁人:【可选】参与活动中的商品,不允许下架???
|
|
|
+
|
|
|
+ // 更新状态
|
|
|
+ SpuApplyDO productSpuDO = spuApplyMapper.selectById(updateReqVO.getId()).setStatus(updateReqVO.getStatus());
|
|
|
+ spuApplyMapper.updateById(productSpuDO);
|
|
|
+
|
|
|
+ ProductSpuDO spu = spuService.getSpuByApplyId(updateReqVO.getId()).setStatus(updateReqVO.getStatus());
|
|
|
+ spuService.updateById(spu);
|
|
|
+ }
|
|
|
+
|
|
|
}
|