...
|
...
|
@@ -18,7 +18,7 @@ public class PublicUserFavoriteService { |
|
|
|
|
|
private static final Logger logger = LoggerFactory.getLogger(PublicUserFavoriteService.class);
|
|
|
|
|
|
public void saveOrUpdatePublicUserPraise(PublicUserFavorite publicUserFavorite)throws Exception {
|
|
|
public void saveOrUpdatePublicUserFavorite(PublicUserFavorite publicUserFavorite)throws Exception {
|
|
|
PublicUserFavorite publicUserFavoriteFromDB = getPublicUserFavoriteByUniqueKey(publicUserFavorite);
|
|
|
if (publicUserFavoriteFromDB != null) { //更新
|
|
|
BeanCopyUtils.copyNonNullProperties(publicUserFavorite , publicUserFavoriteFromDB , PublicUserFavorite.class);
|
...
|
...
|
@@ -28,14 +28,14 @@ public class PublicUserFavoriteService { |
|
|
}
|
|
|
}
|
|
|
|
|
|
public void deletePublicUserPraise(PublicUserFavorite publicUserFavorite) throws Exception{
|
|
|
public void deletePublicUserFavorite(PublicUserFavorite publicUserFavorite) throws Exception{
|
|
|
PublicUserFavorite publicUserFavoriteFromDB = getPublicUserFavoriteByUniqueKey(publicUserFavorite);
|
|
|
if (publicUserFavoriteFromDB != null) {
|
|
|
repository.deleteById(publicUserFavoriteFromDB.getId());
|
|
|
}else{
|
|
|
logger.error("参数不合法srcChannel={},uid={},targetId={}", publicUserFavorite.getSrcChannel(),
|
|
|
publicUserFavorite.getUid(),publicUserFavorite.getTargetId());
|
|
|
throw new Exception();
|
|
|
throw new Exception("deletePublicUserFavorite数据不存在");
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
|