...
|
...
|
@@ -192,7 +192,9 @@ public class YohoNowDataSynService { |
|
|
needSyncList.add(articleLabel);
|
|
|
});
|
|
|
}
|
|
|
publicEntityManager.getTransaction().begin();
|
|
|
if(!publicEntityManager.getTransaction().isActive()){
|
|
|
publicEntityManager.getTransaction().begin();
|
|
|
}
|
|
|
StringBuilder sb = null;
|
|
|
for(PublicArticleLabel attention : needSyncList){
|
|
|
if(null == sb ){
|
...
|
...
|
@@ -209,7 +211,9 @@ public class YohoNowDataSynService { |
|
|
}
|
|
|
|
|
|
private void savePublicLabels(List<PublicLabel> needSyncLabelList){
|
|
|
publicEntityManager.getTransaction().begin();
|
|
|
if(!publicEntityManager.getTransaction().isActive()){
|
|
|
publicEntityManager.getTransaction().begin();
|
|
|
}
|
|
|
StringBuilder sb = null;
|
|
|
for(PublicLabel attention : needSyncLabelList){
|
|
|
if(null == sb ){
|
...
|
...
|
@@ -410,7 +414,9 @@ public class YohoNowDataSynService { |
|
|
}
|
|
|
|
|
|
private void savePublicUserAttentions(List<PublicUserAttention> userAttentions){
|
|
|
publicEntityManager.getTransaction().begin();
|
|
|
if(!publicEntityManager.getTransaction().isActive()){
|
|
|
publicEntityManager.getTransaction().begin();
|
|
|
}
|
|
|
StringBuilder sb = null;
|
|
|
for(PublicUserAttention attention : userAttentions){
|
|
|
if(null == sb ){
|
...
|
...
|
@@ -506,7 +512,9 @@ public class YohoNowDataSynService { |
|
|
}
|
|
|
|
|
|
private void savePublicUserPraises(List<PublicUserPraise> articlePraises){
|
|
|
publicEntityManager.getTransaction().begin();
|
|
|
if(!publicEntityManager.getTransaction().isActive()){
|
|
|
publicEntityManager.getTransaction().begin();
|
|
|
}
|
|
|
StringBuilder sb = null;
|
|
|
for(PublicUserPraise attention : articlePraises){
|
|
|
if(null == sb ){
|
...
|
...
|
|