|
@@ -375,9 +375,25 @@ public class LotServiceImpl extends ServiceImpl<LotMapper,Lot> implements ILotSe
|
|
|
lotMapper.updateLot(lot);
|
|
lotMapper.updateLot(lot);
|
|
|
}
|
|
}
|
|
|
redisCache.setCacheMapValue(String.format(Constants.REDIS_MAP_AUC_LOT_TEMPLATE, lot.getAuctionId()), lot.getId().toString(), liveContext.getLive());
|
|
redisCache.setCacheMapValue(String.format(Constants.REDIS_MAP_AUC_LOT_TEMPLATE, lot.getAuctionId()), lot.getId().toString(), liveContext.getLive());
|
|
|
|
|
+ // 保存拍品分类关联
|
|
|
|
|
+ saveLotCategoryRelation(lot);
|
|
|
}, true);
|
|
}, true);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ private void saveLotCategoryRelation(Lot lot) {
|
|
|
|
|
+ List<Long> categoryIds = new ArrayList<>();
|
|
|
|
|
+ if (StringUtils.isNotEmpty(lot.getCategory())) {
|
|
|
|
|
+ categoryIds.add(Long.parseLong(lot.getCategory()));
|
|
|
|
|
+ }
|
|
|
|
|
+ if (StringUtils.isNotEmpty(lot.getSubCategory())) {
|
|
|
|
|
+ categoryIds.add(Long.parseLong(lot.getSubCategory()));
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!categoryIds.isEmpty()) {
|
|
|
|
|
+ spuCategoryMapper.deleteLotCategoryRelation(lot.getId());
|
|
|
|
|
+ spuCategoryMapper.insertLotCategoryRelation(lot.getId(), categoryIds);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
@Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class)
|
|
@Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class)
|
|
|
public void pubLots(Auction auction) {
|
|
public void pubLots(Auction auction) {
|
|
@@ -967,11 +983,11 @@ public class LotServiceImpl extends ServiceImpl<LotMapper,Lot> implements ILotSe
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
Long favoriteCount = lotFansMapper.selectCount(new LambdaQueryWrapper<LotFans>()
|
|
Long favoriteCount = lotFansMapper.selectCount(new LambdaQueryWrapper<LotFans>()
|
|
|
- .eq(LotFans::getLotId, lot.getId())
|
|
|
|
|
- .eq(LotFans::getUserId, userInfo.getId().longValue())
|
|
|
|
|
- .eq(LotFans::getType, "user_like"));
|
|
|
|
|
|
|
+ .eq(LotFans::getLotId, lot.getId())
|
|
|
|
|
+ .eq(LotFans::getDelFlag, 0)
|
|
|
|
|
+ .eq(LotFans::getUserId, userInfo.getId().longValue())
|
|
|
|
|
+ .eq(LotFans::getType, "user_like"));
|
|
|
response.setIsFans(favoriteCount > 0);
|
|
response.setIsFans(favoriteCount > 0);
|
|
|
-
|
|
|
|
|
LambdaQueryWrapper<DepositOrder> depositQuery = new LambdaQueryWrapper<DepositOrder>()
|
|
LambdaQueryWrapper<DepositOrder> depositQuery = new LambdaQueryWrapper<DepositOrder>()
|
|
|
.eq(DepositOrder::getUserId, userInfo.getId())
|
|
.eq(DepositOrder::getUserId, userInfo.getId())
|
|
|
.in(DepositOrder::getStatus, 1);
|
|
.in(DepositOrder::getStatus, 1);
|