init commit
This commit is contained in:
30
application/api/model/wdsxh/Banner.php
Normal file
30
application/api/model/wdsxh/Banner.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class Banner
|
||||
* Desc 轮播管理
|
||||
* Create on 2024/3/25 09:59
|
||||
* Create by @小趴菜
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh;
|
||||
|
||||
|
||||
|
||||
class Banner extends Base
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_banner';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
65
application/api/model/wdsxh/Base.php
Normal file
65
application/api/model/wdsxh/Base.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\model\wdsxh;
|
||||
|
||||
use think\Model;
|
||||
|
||||
/**
|
||||
* Class Base
|
||||
* Desc 基础Model
|
||||
* Create on 2024/3/11 11:53
|
||||
* Create by wangyafang
|
||||
*/
|
||||
|
||||
class Base extends Model
|
||||
{
|
||||
protected function getImageAttr($value)
|
||||
{
|
||||
return wdsxh_full_url($value);
|
||||
}
|
||||
|
||||
protected function getAvatarAttr($value)
|
||||
{
|
||||
return wdsxh_full_url($value);
|
||||
}
|
||||
|
||||
protected function getImagesAttr($value)
|
||||
{
|
||||
$array = explode(',',$value);
|
||||
foreach ($array as $k=>$v) {
|
||||
$array[$k] = wdsxh_full_url($v);
|
||||
}
|
||||
return implode(',',$array);
|
||||
}
|
||||
|
||||
protected function getFilesAttr($value)
|
||||
{
|
||||
$array = explode(',',$value);
|
||||
foreach ($array as $k=>$v) {
|
||||
$array[$k] = wdsxh_full_url($v);
|
||||
}
|
||||
return implode(',',$array);
|
||||
}
|
||||
|
||||
protected function setImagesAttr($value)
|
||||
{
|
||||
$value = remove_wdsxh_full_url($value);
|
||||
return $value;
|
||||
}
|
||||
|
||||
protected function setImageAttr($value)
|
||||
{
|
||||
$value = remove_wdsxh_full_url($value);
|
||||
return $value;
|
||||
}
|
||||
|
||||
protected function setBackgroundImageAttr($value)
|
||||
{
|
||||
$value = remove_wdsxh_full_url($value);
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
46
application/api/model/wdsxh/Demand.php
Normal file
46
application/api/model/wdsxh/Demand.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class Demand
|
||||
* Desc 需求反馈
|
||||
* Create on 2024/3/13 15:33
|
||||
* Create by @小趴菜
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh;
|
||||
|
||||
|
||||
use think\Model;
|
||||
use traits\model\SoftDelete;
|
||||
|
||||
class Demand extends Model
|
||||
{
|
||||
use SoftDelete;
|
||||
|
||||
|
||||
|
||||
// 表名
|
||||
protected $name = 'wdsxh_demand';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = 'integer';
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = 'updatetime';
|
||||
protected $deleteTime = 'deletetime';
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
39
application/api/model/wdsxh/Faq.php
Normal file
39
application/api/model/wdsxh/Faq.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class Faq
|
||||
* Desc 常见问题
|
||||
* Create on 2024/3/13 15:56
|
||||
* Create by @小趴菜
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh;
|
||||
|
||||
|
||||
use think\Model;
|
||||
|
||||
class Faq extends Model
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_faq';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = 'integer';
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
38
application/api/model/wdsxh/PcBanner.php
Normal file
38
application/api/model/wdsxh/PcBanner.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class PcBanner
|
||||
* Desc pc轮播管理
|
||||
* Create on 2024/4/09 16:27
|
||||
* Create by @小趴菜
|
||||
*/
|
||||
namespace app\api\model\wdsxh;
|
||||
|
||||
|
||||
|
||||
class PcBanner extends Base
|
||||
{
|
||||
|
||||
// 表名
|
||||
protected $name = 'wdsxh_pc_banner';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = 'integer';
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
28
application/api/model/wdsxh/PcBusinessAssociation.php
Normal file
28
application/api/model/wdsxh/PcBusinessAssociation.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class PcBusinessAssociation
|
||||
* Desc pc商协信息
|
||||
* Create on 2024/4/09 17:44
|
||||
* Create by @小趴菜
|
||||
*/
|
||||
namespace app\api\model\wdsxh;
|
||||
|
||||
use think\Model;
|
||||
|
||||
|
||||
class PcBusinessAssociation extends Model
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_pc_business_association';
|
||||
|
||||
}
|
||||
37
application/api/model/wdsxh/Quickmenu.php
Normal file
37
application/api/model/wdsxh/Quickmenu.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\api\model\wdsxh;
|
||||
/**
|
||||
* Class Quickmenu
|
||||
* Desc 快速导航
|
||||
* Create on 2024/3/22 13:32
|
||||
* Create by @小趴菜
|
||||
*/
|
||||
class Quickmenu extends Base
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_quickmenu';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = 'integer';
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
49
application/api/model/wdsxh/Tabbar.php
Normal file
49
application/api/model/wdsxh/Tabbar.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\api\model\wdsxh;
|
||||
/**
|
||||
* Class Tabbar
|
||||
* Desc 底部导航
|
||||
* Create on 2024/3/22 16:59
|
||||
* Create by @小趴菜
|
||||
*/
|
||||
class Tabbar extends Base
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_tabbar';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = 'integer';
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
|
||||
protected function getIconAttr($value)
|
||||
{
|
||||
return wdsxh_full_url($value);
|
||||
}
|
||||
|
||||
|
||||
protected function getSeliconAttr($value)
|
||||
{
|
||||
return wdsxh_full_url($value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
40
application/api/model/wdsxh/UserWechat.php
Normal file
40
application/api/model/wdsxh/UserWechat.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\api\model\wdsxh;
|
||||
|
||||
|
||||
/**
|
||||
* Class UserWechat
|
||||
* Desc 微信表模型
|
||||
* Create on 2024/3/7 10:11
|
||||
* Create by wangyafang
|
||||
*/
|
||||
class UserWechat extends Base
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_user_wechat';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
|
||||
protected $type = [
|
||||
'join_time' => 'timestamp:Y-m-d',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
71
application/api/model/wdsxh/activity/Activity.php
Normal file
71
application/api/model/wdsxh/activity/Activity.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\api\model\wdsxh\activity;
|
||||
|
||||
use app\api\model\wdsxh\Base;
|
||||
use app\common\model\wdsxh\points\UserWechatPointsLog;
|
||||
|
||||
/**
|
||||
* Class Activity
|
||||
* Desc 活动模型
|
||||
* Create on 2024/3/11 16:29
|
||||
* Create by wangyafang
|
||||
*/
|
||||
class Activity extends Base
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_activity';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = false;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = false;
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
|
||||
protected static function init()
|
||||
{
|
||||
self::afterUpdate(function ($row) {
|
||||
// 仅当活动状态变更为"已结束"且开启积分功能时才发放积分
|
||||
if ($row['points_status'] == 1) {
|
||||
// 获取所有已审核通过的报名用户
|
||||
$activityApplyList = (new ActivityApply())
|
||||
->where('activity_id', $row['id'])
|
||||
->where('state', '2')
|
||||
->select();
|
||||
|
||||
if (empty($activityApplyList)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 遍历所有报名用户,为每个用户发放积分
|
||||
foreach ($activityApplyList as $activityApplyObj) {
|
||||
// 检查是否已经发放过积分,避免重复插入
|
||||
$existLog = UserWechatPointsLog::where('activity_id', $row['id'])
|
||||
->where('wechat_id', $activityApplyObj['wechat_id'])
|
||||
->where('source', 1)
|
||||
->where('memo', '参加活动')
|
||||
->find();
|
||||
|
||||
// 如果未发放过,则发放积分
|
||||
if (!$existLog) {
|
||||
UserWechatPointsLog::activity(1, $activityApplyObj, $row, '参加活动');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
44
application/api/model/wdsxh/activity/ActivityApply.php
Normal file
44
application/api/model/wdsxh/activity/ActivityApply.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class ActivityApply
|
||||
* Desc 活动报名模型
|
||||
* Create on 2024/3/11 17:58
|
||||
* Create by wangyafang
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\activity;
|
||||
|
||||
|
||||
use think\Model;
|
||||
|
||||
class ActivityApply extends Model
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_activity_apply';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
|
||||
public function activity()
|
||||
{
|
||||
return $this->belongsTo('app\api\model\wdsxh\activity\Activity', 'activity_id', 'id', [])->setEagerlyType(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
37
application/api/model/wdsxh/activity/ActivityApplyRecord.php
Normal file
37
application/api/model/wdsxh/activity/ActivityApplyRecord.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\api\model\wdsxh\activity;
|
||||
|
||||
use think\Model;
|
||||
|
||||
/**
|
||||
* Class ActivityApplyRecord
|
||||
* Desc 活动报名记录Model
|
||||
* Create on 2024/4/1 14:04
|
||||
* Create by wangyafang
|
||||
*/
|
||||
class ActivityApplyRecord extends Model
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_activity_apply_record';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = false;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = false;
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
39
application/api/model/wdsxh/activity/Order.php
Normal file
39
application/api/model/wdsxh/activity/Order.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class Order
|
||||
* Desc 活动订单表
|
||||
* Create on 2024/3/12 10:48
|
||||
* Create by wangyafang
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\activity;
|
||||
|
||||
|
||||
use think\Model;
|
||||
|
||||
class Order extends Model
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_activity_order';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
39
application/api/model/wdsxh/activity/Refund.php
Normal file
39
application/api/model/wdsxh/activity/Refund.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class Refund
|
||||
* Desc 活动退款模型
|
||||
* Create on 2024/3/12 17:22
|
||||
* Create by wangyafang
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\activity;
|
||||
|
||||
|
||||
use think\Model;
|
||||
|
||||
class Refund extends Model
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_activity_refund';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
48
application/api/model/wdsxh/album/Album.php
Normal file
48
application/api/model/wdsxh/album/Album.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 Album
|
||||
* Desc 相册管理
|
||||
* Create on 2024/3/12 10:10
|
||||
* Create by @小趴菜
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\album;
|
||||
|
||||
use app\api\model\wdsxh\Base;
|
||||
use traits\model\SoftDelete;
|
||||
class Album extends Base
|
||||
{
|
||||
use SoftDelete;
|
||||
|
||||
|
||||
|
||||
// 表名
|
||||
protected $name = 'wdsxh_album';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = 'integer';
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = 'updatetime';
|
||||
protected $deleteTime = 'deletetime';
|
||||
|
||||
protected function getReleaseDateAttr($value)
|
||||
{
|
||||
$new_date = str_replace("-", "/", $value);
|
||||
return $new_date;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
37
application/api/model/wdsxh/album/AlbumConfig.php
Normal file
37
application/api/model/wdsxh/album/AlbumConfig.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class AlbumConfig
|
||||
* Desc 相册设置
|
||||
* Create on 2024/3/12 10:38
|
||||
* Create by @小趴菜
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\album;
|
||||
|
||||
use app\api\model\wdsxh\Base;
|
||||
|
||||
class AlbumConfig extends Base
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_album_config';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = true;
|
||||
protected $updateTime = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
77
application/api/model/wdsxh/article/Article.php
Normal file
77
application/api/model/wdsxh/article/Article.php
Normal file
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class Article
|
||||
* Desc 文章管理
|
||||
* Create on 2024/3/12 10:10
|
||||
* Create by @小趴菜
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\article;
|
||||
|
||||
use think\Model;
|
||||
|
||||
class Article extends Model
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_article';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = true;
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
|
||||
protected function getCreatetimeAttr($value)
|
||||
{
|
||||
$new_date = date("Y-m-d H:i", $value);
|
||||
return $new_date;
|
||||
}
|
||||
|
||||
protected function getImageAttr($value)
|
||||
{
|
||||
return wdsxh_full_url($value);
|
||||
}
|
||||
|
||||
protected function getFilesAttr($value, $data)
|
||||
{
|
||||
$return_data = [];
|
||||
if (empty($value)) {
|
||||
return $return_data;
|
||||
} else {
|
||||
$filesdataArray = json_decode($data['filesdata'], true);
|
||||
$array = explode(',',$value);
|
||||
foreach ($array as $k=>$v) {
|
||||
// 获取文件扩展名
|
||||
$path_parts = pathinfo($v);
|
||||
$extension = isset($path_parts['extension']) ? '.' . $path_parts['extension'] : '';
|
||||
|
||||
// 拼接文件名和扩展名
|
||||
$fullName = $filesdataArray[$k]['name'] . $extension;
|
||||
|
||||
$return_data[$k] = array(
|
||||
'name'=>$fullName,
|
||||
'file'=>wdsxh_full_url($v),
|
||||
);
|
||||
}
|
||||
return $return_data;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
30
application/api/model/wdsxh/article/ArticleCat.php
Normal file
30
application/api/model/wdsxh/article/ArticleCat.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class ArticleCat
|
||||
* Desc 文章分类
|
||||
* Create on 2024/3/12 11:36
|
||||
* Create by @小趴菜
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\article;
|
||||
|
||||
use app\api\model\wdsxh\Base;
|
||||
|
||||
class ArticleCat extends Base
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_article_cat';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
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';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
65
application/api/model/wdsxh/corporate/Card.php
Normal file
65
application/api/model/wdsxh/corporate/Card.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力中小企业发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdadmin.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Wdadmin系统产品软件并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.wdadmin.cn
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class Card
|
||||
* Desc 名片Model
|
||||
* Create on 2025/1/21 16:57
|
||||
* Create by wangyafang
|
||||
*/
|
||||
namespace app\api\model\wdsxh\corporate;
|
||||
|
||||
use app\api\model\wdsxh\Base;
|
||||
use app\api\model\wdsxh\business\Association;
|
||||
|
||||
class Card extends Base
|
||||
{
|
||||
|
||||
|
||||
|
||||
// 表名
|
||||
protected $name = 'wdsxh_corporate_card';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = 'integer';
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = 'updatetime';
|
||||
protected $deleteTime = false;
|
||||
|
||||
// 追加属性
|
||||
protected $append = [
|
||||
'association'
|
||||
];
|
||||
|
||||
public function getAssociationAttr($value)
|
||||
{
|
||||
|
||||
$result = (new Association())->where('id',1)->field('name,logo')->find();
|
||||
return $result;
|
||||
}
|
||||
|
||||
protected function getCardBackgroundImageAttr($value)
|
||||
{
|
||||
return wdsxh_full_url($value);
|
||||
}
|
||||
|
||||
protected function setCardBackgroundImageAttr($value)
|
||||
{
|
||||
$value = remove_wdsxh_full_url($value);
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
43
application/api/model/wdsxh/corporate/CardBackground.php
Normal file
43
application/api/model/wdsxh/corporate/CardBackground.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力中小企业发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdadmin.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Wdadmin系统产品软件并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.wdadmin.cn
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class CardBackground
|
||||
* Desc 名片背景Model
|
||||
* Create on 2025/1/21 16:57
|
||||
* Create by wangyafang
|
||||
*/
|
||||
namespace app\api\model\wdsxh\corporate;
|
||||
|
||||
use app\api\model\wdsxh\Base;
|
||||
use traits\model\SoftDelete;
|
||||
|
||||
class CardBackground extends Base
|
||||
{
|
||||
use SoftDelete;
|
||||
|
||||
|
||||
|
||||
// 表名
|
||||
protected $name = 'wdsxh_corporate_card_background';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = 'integer';
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = 'updatetime';
|
||||
protected $deleteTime = 'deletetime';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
39
application/api/model/wdsxh/corporate/Reliable.php
Normal file
39
application/api/model/wdsxh/corporate/Reliable.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class Reliable
|
||||
* Desc 名片靠谱模型
|
||||
* Create on 2025/1/22 14:22
|
||||
* Create by wangyafang
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\corporate;
|
||||
|
||||
|
||||
use think\Model;
|
||||
|
||||
class Reliable extends Model
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_corporate_card_reliable';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
39
application/api/model/wdsxh/corporate/Visitor.php
Normal file
39
application/api/model/wdsxh/corporate/Visitor.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class Visitor
|
||||
* Desc 名片访客模型
|
||||
* Create on 2025/1/22 8:57
|
||||
* Create by wangyafang
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\corporate;
|
||||
|
||||
|
||||
use think\Model;
|
||||
|
||||
class Visitor extends Model
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_corporate_card_visitor';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
31
application/api/model/wdsxh/goods/Address.php
Normal file
31
application/api/model/wdsxh/goods/Address.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class Address
|
||||
* Desc 收货地址
|
||||
* Create on 2024/3/15 15:25
|
||||
* Create by @小趴菜
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\goods;
|
||||
|
||||
|
||||
use app\api\model\wdsxh\Base;
|
||||
|
||||
class Address extends Base
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_mall_user_address';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
42
application/api/model/wdsxh/goods/Banner.php
Normal file
42
application/api/model/wdsxh/goods/Banner.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class Banner
|
||||
* Desc 商城轮播图
|
||||
* Create on 2024/3/13 16:20
|
||||
* Create by @小趴菜
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\goods;
|
||||
|
||||
|
||||
use app\api\model\wdsxh\Base;
|
||||
use traits\model\SoftDelete;
|
||||
|
||||
class Banner extends Base
|
||||
{
|
||||
use SoftDelete;
|
||||
// 表名
|
||||
protected $name = 'wdsxh_mall_banner';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = true;
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = 'deletetime';
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
41
application/api/model/wdsxh/goods/FreightRules.php
Normal file
41
application/api/model/wdsxh/goods/FreightRules.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class FreightRules
|
||||
* Desc 商城运费规则
|
||||
* Create on 2024/3/15 14:06
|
||||
* Create by @小趴菜
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\goods;
|
||||
|
||||
|
||||
use app\api\model\wdsxh\Base;
|
||||
use traits\model\SoftDelete;
|
||||
|
||||
class FreightRules extends Base
|
||||
{
|
||||
use SoftDelete;
|
||||
// 表名
|
||||
protected $name = 'wdsxh_mall_freight_rules';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = 'integer';
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = 'updatetime';
|
||||
protected $deleteTime = 'deletetime';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
55
application/api/model/wdsxh/goods/Goods.php
Normal file
55
application/api/model/wdsxh/goods/Goods.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class Goods
|
||||
* Desc 商城商品
|
||||
* Create on 2024/3/13 16:20
|
||||
* Create by @小趴菜
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\goods;
|
||||
|
||||
|
||||
use app\api\model\wdsxh\Base;
|
||||
use traits\model\SoftDelete;
|
||||
|
||||
class Goods extends Base
|
||||
{
|
||||
use SoftDelete;
|
||||
|
||||
// 表名
|
||||
protected $name = 'wdsxh_mall_goods';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = true;
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = 'deletetime';
|
||||
|
||||
protected function getRecommendImageAttr($value){
|
||||
return wdsxh_full_url($value);
|
||||
}
|
||||
|
||||
protected function getSliderImagesAttr($value)
|
||||
{
|
||||
$array = explode(',',$value);
|
||||
foreach ($array as $k=>$v) {
|
||||
$array[$k] = wdsxh_full_url($v);
|
||||
}
|
||||
return implode(',',$array);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
42
application/api/model/wdsxh/goods/Order.php
Normal file
42
application/api/model/wdsxh/goods/Order.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class Order
|
||||
* Desc 订单管理
|
||||
* Create on 2024/3/13 16:20
|
||||
* Create by @小趴菜
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\goods;
|
||||
|
||||
|
||||
use app\api\model\wdsxh\Base;
|
||||
use traits\model\SoftDelete;
|
||||
|
||||
class Order extends Base
|
||||
{
|
||||
use SoftDelete;
|
||||
|
||||
// 表名
|
||||
protected $name = 'wdsxh_mall_order';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = 'integer';
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = 'deletetime';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
39
application/api/model/wdsxh/goods/Refund.php
Normal file
39
application/api/model/wdsxh/goods/Refund.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class Refund
|
||||
* Desc 退款管理
|
||||
* Create on 2024/3/13 16:20
|
||||
* Create by 订单退款
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\goods;
|
||||
|
||||
|
||||
use app\api\model\wdsxh\Base;
|
||||
|
||||
class Refund extends Base
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_mall_order_refund';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = 'integer';
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
44
application/api/model/wdsxh/goods/SingleCategory.php
Normal file
44
application/api/model/wdsxh/goods/SingleCategory.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class SingleCategory
|
||||
* Desc 商城分类
|
||||
* Create on 2024/3/13 11:34
|
||||
* Create by @小趴菜
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\goods;
|
||||
|
||||
|
||||
use app\api\model\wdsxh\Base;
|
||||
use traits\model\SoftDelete;
|
||||
|
||||
class SingleCategory extends Base
|
||||
{
|
||||
//todo 商城后台删除分类,前端没有删除
|
||||
use SoftDelete;
|
||||
|
||||
// 表名
|
||||
protected $name = 'wdsxh_single_category';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = true;
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = 'deletetime';
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
40
application/api/model/wdsxh/institution/Institution.php
Normal file
40
application/api/model/wdsxh/institution/Institution.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力中小企业发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdadmin.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Wdadmin系统产品软件并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.wdadmin.cn
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Class institution
|
||||
* Desc 机构Model
|
||||
* Create on 2025/3/5 10:28
|
||||
* Create by wangyafang
|
||||
*/
|
||||
namespace app\api\model\wdsxh\institution;
|
||||
|
||||
use app\api\model\wdsxh\Base;
|
||||
|
||||
class Institution extends Base
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_institution';
|
||||
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = false;
|
||||
|
||||
protected function getIconAttr($value)
|
||||
{
|
||||
return wdsxh_full_url($value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力中小企业发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdadmin.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Wdadmin系统产品软件并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.wdadmin.cn
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\api\model\wdsxh\institution;
|
||||
|
||||
use think\Model;
|
||||
|
||||
class InstitutionMemberApply extends Model
|
||||
{
|
||||
protected $name = 'wdsxh_institution_member_apply';
|
||||
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = false;
|
||||
}
|
||||
35
application/api/model/wdsxh/institution/Level.php
Normal file
35
application/api/model/wdsxh/institution/Level.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力中小企业发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdadmin.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Wdadmin系统产品软件并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.wdadmin.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class Level
|
||||
* Desc 机构级别
|
||||
* Create on 2025/3/5 11:20
|
||||
* Create by wangyafang
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\institution;
|
||||
|
||||
|
||||
use think\Model;
|
||||
|
||||
class Level extends Model
|
||||
{
|
||||
protected $name = 'wdsxh_institution_level';
|
||||
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = false;
|
||||
protected $updateTime = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
47
application/api/model/wdsxh/institution/Member.php
Normal file
47
application/api/model/wdsxh/institution/Member.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力中小企业发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdadmin.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Wdadmin系统产品软件并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.wdadmin.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class Member
|
||||
* Desc 成员Model
|
||||
* Create on 2025/3/5 10:41
|
||||
* Create by wangyafang
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\institution;
|
||||
|
||||
|
||||
use think\Model;
|
||||
|
||||
class Member extends Model
|
||||
{
|
||||
protected $name = 'wdsxh_institution_member';
|
||||
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = false;
|
||||
protected $updateTime = false;
|
||||
|
||||
public function usermember()
|
||||
{
|
||||
return $this->belongsTo('app\api\model\wdsxh\member\Member', 'member_id', 'id', [], 'LEFT')
|
||||
->setEagerlyType(0);
|
||||
}
|
||||
|
||||
public function institutionlevel()
|
||||
{
|
||||
return $this->belongsTo('app\api\model\wdsxh\institution\Level', 'level_id', 'id', [], 'LEFT')
|
||||
->setEagerlyType(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
43
application/api/model/wdsxh/jielong/Jielong.php
Normal file
43
application/api/model/wdsxh/jielong/Jielong.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 Jielong
|
||||
* Desc 活动接龙
|
||||
* Create on 2024/3/14 16:22
|
||||
* Create by @小趴菜
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\jielong;
|
||||
|
||||
|
||||
use think\Model;
|
||||
use traits\model\SoftDelete;
|
||||
|
||||
class Jielong extends Model
|
||||
{
|
||||
|
||||
use SoftDelete;
|
||||
// 表名
|
||||
protected $name = 'wdsxh_jielong';
|
||||
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = 'integer';
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = 'updatetime';
|
||||
protected $deleteTime = 'deletetime';
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
40
application/api/model/wdsxh/jielong/JielongFeedback.php
Normal file
40
application/api/model/wdsxh/jielong/JielongFeedback.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class JielongFeedback
|
||||
* Desc 活动接龙反馈
|
||||
* Create on 2024/3/14 16:22
|
||||
* Create by @小趴菜
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\jielong;
|
||||
|
||||
|
||||
use app\api\model\wdsxh\Base;
|
||||
|
||||
class JielongFeedback extends Base
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_jielong_feedback';
|
||||
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = false;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = false;
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
40
application/api/model/wdsxh/mall/Cart.php
Normal file
40
application/api/model/wdsxh/mall/Cart.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* Class Cart
|
||||
* Desc 购物车模型
|
||||
* Create on 2022/10/11 11:53
|
||||
* Create by wangyafang
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\mall;
|
||||
use think\Model;
|
||||
|
||||
class Cart extends Model
|
||||
{
|
||||
|
||||
// 表名
|
||||
protected $name = 'wdsxh_mall_cart';
|
||||
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
|
||||
protected function getGoodsImageAttr($value)
|
||||
{
|
||||
return wdsxh_full_url($value);
|
||||
}
|
||||
|
||||
protected function setGoodsImageAttr($value)
|
||||
{
|
||||
$value = remove_wdsxh_full_url($value);
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
27
application/api/model/wdsxh/mall/ConfirmReceiptMessage.php
Normal file
27
application/api/model/wdsxh/mall/ConfirmReceiptMessage.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力中小企业发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdadmin.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Wdadmin系统产品软件并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.wdadmin.cn
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\api\model\wdsxh\mall;
|
||||
|
||||
use think\Model;
|
||||
|
||||
class ConfirmReceiptMessage extends Model
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_mall_confirm_receipt_message';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = false;
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
}
|
||||
50
application/api/model/wdsxh/mall/OrderItem.php
Normal file
50
application/api/model/wdsxh/mall/OrderItem.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力中小企业发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdadmin.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Wdadmin系统产品软件并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.wdadmin.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class OrderItem
|
||||
* Desc 订单明细表
|
||||
* Create on 2025/4/14 17:55
|
||||
* Create by wangyafang
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\mall;
|
||||
|
||||
|
||||
use think\Model;
|
||||
|
||||
class OrderItem extends Model
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_mall_order_item';
|
||||
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
|
||||
protected function getGoodsImageAttr($value)
|
||||
{
|
||||
return wdsxh_full_url($value);
|
||||
}
|
||||
|
||||
protected function setGoodsImageAttr($value)
|
||||
{
|
||||
$value = remove_wdsxh_full_url($value);
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
38
application/api/model/wdsxh/member/Cert.php
Normal file
38
application/api/model/wdsxh/member/Cert.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class Cart
|
||||
* Desc 证书模型
|
||||
* Create on 2024/3/12 9:49
|
||||
* Create by @小趴菜
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\member;
|
||||
|
||||
|
||||
use app\api\model\wdsxh\Base;
|
||||
|
||||
class Cert extends Base
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_member_cert';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力中小企业发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdadmin.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Wdadmin系统产品软件并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.wdadmin.cn
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\api\model\wdsxh\member;
|
||||
|
||||
use think\Model;
|
||||
|
||||
class CompanyFixedInformation extends Model
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_company_fixed_information';
|
||||
|
||||
protected function getPersonalCarouselImagesAttr($value)
|
||||
{
|
||||
$value = wdsxh_full_url($value);
|
||||
if (is_array($value)){
|
||||
$value = implode(',',$value);
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
protected function getCompanyCarouselImagesAttr($value)
|
||||
{
|
||||
$value = wdsxh_full_url($value);
|
||||
if (is_array($value)){
|
||||
$value = implode(',',$value);
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
74
application/api/model/wdsxh/member/CompanyGoods.php
Normal file
74
application/api/model/wdsxh/member/CompanyGoods.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力中小企业发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdadmin.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Wdadmin系统产品软件并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.wdadmin.cn
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\api\model\wdsxh\member;
|
||||
|
||||
use think\Model;
|
||||
|
||||
class CompanyGoods extends Model
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_company_goods';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = 'updatetime';
|
||||
|
||||
// 追加属性
|
||||
protected $append = ['image'];
|
||||
|
||||
/**
|
||||
* 获取第一张图片(完整URL)
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
*/
|
||||
public function getImageAttr($value, $data)
|
||||
{
|
||||
if (!isset($data['images']) || empty($data['images'])) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$images = $data['images'];
|
||||
$firstImage = '';
|
||||
|
||||
// 判断是否为JSON数组
|
||||
if (is_string($images) && (strpos($images, '[') === 0 || strpos($images, '{') === 0)) {
|
||||
$imagesArray = json_decode($images, true);
|
||||
if (is_array($imagesArray) && !empty($imagesArray)) {
|
||||
$firstImage = is_array($imagesArray[0]) ? $imagesArray[0] : reset($imagesArray);
|
||||
}
|
||||
}
|
||||
// 判断是否为逗号分隔的字符串
|
||||
elseif (is_string($images) && strpos($images, ',') !== false) {
|
||||
$imagesArray = explode(',', $images);
|
||||
$firstImage = trim($imagesArray[0]);
|
||||
}
|
||||
// 单个图片
|
||||
else {
|
||||
$firstImage = $images;
|
||||
}
|
||||
|
||||
// 返回完整URL
|
||||
return wdsxh_full_url($firstImage);
|
||||
}
|
||||
|
||||
protected function getImagesAttr($value)
|
||||
{
|
||||
$array = explode(',',$value);
|
||||
foreach ($array as $k=>$v) {
|
||||
$array[$k] = wdsxh_full_url($v);
|
||||
}
|
||||
return implode(',',$array);
|
||||
}
|
||||
}
|
||||
44
application/api/model/wdsxh/member/IndustryCategory.php
Normal file
44
application/api/model/wdsxh/member/IndustryCategory.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class IndustryCategory
|
||||
* Desc 行业分类模型
|
||||
* Create on 2024/3/19 11:22
|
||||
* Create by wangyafang
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\member;
|
||||
|
||||
|
||||
use think\Model;
|
||||
|
||||
class IndustryCategory extends Model
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_member_industry_category';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = false;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = false;
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
|
||||
public function getIconAttr($value)
|
||||
{
|
||||
return wdsxh_full_url($value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
39
application/api/model/wdsxh/member/JoinConfig.php
Normal file
39
application/api/model/wdsxh/member/JoinConfig.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class JoinConfig
|
||||
* Desc 入会类型设置模型
|
||||
* Create on 2024/3/19 10:52
|
||||
* Create by wangyafang
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\member;
|
||||
|
||||
|
||||
use think\Model;
|
||||
|
||||
class JoinConfig extends Model
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_member_join_config';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = false;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = false;
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
39
application/api/model/wdsxh/member/Level.php
Normal file
39
application/api/model/wdsxh/member/Level.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class Member
|
||||
* Desc 会员模型
|
||||
* Create on 2024/3/8 9:56
|
||||
* Create by wangyafang
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\member;
|
||||
|
||||
|
||||
use app\api\model\wdsxh\Base;
|
||||
|
||||
class Level extends Base
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_member_level';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = false;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = false;
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
49
application/api/model/wdsxh/member/Member.php
Normal file
49
application/api/model/wdsxh/member/Member.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class Member
|
||||
* Desc 会员模型
|
||||
* Create on 2024/3/8 9:56
|
||||
* Create by wangyafang
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\member;
|
||||
|
||||
|
||||
use app\api\model\wdsxh\Base;
|
||||
|
||||
class Member extends Base
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_member';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
|
||||
public function getCompanyLogoAttr($value)
|
||||
{
|
||||
return wdsxh_full_url($value);
|
||||
}
|
||||
|
||||
public function getOrganizeLogoAttr($value)
|
||||
{
|
||||
return wdsxh_full_url($value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class MemberExpireMessage
|
||||
* Desc 已发送会员即将过期消息提醒Model
|
||||
* Create on 2024/4/8 14:24
|
||||
* Create by wangyafang
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\member;
|
||||
|
||||
|
||||
use think\Model;
|
||||
|
||||
class MemberAlreadyExpireMessage extends Model
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_member_already_expire_message';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = false;
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
37
application/api/model/wdsxh/member/MemberApply.php
Normal file
37
application/api/model/wdsxh/member/MemberApply.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\api\model\wdsxh\member;
|
||||
|
||||
use think\Model;
|
||||
|
||||
/**
|
||||
* Class MemberApply
|
||||
* Desc 入会申请模型
|
||||
* Create on 2024/3/8 9:51
|
||||
* Create by wangyafang
|
||||
*/
|
||||
class MemberApply extends Model
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_member_apply';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
48
application/api/model/wdsxh/member/MemberApplyExamine.php
Normal file
48
application/api/model/wdsxh/member/MemberApplyExamine.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力中小企业发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdadmin.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Wdadmin系统产品软件并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.wdadmin.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class MemberApplyExamine
|
||||
* Desc 会员审核Model
|
||||
* Create on 2025/3/5 15:18
|
||||
* Create by wangyafang
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\member;
|
||||
|
||||
|
||||
use app\api\model\wdsxh\Base;
|
||||
|
||||
class MemberApplyExamine extends Base
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_member_apply';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
|
||||
protected $type = [
|
||||
'createtime' => 'timestamp:Y-m-d H:i:s',
|
||||
];
|
||||
|
||||
public function level()
|
||||
{
|
||||
return $this->belongsTo('Level', 'member_level_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
39
application/api/model/wdsxh/member/MemberExpireMessage.php
Normal file
39
application/api/model/wdsxh/member/MemberExpireMessage.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class MemberExpireMessage
|
||||
* Desc 已发送会员即将过期消息提醒Model
|
||||
* Create on 2024/4/8 14:24
|
||||
* Create by wangyafang
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\member;
|
||||
|
||||
|
||||
use think\Model;
|
||||
|
||||
class MemberExpireMessage extends Model
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_member_expire_message';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = false;
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
45
application/api/model/wdsxh/member/Pay.php
Normal file
45
application/api/model/wdsxh/member/Pay.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class Pay
|
||||
* Desc 会员缴费记录模型
|
||||
* Create on 2024/3/15 14:33
|
||||
* Create by wangyafang
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\member;
|
||||
|
||||
|
||||
use think\Model;
|
||||
|
||||
class Pay extends Model
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_member_pay';
|
||||
|
||||
protected $type = [
|
||||
'status' => 'integer',
|
||||
'score' => 'float',
|
||||
'pay_time' => 'timestamp:Y-m-d H:i:s',
|
||||
];
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
39
application/api/model/wdsxh/member/Promotion.php
Normal file
39
application/api/model/wdsxh/member/Promotion.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class Promotion
|
||||
* Desc 推广会员模型
|
||||
* Create on 2024/3/16 15:30
|
||||
* Create by wangyafang
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\member;
|
||||
|
||||
|
||||
use think\Model;
|
||||
|
||||
class Promotion extends Model
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_member_promotion';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
39
application/api/model/wdsxh/member/Visitor.php
Normal file
39
application/api/model/wdsxh/member/Visitor.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class Visitor
|
||||
* Desc 会员访客模型
|
||||
* Create on 2024/3/15 10:54
|
||||
* Create by wangyafang
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\member;
|
||||
|
||||
|
||||
use think\Model;
|
||||
|
||||
class Visitor extends Model
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_member_visitor';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
42
application/api/model/wdsxh/message/MemberNotification.php
Normal file
42
application/api/model/wdsxh/message/MemberNotification.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力中小企业发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdadmin.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Wdadmin系统产品软件并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.wdadmin.cn
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\api\model\wdsxh\message;
|
||||
|
||||
use app\admin\model\wdsxh\message\MessageNotification;
|
||||
use think\Model;
|
||||
|
||||
class MemberNotification extends Model
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_member_notification';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = 'int';
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = false;
|
||||
protected $updateTime = false;
|
||||
|
||||
protected $type = [
|
||||
'status' => 'integer',
|
||||
'score' => 'float',
|
||||
'createtime' => 'timestamp:Y-m-d H:i:s',
|
||||
];
|
||||
|
||||
protected $append = [
|
||||
'title',
|
||||
];
|
||||
|
||||
public function getTitleAttr($value, $data)
|
||||
{
|
||||
return (new MessageNotification())->where('id',$data['notification_id'])->value('title');
|
||||
}
|
||||
}
|
||||
41
application/api/model/wdsxh/points/Goods.php
Normal file
41
application/api/model/wdsxh/points/Goods.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力中小企业发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdadmin.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Wdadmin系统产品软件并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.wdadmin.cn
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\api\model\wdsxh\points;
|
||||
|
||||
use app\api\model\wdsxh\Base;
|
||||
use traits\model\SoftDelete;
|
||||
|
||||
class Goods extends Base
|
||||
{
|
||||
use SoftDelete;
|
||||
|
||||
|
||||
|
||||
// 表名
|
||||
protected $name = 'wdsxh_points_goods';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = 'integer';
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = false;
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = 'deletetime';
|
||||
|
||||
protected function getSliderImagesAttr($value)
|
||||
{
|
||||
$array = explode(',',$value);
|
||||
foreach ($array as $k=>$v) {
|
||||
$array[$k] = wdsxh_full_url($v);
|
||||
}
|
||||
return implode(',',$array);
|
||||
}
|
||||
}
|
||||
105
application/api/model/wdsxh/points/Order.php
Normal file
105
application/api/model/wdsxh/points/Order.php
Normal file
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力中小企业发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdadmin.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Wdadmin系统产品软件并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.wdadmin.cn
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\api\model\wdsxh\points;
|
||||
|
||||
use app\admin\model\wdsxh\points\Express;
|
||||
use app\admin\model\wdsxh\points\Logistics;
|
||||
use app\common\model\wdsxh\points\UserWechatPointsLog;
|
||||
use think\Db;
|
||||
use think\Exception;
|
||||
use think\exception\PDOException;
|
||||
use think\exception\ValidateException;
|
||||
use think\Model;
|
||||
|
||||
class Order extends Model
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_points_order';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = 'integer';
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
|
||||
protected $append = [
|
||||
'goods_info',
|
||||
];
|
||||
|
||||
protected $type = [
|
||||
'redemption_time' => 'timestamp:Y-m-d H:i:s',
|
||||
];
|
||||
|
||||
protected static function init()
|
||||
{
|
||||
self::beforeInsert(function ($data) {
|
||||
$data['order_no'] = wdsxh_create_order();
|
||||
|
||||
$address = (new \app\api\model\wdsxh\goods\Address())->where('id',$data['address_id'])->find();
|
||||
$data['real_name'] = $address['name'];//用户名称
|
||||
$data['user_phone'] = $address['tel'];//手机号
|
||||
$data['user_address'] = $address['address'];//详细地址
|
||||
|
||||
$data['redemption_time'] = time();//兑换时间
|
||||
|
||||
});
|
||||
|
||||
self::afterInsert(function ($data) {
|
||||
$goodsObj = (new Goods())->where('id',$data['goods_id'])->find();
|
||||
UserWechatPointsLog::pointsMall(2,$data,$goodsObj,'积分兑换');
|
||||
});
|
||||
}
|
||||
|
||||
public function submitSettlement($data)
|
||||
{
|
||||
$orderModel = new self();
|
||||
Db::startTrans();
|
||||
try {
|
||||
$orderModel->allowField(true)->save($data);
|
||||
Db::commit();
|
||||
} catch (ValidateException|PDOException|Exception $e) {
|
||||
Db::rollback();
|
||||
throw new \think\Exception($e->getMessage());
|
||||
}
|
||||
|
||||
return ['order_id'=>$orderModel->id];
|
||||
|
||||
}
|
||||
|
||||
public function getGoodsInfoAttr($value, $data)
|
||||
{
|
||||
$goods = (new Goods())
|
||||
->withTrashed()
|
||||
->where('id',$data['goods_id'])
|
||||
->field('name,image')
|
||||
->find();
|
||||
$goods->points = $data['points'];
|
||||
return $goods;
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc 获取发货信息
|
||||
* Create on 2025/11/13 下午3:46
|
||||
* Create by wangyafang
|
||||
*/
|
||||
public function logistics($order_id){
|
||||
$logistics = (new Logistics())
|
||||
->where('order_id',$order_id)
|
||||
->field('delivery_id,delivery_no,send_time')
|
||||
->find();
|
||||
$logistics['delivery_name'] = (new Express())->where('id',$logistics['delivery_id'])->value('name');
|
||||
$logistics->hidden(['delivery_id']);
|
||||
return $logistics;
|
||||
|
||||
}
|
||||
}
|
||||
19
application/api/model/wdsxh/questionnaire/Category.php
Normal file
19
application/api/model/wdsxh/questionnaire/Category.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力中小企业发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdadmin.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Wdadmin系统产品软件并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.wdadmin.cn
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\api\model\wdsxh\questionnaire;
|
||||
|
||||
use think\Model;
|
||||
|
||||
class Category extends Model
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_questionnaire_category';
|
||||
}
|
||||
36
application/api/model/wdsxh/questionnaire/Questionnaire.php
Normal file
36
application/api/model/wdsxh/questionnaire/Questionnaire.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class Questionnaire
|
||||
* Desc 证书模型
|
||||
* Create on 2024/3/19 15:49
|
||||
* Create by @小趴菜
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\questionnaire;
|
||||
|
||||
|
||||
use app\api\model\wdsxh\Base;
|
||||
use traits\model\SoftDelete;
|
||||
|
||||
class Questionnaire extends Base
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_questionnaire';
|
||||
|
||||
use SoftDelete;
|
||||
|
||||
protected $deleteTime = 'deletetime';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
39
application/api/model/wdsxh/questionnaire/Render.php
Normal file
39
application/api/model/wdsxh/questionnaire/Render.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class Render
|
||||
* Desc 问卷提交
|
||||
* Create on 2024/3/20 16:49
|
||||
* Create by @小趴菜
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\questionnaire;
|
||||
|
||||
|
||||
use app\api\model\wdsxh\Base;
|
||||
|
||||
class Render extends Base
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_questionnaire_render';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = true;
|
||||
|
||||
protected $updateTime = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
38
application/api/model/wdsxh/questionnaire/Topic.php
Normal file
38
application/api/model/wdsxh/questionnaire/Topic.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class Topic
|
||||
* Desc 问卷题目管理
|
||||
* Create on 2024/3/19 16:49
|
||||
* Create by @小趴菜
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\questionnaire;
|
||||
|
||||
|
||||
use app\api\model\wdsxh\Base;
|
||||
|
||||
class Topic extends Base
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_questionnaire_topic';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = true;
|
||||
protected $updateTime = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
32
application/api/model/wdsxh/user/Wechat.php
Normal file
32
application/api/model/wdsxh/user/Wechat.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
/**
|
||||
* Class Wechat
|
||||
* Desc 微信表
|
||||
* Create on 2024/3/12 10:10
|
||||
* Create by @小趴菜
|
||||
*/
|
||||
|
||||
namespace app\api\model\wdsxh\user;
|
||||
|
||||
use think\Model;
|
||||
|
||||
class Wechat extends Model
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_user_wechat';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user