作者 李宇航

合并分支 'lyh-server' 到 'master'

Lyh server



查看合并请求 !1494
... ... @@ -119,14 +119,14 @@ class AiBlogAuthorTask extends Command
}
$aiBlogAuthorModel = new AiBlogAuthor();
foreach ($data as $v){
//查询当前数据是否存在
$info = $aiBlogAuthorModel->read(['author_id'=>$v['id']]);
$param = [
'author_id'=>$v['id'],
'title'=>$v['title'],
'image'=>str_replace_url($v['picture']),
'description'=>$v['description'],
];
//查询当前数据是否存在
$info = $aiBlogAuthorModel->read(['author_id'=>$v['id']]);
try {
if($info === false){
echo '执行新增'.PHP_EOL;
... ... @@ -134,11 +134,11 @@ class AiBlogAuthorTask extends Command
$param['route'] = RouteMap::setRoute($v['route'] ?? $v['title'], RouteMap::SOURCE_AI_BLOG_AUTHOR, $id, $project_id);
$aiBlogAuthorModel->edit(['route'=>$param['route']],['id'=>$id]);
}else{
$param['route'] = RouteMap::setRoute($v['route'] ?? $v['title'], RouteMap::SOURCE_AI_BLOG_AUTHOR, $id, $project_id);
$param['route'] = RouteMap::setRoute($v['route'] ?? $v['title'], RouteMap::SOURCE_AI_BLOG_AUTHOR, $info['id'], $project_id);
$aiBlogAuthorModel->edit($param,['id'=>$info['id']]);
echo '执行更新'.PHP_EOL;
}
$aiSettingInfo = $this->getSetting();
$aiSettingInfo = $this->getSetting($project_id);
$aiBlogService = new AiBlogService();
$aiBlogService->mch_id = $aiSettingInfo['mch_id'];
$aiBlogService->key = $aiSettingInfo['key'];
... ...