version check enabled
This commit is contained in:
parent
3dd0dcf378
commit
0ff3eb9ee2
@ -592,5 +592,8 @@ defined('ENTITYFININSTITUTIONID') OR define('ENTITYFININSTITUTIONID','entity_fin
|
||||
defined('ENTITYPREFERENCS') OR define('ENTITYPREFERENCE','m_entity_preferences');
|
||||
defined('ENTITYPREFERENCEID') OR define('ENTITYPREFERENCEID','entity_preference_id');
|
||||
|
||||
defined('APP_VERSION_INFO') OR define('APP_VERSION_INFO','m_app_version_info');
|
||||
defined('APP_VERSION_INFOID') OR define('APP_VERSION_INFOID','version_info_id');
|
||||
|
||||
|
||||
|
||||
|
||||
@ -82,6 +82,7 @@ $route['deletePdTeamMapping'] = 'Common_Masters_Controller/deletePdTeamMapping';
|
||||
$route['getLender'] = 'Common_Masters_Controller/getLender';
|
||||
$route['getProduct'] = 'Common_Masters_Controller/getProduct';
|
||||
$route['getCustomerSegment'] = 'Common_Masters_Controller/getCustomerSegment';
|
||||
$route['(checkAppVersion/:any)'] = 'Common_Masters_Controller/checkAppVersion';
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1168,4 +1168,25 @@ class Common_Masters_Controller extends REST_Controller {
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function checkAppVersion_get()
|
||||
{
|
||||
$client = $this->get('client');
|
||||
$version_data = $this->Common_Masters_Model-> getAppVersion($client);
|
||||
|
||||
if($version_data)
|
||||
{
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['records'] = $version_data;
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['dataStatus'] = false;
|
||||
$data['status'] = REST_Controller::HTTP_NOT_MODIFIED;
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -143,4 +143,21 @@ class Common_Masters_Model extends SPARQ_Model {
|
||||
}
|
||||
|
||||
|
||||
function getAppVersion($client = null)
|
||||
{
|
||||
$this->db->SELECT('version_info_id, version, release_notes');
|
||||
$this->db->FROM(APP_VERSION_INFO);
|
||||
$this->db->ORDER_BY(APP_VERSION_INFOID,'desc');
|
||||
if($client == 'MOB')
|
||||
{
|
||||
$this->db->LIMIT(1,0);
|
||||
}
|
||||
$data = $this->db->GET()->result_array();
|
||||
//print_r($this->db->last_query());die();
|
||||
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user