|
|
@@ -121,13 +121,19 @@ public class CameraApiController {
|
|
|
productEntity.setProductModel(productModel.getProductModel());
|
|
|
productEntity.setBackImg(bladeFile.getLink());
|
|
|
productEntity.setQrCode(productCode);
|
|
|
+ productEntity.setStatus(2);
|
|
|
productService.save(productEntity);
|
|
|
}else{
|
|
|
- productEntity.setFrontImg(bladeFile.getLink());
|
|
|
- productService.updateById(productEntity);
|
|
|
+ if(productEntity.getStatus()==2){
|
|
|
+ productEntity.setFrontImg(bladeFile.getLink());
|
|
|
+ productService.updateById(productEntity);
|
|
|
+ productImageRecord.setMessage("成功");
|
|
|
+ productImageRecord.setProductId(productEntity.getId());
|
|
|
+ }else{
|
|
|
+ productImageRecord.setStatus(2);
|
|
|
+ productImageRecord.setMessage("产品"+(productEntity.getStatus()==1?"正在维修中":"已入库")+"请勿重复下线");
|
|
|
+ }
|
|
|
}
|
|
|
- productImageRecord.setMessage("成功");
|
|
|
- productImageRecord.setProductId(productEntity.getId());
|
|
|
}
|
|
|
}
|
|
|
productImageRecordService.save(productImageRecord);
|