mobile-first
赵鹏 5 years ago
parent 69ab7509b1
commit c30961d60c

@ -5,14 +5,14 @@ defined('BASEPATH') or exit('No direct script access allowed');
class getbokun extends CI_Controller
{
var $webUrl = "http://localhost:105";
//var $webUrl = "http://localhost:105"; //本地调用地址
var $webUrl = "https://ct.mycht.cn/" ; //网前调用地址
public function __construct()
{
parent::__construct();
$this->permission->is_admin();
$this->load->library("Bokun_lib");
$this->load->model("tpBokun_model");
$this->load->view('bootstrap3/footer');
}
public function index()
@ -196,6 +196,11 @@ class getbokun extends CI_Controller
if ($addInfo->status == "ok") {
//先判断是否是新产品
$checkNew = $this->tpBokun_model->checkExitHT($PAGCode);
if ($checkNew) {
continue;
}
//提交本地翰特保存
if ($CityName == "") {
$CityName = $ActivityData->googlePlace->city; //如果没有传递城市名称参数就获取activity数据中的
@ -276,7 +281,7 @@ class getbokun extends CI_Controller
$this->tpBokun_model->PAG2_Name = $activityData->title;
$this->tpBokun_model->PAG2_Title = $activityData->description;
$pagsn = $this->tpBokun_model->AddProductToHT();
echo("添加:".$PAGCode."\r\n");
echo("添加:".$PAGCode.",".$pagsn."\r\n");
}
}
}

@ -10,6 +10,7 @@ class TpBokun_model extends CI_Model
{
parent::__construct();
$this->HT = $this->load->database('HT', TRUE);
$this->HT229Write = $this->load->database('HT229Write',TRUE);
$this->load->model("IContent_model");
$this->load->model("IStructures_model");
$CI = &get_instance();
@ -200,7 +201,7 @@ class TpBokun_model extends CI_Model
( ?,?,?,GETDATE(),?,?,?)
";
$query = $this->HT->query($sql, array(
$query = $this->HT229Write->query($sql, array(
$this->PAG_CII_SN,
$this->PAG_Code,
$this->PAG_Scheme,
@ -208,7 +209,7 @@ class TpBokun_model extends CI_Model
$this->PAG_DEI_SN,
$this->PAG_PPI_SN
));
$this->pag_sn = $this->HT->query("select max(pag_sn) as pag_sn from BIZ_PackageInfo")->row("pag_sn");
$this->pag_sn = $this->HT229Write->query("select max(pag_sn) as pag_sn from BIZ_PackageInfo")->row("pag_sn");
//插入语种表
@ -226,7 +227,7 @@ class TpBokun_model extends CI_Model
//录入中,英两个语种
for ($i = 1; $i < 3; $i++) {
$this->HT->query($sql2, array(
$this->HT229Write->query($sql2, array(
$this->pag_sn,
$i,
$this->PAG2_Name,
@ -246,7 +247,7 @@ class TpBokun_model extends CI_Model
*/
function checkExitHT($PAG_Code){
$sql = "select top 1 * from BIZ_PackageInfo where PAG_Code = ?";
$query = $this->HT->query($sql, array($PAG_Code));
$query = $this->HT229Write->query($sql, array($PAG_Code));
if ($query->num_rows() > 0) {
$result=true;
} else {

Loading…
Cancel
Save