Commit 8bbf3300 by 墨竹

feat:空指针判断

parent 74c39ba4
...@@ -221,7 +221,10 @@ public class KafkaMessageServiceImpl implements MessageListener<String, GicRecor ...@@ -221,7 +221,10 @@ public class KafkaMessageServiceImpl implements MessageListener<String, GicRecor
* @param syncPojo * @param syncPojo
*/ */
private void dealStore(StoreSyncPojo syncPojo) { private void dealStore(StoreSyncPojo syncPojo) {
if (syncPojo == null) {
logger.error("门店处理为空");
return;
}
if (syncPojo.getRecordType() == GicRecordType.UPDATE.value() if (syncPojo.getRecordType() == GicRecordType.UPDATE.value()
&& (!syncPojo.getStoreName().equals(syncPojo.getOldStoreName()))) { && (!syncPojo.getStoreName().equals(syncPojo.getOldStoreName()))) {
logger.info("门店名称变更:{}", JSONObject.toJSONString(syncPojo)); logger.info("门店名称变更:{}", JSONObject.toJSONString(syncPojo));
...@@ -262,7 +265,7 @@ public class KafkaMessageServiceImpl implements MessageListener<String, GicRecor ...@@ -262,7 +265,7 @@ public class KafkaMessageServiceImpl implements MessageListener<String, GicRecor
*/ */
private void dealStoreGroup(GroupSyncPojo syncPojo) { private void dealStoreGroup(GroupSyncPojo syncPojo) {
//删除 同步绑定门店 //删除 同步绑定门店
if (syncPojo.getOldStatus() == 1 && syncPojo.getStatus() == 0) { if (syncPojo!= null && syncPojo.getOldStatus() == 1 && syncPojo.getStatus() == 0) {
logger.info("门店分组变更,同步绑定门店:{}", JSONObject.toJSONString(syncPojo)); logger.info("门店分组变更,同步绑定门店:{}", JSONObject.toJSONString(syncPojo));
this.bindStoreToMq(syncPojo.getEnterpriseId()); this.bindStoreToMq(syncPojo.getEnterpriseId());
} }
......
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