fix(asms): 标准性质判断

This commit is contained in:
yjz
2024-03-06 13:50:51 +08:00
parent ddabbf2d4f
commit 1992d9a83c
5 changed files with 40 additions and 11 deletions
@@ -540,7 +540,12 @@ public class LawsAsmsOpenApiServiceImpl extends ServiceImpl<LawsAsmsOpenApiMappe
lawsDomesticStandard.setCreateTime(getSimpleDate2(lawsAsmsDomestic.getCreateTimeString()));
// 更新时间
lawsDomesticStandard.setUpdateTime(getSimpleDate2(lawsAsmsDomestic.getUpdateTimeString()));
lawsDomesticStandardService.saveOrUpdate(lawsDomesticStandard);
int count = lawsDomesticStandardService.queryCountById(lawsAsmsDomestic.getId());
if (count > 0){
lawsDomesticStandardService.updateById(lawsDomesticStandard);
}else {
lawsDomesticStandardService.save(lawsDomesticStandard);
}
// 同步es数据库
lawsHomeSearchService.updateEsData(LawsHomeSearchCommon.LAWS_DOMESTIC_STANDARD, lawsDomesticStandard.getId(), LawsHomeSearchCommon.LAWS_ES_ADD);
});