You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.1 KiB
41 lines
1.1 KiB
<?php
|
|
defined('IN_IA') or exit('Access Denied');
|
|
class MerchantDataEnt
|
|
{
|
|
|
|
/**
|
|
* 新增编辑企业信息
|
|
* @param $data
|
|
* @param $storeid
|
|
*/
|
|
public static function saveData($data,$storeid)
|
|
{
|
|
$save_data = ['storeid' => $storeid];
|
|
|
|
if (!empty($data['cc_id'])) {
|
|
$save_data['cc_id'] = $data['cc_id'];
|
|
}
|
|
if (!empty($data['introduction'])) {
|
|
$save_data['introduction'] = $data['introduction'];
|
|
}
|
|
if (!empty($data['business'])) {
|
|
$save_data['business'] = $data['business'];
|
|
}
|
|
if (!empty($data['advantage'])) {
|
|
$save_data['advantage'] = $data['advantage'];
|
|
}
|
|
|
|
$query = pdo_get(PDO_NAME . 'wlmerchant_merchantdataent',['storeid' => $storeid]);
|
|
|
|
if ($query) {
|
|
$save_data['update_time'] = date("Y-m-d H:i:s",time());
|
|
|
|
pdo_update(PDO_NAME . 'wlmerchant_merchantdataent',$save_data,['id' => $query['id']]);
|
|
} else {
|
|
$save_data['create_time'] = date("Y-m-d H:i:s",time());
|
|
|
|
pdo_insert(PDO_NAME . 'wlmerchant_merchantdataent',$save_data);
|
|
}
|
|
}
|
|
|
|
}
|