增加,门店恢复状态,删除门店接口
This commit is contained in:
@@ -192,8 +192,12 @@ public class ShopServiceImpl implements ShopService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Integer deleteShop(DeleteShopRequest request) {
|
||||
// ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (shopInfo==null){
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
// if (Objects.nonNull(shopInfo)) {
|
||||
// //进入选址不允许删除操作
|
||||
// throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
@@ -209,9 +213,16 @@ public class ShopServiceImpl implements ShopService {
|
||||
// }
|
||||
// pointRecommendDAO.updateRecommendStatus(shopInfo.getPointId(), PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_1, Arrays.asList(PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_5));
|
||||
// }
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||
lineInfoDO.setWantShopNum(lineInfoDO.getWantShopNum() - 1);
|
||||
lineInfoDO.setUpdateTime(new Date());
|
||||
lineInfoDO.setUpdateUserId(request.getUserId());
|
||||
lineInfoDAO.updateLineInfo(lineInfoDO);
|
||||
ShopInfoDO updateShop = new ShopInfoDO();
|
||||
updateShop.setId(request.getShopId());
|
||||
updateShop.setDeleted(true);
|
||||
updateShop.setUpdateTime(new Date());
|
||||
updateShop.setUpdateUserId(request.getUserId());
|
||||
return shopInfoDAO.updateShopInfo(updateShop);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user