mini设计阶段确认加校验

This commit is contained in:
shuo.wang
2025-04-14 16:29:43 +08:00
parent efe854c416
commit 8564e70e13
3 changed files with 11 additions and 3 deletions

View File

@@ -239,6 +239,8 @@ public enum ErrorCodeEnum {
CREATE_PASSWORD_FAIL(131007,"身份证号信息错误",null), CREATE_PASSWORD_FAIL(131007,"身份证号信息错误",null),
GET_HOME_TEMPLATE_ERROR(131008,"获取首页模板失败",null), GET_HOME_TEMPLATE_ERROR(131008,"获取首页模板失败",null),
THE_DATA_IS_NOT_FILLED(131009,"您有数据还未填写",null), THE_DATA_IS_NOT_FILLED(131009,"您有数据还未填写",null),
QUOTATION_URL_REQUIRED(131010,"请等待报价单提交",null),
DESIGN_URL_REQUIRED(131011,"请等待设计图提交",null),
TALLY_BOOK_NOT_EXIST(180001, "记账本数据不存在", null), TALLY_BOOK_NOT_EXIST(180001, "记账本数据不存在", null),

View File

@@ -77,8 +77,8 @@ public enum ShopSubStageStatusEnum {
//平台资料提交 //平台资料提交
SHOP_SUB_STAGE_STATUS_150(ShopSubStageEnum.SHOP_STAGE_15, 1500, "待提交", Boolean.FALSE), SHOP_SUB_STAGE_STATUS_150(ShopSubStageEnum.SHOP_STAGE_15, 1500, "待提交", Boolean.FALSE),
SHOP_SUB_STAGE_STATUS_151(ShopSubStageEnum.SHOP_STAGE_15, 1510, "订货信息待提交", Boolean.TRUE), SHOP_SUB_STAGE_STATUS_151(ShopSubStageEnum.SHOP_STAGE_15, 1510, "待总部填写仓配信息", Boolean.TRUE),
SHOP_SUB_STAGE_STATUS_152(ShopSubStageEnum.SHOP_STAGE_15, 1520, "总部订货收款账户待提交",Boolean.TRUE), SHOP_SUB_STAGE_STATUS_152(ShopSubStageEnum.SHOP_STAGE_15, 1520, "总部提交订货收款信息",Boolean.TRUE),
SHOP_SUB_STAGE_STATUS_153(ShopSubStageEnum.SHOP_STAGE_15, 1530, "已完成", Boolean.TRUE), SHOP_SUB_STAGE_STATUS_153(ShopSubStageEnum.SHOP_STAGE_15, 1530, "已完成", Boolean.TRUE),
//POS //POS

View File

@@ -637,6 +637,13 @@ public class DecorationServiceImpl implements DecorationService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Boolean confirmDesign(DecorationDesignRequest request, LoginUserInfo user) { public Boolean confirmDesign(DecorationDesignRequest request, LoginUserInfo user) {
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId());
if (StringUtils.isBlank(decoration.getQuotationUrl())){
throw new ServiceException(ErrorCodeEnum.QUOTATION_URL_REQUIRED);
}
if (StringUtils.isBlank(decoration.getDesignUrl())){
throw new ServiceException(ErrorCodeEnum.DESIGN_URL_REQUIRED);
}
//重复提交校验 3秒内不能重复提交 //重复提交校验 3秒内不能重复提交
String lockKey = "confirmDesign:" + request.getShopId(); String lockKey = "confirmDesign:" + request.getShopId();
String lockValue = UUID.randomUUID().toString(); String lockValue = UUID.randomUUID().toString();
@@ -645,7 +652,6 @@ public class DecorationServiceImpl implements DecorationService {
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION); throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
} }
DecorationDesignInfoDO decorationDesignInfoDO = request.toDecorationDesignInfoDO(); DecorationDesignInfoDO decorationDesignInfoDO = request.toDecorationDesignInfoDO();
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId());
if (Objects.nonNull(decoration)) { if (Objects.nonNull(decoration)) {
decorationDesignInfoDO.setId(decoration.getId()); decorationDesignInfoDO.setId(decoration.getId());
decorationDesignInfoDAO.updateByPrimaryKeySelective(decorationDesignInfoDO); decorationDesignInfoDAO.updateByPrimaryKeySelective(decorationDesignInfoDO);