|
|
|
@ -13,16 +13,13 @@ class Index extends CI_Controller {
|
|
|
|
|
$this->load->model('Group_model');
|
|
|
|
|
$this->load->model('BIZ_Orders_model');
|
|
|
|
|
|
|
|
|
|
$opend_id = $this->input->post('openId');
|
|
|
|
|
$opend_key = $this->input->post('key');
|
|
|
|
|
$match = $this->UserAuth_model->if_user_key($open_id, $open_key, 11, 1);
|
|
|
|
|
if ($match !== TRUE) {
|
|
|
|
|
$ret['status'] = -1;
|
|
|
|
|
$ret['errMsg'] = "用户验证失败";
|
|
|
|
|
return $this->output->set_content_type('application/json')->set_output(json_encode($ret));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* TODO
|
|
|
|
|
* 请求的openID和订单的VEI_SN不相等
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
public function index()
|
|
|
|
|
{
|
|
|
|
|
$vendor_plan = $this->Group_model->get_vendor_plan_info(214600, 1343);
|
|
|
|
@ -48,6 +45,14 @@ class Index extends CI_Controller {
|
|
|
|
|
return $this->output->set_output("Not found vendor function. " . $order->GRI_SN);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function verify_user()
|
|
|
|
|
{
|
|
|
|
|
$open_id = $this->input->post('openId');
|
|
|
|
|
$open_key = $this->input->post('key');
|
|
|
|
|
$match = $this->UserAuth_model->if_user_key($open_id, $open_key, 1);
|
|
|
|
|
return $match;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 接收地接社的信息上报
|
|
|
|
|
* * 信息类型代码:
|
|
|
|
@ -62,13 +67,13 @@ class Index extends CI_Controller {
|
|
|
|
|
{
|
|
|
|
|
$ret['status'] = -1;
|
|
|
|
|
$ret['errMsg'] = "未知错误";
|
|
|
|
|
$input = $this->input->post();
|
|
|
|
|
$vendorID = $input['openId'];
|
|
|
|
|
$validate = $this->calc_key($vendorID, $input['key']);
|
|
|
|
|
if ($validate !== TRUE) {
|
|
|
|
|
$ret['errMsg'] = "身份验证失败.";
|
|
|
|
|
$user_verify = $this->verify_user();
|
|
|
|
|
if ($user_verify !== TRUE) {
|
|
|
|
|
$ret['errMsg'] = '用户验证失败';
|
|
|
|
|
return $this->output->set_content_type('application/json')->set_output(json_encode($ret));
|
|
|
|
|
}
|
|
|
|
|
$input = $this->input->post();
|
|
|
|
|
$vendorID = $input['openId'];
|
|
|
|
|
$vps = $this->Group_model->get_sync_info_by_vendororder($input['orderId']);
|
|
|
|
|
if (empty($vps)) {
|
|
|
|
|
$ret['errMsg'] = "未找到相应的订单.";
|
|
|
|
@ -178,7 +183,7 @@ class Index extends CI_Controller {
|
|
|
|
|
{
|
|
|
|
|
$default = "b825e39422a54875a95752fc7ed6f5d2";
|
|
|
|
|
$ret = md5(hash("sha256", $userId.$default));
|
|
|
|
|
return $ret===$key;
|
|
|
|
|
return $ret;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|