From afd1bf986afbb1883efbaeb222d890ae6d15fba6 Mon Sep 17 00:00:00 2001 From: antao Date: Fri, 23 Nov 2018 19:46:59 +0800 Subject: [PATCH] jsoncpp int64 --- drogon_ctl/templates/model_cc.csp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drogon_ctl/templates/model_cc.csp b/drogon_ctl/templates/model_cc.csp index f94ec5d5..18a200b4 100644 --- a/drogon_ctl/templates/model_cc.csp +++ b/drogon_ctl/templates/model_cc.csp @@ -313,6 +313,8 @@ Json::Value {{className}}::toJson() const ret["<%c++$$<"]=get<%c++$$<()->toCustomedFormattedStringLocal("%Y-%m-%d %H:%M:%S", true); <%c++}else if(col._colDatabaseType=="bytea"){%> ret["<%c++$$<"]=drogon::base64Encode((const unsigned char *)get<%c++$$<()->data(),get<%c++$$<()->size()); +<%c++}else if(col._colType=="int64_t"){%> + ret["<%c++$$<"]=(Json::Int64)getValueOf<%c++$$<(); <%c++}else{%> ret["<%c++$$<"]=getValueOf<%c++$$<(); <%c++}%>