|
@@ -1058,32 +1058,34 @@ public class FsStoreProductScrmServiceImpl implements IFsStoreProductScrmService
|
|
|
if(list != null && !list.isEmpty()){
|
|
|
for (FsStoreProductScrm product : list) {
|
|
|
List<FsStoreProductAttrValueScrm> param = fsStoreProductAttrValueMapper.selectFsStoreProductAttrValueByProductId(product.getProductId());
|
|
|
- //获取店铺
|
|
|
- FsStoreScrm store = fsStoreScrmService.selectFsStoreByStoreId(product.getStoreId());
|
|
|
- if(store == null || 1 != store.getStatus()){
|
|
|
- return R.error("ID为:" + product.getProductId() + "的店铺不存在或未启用");
|
|
|
- }else{
|
|
|
- //验证资质
|
|
|
- switch (product.getProductType()){
|
|
|
- case 1://非处方
|
|
|
- break;
|
|
|
- case 2://处方
|
|
|
- if("".equals(store.getDrugLicense()) || LocalDate.now().isBefore(store.getDrugLicenseExpiryEnd())){
|
|
|
- return R.error("ID为:" + product.getProductId() + "的店铺药品资质为空或已过期,请完善后再添加");
|
|
|
- }
|
|
|
- break;
|
|
|
- case 3://食品
|
|
|
- if("".equals(store.getFoodLicense()) || LocalDate.now().isBefore(store.getFoodLicenseExpiryEnd())){
|
|
|
- return R.error("ID为:" + product.getProductId() + "的店铺食品资质为空或已过期,请完善后再添加");
|
|
|
- }
|
|
|
- break;
|
|
|
- case 4://器械
|
|
|
- if("".equals(store.getMedicalDevice3()) || LocalDate.now().isBefore(store.getMedicalDevice3ExpiryEnd())){
|
|
|
- return R.error("ID为:" + product.getProductId() + "的店铺器械资质为空或已过期,请完善后再添加");
|
|
|
- }
|
|
|
- break;
|
|
|
- default:
|
|
|
- return R.error("ID为:" + product.getProductId() + "的商品类型错误");
|
|
|
+ if(!("益善缘".equals(cloudHostProper.getCompanyName()))) {
|
|
|
+ //获取店铺
|
|
|
+ FsStoreScrm store = fsStoreScrmService.selectFsStoreByStoreId(product.getStoreId());
|
|
|
+ if (store == null || 1 != store.getStatus()) {
|
|
|
+ return R.error("ID为:" + product.getProductId() + "的店铺不存在或未启用");
|
|
|
+ } else {
|
|
|
+ //验证资质
|
|
|
+ switch (product.getProductType()) {
|
|
|
+ case 1://非处方
|
|
|
+ break;
|
|
|
+ case 2://处方
|
|
|
+ if ("".equals(store.getDrugLicense()) || LocalDate.now().isBefore(store.getDrugLicenseExpiryEnd())) {
|
|
|
+ return R.error("ID为:" + product.getProductId() + "的店铺药品资质为空或已过期,请完善后再添加");
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 3://食品
|
|
|
+ if ("".equals(store.getFoodLicense()) || LocalDate.now().isBefore(store.getFoodLicenseExpiryEnd())) {
|
|
|
+ return R.error("ID为:" + product.getProductId() + "的店铺食品资质为空或已过期,请完善后再添加");
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 4://器械
|
|
|
+ if ("".equals(store.getMedicalDevice3()) || LocalDate.now().isBefore(store.getMedicalDevice3ExpiryEnd())) {
|
|
|
+ return R.error("ID为:" + product.getProductId() + "的店铺器械资质为空或已过期,请完善后再添加");
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ return R.error("ID为:" + product.getProductId() + "的商品类型错误");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|