修改订货金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

@@ -184,6 +184,7 @@ public enum ErrorCodeEnum {
UPDATE_SHOP_SUB_STAGE_STATUS_FALSE(103009,"修改开业运营方案阶段状态失败",null),
SHOP_ID_NOT_EXIST(103010,"shopId不存在",null),
FIRST_ORDER_PARAM_NULL(103020,"首批订货金参数为空",null),
USER_NOT_LOGIN(103021,"用户未登录",null),
XFSG_SERVICE_ERROR(103099,"鲜丰服务调用失败",null),
GET_FIRST_ORDER(103021,"获取鲜丰首批订货金失败",null),

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;
}
}

View File

@@ -39,7 +39,7 @@ import java.util.List;
@RequestMapping("/pc/openPreparation")
@Api(tags = "pc开业筹备")
@Slf4j
public class OpenPreparationController {
public class PCOpenPreparationController {
@Resource
private FirstOrderService firstOrderService;