/* * @Description: * @Version: 1.0 * @Autor: lishengyin * @Date: 2022-03-02 09:41:56 * @LastEditors: lishengyin * @LastEditTime: 2022-03-03 16:34:43 */ #ifndef __NETTYHTTPDISCODE_H_ #define __NETTYHTTPDISCODE_H_ #include #include #include #include #include using namespace std; class NettyHttpDicCode { public: std::string addTime; int appId; std::string attr1; std::string attr2; std::string attr3; int createBy; std::string dictCode; int dictId; std::string dictName; int dictType; int enableFlag; int orderNo; std::string parentDictCode; std::string parentDictName; std::string remark; int updateBy; std::string updateTime; public: NettyHttpDicCode(){} ~NettyHttpDicCode(){} /** * @description: json反序列为对象 * @param {*} * @return {*} */ bool jsonToObject(const rapidjson::Value& object){ const auto end = object.MemberEnd(); if(end == object.FindMember("attr1") || !object["attr1"].IsString()){ return false; }else{ attr1 = object["attr1"].GetString(); } return true; } }; #endif