mini设计阶段确认加校验
This commit is contained in:
@@ -637,6 +637,13 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
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秒内不能重复提交
|
||||
String lockKey = "confirmDesign:" + request.getShopId();
|
||||
String lockValue = UUID.randomUUID().toString();
|
||||
@@ -645,7 +652,6 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||
}
|
||||
DecorationDesignInfoDO decorationDesignInfoDO = request.toDecorationDesignInfoDO();
|
||||
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId());
|
||||
if (Objects.nonNull(decoration)) {
|
||||
decorationDesignInfoDO.setId(decoration.getId());
|
||||
decorationDesignInfoDAO.updateByPrimaryKeySelective(decorationDesignInfoDO);
|
||||
|
||||
Reference in New Issue
Block a user