Commit a02c2eb3 by guojuxing

门店binlog调整

parent 6b5b5621
......@@ -62,7 +62,7 @@ public class StoreInfoMessageHandler implements MessageHandler {
List<StoreDTO> listStore = listStoreResponse.getResult();
for(StoreDTO storeDTO : listStore){
if(storeDTO.getOwnType() == StoreOwnTypeEnum.OWNER.getCode()){
if(Integer.valueOf(fieldMap.get("old_status").getValue()) == 1 && Integer.valueOf(fieldMap.get("new_status").getValue()) == 0){
if(Integer.valueOf(fieldMap.get("new_status").getValue()) == 0){
this.storeApiService.deleteStoreFromEs(storeDTO.getEnterpriseId(), storeDTO.getStoreId());
}else {
this.storeIndexRefreshHandler.refreshStoreIndex(storeDTO.getEnterpriseId(), storeDTO.getStoreId());
......
......@@ -87,7 +87,8 @@ public class StoreMessageHandler implements MessageHandler {
enterpriseId = Integer.valueOf(fieldMap.get("new_enterprise_id").getValue());
storeId = Integer.valueOf(fieldMap.get("new_store_id").getValue());
storeInfoId = Integer.valueOf(fieldMap.get("new_store_info_id").getValue());
if (Integer.valueOf(fieldMap.get(OLD_STATUS).getValue()) == 1 && Integer.valueOf(fieldMap.get(NEW_STATUS).getValue()) == 0) { //删除
if (Integer.valueOf(fieldMap.get(NEW_STATUS).getValue()) == 0) { //删除
this.storeApiService.deleteStoreFromEs(enterpriseId, storeId);
}else {
this.storeIndexRefreshHandler.refreshStoreIndex(enterpriseId, storeId);
......@@ -131,7 +132,7 @@ public class StoreMessageHandler implements MessageHandler {
storeSearchDTO.setEnterpriseId(enterpriseId);
Long count = this.storeApiService.queryStoreCountFromEs(storeSearchDTO).getResult();
boolean ownExist = count > 0 ? true : false;
Integer unionEnterpriseId = 1;
Integer unionEnterpriseId = dto.getUnionEnterpriseId();
storeSearchDTO.setEnterpriseId(unionEnterpriseId);
count = this.storeApiService.queryStoreCountFromEs(storeSearchDTO).getResult();
boolean unionExist = count > 0 ? true : false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment