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,48 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力商协会发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
// +----------------------------------------------------------------------
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
// +----------------------------------------------------------------------
/**
* Class Association
* Desc 商协管理
* Create on 2024/3/12 14:21
* Create by @小趴菜
*/
namespace app\api\model\wdsxh\business;
use think\Model;
class Association extends Model
{
// 表名
protected $name = 'wdsxh_business_association';
// 自动写入时间戳字段
protected $autoWriteTimestamp = true;
// 定义时间戳字段名
protected $createTime = true;
protected $updateTime = false;
protected function getLogoAttr($value)
{
return wdsxh_full_url($value);
}
protected function getWananchiQrCodeAttr($value)
{
return wdsxh_full_url($value);
}
}

View File

@@ -0,0 +1,57 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力商协会发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
// +----------------------------------------------------------------------
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
// +----------------------------------------------------------------------
/**
* Class Business
* Desc 商圈管理
* Create on 2024/3/12 14:43
* Create by @小趴菜
*/
namespace app\api\model\wdsxh\business;
use app\admin\model\wdsxh\points\PointsConfig;
use app\api\model\wdsxh\Base;
use app\common\model\wdsxh\points\UserWechatPointsLog;
use traits\model\SoftDelete;
class Business extends Base
{
use SoftDelete;
// 表名
protected $name = 'wdsxh_business';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
protected static function init()
{
self::afterInsert(function ($row) {
$is_process = (new BusinessConfig())->where('id',1)->value('is_process');
$add_points = (new PointsConfig())->where('id',1)->value('public_business_get_points');
if($is_process==2 && $add_points>0){
UserWechatPointsLog::addPoints(1,'需求发布',$row['wechat_id'],$add_points,3);
}
});
}
}

View File

@@ -0,0 +1,27 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力商协会发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
// +----------------------------------------------------------------------
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
// +----------------------------------------------------------------------
/**
* Class Business
* Desc 商圈配置';
* Create on 2024/3/12 16:58
* Create by @小趴菜
*/
namespace app\api\model\wdsxh\business;
use think\Model;
class BusinessConfig extends Model
{
// 表名
protected $name = 'wdsxh_business_config';
}

View File

@@ -0,0 +1,43 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力商协会发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
// +----------------------------------------------------------------------
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
// +----------------------------------------------------------------------
/**
* Class Category
* Desc 商圈分类管理
* Create on 2024/3/12 14:43
* Create by @小趴菜
*/
namespace app\api\model\wdsxh\business;
use app\api\model\wdsxh\Base;
use traits\model\SoftDelete;
class Category extends Base
{
use SoftDelete;
// 表名
protected $name = 'wdsxh_business_category';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
}