fix addBranchShop
This commit is contained in:
@@ -23,7 +23,6 @@ public class AddBranchShopRequest {
|
||||
@NotNull
|
||||
private Long lineId;
|
||||
@ApiModelProperty("门店名称")
|
||||
@NotBlank
|
||||
private String shopName;
|
||||
@ApiModelProperty("意向开店区域")
|
||||
@NotNull
|
||||
|
||||
@@ -261,12 +261,19 @@ public class ShopServiceImpl implements ShopService {
|
||||
if (lineInfo.getWorkflowSubStageStatus() < WorkflowSubStageStatusEnum.PAY_DEPOSIT_45.getCode()) {
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_STATUS_NOT_ALLOW_OPERATE);
|
||||
}
|
||||
ShopInfoDO shopInfoDO = request.toDO(request, lineInfo.getPartnerId());
|
||||
List<ShopInfoDO> shopList = shopInfoDAO.getShopList(lineInfo.getId());
|
||||
if (CollectionUtils.isNotEmpty(shopList)) {
|
||||
if (StringUtils.isBlank(request.getShopName())) {
|
||||
shopInfoDO.setShopName("店铺" + NumberConverter.convertArabicToChinese(lineInfo.getWantShopNum()+1));
|
||||
}
|
||||
lineInfo.setWantShopNum(lineInfo.getWantShopNum() + 1);
|
||||
lineInfoDAO.updateLineInfo(lineInfo);
|
||||
}else {
|
||||
if (StringUtils.isBlank(request.getShopName())) {
|
||||
shopInfoDO.setShopName("店铺" + NumberConverter.convertArabicToChinese(lineInfo.getWantShopNum()));
|
||||
}
|
||||
}
|
||||
ShopInfoDO shopInfoDO = request.toDO(request, lineInfo.getPartnerId());
|
||||
shopInfoDO.setCreateUserId(userId);
|
||||
Long shopId = shopInfoDAO.addShopInfo(shopInfoDO);
|
||||
if (lineInfo.getWorkflowSubStageStatus().equals(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_125.getCode())) {
|
||||
|
||||
Reference in New Issue
Block a user