Signed-off-by: Cuiziyuan <cuiziyuan1@h-partners.com>
This commit is contained in:
Cuiziyuan 2024-11-11 09:24:41 +08:00
parent 79169f1f98
commit a545f58538
2 changed files with 4 additions and 4 deletions

View File

@ -18,7 +18,7 @@
namespace OHOS::DataShare {
bool TemplateNode::Marshal(DistributedData::Serializable::json &node) const
{
bool ret = SetValue(node[GET_NAME(update)], predicates);
bool ret = SetValue(node[GET_NAME(update)], update);
ret = SetValue(node[GET_NAME(predicates)], predicates);
ret = ret && SetValue(node[GET_NAME(scheduler)], scheduler);
return ret;
@ -26,7 +26,7 @@ bool TemplateNode::Marshal(DistributedData::Serializable::json &node) const
bool TemplateNode::Unmarshal(const DistributedData::Serializable::json &node)
{
bool ret = GetValue(node, GET_NAME(update), predicates);
bool ret = GetValue(node, GET_NAME(update), update);
ret = GetValue(node, GET_NAME(predicates), predicates);
return ret && GetValue(node, GET_NAME(scheduler), scheduler);
}

View File

@ -346,9 +346,9 @@ int RdbSubscriberManager::Notify(const Key &key, int32_t userId, const std::vect
if (!tpl.update_.empty()) {
auto [errCode, rowCount] = delegate->UpdateSql(tpl.update_);
if (errCode != E_OK) {
ZLOGE("Update failed, err:%{public}d", errCode);
ZLOGE("Update failed, err:%{public}d, %{public}s, %{public}" PRId64 ", %{public}s",
errCode, DistributedData::Anonymous::Change(key.uri).c_str(), key.subscriberId, key.bundleName.c_str());
}
ZLOGI("Update finished, data changed:%{public}lld", rowCount);
}
ZLOGI("emit, valSize: %{public}zu, dataSize:%{public}zu, uri:%{public}s,",