feat: 新增分销分佣结算、商家认证及草稿管理功能,优化界面与版本更新
这个提交包含在:
@@ -3,6 +3,7 @@
|
||||
namespace app\admin\model;
|
||||
|
||||
use think\Model;
|
||||
use app\common\library\FcRelation;
|
||||
|
||||
|
||||
class FcComment extends Model
|
||||
@@ -25,8 +26,19 @@ class FcComment extends Model
|
||||
|
||||
// 追加属性
|
||||
protected $append = [
|
||||
|
||||
'post_title',
|
||||
'user_name',
|
||||
];
|
||||
|
||||
public function getPostTitleAttr($value, $data)
|
||||
{
|
||||
return FcRelation::postTitle(isset($data['post_id']) ? $data['post_id'] : 0);
|
||||
}
|
||||
|
||||
public function getUserNameAttr($value, $data)
|
||||
{
|
||||
return FcRelation::userName(isset($data['user_id']) ? $data['user_id'] : 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace app\admin\model;
|
||||
|
||||
use think\Model;
|
||||
use app\common\library\FcRelation;
|
||||
|
||||
|
||||
class FcCommission extends Model
|
||||
@@ -25,8 +26,19 @@ class FcCommission extends Model
|
||||
|
||||
// 追加属性
|
||||
protected $append = [
|
||||
|
||||
'user_name',
|
||||
'from_user_name',
|
||||
];
|
||||
|
||||
public function getUserNameAttr($value, $data)
|
||||
{
|
||||
return FcRelation::userName(isset($data['user_id']) ? $data['user_id'] : 0);
|
||||
}
|
||||
|
||||
public function getFromUserNameAttr($value, $data)
|
||||
{
|
||||
return FcRelation::userName(isset($data['from_user_id']) ? $data['from_user_id'] : 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace app\admin\model;
|
||||
|
||||
use think\Model;
|
||||
use app\common\library\FcRelation;
|
||||
|
||||
|
||||
class FcDistRelation extends Model
|
||||
@@ -25,8 +26,19 @@ class FcDistRelation extends Model
|
||||
|
||||
// 追加属性
|
||||
protected $append = [
|
||||
|
||||
'user_name',
|
||||
'parent_name',
|
||||
];
|
||||
|
||||
public function getUserNameAttr($value, $data)
|
||||
{
|
||||
return FcRelation::userName(isset($data['user_id']) ? $data['user_id'] : 0);
|
||||
}
|
||||
|
||||
public function getParentNameAttr($value, $data)
|
||||
{
|
||||
return FcRelation::userName(isset($data['parent_id']) ? $data['parent_id'] : 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace app\admin\model;
|
||||
|
||||
use think\Model;
|
||||
use app\common\library\FcRelation;
|
||||
|
||||
|
||||
class FcDraft extends Model
|
||||
@@ -25,8 +26,19 @@ class FcDraft extends Model
|
||||
|
||||
// 追加属性
|
||||
protected $append = [
|
||||
|
||||
'user_name',
|
||||
'category_name',
|
||||
];
|
||||
|
||||
public function getUserNameAttr($value, $data)
|
||||
{
|
||||
return FcRelation::userName(isset($data['user_id']) ? $data['user_id'] : 0);
|
||||
}
|
||||
|
||||
public function getCategoryNameAttr($value, $data)
|
||||
{
|
||||
return FcRelation::categoryName(isset($data['category_id']) ? $data['category_id'] : 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace app\admin\model;
|
||||
|
||||
use think\Model;
|
||||
use app\common\library\FcRelation;
|
||||
|
||||
|
||||
class FcFinanceFlow extends Model
|
||||
@@ -25,8 +26,23 @@ class FcFinanceFlow extends Model
|
||||
|
||||
// 追加属性
|
||||
protected $append = [
|
||||
|
||||
'related_text',
|
||||
];
|
||||
|
||||
public function getRelatedTextAttr($value, $data)
|
||||
{
|
||||
$scene = isset($data['scene']) ? $data['scene'] : '';
|
||||
$id = isset($data['related_id']) ? $data['related_id'] : 0;
|
||||
if (strpos($scene, '提现') !== false) {
|
||||
return FcRelation::withdrawNo($id);
|
||||
}
|
||||
if (strpos($scene, '订单') !== false || strpos($scene, '会员') !== false
|
||||
|| strpos($scene, '发布') !== false || strpos($scene, '充值') !== false) {
|
||||
return FcRelation::orderNo($id);
|
||||
}
|
||||
$no = FcRelation::orderNo($id);
|
||||
return $no !== '' ? $no : FcRelation::withdrawNo($id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace app\admin\model;
|
||||
|
||||
use think\Model;
|
||||
use app\common\library\FcRelation;
|
||||
|
||||
|
||||
class FcMerchant extends Model
|
||||
@@ -25,8 +26,13 @@ class FcMerchant extends Model
|
||||
|
||||
// 追加属性
|
||||
protected $append = [
|
||||
|
||||
'user_name',
|
||||
];
|
||||
|
||||
public function getUserNameAttr($value, $data)
|
||||
{
|
||||
return FcRelation::userName(isset($data['user_id']) ? $data['user_id'] : 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace app\admin\model;
|
||||
|
||||
use think\Model;
|
||||
use app\common\library\FcRelation;
|
||||
|
||||
|
||||
class FcMessage extends Model
|
||||
@@ -25,8 +26,13 @@ class FcMessage extends Model
|
||||
|
||||
// 追加属性
|
||||
protected $append = [
|
||||
|
||||
'user_name',
|
||||
];
|
||||
|
||||
public function getUserNameAttr($value, $data)
|
||||
{
|
||||
return FcRelation::userName(isset($data['user_id']) ? $data['user_id'] : 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace app\admin\model;
|
||||
|
||||
use think\Model;
|
||||
use app\common\library\FcRelation;
|
||||
|
||||
|
||||
class FcOrder extends Model
|
||||
@@ -25,14 +26,25 @@ class FcOrder extends Model
|
||||
|
||||
// 追加属性
|
||||
protected $append = [
|
||||
'status_text'
|
||||
'status_text',
|
||||
'user_name',
|
||||
];
|
||||
|
||||
public function getUserNameAttr($value, $data)
|
||||
{
|
||||
return FcRelation::userName(isset($data['user_id']) ? $data['user_id'] : 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function getStatusList()
|
||||
{
|
||||
return ['16' => __('Status 16')];
|
||||
return [
|
||||
'pending' => __('待支付'),
|
||||
'paid' => __('已支付'),
|
||||
'refunded' => __('已退款'),
|
||||
'closed' => __('已关闭'),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace app\admin\model;
|
||||
|
||||
use think\Model;
|
||||
use app\common\library\FcRelation;
|
||||
|
||||
|
||||
class FcPayView extends Model
|
||||
@@ -25,8 +26,25 @@ class FcPayView extends Model
|
||||
|
||||
// 追加属性
|
||||
protected $append = [
|
||||
|
||||
'user_name',
|
||||
'post_title',
|
||||
'order_no',
|
||||
];
|
||||
|
||||
public function getUserNameAttr($value, $data)
|
||||
{
|
||||
return FcRelation::userName(isset($data['user_id']) ? $data['user_id'] : 0);
|
||||
}
|
||||
|
||||
public function getPostTitleAttr($value, $data)
|
||||
{
|
||||
return FcRelation::postTitle(isset($data['post_id']) ? $data['post_id'] : 0);
|
||||
}
|
||||
|
||||
public function getOrderNoAttr($value, $data)
|
||||
{
|
||||
return FcRelation::orderNo(isset($data['order_id']) ? $data['order_id'] : 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace app\admin\model;
|
||||
|
||||
use think\Model;
|
||||
use traits\model\SoftDelete;
|
||||
use app\common\library\FcRelation;
|
||||
|
||||
class FcPost extends Model
|
||||
{
|
||||
@@ -25,8 +26,19 @@ class FcPost extends Model
|
||||
|
||||
// 追加属性
|
||||
protected $append = [
|
||||
|
||||
'user_name',
|
||||
'category_name',
|
||||
];
|
||||
|
||||
public function getUserNameAttr($value, $data)
|
||||
{
|
||||
return FcRelation::userName(isset($data['user_id']) ? $data['user_id'] : 0);
|
||||
}
|
||||
|
||||
public function getCategoryNameAttr($value, $data)
|
||||
{
|
||||
return FcRelation::categoryName(isset($data['category_id']) ? $data['category_id'] : 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace app\admin\model;
|
||||
|
||||
use think\Model;
|
||||
use app\common\library\FcRelation;
|
||||
|
||||
|
||||
class FcReport extends Model
|
||||
@@ -25,14 +26,37 @@ class FcReport extends Model
|
||||
|
||||
// 追加属性
|
||||
protected $append = [
|
||||
'status_text'
|
||||
'status_text',
|
||||
'reporter_name',
|
||||
'target_title',
|
||||
];
|
||||
|
||||
public function getReporterNameAttr($value, $data)
|
||||
{
|
||||
return FcRelation::userName(isset($data['reporter_id']) ? $data['reporter_id'] : 0);
|
||||
}
|
||||
|
||||
public function getTargetTitleAttr($value, $data)
|
||||
{
|
||||
$type = isset($data['target_type']) ? $data['target_type'] : '';
|
||||
$id = isset($data['target_id']) ? $data['target_id'] : 0;
|
||||
if ($type === 'post') {
|
||||
return FcRelation::postTitle($id);
|
||||
}
|
||||
if ($type === 'comment') {
|
||||
return FcRelation::commentSnippet($id);
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function getStatusList()
|
||||
{
|
||||
return ['16' => __('Status 16')];
|
||||
return [
|
||||
'pending' => __('待处理'),
|
||||
'handled' => __('已处理'),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace app\admin\model;
|
||||
|
||||
use think\Model;
|
||||
use app\common\library\FcRelation;
|
||||
|
||||
|
||||
class FcWithdraw extends Model
|
||||
@@ -25,14 +26,24 @@ class FcWithdraw extends Model
|
||||
|
||||
// 追加属性
|
||||
protected $append = [
|
||||
'status_text'
|
||||
'status_text',
|
||||
'user_name',
|
||||
];
|
||||
|
||||
public function getUserNameAttr($value, $data)
|
||||
{
|
||||
return FcRelation::userName(isset($data['user_id']) ? $data['user_id'] : 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function getStatusList()
|
||||
{
|
||||
return ['16' => __('Status 16')];
|
||||
return [
|
||||
'auditing' => __('待审核'),
|
||||
'paid' => __('已打款'),
|
||||
'rejected' => __('已驳回'),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户