Fix offfers data
This commit is contained in:
@@ -248,11 +248,16 @@ long WrenchReturnJobOffersList(CVars in, CVars &out) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
res = pgsql_query("SELECT jo.id AS offer_id, mj.id AS job_id, jo.id AS contract_id, jo.added::date,mj.title, jo.offer_code,jo.uid AS offer_uid,jo.expire, "
|
res = pgsql_query("SELECT jo.id AS offer_id, mj.id AS job_id, jo.id AS contract_id, "
|
||||||
" jo.public_view, mj.uid AS job_uid, jo.added AS offer_added, mj.description AS description, jo.job_description,mj.price, mj.timeline_days "
|
" jo.added::date,mj.title, jo.offer_code,jo.uid AS offer_uid,jo.expire, "
|
||||||
"FROM members_jobs_offer jo LEFT JOIN members_jobs mj ON mj.id = jo.job_id "
|
" jo.public_view, mj.uid AS job_uid, jo.added AS offer_added, "
|
||||||
"WHERE jo.expire > now() AND jo.status = 1 "
|
" mj.description AS description, jo.job_description,mj.price, mj.timeline_days,jo.job_description AS job_detail, "
|
||||||
"AND jo.client_id = %lu LIMIT %lu ", in["member_id"].Long(), in["limit"].Long());
|
" c.code AS currency_code, c.description AS currency_description,mj.country "
|
||||||
|
" FROM members_jobs_offer jo "
|
||||||
|
" LEFT JOIN members_jobs mj ON mj.id = jo.job_id "
|
||||||
|
" LEFT JOIN currency c ON c.country=mj.country "
|
||||||
|
" WHERE jo.expire > now() AND jo.status = 1 "
|
||||||
|
" AND jo.client_id = %lu LIMIT %lu ", in["member_id"].Long(), in["limit"].Long());
|
||||||
|
|
||||||
|
|
||||||
if (res != NULL && pgsql_num_rows(res) > 0) {
|
if (res != NULL && pgsql_num_rows(res) > 0) {
|
||||||
@@ -317,6 +322,19 @@ long WrenchReturnJobOffersList(CVars in, CVars &out) {
|
|||||||
|
|
||||||
snprintf(vname, sizeof (vname), "offer_added_%05d", i);
|
snprintf(vname, sizeof (vname), "offer_added_%05d", i);
|
||||||
out[vname] = rec["offer_added"];
|
out[vname] = rec["offer_added"];
|
||||||
|
|
||||||
|
snprintf(vname, sizeof (vname), "job_detail_%05d", i); // delivery details from members_jobs_offers
|
||||||
|
out[vname] = rec["job_detail"];
|
||||||
|
|
||||||
|
snprintf(vname, sizeof (vname), "job_country_%05d", i);
|
||||||
|
out[vname] = rec["job_country"];
|
||||||
|
|
||||||
|
snprintf(vname, sizeof (vname), "currency_%05d", i);
|
||||||
|
out[vname] = rec["currency_description"];
|
||||||
|
|
||||||
|
snprintf(vname, sizeof (vname), "currency_code_%05d", i);
|
||||||
|
out[vname] = rec["currency_code"];
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ret = PHP_API_OK;
|
ret = PHP_API_OK;
|
||||||
|
|||||||
@@ -580,6 +580,7 @@ class WrenchApi extends BaseController
|
|||||||
|
|
||||||
switch ($in["action"]) {
|
switch ($in["action"]) {
|
||||||
case WRENCHBOARD_ACCOUNT_LOGIN:
|
case WRENCHBOARD_ACCOUNT_LOGIN:
|
||||||
|
case WRENCHBOARD_ACCOUNT_AUXLOGIN:
|
||||||
$endpoint = "SESSION-".$out["session"];
|
$endpoint = "SESSION-".$out["session"];
|
||||||
$this->saveCache($endpoint,$out);
|
$this->saveCache($endpoint,$out);
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user