return WrenchMarketInterestQuestionList(in, out);
This commit is contained in:
@@ -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) {
|
||||
map<const char*, const char*>f = 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;
|
||||
|
||||
Reference in New Issue
Block a user