修改订货金bug

This commit is contained in:
shuo.wang
2024-05-07 14:27:08 +08:00
parent c2982e7fe5
commit 51adc16ecc
4 changed files with 7 additions and 35 deletions

View File

@@ -16,5 +16,5 @@ public interface FirstOrderService {
Integer saveOrder(FirstOrderRequest request, LoginUserInfo user);
FirstOrderDTO getOrder(Long shopId);
FirstOrderDTO flush(Long shopId);
}

View File

@@ -79,11 +79,9 @@ public class FirstOrderServiceImp implements FirstOrderService {
//云立方同步
if (num > 0) {
try {
// ShopInfoDO shopInfo = shopService.getShopInfo(order.getShopId());
// String shopCode = shopInfo.getShopInfopCode();
// String shopCode = "31310383";
// Boolean flag = coolStoreStartFlowService.getFirstOrder(shopCode);
Boolean flag = Boolean.TRUE;
ShopInfoDO shopInfo = shopService.getShopInfo(order.getShopId());
String storeNum = shopInfo.getStoreNum();
Boolean flag = coolStoreStartFlowService.getFirstOrder(storeNum);
log.info("saveOrder,flag:{}", flag);
if (flag == null) {
throw new ServiceException(ErrorCodeEnum.GET_FIRST_ORDER);
@@ -105,7 +103,7 @@ public class FirstOrderServiceImp implements FirstOrderService {
public FirstOrderDTO getOrder(Long shopId) {
log.info("getOrder shopId:{},", shopId);
if (shopId == null) {
log.error("shopId/shopCode is null");
log.error("shopId is null");
throw new ServiceException(ErrorCodeEnum.FIRST_ORDER_PARAM_NULL);
}
FirstOrderDTO order = firstOrderDAO.selectFirstOrderByShopId(shopId);
@@ -114,31 +112,4 @@ public class FirstOrderServiceImp implements FirstOrderService {
order.setFirstOrderSubStage(firstOrderStageInfo.getShopSubStageStatus());
return order;
}
@Override
public FirstOrderDTO flush(Long shopId) {
ShopStageInfoDO orderStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_15);
try {
if (!orderStageInfo.getShopSubStageStatus().
equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151.getShopSubStageStatus())) {
ShopInfoDO shopInfo = shopService.getShopInfo(shopId);
String shopCode = shopInfo.getShopCode();
Boolean flag = coolStoreStartFlowService.getFirstOrder(shopCode);
log.info("saveOrder,flag:{}", flag);
if (flag == null) {
throw new ServiceException(ErrorCodeEnum.GET_FIRST_ORDER);
}
if (flag) {
//更改子阶段状态
shopStageInfoDAO.updateShopStageAndAuditInfo(shopId,
ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151, null);
preparationService.whetherToOpenForAcceptance(shopId);
}
}
} catch (Exception e) {
log.error("获取鲜丰订货金异常", e);
}
FirstOrderDTO order = getOrder(shopId);
return order;
}
}