Commit f89a1bb2 by wuyang.zou

1、将 fmclient.dll EC-1446 + CCO-1438 两个区域版本进行合并

2、程序 兼容 fmclient.cfg 配置文件是老文件的缺陷bug: 无 Upp Svr 域名;

3、Version:1.20.11.3

4、fmclient.dll -> 星巴克卡券核销 + 打印日结报表;
parent ffbdea21
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
......@@ -20,12 +20,14 @@
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
......
No preview for this file type
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
......@@ -28,8 +28,8 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
......@@ -43,11 +43,13 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>D:\gitcode\sbkclient\ZH_Client\include;D:\FM\sbkClient\ZH_Client\include;C:\openssl\openssl-1.0.1s\inc32;$(IncludePath)</IncludePath>
<LibraryPath>D:\gitcode\sbkclient\ZH_Client\lib;C:\openssl\openssl-1.0.1s\out32dll;D:\FM\sbkClient\ZH_Client\lib;$(LibraryPath)</LibraryPath>
<IncludePath>E:\zouwuyang\StarBucks\UPP-Client-Project\fmclient-CCO-1438\sbkclient\ZH_Client\include;E:\zouwuyang\StarBucks\UPP-Client-Project\fmclient-CCO-1438\sbkclient\ZH_Client\include\curl-7.40.0\include\curl;$(IncludePath)</IncludePath>
<LibraryPath>E:\zouwuyang\StarBucks\UPP-Client-Project\fmclient-CCO-1438\sbkclient\ZH_Client\lib;E:\zouwuyang\StarBucks\UPP-Client-Project\fmclient-CCO-1438\sbkclient\ZH_Client;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>E:\zouwuyang\StarBucks\UPP-Client-Project\fmclient-CCO-1438\sbkclient\ZH_Client;E:\zouwuyang\StarBucks\UPP-Client-Project\fmclient-CCO-1438\sbkclient\ZH_Client\include;E:\zouwuyang\StarBucks\UPP-Client-Project\fmclient-CCO-1438\sbkclient\ZH_Client\include\curl-7.40.0\include\curl;$(IncludePath)</IncludePath>
<LibraryPath>E:\zouwuyang\StarBucks\UPP-Client-Project\fmclient-CCO-1438\sbkclient\ZH_Client;E:\zouwuyang\StarBucks\UPP-Client-Project\fmclient-CCO-1438\sbkclient\ZH_Client\lib;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
......@@ -56,13 +58,13 @@
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>C:\curl-7.40.0-devel-mingw32\include\curl;C:\curl-7.40.0-devel-mingw32\include;$(SolutionDir)\ZH_Client</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)\ZH_Client</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>C:\openssl\openssl-1.0.1s\out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libeay32.lib;ssleay32.lib;gtestd.lib;sqlite3.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
......@@ -81,6 +83,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>libeay32.lib;ssleay32.lib;gtestd.lib;sqlite3.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
......
......@@ -2,6 +2,7 @@
#define FM_DATA_PROCESS_H
#include <string>
#include <sstream>
#include <openssl/evp.h>
#include <openssl/bio.h>
......@@ -10,19 +11,14 @@
#include <openssl/pem.h>
#include <openssl/err.h>
#include <openssl/des.h>
#include "fmlog.h"
//#include <jansson.h>
//#include <jansson_private.h>
#include "fmlog.h"
#include "fmglobal.h"
#include <rapidjson/document.h>
#include <rapidjson/prettywriter.h>
#include <rapidjson/writer.h>
#include <rapidjson/stringbuffer.h>
#include <sstream>
#include "fmglobal.h"
using namespace rapidjson;
class DataProcess
......@@ -45,7 +41,7 @@ public:
if(input == NULL)
return 0;
//assert(NULL != input);
b64 = BIO_new(BIO_f_base64());
bmem = BIO_new(BIO_s_mem());
if (NULL == b64 || NULL == bmem) {
......@@ -71,6 +67,7 @@ public:
return len;
}
/***********************************
*函数名:debase64
*input :base64字符串
......@@ -87,7 +84,7 @@ public:
if(input == NULL)
return 0;
//assert(NULL != input);
if (length > size)
return 0;
memset(result, 0, size);
......@@ -106,6 +103,7 @@ public:
return len;
}
/***********************************
*RSASign : RSA签名
*text :待签名字符串
......@@ -129,7 +127,6 @@ public:
return 0;
//printf("\n%s\n", tmpprivatekey);
OpenSSL_add_all_algorithms();
//读取私钥从一个pem文件中
......@@ -175,6 +172,7 @@ public:
return length;
}
/***********************************
*RSAVerify : RSA验签
*text :待签名字符串
......@@ -236,6 +234,7 @@ public:
return 1;
}
/***********************************
*DES3Encode : DES3加密字符串]
*key : 3des加密秘钥
......@@ -276,6 +275,7 @@ public:
free(tmp);
return len;
}
/***********************************
*DES3Decode : DES3解密字符串
*text :待签名字符串
......@@ -320,6 +320,7 @@ public:
return iOutLen;
}
/***********************************
*GetPEMKey : 将公钥或私钥转换为opelssl可加载的pem格式
*key :原始秘钥
......@@ -334,35 +335,27 @@ public:
std::stringstream sstm;
std::string str(key, keylen);
if (keylen > outpemkeymaxlen)
{
if (keylen > outpemkeymaxlen) {
return 0;
}
if(ispublickey == 0)
{
if (ispublickey == 0) {
int i = 0;
sstm << "-----BEGIN RSA PRIVATE KEY-----\n";
while(i + 64 < keylen)
{
while(i + 64 < keylen) {
sstm << str.substr(i, 64) << "\n";
i += 64;
}
if(keylen - i > 0)
sstm << str.substr(i, keylen - i) << "\n";
sstm << "-----END RSA PRIVATE KEY-----\n";
}
else
{
} else {
int i = 0;
sstm << "-----BEGIN PUBLIC KEY-----\n";
while(i + 64 < keylen)
{
while(i + 64 < keylen) {
sstm << str.substr(i, 64) << "\n";
i += 64;
}
......@@ -377,6 +370,7 @@ public:
strcpy(outpemkey, sstm.str().c_str());
return 1;
}
/***********************************
*GetJsonKeyArray : 获取json中非array非object的key
*keys :json的key数组
......@@ -386,38 +380,18 @@ public:
static int GetJsonKeyArray(std::string* keys,const std::string &json)
{
LOG() << "GetJsonKeyArray";
//const char *key;
//json_t *root, *value;
//json_error_t error;
//int i = 0;
//root = json_loads(json.c_str(), 0, &error);
//if(!root)
// return 0;
//json_object_foreach(root, key, value)
//{
// keys[i] = std::string(key);
// i++ ;
//}
//json_decref(root);
Document root;
Value value;
int i = 0;
root.Parse<0>(json.c_str());
if(root.HasParseError())
{
if(root.HasParseError()) {
return 0;
}
Value::ConstMemberIterator itr;
for(itr = root.MemberBegin(); itr != root.MemberEnd(); itr++)
{
for(itr = root.MemberBegin(); itr != root.MemberEnd(); itr++) {
Document::AllocatorType allocator;
Value key;
key.CopyFrom(itr->name, allocator);
......@@ -427,6 +401,7 @@ public:
return i;
}
/***********************************
*SortString : 字符串数组排序
*keys :json的key数组
......@@ -439,12 +414,9 @@ public:
int i, j, k = 0;
std::string tmp;
for(i = 0; i < length - 1;i++)
{
for(j = i + 1; j < length; j++)
{
if(keys[i].compare(keys[j]) > 0 )
{
for(i = 0; i < length - 1;i++) {
for(j = i + 1; j < length; j++) {
if (keys[i].compare(keys[j]) > 0 ) {
tmp = keys[i];
keys[i] = keys[j];
keys[j] =tmp;
......@@ -452,6 +424,7 @@ public:
}
}
}
/***********************************
*GetValueFromJson : 按照顺序
*keys :json的key数组
......@@ -460,90 +433,37 @@ public:
static int GetValueFromJson(const std::string *keys, int length, const std::string &json, std::string &outmsg)
{
LOG() <<"GetValueFromJson";
//json_t *root, *value;
//json_error_t error;
//int num;
//char nums[32] = {0};
//const char *tmp;
//int i = 0;
//outmsg = std::string();
//root = json_loads(json.c_str(), 0, &error);
//if(!root)
// return 0;
//for(i = 0; i < length; i ++)
//{
// value = json_object_get(root, keys[i].c_str());
// if(json_is_string(value))
// {
// tmp = json_string_value(value);
// }
// else if(json_is_number(value))
// {
// num = (int)json_integer_value(value);
// itoa(num, nums, 10);
// tmp = nums;
// }
// else if(json_is_object(value))
// {
// continue;
// }
// else if(json_is_array(value))
// {
// continue;
// }else
// {
// continue;
// }
// outmsg.append(tmp);
// outmsg.append("|");
//}
//json_decref(root);
//outmsg.at(outmsg.size() - 1) = 0;
//return 1;
Document root;
Value value;
int num;
char nums[32] = {0};
const char *tmp;
int i = 0;
outmsg = std::string();
root.Parse<0>(json.c_str());
if(root.HasParseError())
{
if(root.HasParseError()) {
return 0;
}
for(i = 0; i < length; i++)
{
for(i = 0; i < length; i++) {
value = root[keys[i].c_str()];
if (value.IsString())
{
if (value.IsString()) {
tmp = value.GetString();
}
else if (value.IsInt())
{
} else if (value.IsInt()) {
num = (int)value.GetInt();
itoa(num, nums, 10);
tmp = nums;
}
else if (value.IsArray())
{
} else if (value.IsArray()) {
continue;
}
else
{
} else {
continue;
}
// 遍历最外层全部Key,且对应的Value->rapidJson::Value是 string/int 才追加到 带出参数;
// 数组/json对象 都直接跳过;
outmsg.append(tmp);
outmsg.append("|");
}
......
No preview for this file type
No preview for this file type
......@@ -10,26 +10,22 @@
#define MAX_SIGN_LEN 256
#define CFG_FILE_NAME "fmclient.cfg"
#define RBG_FILE_NAME "fmclient.rbk"
#define REQUEST_CRET "{\"ver\": 1,\"reqType\": 99,\"partnerId\":%d,\"storeId\":\"%s\",\"stationId\": \"%s\",\"mac\":\"%s\",\"posType\":%d}"
//#define REQUEST_CRET "{\"ver\": 1,\"reqType\": 99,\"partnerId\":%d,\"storeId\":\"%s\",\"stationId\": \"%s\",\"mac\":\"%s\"}"
//GC 1438
#define DES3_KEY "ABCD@#9876DFSAAWKLDEOPDD"
//CCO-1438
#define CCO_DES3_KEY "ABCD@#9876DFSAAWKLDEOPDD"
//EC-1446
#define EC_DES3_KEY "DDDDEEEE45LPODDCXZZLKDDO"
//EC 1446
//#define DES3_KEY "DDDDEEEE45LPODDCXZZLKDDO"
#define DLL_VERSION "1.20.11.3"
#define CRET_FILE_NAME "client.p12"
#define JSON_KEY_ONLY "partnerOrderId"
#define CFG_KEY "template"
#define TMP_JSON "json.ini"
#define DB_ORDER "order.db"
#define DB_TABLE_NAME "orderlist"
#define MAX_ORDERID_LEN 200
#define POSTYPE "posType"
#endif
\ No newline at end of file
......@@ -10,12 +10,10 @@
#include <fstream>
#include <sstream>
class LOG
{
public :
class LOG {
LOG()
{
public :
LOG() {
std::string filepath;
time_t tt = time(NULL);
tm *t = localtime(&tt);
......@@ -28,12 +26,9 @@ public :
filepath.append(_curr_filename);
filepath.append(".txt");
//std::cout << filepath << std::endl;
_filestm.open(filepath, std::ios::app);
if(_filestm.is_open())
{
if(_filestm.is_open()) {
_filestm << t->tm_year + 1900 << "-" << t->tm_mon + 1 << "-" << t->tm_mday << " " << t->tm_hour << ":" << t->tm_min << ":" << t->tm_sec << ":";
std::cout << t->tm_year + 1900 << "-" << t->tm_mon + 1 << "-" << t->tm_mday << " " << t->tm_hour << ":" << t->tm_min << ":" << t->tm_sec << ":";
_filestm.flush();
......@@ -41,38 +36,34 @@ public :
}
~LOG()
{
if(_filestm.is_open())
{
~LOG() {
if(_filestm.is_open()) {
_filestm << std::endl;
std::cout << std::endl;
_filestm.flush();
_filestm.close();
}
}
void Get_LOG_FileName()
{
void Get_LOG_FileName() {
time_t tt = time(NULL);
tm *t = localtime(&tt);
std::stringstream sstr;
sstr << "fmclient" << t->tm_year + 1900 << t->tm_mon + 1 << t->tm_mday;
std::string filename = std::string(sstr.str().c_str());
if(filename.compare(_curr_filename) != 0)
_curr_filename = filename;
}
template<typename T>
LOG& operator << (const T &in)
{
if(_filestm.is_open())
{
LOG& operator << (const T &in) {
if(_filestm.is_open()) {
_filestm << in ;
std::cout << in ;
_filestm.flush();
......@@ -82,7 +73,6 @@ public :
private:
std::ofstream _filestm;
std::string _curr_filename;
};
......
#ifndef FM_TOOL_H_
#define FM_TOOL_H_
//#include <jansson.h>
//#include <jansson_private.h>
//rapidjson库
#include <rapidjson\document.h>
#include <rapidjson\prettywriter.h>
......@@ -12,8 +9,8 @@
#include "fmglobal.h"
#include "fmlog.h"
#include "filesystem.h"
#include "filesystem.h"
#include <winsock2.h>
#include <iphlpapi.h>
......@@ -21,11 +18,10 @@
using namespace rapidjson;
class Tool
{
class Tool {
public:
static int GetMacByGetAdaptersAddresses(std::string& macOUT)
{
static int GetMacByGetAdaptersAddresses(std::string& macOUT) {
bool ret = 0;
ULONG outBufLen = sizeof(IP_ADAPTER_ADDRESSES);
......@@ -73,38 +69,21 @@ public:
char tmp[MAX_BUF_LEN] = { 0 };
std::string path;
char type[64] = { 0 };
itoa(reqType, type, 10);
std::string tmpstr = std::string(type);
FileSys::GetProcPath(path);
//if(tmpstr.size() == 1)
//{
// std::string str = std::string("a").append(tmpstr);
// memset(type, 0, 64);
// strcpy(type, str.c_str());
//}
path.append(TMP_JSON);
LOG() << "template cfg file path :" << path;
LOG() << "ReadTMPForType:: Template Config File Path : " << path;
GetPrivateProfileString(type, CFG_KEY,"",tmp, MAX_BUF_LEN, path.c_str());
strcpy(tplt, tmp);
LOG() << "get template json : " << tplt;
LOG() << "ReadTMPForType:: ReqType: "<< type <<" Get Template Json: " << tplt;
return (tmp[0] == 0 ? 0 : 1);
}
static std::string JsonToString(const Value &valObj)
{
static std::string JsonToString(const Value &valObj) {
StringBuffer sbBuf;
Writer<StringBuffer> jWriter(sbBuf);
valObj.Accept(jWriter);
......@@ -113,67 +92,47 @@ public:
static void CompareJson(const Value &srcval, Value &desvalue, Document &desdoc)
{
if(srcval.IsObject() && desvalue.IsObject())
{
if(srcval.IsObject() && desvalue.IsObject()) {
//获得json中的key和value
Value::ConstMemberIterator itr;
for(itr = srcval.MemberBegin(); itr != srcval.MemberEnd(); itr++)
{
for(itr = srcval.MemberBegin(); itr != srcval.MemberEnd(); itr++) {
Value jKey;
Value jValue;
//得到key和value
jKey.CopyFrom(itr->name, desdoc.GetAllocator());
jValue.CopyFrom(itr->value, desdoc.GetAllocator());
if(jValue.IsObject())
{
if(desvalue.HasMember(jKey))
{
if(jValue.IsObject()) {
if(desvalue.HasMember(jKey)) {
CompareJson(jValue, desvalue[jKey], desdoc);
}
else
{
} else {
desvalue.AddMember(jKey, jValue, desdoc.GetAllocator());
}
}
else if(jValue.IsArray())
{
if(desvalue.HasMember(jKey))
{
} else if(jValue.IsArray()) {
if(desvalue.HasMember(jKey)) {
CompareJson(jValue, desvalue[jKey], desdoc);
}
else
{
} else {
desvalue.AddMember(jKey, jValue, desdoc.GetAllocator());
}
}
else
{
} else {
if(desvalue.HasMember(jKey))
continue;
else
{
else {
desvalue.AddMember(jKey, jValue, desdoc.GetAllocator());
}
}
}
}
else if(srcval.IsArray() && desvalue.IsArray())
{
if (!srcval[0].IsNull())
{
} else if (srcval.IsArray() && desvalue.IsArray()) {
if (!srcval[0].IsNull()) {
std::cout << desvalue.GetArray().Size();
for (int i = 0;i < desvalue.GetArray().Size(); i++)
{
for (int i = 0;i < desvalue.GetArray().Size(); i++) {
CompareJson(srcval[0],desvalue[i], desdoc);
}
if (desvalue.Size() == 0)
{
if (desvalue.Size() == 0) {
Value tmpval;
tmpval.CopyFrom(srcval[0], desdoc.GetAllocator());
desvalue.PushBack(tmpval, desdoc.GetAllocator());
......@@ -181,78 +140,59 @@ public:
}
}
}
static void CompareJson(std::string tplt, std::string tmpin, Document::AllocatorType& a1, Document::AllocatorType& a2)
{
//将json解析成document
Document doc1;
Document doc2;
doc1.Parse<0>(tplt.c_str());
doc2.Parse<0>(tmpin.c_str());
if(!doc1.HasParseError() && !doc2.HasParseError())
{
if(doc1.IsObject() && doc2.IsObject())
{
if(doc1.IsObject() && doc2.IsObject()) {
//获得json中的key和value
Value::ConstMemberIterator itr;
for(itr = doc1.MemberBegin(); itr != doc1.MemberEnd(); itr++)
{
for(itr = doc1.MemberBegin(); itr != doc1.MemberEnd(); itr++) {
Value jKey;
Value jValue;
//得到key和value
jKey.CopyFrom(itr->name, a1);
jValue.CopyFrom(itr->value, a1);
LOG() << jKey.GetString() << "----------";
if(jValue.IsObject())
{
if(jValue.IsObject()) {
LOG() << jKey.GetString() << "+++++++++++";
if(doc2.HasMember(jKey))
{
if(doc2.HasMember(jKey)) {
CompareJson(JsonToString(jValue), JsonToString(doc2[jKey]), a1, a2);
}
else
{
} else {
doc2.AddMember(jKey, jValue, a2);
}
}
else if(jValue.IsArray())
{
if(doc2.HasMember(jKey))
{
} else if(jValue.IsArray()) {
if(doc2.HasMember(jKey)) {
CompareJson(JsonToString(jValue), JsonToString(doc2[jKey]), a1, a2);
}
else
{
} else {
doc2.AddMember(jKey, jValue, a2);
}
}
else
{
} else {
if(doc2.HasMember(jKey))
continue;
else
{
else {
doc2.AddMember(jKey, jValue, a2);
}
}
}
}
else if(doc1.IsArray() && doc2.IsArray())
{
if (!doc1[0].IsNull())
{
for (int i = 0;i < doc2.Size(); i++)
{
} else if (doc1.IsArray() && doc2.IsArray()) {
if (!doc1[0].IsNull()) {
for (int i = 0;i < doc2.Size(); i++) {
CompareJson(JsonToString(doc1[i]), JsonToString(doc2[i]), a1, a2);
}
if (doc2.Size() == 0)
{
if (doc2.Size() == 0) {
doc2.PushBack(doc1[0], a2);
}
}
......@@ -268,7 +208,6 @@ public:
Writer<StringBuffer> writer(buffer);
doc.Accept(writer);
return std::string(buffer.GetString());
}
static int ComplementJson(const char *in, char *out, int reqType)
......@@ -277,37 +216,30 @@ public:
if(ReadTMPForType(templatestr, reqType) == 0)
{
LOG() << "get temple failed";
LOG() << "ComplementJson:: Get Temple Failed";
return 0;
}
Document root;
Document tmpin;
root.Parse(templatestr);
tmpin.Parse(in);
LOG() << "get temple success : " << DocumentToString(root);
if(root.HasParseError())
{
if(root.HasParseError()) {
LOG() << "error temple or injson json(reqType:"<< reqType << "):" << templatestr;
return 0;
}
if(tmpin.HasParseError())
{
if(tmpin.HasParseError()) {
LOG() << "error temple or injson json(reqType:"<< reqType << "):" << in;
return 0;
}
const Value &srcvalue = root;
Value &desvalue = tmpin;
CompareJson(srcvalue, desvalue, tmpin);
strcpy(out, DocumentToString(tmpin).c_str());
LOG() << "complement json success : " << out;
return 1;
......
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