fix addBranchShop
This commit is contained in:
@@ -263,12 +263,19 @@ public class ShopServiceImpl implements ShopService {
|
||||
}
|
||||
ShopInfoDO shopInfoDO = request.toDO(request, lineInfo);
|
||||
List<ShopInfoDO> shopList = shopInfoDAO.getShopList(lineInfo.getId());
|
||||
if(StringUtils.isBlank(request.getShopName())){
|
||||
if (CollectionUtils.isNotEmpty(shopList)) {
|
||||
shopInfoDO.setShopName("店铺"+NumberConverter.convertArabicToChinese(lineInfo.getWantShopNum() + 1));
|
||||
}else{
|
||||
shopInfoDO.setShopName("店铺"+NumberConverter.convertArabicToChinese(lineInfo.getWantShopNum()));
|
||||
}
|
||||
}else{
|
||||
shopInfoDO.setShopName(request.getShopName());
|
||||
}
|
||||
|
||||
if (CollectionUtils.isNotEmpty(shopList)) {
|
||||
shopInfoDO.setShopName("店铺"+NumberConverter.convertArabicToChinese(lineInfo.getWantShopNum() + 1));
|
||||
lineInfo.setWantShopNum(lineInfo.getWantShopNum() + 1);
|
||||
lineInfoDAO.updateLineInfo(lineInfo);
|
||||
}else {
|
||||
shopInfoDO.setShopName("店铺"+NumberConverter.convertArabicToChinese(lineInfo.getWantShopNum()));
|
||||
}
|
||||
shopInfoDO.setCreateUserId(userId);
|
||||
Long shopId = shopInfoDAO.addShopInfo(shopInfoDO);
|
||||
|
||||
Reference in New Issue
Block a user