init commit

This commit is contained in:
2026-03-17 09:56:00 +08:00
commit e2c8ae752d
6827 changed files with 1211784 additions and 0 deletions

View File

@@ -0,0 +1,79 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力商协会发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
// +----------------------------------------------------------------------
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
// +----------------------------------------------------------------------
namespace app\admin\model\wdsxh\mall;
use think\Model;
use traits\model\SoftDelete;
class Banner extends Model
{
use SoftDelete;
// 表名
protected $name = 'wdsxh_mall_banner';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'jump_type_text',
'status_text'
];
protected static function init()
{
self::afterInsert(function ($row) {
$pk = $row->getPk();
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
});
}
public function getJumpTypeList()
{
return ['1' => __('Jump_type 1'), '2' => __('Jump_type 2'), '4' => __('Jump_type 4'), '3' => __('Jump_type 3')];
}
public function getStatusList()
{
return ['0' => __('Status 0'), '1' => __('Status 1')];
}
public function getJumpTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['jump_type']) ? $data['jump_type'] : '');
$list = $this->getJumpTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
}

View File

@@ -0,0 +1,56 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力商协会发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
// +----------------------------------------------------------------------
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
// +----------------------------------------------------------------------
namespace app\admin\model\wdsxh\mall;
use think\Model;
use traits\model\SoftDelete;
class Express extends Model
{
use SoftDelete;
// 表名
protected $name = 'wdsxh_mall_express';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
];
protected static function init()
{
self::afterInsert(function ($row) {
$pk = $row->getPk();
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
});
}
}

View File

@@ -0,0 +1,71 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力商协会发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
// +----------------------------------------------------------------------
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
// +----------------------------------------------------------------------
namespace app\admin\model\wdsxh\mall;
use think\Model;
use traits\model\SoftDelete;
class FreightRules extends Model
{
use SoftDelete;
// 表名
protected $name = 'wdsxh_mall_freight_rules';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'status_text'
];
protected static function init()
{
self::beforeInsert(function ($row) {
$row['open_area'] = implode(',',$row['open_area']);
});
self::beforeUpdate(function ($row) {
$row['open_area'] = implode(',',$row['open_area']);
});
}
public function getStatusList()
{
return ['normal' => __('Status normal'), 'hidden' => __('Status hidden')];
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getOpenAreaList()
{
return ['北京市' => __('北京市'), '天津市' => __('天津市'), '上海市' => __('上海市'), '重庆市' => __('重庆市'), '河北省' => __('河北省'), '山西省' => __('山西省'), '辽宁省' => __('辽宁省'), '吉林省' => __('吉林省'), '黑龙江省' => __('黑龙江省'), '江苏省' => __('江苏省'), '浙江省' => __('浙江省'), '安徽省' => __('安徽省'), '福建省' => __('福建省'), '江西省' => __('江西省'), '山东省' => __('山东省'), '河南省' => __('河南省'), '湖北省' => __('湖北省'), '湖南省' => __('湖南省'), '广东省' => __('广东省'), '海南省' => __('海南省'), '四川省' => __('四川省'), '贵州省' => __('贵州省'), '云南省' => __('云南省'), '陕西省' => __('陕西省'), '甘肃省' => __('甘肃省'), '青海省' => __('青海省'), '内蒙古自治区' => __('内蒙古自治区'), '广西壮族自治区' => __('广西壮族自治区'), '西藏自治区' => __('西藏自治区'), '宁夏回族自治区' => __('宁夏回族自治区'), '新疆维吾尔自治区' => __('新疆维吾尔自治区'), '香港' => __('香港'), '澳门' => __('澳门'), '台湾省' => __('台湾省')];
}
}

View File

@@ -0,0 +1,85 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力商协会发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
// +----------------------------------------------------------------------
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
// +----------------------------------------------------------------------
namespace app\admin\model\wdsxh\mall;
use think\Model;
use traits\model\SoftDelete;
class Goods extends Model
{
use SoftDelete;
// 表名
protected $name = 'wdsxh_mall_goods';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'is_hot_text',
'status_text'
];
protected static function init()
{
self::afterInsert(function ($row) {
$pk = $row->getPk();
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
});
}
public function getIsHotList()
{
return ['1' => __('Is_hot 1'), '0' => __('Is_hot 0')];
}
public function getStatusList()
{
return ['normal' => __('Status normal'), 'hidden' => __('Status hidden')];
}
public function getIsHotTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['is_hot']) ? $data['is_hot'] : '');
$list = $this->getIsHotList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function category()
{
return $this->belongsTo('app\admin\model\wdsxh\mall\GoodsCategory','category_id','id')->setEagerlyType(0);
}
}

View File

@@ -0,0 +1,65 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力商协会发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
// +----------------------------------------------------------------------
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
// +----------------------------------------------------------------------
namespace app\admin\model\wdsxh\mall;
use think\Model;
use traits\model\SoftDelete;
class GoodsCategory extends Model
{
use SoftDelete;
// 表名
protected $name = 'wdsxh_single_category';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'status_text'
];
protected static function init()
{
self::afterInsert(function ($row) {
$pk = $row->getPk();
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
});
}
public function getStatusList()
{
return ['0' => __('Status 0'), '1' => __('Status 1')];
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
}

View File

@@ -0,0 +1,21 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力商协会发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
// +----------------------------------------------------------------------
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
// +----------------------------------------------------------------------
namespace app\admin\model\wdsxh\mall;
use think\Model;
class Logistics extends Model
{
// 表名
protected $name = 'wdsxh_mall_order_logistics';
}

View File

@@ -0,0 +1,157 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力商协会发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
// +----------------------------------------------------------------------
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
// +----------------------------------------------------------------------
namespace app\admin\model\wdsxh\mall;
use think\Model;
use traits\model\SoftDelete;
class Order extends Model
{
use SoftDelete;
// 表名
protected $name = 'wdsxh_mall_order';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = false;
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'state_text',
'refund_status_text',
'paid_text',
'pay_time_text',
'refund_reason_time_text',
'complete_time_text',
'cancel_time_text'
];
public function getBuyNowList()
{
return ['1' => __('Buy_now 1'), '2' => __('Buy_now 2')];
}
public function getStateList()
{
return ['1' => __('待付款'), '2' => __('待发货'), '3' => __('待收货'),'4' => __('已完成')];
}
public function getRefundStatusList()
{
return ['1' => __('未退款'), '2' => __('申请中'), '3' => __('待退货'), '4' => __('退款中'), '5' => __('已退款')];
}
public function getPaidList()
{
return ['1' => __('未付款'), '2' => __('已付款')];
}
public function getBuyNowTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['buy_now']) ? $data['buy_now'] : '');
$list = $this->getBuyNowList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getStateTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['state']) ? $data['state'] : '');
$list = $this->getStateList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getRefundStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['refund_status']) ? $data['refund_status'] : '');
$list = $this->getRefundStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getPaidTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['paid']) ? $data['paid'] : '');
$list = $this->getPaidList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getPayTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['pay_time']) ? $data['pay_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getRefundReasonTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['refund_reason_time']) ? $data['refund_reason_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getCompleteTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['complete_time']) ? $data['complete_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getCancelTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['cancel_time']) ? $data['cancel_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
protected function setPayTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setRefundReasonTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setCompleteTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setCancelTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
public function getDeliveryMethodList()
{
return ['1' => __('Delivery_method 1'), '2' => __('Delivery_method 2')];
}
public function getDeliveryMethodTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['buy_now']) ? $data['buy_now'] : '');
$list = $this->getDeliveryMethodList();
return isset($list[$value]) ? $list[$value] : '';
}
}

View File

@@ -0,0 +1,32 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力商协会发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
// +----------------------------------------------------------------------
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
// +----------------------------------------------------------------------
namespace app\admin\model\wdsxh\mall;
use think\Model;
use traits\model\SoftDelete;
class OrderRefundLog extends Model
{
use SoftDelete;
// 表名
protected $name = 'wdsxh_mall_order_refund_log';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
}

View File

@@ -0,0 +1,70 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力商协会发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
// +----------------------------------------------------------------------
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
// +----------------------------------------------------------------------
namespace app\admin\model\wdsxh\mall;
use think\Model;
class Refund extends Model
{
// 表名
protected $name = 'wdsxh_mall_order_refund';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = false;
protected $deleteTime = false;
// 追加属性
protected $append = [
'refund_time_text',
'add_express_no_time_text'
];
public function getRefundTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['refund_time']) ? $data['refund_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getAddExpressNoTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['add_express_no_time']) ? $data['add_express_no_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
protected function setRefundTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setAddExpressNoTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
}

View File

@@ -0,0 +1,42 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力中小企业发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdadmin.cn All rights reserved.
// +----------------------------------------------------------------------
// | Wdadmin系统产品软件并不是自由软件不加密并不代表开源未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn> www.wdadmin.cn
// +----------------------------------------------------------------------
/**
* Class SelfPickup
* Desc 自提点Model
* Create on 2025/4/15 14:23
* Create by wangyafang
*/
namespace app\admin\model\wdsxh\mall;
use think\Model;
class SelfPickup extends Model
{
// 表名
protected $name = 'wdsxh_mall_self_pickup';
// 定义时间戳字段名
protected $createTime = false;
protected $updateTime = false;
protected $deleteTime = false;
public function getIsStatusList()
{
return ['1' => __('Self_pickup_status 1'), '2' => __('Self_pickup_status 2')];
}
}