From 98a765515fe7f54c1cdb016fe3de031a6c485f3d Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Fri, 23 Jun 2023 14:55:22 -0400 Subject: [PATCH] return WrenchMarketInterestQuestionList(in, out); --- wrenchboard/src/shared_tool/jobs.cc | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/wrenchboard/src/shared_tool/jobs.cc b/wrenchboard/src/shared_tool/jobs.cc index acb2ed8b..442cd821 100644 --- a/wrenchboard/src/shared_tool/jobs.cc +++ b/wrenchboard/src/shared_tool/jobs.cc @@ -20,6 +20,7 @@ long WrenchJobsQuestion(CVars in, CVars &out); long WrenchMarketInterestQuestion(CVars in, CVars &out); +long WrenchMarketInterestQuestionList(CVars in, CVars &out); long WrenchReplyMessage(CVars in, CVars &out); long WrenchJobPostAgree(CVars in, CVars &out); long WrenchJobPostExtendTime(CVars in, CVars &out); @@ -126,6 +127,10 @@ long jobs_calls(CVars in, CVars &out) { return WrenchMarketInterestQuestion(in, out); break; + case WRENCHBOARD_JOB_INT_QUESTLST: + return WrenchMarketInterestQuestionList(in, out); + break; + case WRENCHBOARD_JOB_REPLY_QUESTION: return WrenchReplyMessage(in, out); break; @@ -395,6 +400,42 @@ long WrenchReplyMessage(CVars in, CVars &out) { return 0; } +long WrenchMarketInterestQuestionList(CVars in, CVars &out) { + long ret = PHP_API_BAD_PARAM; + out = in; + try { + out["status"] = "0"; + long member_id = REQ_LONG(in, "member_id", 1, -1); + //long interest_id = REQ_LONG(in, "interest_id", 1, -1); + REQ_STRING(in, "offer_uid", 1, 55, "(.*)"); + REQ_STRING(in, "interest_uid", 1, 55, "(.*)"); + //REQ_STRING(in, "offer_code", 1, 15, "(.*)"); //offer_code + REQ_STRING(in, "msg_type", 1, 15, "(.*)"); //msg_type + + const PGresult *res = pgsql_query("SELECT o.*,o.member_id AS client_id,jo.offer_code " + " FROM members_offer_interest o " + " LEFT JOIN members_jobs_offer jo ON jo.id=o.offer_id WHERE jo.uid='%s' AND o.uid=%lu", in["offer_uid"].c_str(), in["interest_uid"].c_str()); + if (res != NULL && pgsql_num_rows(res) > 0) { + mapf = pgsql_fetch_assoc(res, 0); + if (!f.empty()) { + CVars rec; + map_to_cvars(f, rec); + out = rec; + + + + + } + } + + ret = PHP_CREATED_OK; + + } catch (bad_parameter) { + out["log_status"] = "Error WrenchMarketInterestQuestionList"; + } + return ret; +} + long WrenchMarketInterestQuestion(CVars in, CVars &out) { long ret = PHP_API_BAD_PARAM;