init commit
This commit is contained in:
48
application/api/model/wdsxh/business/Association.php
Normal file
48
application/api/model/wdsxh/business/Association.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
57
application/api/model/wdsxh/business/Business.php
Normal file
57
application/api/model/wdsxh/business/Business.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
27
application/api/model/wdsxh/business/BusinessConfig.php
Normal file
27
application/api/model/wdsxh/business/BusinessConfig.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 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';
|
||||
|
||||
}
|
||||
43
application/api/model/wdsxh/business/Category.php
Normal file
43
application/api/model/wdsxh/business/Category.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 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';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user