```
feat(split): 添加分账手动指定接收方功能 - 实现SplitManualService服务类,支持手动覆盖分账明细 - 新增SplitManual和SplitManualLog数据模型 - 修改SplitCalculator优先使用手动覆盖数据进行分账计算 - 添加分账记录手动指定接收方的数据库表结构 - 集成手动分账到汇付分账流程中,支持失败重试机制 - 添加商品详情内容更新SQL脚本用于汇付审核 ```
这个提交包含在:
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace addons\shopro\model\split;
|
||||
|
||||
use think\Model;
|
||||
|
||||
class SplitManualLog extends Model
|
||||
{
|
||||
protected $name = 'shopro_split_manual_log';
|
||||
protected $autoWriteTimestamp = false;
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = false;
|
||||
|
||||
public function getBeforeItemsAttr($value)
|
||||
{
|
||||
return $this->decodeItems($value);
|
||||
}
|
||||
|
||||
public function setBeforeItemsAttr($value)
|
||||
{
|
||||
return $this->encodeItems($value);
|
||||
}
|
||||
|
||||
public function getAfterItemsAttr($value)
|
||||
{
|
||||
return $this->decodeItems($value);
|
||||
}
|
||||
|
||||
public function setAfterItemsAttr($value)
|
||||
{
|
||||
return $this->encodeItems($value);
|
||||
}
|
||||
|
||||
protected function decodeItems($value)
|
||||
{
|
||||
if ($value === null || $value === '') {
|
||||
return [];
|
||||
}
|
||||
$decoded = json_decode($value, true);
|
||||
return is_array($decoded) ? $decoded : [];
|
||||
}
|
||||
|
||||
protected function encodeItems($value)
|
||||
{
|
||||
if (is_array($value)) {
|
||||
return json_encode($value, JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
在新工单中引用
屏蔽一个用户