init: import production code mss.nahaichuan.com (exclude Runtime/Uploads/backups/logs)

这个提交包含在:
Developer
2026-10-30 10:18:50 +08:00
当前提交 1f3e0ce2f6
共有 9291 个文件被更改,包括 1776674 次插入 和 0 次删除

查看文件

@@ -0,0 +1,69 @@
<?php
namespace Common\Model;
use Think\Model;
//[1.8.50]
/**
* 商户配置表
* Class MerchantConfigModel
* @package Common\Model
*/
class MerchantConfigModel extends BaseModel
{
protected $tableName = 'retail_merchant_config';
protected $fields = array(
'id', //int(11) NOT NULL AUTO_INCREMENT,
'merchant_id', //int(11) NOT NULL DEFAULT '0' COMMENT '商户id',
'integral_arrive_cash', //tinyint(1) DEFAULT '0' COMMENT '积分抵现设置 0关闭 1开启',
'integral_arrive_cash_data', //int(11) DEFAULT '0' COMMENT '积分抵现比例 按照多少积分抵0.01元',
'integral_arrive_cash_price', //decimal(10,2) DEFAULT '0.01' COMMENT '多少积分等于的金额数',
'integral_arrive_cash_rate', //decimal(10,6) DEFAULT '0.000000' COMMENT '积分抵现比例 按照整单百分比抵扣',
'other_pay', //tinyint(1) DEFAULT '0' COMMENT '是否开启其他支付 0关闭 1开启',
'pay_to_vip_state', //tinyint(1) DEFAULT '0' COMMENT '是否开起支付成为会员 0关闭 1开起',
'add_time', //varchar(20) DEFAULT NULL COMMENT '创建时间',
'turntable_status', //tinyint(1) NOT NULL DEFAULT '1' COMMENT '大转盘活动 系统开关 默认1关闭 2开启',
'marketing_methods', //tinyint(1) DEFAULT '1' COMMENT '营销方式 1基于订单 2基于商品',
'vip_register_state', //tinyint(1) DEFAULT '1' COMMENT '引导成为常规会员 0关闭1开启',
'plus_register_state', //tinyint(1) DEFAULT '1' COMMENT '引导成为/续费PLUS会员 0关闭1开启',
'shop_coupon_simple_image', //varchar(255) DEFAULT '' COMMENT '普通支付商家券本地图片',
'shop_coupon_service_image', //varchar(255) DEFAULT '' COMMENT '服务商模式商家券本地图片',
'shop_coupon_simple_wx_image', //varchar(255) DEFAULT '' COMMENT '普通支付商家券微信图片',
'shop_coupon_service_wx_image', //varchar(255) DEFAULT '' COMMENT '服务商模式商家券微信图片',
'store_access', //tinyint(1) DEFAULT '1' COMMENT '进入门店方式 1进入最近门店 2进入会员绑定门店',
'store_switch', //tinyint(1) DEFAULT '1' COMMENT '是否可以切换门店 1可 2否',
'tourist_store_access', //tinyint(1) DEFAULT '1' COMMENT '非会员进入门店方式 1最近门店,2所属门店,3主店',
'merchant_diy', //text COMMENT '商户设置商城DIY:json数据',
);
/**
* 商户DIV设置
* @param $merchantId : 商户id
* @param $diy : json数据
* @return bool
*/
public function diySave($merchantId, $diy)
{
$where = array(
'merchant_id' => $merchantId
);
$config = $this->getFind($where);
if (empty($config)) {
$add = array(
'merchant_id' => $merchantId,
'merchant_diy' => $diy,
);
$res = $this->addOrder($add);
} else {
$res = $this->updateOrder($where, array('merchant_diy' => $diy));
}
if($res === false){
return false;
}else{
return true;
}
}
}