master:档口审核时,初始化库存系统;

pull/1121/head
liujiang 2025-10-14 12:58:35 +08:00
parent b10e834365
commit c5b2c7fd3a
3 changed files with 11 additions and 0 deletions

View File

@ -65,6 +65,8 @@ public class StoreCertCreateVO {
private String facAddress;
@ApiModelProperty(value = "生产规模")
private Integer prodScale;
@ApiModelProperty(value = "库存系统 1步橘 2天友 3发货宝")
private Integer stockSys;
}
@Data

View File

@ -50,6 +50,8 @@ public class StoreCertDTO {
private String facAddress;
@ApiModelProperty(value = "生产规模")
private Integer prodScale;
@ApiModelProperty(value = "库存系统 1步橘 2天友 3发货宝")
private Integer stockSys;
}
@Data

View File

@ -156,11 +156,18 @@ public class StoreServiceImpl implements IStoreService {
!Objects.equals(store.getStoreStatus(), StoreStatus.AUDIT_REJECTED.getValue())) {
throw new ServiceException("当前状态不为待审核 或 审核驳回,不可审核!", HttpStatus.ERROR);
}
// 如果库存系统为空 则报错
if (ObjectUtils.isEmpty(auditDTO.getStoreCert().getStoreBasic().getStockSys())) {
throw new ServiceException("库存系统不能为空!", HttpStatus.ERROR);
}
// 判断库存系统的值在系统是否存在
StockSysType.of(auditDTO.getStoreCert().getStoreBasic().getStockSys());
auditDTO.getStoreCert().setStoreId(auditDTO.getStoreId());
// 更新档口认证信息
this.updateStoreCert(auditDTO.getStoreCert());
store.setStoreStatus(StoreStatus.TRIAL_PERIOD.getValue());
store.setRejectReason("");
store.setStockSys(auditDTO.getStoreCert().getStoreBasic().getStockSys());
// 将store存到redis中
redisCache.setCacheObject(CacheConstants.STORE_KEY + store.getId(), store);
} else {