fix
This commit is contained in:
@@ -175,7 +175,7 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
@Override
|
@Override
|
||||||
public List<ShopStageInfoVO> getShopStageInfo(Long shopId, Integer shopStage) {
|
public List<ShopStageInfoVO> getShopStageInfo(Long shopId, Integer shopStage) {
|
||||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||||
if (Objects.isNull(shopInfo)){
|
if (Objects.isNull(shopInfo)) {
|
||||||
throw new ServiceException(ErrorCodeEnum.SHOP_ID_NOT_EXIST);
|
throw new ServiceException(ErrorCodeEnum.SHOP_ID_NOT_EXIST);
|
||||||
}
|
}
|
||||||
if (Objects.nonNull(shopStage)) {
|
if (Objects.nonNull(shopStage)) {
|
||||||
@@ -199,7 +199,7 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Integer deleteShop(DeleteShopRequest request) {
|
public Integer deleteShop(DeleteShopRequest request) {
|
||||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||||
if (shopInfo==null){
|
if (shopInfo == null) {
|
||||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||||
}
|
}
|
||||||
// if (Objects.nonNull(shopInfo)) {
|
// if (Objects.nonNull(shopInfo)) {
|
||||||
@@ -218,7 +218,9 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
// pointRecommendDAO.updateRecommendStatus(shopInfo.getPointId(), PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_1, Arrays.asList(PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_5));
|
// pointRecommendDAO.updateRecommendStatus(shopInfo.getPointId(), PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_1, Arrays.asList(PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_5));
|
||||||
// }
|
// }
|
||||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||||
lineInfoDO.setWantShopNum(lineInfoDO.getWantShopNum() - 1);
|
if (lineInfoDO.getWantShopNum() > 1) {
|
||||||
|
lineInfoDO.setWantShopNum(lineInfoDO.getWantShopNum() - 1);
|
||||||
|
}
|
||||||
lineInfoDO.setUpdateTime(new Date());
|
lineInfoDO.setUpdateTime(new Date());
|
||||||
lineInfoDO.setUpdateUserId(request.getUserId());
|
lineInfoDO.setUpdateUserId(request.getUserId());
|
||||||
lineInfoDAO.updateLineInfo(lineInfoDO);
|
lineInfoDAO.updateLineInfo(lineInfoDO);
|
||||||
|
|||||||
Reference in New Issue
Block a user