feat: 完善协议管理、师傅资质认证、分账配置并完成测试环境全量部署与同步
这个提交包含在:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
/**
|
||||
* 平台协议与隐私政策模型
|
||||
*/
|
||||
class Agreement extends Model
|
||||
{
|
||||
protected $name = 'agreement';
|
||||
|
||||
protected $autoWriteTimestamp = 'int';
|
||||
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = 'updatetime';
|
||||
protected $deleteTime = false;
|
||||
|
||||
public function getStatusList()
|
||||
{
|
||||
return [
|
||||
'normal' => '正常展示',
|
||||
'hidden' => '暂不展示',
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
class CommissionRule extends Model
|
||||
{
|
||||
protected $name = 'commission_rule';
|
||||
|
||||
protected $autoWriteTimestamp = 'integer';
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = 'updatetime';
|
||||
protected $deleteTime = false;
|
||||
|
||||
public function getOrderModeList(): array
|
||||
{
|
||||
return [
|
||||
'all' => '不限订单类型',
|
||||
'fixed' => '一口价',
|
||||
'quote' => '师傅报价',
|
||||
'custom' => '业主自主出价',
|
||||
'range' => '区间定价',
|
||||
];
|
||||
}
|
||||
|
||||
public function getCustomerTypeList(): array
|
||||
{
|
||||
return [
|
||||
'all' => '不限下单人',
|
||||
'personal' => '个人下单',
|
||||
'merchant' => '企业商家',
|
||||
];
|
||||
}
|
||||
|
||||
public function getUrgentModeList(): array
|
||||
{
|
||||
return [
|
||||
'all' => '不限是否加急',
|
||||
'normal' => '仅普通单',
|
||||
'urgent' => '仅加急单',
|
||||
];
|
||||
}
|
||||
|
||||
public function getCalcModeList(): array
|
||||
{
|
||||
return [
|
||||
'percent' => '按比例抽成 (%)',
|
||||
'fixed' => '每单固定收费 (元)',
|
||||
'mixed' => '按比例 + 每单固定费',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStatusList(): array
|
||||
{
|
||||
return [
|
||||
'normal' => '启用',
|
||||
'hidden' => '停用',
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
class MasterCert extends Model
|
||||
{
|
||||
protected $name = 'master_cert';
|
||||
|
||||
protected $autoWriteTimestamp = 'integer';
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = 'updatetime';
|
||||
protected $deleteTime = false;
|
||||
|
||||
protected $append = [
|
||||
'status_text',
|
||||
];
|
||||
|
||||
public function getStatusList()
|
||||
{
|
||||
return [
|
||||
'pending' => '待审核',
|
||||
'pass' => '已通过',
|
||||
'reject' => '已驳回',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStatusTextAttr($value, $data)
|
||||
{
|
||||
$value = $value ?: ($data['status'] ?? '');
|
||||
$list = $this->getStatusList();
|
||||
return $list[$value] ?? '';
|
||||
}
|
||||
|
||||
public function master()
|
||||
{
|
||||
return $this->belongsTo('Master', 'master_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,8 @@ class Withdraw extends Model
|
||||
// 追加属性
|
||||
protected $append = [
|
||||
'channel_text',
|
||||
'status_text'
|
||||
'status_text',
|
||||
'transfer_state_text'
|
||||
];
|
||||
|
||||
|
||||
@@ -57,6 +58,15 @@ class Withdraw extends Model
|
||||
return $list[$value] ?? '';
|
||||
}
|
||||
|
||||
public function getTransferStateTextAttr($value, $data)
|
||||
{
|
||||
$state = $data['transfer_state'] ?? '';
|
||||
if ($state === '' && ($data['channel'] ?? '') === 'bank') {
|
||||
return '线下转账';
|
||||
}
|
||||
return \app\common\library\PaymentService::transferStateLabel($state);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\model\service;
|
||||
|
||||
use think\Model;
|
||||
|
||||
class Gallery extends Model
|
||||
{
|
||||
protected $name = 'system_gallery';
|
||||
|
||||
protected $autoWriteTimestamp = 'integer';
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = 'updatetime';
|
||||
protected $deleteTime = false;
|
||||
|
||||
protected $append = [
|
||||
'status_text'
|
||||
];
|
||||
|
||||
public function getStatusList()
|
||||
{
|
||||
return ['normal' => __('Normal'), 'hidden' => __('Hidden')];
|
||||
}
|
||||
|
||||
public function getStatusTextAttr($value, $data)
|
||||
{
|
||||
$value = $value ?: ($data['status'] ?? '');
|
||||
$list = $this->getStatusList();
|
||||
return $list[$value] ?? '';
|
||||
}
|
||||
|
||||
public function cat()
|
||||
{
|
||||
return $this->belongsTo('app\admin\model\service\Cat', 'cat_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||
}
|
||||
|
||||
public function service()
|
||||
{
|
||||
return $this->belongsTo('app\admin\model\Service', 'service_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||
}
|
||||
}
|
||||
在新工单中引用
屏蔽一个用户