没有不值得去解决的问题,也没有不值得去学习的技术!

Designing and Implementing Publish Record Queries for Task Import Success and Failure: A Yii 2.0 Analysis of afterAction($action, $result) Not Executing on 404 and 302 Responses (Part 2)

After comparative analysis, I found that neither afterAction nor afterRequest exists

1. When the response status code is 404 or 302, the filter method afterAction($action, $result) is not executed leaves an issue that needs to be analyzed and resolved.

JSON

{
    "code": 226004,
    "message": "数据验证失败:标题只能包含至多255个字符。"
}

2. When the response status code is 422, as shown in Figure 1.

When the response status code is 422
Figure 1

3. Checking Log Messages shows that the filter method afterAction($action, $result) has been executed, as shown in Figure 2.

Checking Log Messages shows that the filter method afterAction($action, $result) has been executed
Figure 2
Plaintext

15:29:04.049	info	yii\db\Command::query
SHOW FULL COLUMNS FROM `cpa_pre_pub_log`
E:\wwwroot\channel-pub-api\common\services\PrePubLogService.php:147
E:\wwwroot\channel-pub-api\qq\filters\PrePubLogFilter.php:54

4. Checking Events shows that the afterAction event has been triggered, as shown in Figure 3.

Checking Events shows that the afterAction event has been triggered
Figure 3
Plaintext
15:29:04.061	afterAction	yii\base\ActionEvent	qq\modules\v1\controllers\ArticleController	否

5. When the response status code is 404, as shown in Figure 4.

When the response status code is 404
Figure 4
JSON

{
    "name": "Not Found",
    "message": "渠道的应用的来源UUID:8d72b7cc2ac911eab85a54ee75d2ebc0,不存在",
    "code": 202001,
    "status": 404,
    "type": "yii\\web\\NotFoundHttpException"
}

6. Checking Log Messages shows that the filter method afterAction($action, $result) has not been executed, as shown in Figure 5.

Checking Log Messages shows that the filter method afterAction($action, $result) has not been executed
Figure 5
Plaintext
yii\web\NotFoundHttpException: 渠道的应用的来源UUID:8d72b7cc2ac911eab85a54ee75d2ebc0,不存在 in E:\wwwroot\channel-pub-api\common\services\ChannelAppSourceService.php:192
Stack trace:
#0 E:\wwwroot\channel-pub-api\common\services\ChannelAppSourceService.php(213): common\services\ChannelAppSourceService::findModelsByUuids(Array)
#1 E:\wwwroot\channel-pub-api\qq\rests\article\StandardCreateAction.php(171): common\services\ChannelAppSourceService::findModelsEnabledByUuids(Array)
#2 [internal function]: qq\rests\article\StandardCreateAction->run()
#3 E:\wwwroot\channel-pub-api\vendor\yiisoft\yii2\base\Action.php(94): call_user_func_array(Array, Array)
#4 E:\wwwroot\channel-pub-api\vendor\yiisoft\yii2\base\Controller.php(157): yii\base\Action->runWithParams(Array)
#5 E:\wwwroot\channel-pub-api\vendor\yiisoft\yii2\base\Module.php(528): yii\base\Controller->runAction('standard-create', Array)
#6 E:\wwwroot\channel-pub-api\vendor\yiisoft\yii2\web\Application.php(103): yii\base\Module->runAction('v1/article/stan...', Array)
#7 E:\wwwroot\channel-pub-api\vendor\yiisoft\yii2\base\Application.php(386): yii\web\Application->handleRequest(Object(yii\web\Request))
#8 E:\wwwroot\channel-pub-api\qq\web\index.php(17): yii\base\Application->run()
#9 {main}

7. Checking Events shows that the afterAction event has not been triggered, as shown in Figure 6.

Checking Events shows that the afterAction event has not been triggered
Figure 6

8. After comparative analysis, I found that neither afterAction nor afterRequest exists, as shown in Figure 7.

After comparative analysis, I found that neither afterAction nor afterRequest exists
Figure 7
Plaintext
15:29:04.061	afterAction	yii\base\ActionEvent	qq\modules\v1\controllers\ArticleController	否
15:29:04.064	afterAction	yii\base\ActionEvent	qq\modules\v1\Module	否
15:29:04.064	afterAction	yii\base\ActionEvent	yii\web\Application	否
15:29:04.064	afterRequest	yii\base\Event	yii\web\Application	否

9. Analysis: To investigate why afterAction and afterRequest exist, I checked the file qq/rests/article/Action.php. The reason is likely whether an exception is thrown, rather than the response status code. When the response status code is 422, it is not an HTTP exception.

PHP

    /**
     * 处理模型错误
     * @param object $model 模型
     * @return array
     * 格式如下:
     *
     * [
     *     'status' => false, // 失败
     *     'code' => 226004, // 返回码
     *     'message' => '数据验证失败:代码是无效的。', // 说明
     * ]
     *
     * @throws ServerErrorHttpException
     */
    public static function handleValidateError($model)
    {
        if ($model->hasErrors()) {
            $response = Yii::$app->getResponse();
            $response->setStatusCode(422, 'Data Validation Failed.');
            $firstError = '';
            foreach ($model->getFirstErrors() as $message) {
                $firstError = $message;
                break;
            }
            return ['status' => false, 'code' => 226004, 'message' => Yii::t('error', Yii::t('error', Yii::t('error', '226004'), ['first_error' => $firstError]))];
        } elseif (!$model->hasErrors()) {
            throw new ServerErrorHttpException('Failed to create the object for unknown reason.');
        }
    }

10. I edited the file qq/rests/article/Action.php to throw an HTTP exception with a response status code of 422, as shown in Figure 8.

Editing the file qq/rests/article/Action.php to throw an HTTP exception with a response status code of 422
Figure 8
PHP

    /**
     * 处理模型错误
     * @param object $model 模型
     * @return array
     * 格式如下:
     *
     * [
     *     'status' => false, // 失败
     *     'code' => 226004, // 返回码
     *     'message' => '数据验证失败:代码是无效的。', // 说明
     * ]
     *
     * @throws UnprocessableEntityHttpException
     * @throws ServerErrorHttpException
     */
    public static function handleValidateError($model)
    {
        if ($model->hasErrors()) {
            $response = Yii::$app->getResponse();
            // $response->setStatusCode(422, 'Data Validation Failed.');
            $firstError = '';
            foreach ($model->getFirstErrors() as $message) {
                $firstError = $message;
                break;
            }
            throw new UnprocessableEntityHttpException(Yii::t('error', Yii::t('error', Yii::t('error', '226004'), ['first_error' => $firstError])), 226004);
            // return ['status' => false, 'code' => 226004, 'message' => Yii::t('error', Yii::t('error', Yii::t('error', '226004'), ['first_error' => $firstError]))];
        } elseif (!$model->hasErrors()) {
            throw new ServerErrorHttpException('Failed to create the object for unknown reason.');
        }
    }

JSON

{
    "name": "Unprocessable entity",
    "message": "数据验证失败:标题只能包含至多255个字符。",
    "code": 226004,
    "status": 422,
    "type": "yii\\web\\UnprocessableEntityHttpException"
}

11. Checking Log Messages shows that the filter method afterAction($action, $result) has not been executed. Therefore, I conclude that whether the filter method afterAction($action, $result) is executed is unrelated to the response status code, but depends on whether an HTTP exception is thrown. When an HTTP exception is thrown, it is not executed; otherwise, it is executed.

12. I edited the action method file qq/rests/article/StandardCreateAction.php. After catching the HTTP exception, instead of throwing it, I converted it to setting the response status code and then returned.

PHP

    /**
     * Creates a new model.
     * @return array
     * @throws \Throwable
     */
    public function run()
    {
        try {
            // 方法代码
        } catch(\Throwable $e) {
            Yii::$app->response->statusCode = $e->statusCode;
            return ['code' => $e->getCode(), 'message' => $e->getMessage()];
        }
    }

13. Reproducing step 5, when the response status code is 404, as shown in Figure 9.

Reproducing step 5, when the response status code is 404
Figure 9
JSON

{
    "code": 202001,
    "message": "渠道的应用的来源UUID:8d72b7cc2ac911eab85a54ee75d2ebc0,不存在"
}

14. Checking Log Messages shows that the filter method afterAction($action, $result) has been executed. The SQL is as follows, as shown in Figure 10.

Checking Log Messages shows that the filter method afterAction($action, $result) has been executed. The SQL is as follows
Figure 10
SQL

INSERT INTO `cpa_pre_pub_log` (`group_id`, `channel_id`, `channel_code`, `type`, `article_type_id`, `article_type_code`, `article_type_name`, `article_category_id`, `article_title`, `article_author`, `source`, `source_uuid`, `source_pub_user_id`, `source_callback_url`, `source_article_id`, `pub_log_code`, `pub_log_message`, `pub_log_body`, `status`, `is_deleted`, `created_at`, `updated_at`, `deleted_at`, `uuid`, `channel_type_id`, `channel_type_code`, `channel_app_source_id`, `channel_app_source_uuid`) VALUES ('015ce30b116ce86058fa6ab4fea4ac63', 1, 'qq', 'pub', 1, 'standard', '标准(普通)', 15, '未来 10 年,“星光中国芯工程”计划投资 100 亿元用于芯片研发及大规模产业化。北京时间 2019 年 12 月 28 日,1999-2019“星光中国芯工程”创新成果与展望报告会在人民大会堂举行。会议回顾和总结了“星光中国芯工程”20 年来在核心技术自主创新、在研发成果大规模产业化、以及在满足国家重大工程技术需求方面取得的重要进展和成功经验,并对“星光中国芯工程”未来发展进行了规划和展望。中国工程院院士、“星光中国芯工程”总指挥、中星微电子集团创建人兼首席科学家邓中翰作了“星光中国芯工程”20 年成果与展望工作报告,报告中,邓中翰表示,在物理层面智能芯片的发展已经受到了物理规律的限制,看似已经接近了极限的时候,在信息层面的技术创新还远远没有碰到天花板。1999 年,邓中翰等一批海外爱国博士企业家回国承担并启动实施“星光中国芯工程”,在北京中关村设立中星微电子公司,致力于超大规模集成电路芯片的研发、设计及产业化工作。2001 年,中国第一颗百万门级超大规模数字多媒体芯片“星光一号”诞生。其后数年间,“星光多媒体”系列芯片被苹果、三星、飞利浦、惠普、LG、索尼、戴尔等国外知名品牌规模采用,占领了全球计算机图像输入芯片 60% 以上的市场份额,彻底结束了中国无“芯”的历史。', '高琳', 'spider', '825e6d5e36468cc4bf536799ce3565cf', 3, 'http://scms.wjdev.chinamcloud.cn/api/thirdPush/callBack', 1, 202001, '渠道的应用的来源UUID:8d72b7cc2ac911eab85a54ee75d2ebc0,不存在', 'a:17:{s:24:\"channel_app_source_uuids\";a:2:{i:0;s:32:\"8d72b7cc2ac911eab85a54ee75d2ebc0\";i:1;s:32:\"18cf06d22ac911eaa31854ee75d2ebc1\";}s:6:\"source\";s:6:\"spider\";s:11:\"source_uuid\";s:32:\"825e6d5e36468cc4bf536799ce3565cf\";s:18:\"source_pub_user_id\";i:3;s:19:\"source_callback_url\";s:55:\"http://scms.wjdev.chinamcloud.cn/api/thirdPush/callBack\";s:19:\"article_category_id\";i:15;s:5:\"title\";s:1525:\"未来 10 年,“星光中国芯工程”计划投资 100 亿元用于芯片研发及大规模产业化。北京时间 2019 年 12 月 28 日,1999-2019“星光中国芯工程”创新成果与展望报告会在人民大会堂举行。会议回顾和总结了“星光中国芯工程”20 年来在核心技术自主创新、在研发成果大规模产业化、以及在满足国家重大工程技术需求方面取得的重要进展和成功经验,并对“星光中国芯工程”未来发展进行了规划和展望。中国工程院院士、“星光中国芯工程”总指挥、中星微电子集团创建人兼首席科学家邓中翰作了“星光中国芯工程”20 年成果与展望工作报告,报告中,邓中翰表示,在物理层面智能芯片的发展已经受到了物理规律的限制,看似已经接近了极限的时候,在信息层面的技术创新还远远没有碰到天花板。1999 年,邓中翰等一批海外爱国博士企业家回国承担并启动实施“星光中国芯工程”,在北京中关村设立中星微电子公司,致力于超大规模集成电路芯片的研发、设计及产业化工作。2001 年,中国第一颗百万门级超大规模数字多媒体芯片“星光一号”诞生。其后数年间,“星光多媒体”系列芯片被苹果、三星、飞利浦、惠普、LG、索尼、戴尔等国外知名品牌规模采用,占领了全球计算机图像输入芯片 60% 以上的市场份额,彻底结束了中国无“芯”的历史。\";s:6:\"author\";s:6:\"高琳\";s:17:\"source_article_id\";i:1;s:7:\"content\";s:1525:\"未来 10 年,“星光中国芯工程”计划投资 100 亿元用于芯片研发及大规模产业化。北京时间 2019 年 12 月 28 日,1999-2019“星光中国芯工程”创新成果与展望报告会在人民大会堂举行。会议回顾和总结了“星光中国芯工程”20 年来在核心技术自主创新、在研发成果大规模产业化、以及在满足国家重大工程技术需求方面取得的重要进展和成功经验,并对“星光中国芯工程”未来发展进行了规划和展望。中国工程院院士、“星光中国芯工程”总指挥、中星微电子集团创建人兼首席科学家邓中翰作了“星光中国芯工程”20 年成果与展望工作报告,报告中,邓中翰表示,在物理层面智能芯片的发展已经受到了物理规律的限制,看似已经接近了极限的时候,在信息层面的技术创新还远远没有碰到天花板。1999 年,邓中翰等一批海外爱国博士企业家回国承担并启动实施“星光中国芯工程”,在北京中关村设立中星微电子公司,致力于超大规模集成电路芯片的研发、设计及产业化工作。2001 年,中国第一颗百万门级超大规模数字多媒体芯片“星光一号”诞生。其后数年间,“星光多媒体”系列芯片被苹果、三星、飞利浦、惠普、LG、索尼、戴尔等国外知名品牌规模采用,占领了全球计算机图像输入芯片 60% 以上的市场份额,彻底结束了中国无“芯”的历史。\";s:10:\"cover_pics\";a:1:{i:0;s:84:\"https://static001.infoq.cn/resource/image/7c/18/7c55c468adf1d616f48681c23e9b9518.png\";}s:10:\"cover_type\";i:1;s:3:\"tag\";s:62:\"百度,发布,推理引擎,Paddle Lite,华为,NPU,在线编译\";s:5:\"apply\";i:0;s:17:\"original_platform\";i:0;s:12:\"original_url\";s:0:\"\";s:15:\"original_author\";s:0:\"\";}', 3, 0, 1578548928, 1578548928, 0, 'b4f7b13a32a311ea9ad254ee75d2ebc1', 0, '', 0, '8d72b7cc2ac911eab85a54ee75d2ebc0'), ('015ce30b116ce86058fa6ab4fea4ac63', 1, 'qq', 'pub', 1, 'standard', '标准(普通)', 15, '未来 10 年,“星光中国芯工程”计划投资 100 亿元用于芯片研发及大规模产业化。北京时间 2019 年 12 月 28 日,1999-2019“星光中国芯工程”创新成果与展望报告会在人民大会堂举行。会议回顾和总结了“星光中国芯工程”20 年来在核心技术自主创新、在研发成果大规模产业化、以及在满足国家重大工程技术需求方面取得的重要进展和成功经验,并对“星光中国芯工程”未来发展进行了规划和展望。中国工程院院士、“星光中国芯工程”总指挥、中星微电子集团创建人兼首席科学家邓中翰作了“星光中国芯工程”20 年成果与展望工作报告,报告中,邓中翰表示,在物理层面智能芯片的发展已经受到了物理规律的限制,看似已经接近了极限的时候,在信息层面的技术创新还远远没有碰到天花板。1999 年,邓中翰等一批海外爱国博士企业家回国承担并启动实施“星光中国芯工程”,在北京中关村设立中星微电子公司,致力于超大规模集成电路芯片的研发、设计及产业化工作。2001 年,中国第一颗百万门级超大规模数字多媒体芯片“星光一号”诞生。其后数年间,“星光多媒体”系列芯片被苹果、三星、飞利浦、惠普、LG、索尼、戴尔等国外知名品牌规模采用,占领了全球计算机图像输入芯片 60% 以上的市场份额,彻底结束了中国无“芯”的历史。', '高琳', 'spider', '825e6d5e36468cc4bf536799ce3565cf', 3, 'http://scms.wjdev.chinamcloud.cn/api/thirdPush/callBack', 1, 202001, '渠道的应用的来源UUID:8d72b7cc2ac911eab85a54ee75d2ebc0,不存在', 'a:17:{s:24:\"channel_app_source_uuids\";a:2:{i:0;s:32:\"8d72b7cc2ac911eab85a54ee75d2ebc0\";i:1;s:32:\"18cf06d22ac911eaa31854ee75d2ebc1\";}s:6:\"source\";s:6:\"spider\";s:11:\"source_uuid\";s:32:\"825e6d5e36468cc4bf536799ce3565cf\";s:18:\"source_pub_user_id\";i:3;s:19:\"source_callback_url\";s:55:\"http://scms.wjdev.chinamcloud.cn/api/thirdPush/callBack\";s:19:\"article_category_id\";i:15;s:5:\"title\";s:1525:\"未来 10 年,“星光中国芯工程”计划投资 100 亿元用于芯片研发及大规模产业化。北京时间 2019 年 12 月 28 日,1999-2019“星光中国芯工程”创新成果与展望报告会在人民大会堂举行。会议回顾和总结了“星光中国芯工程”20 年来在核心技术自主创新、在研发成果大规模产业化、以及在满足国家重大工程技术需求方面取得的重要进展和成功经验,并对“星光中国芯工程”未来发展进行了规划和展望。中国工程院院士、“星光中国芯工程”总指挥、中星微电子集团创建人兼首席科学家邓中翰作了“星光中国芯工程”20 年成果与展望工作报告,报告中,邓中翰表示,在物理层面智能芯片的发展已经受到了物理规律的限制,看似已经接近了极限的时候,在信息层面的技术创新还远远没有碰到天花板。1999 年,邓中翰等一批海外爱国博士企业家回国承担并启动实施“星光中国芯工程”,在北京中关村设立中星微电子公司,致力于超大规模集成电路芯片的研发、设计及产业化工作。2001 年,中国第一颗百万门级超大规模数字多媒体芯片“星光一号”诞生。其后数年间,“星光多媒体”系列芯片被苹果、三星、飞利浦、惠普、LG、索尼、戴尔等国外知名品牌规模采用,占领了全球计算机图像输入芯片 60% 以上的市场份额,彻底结束了中国无“芯”的历史。\";s:6:\"author\";s:6:\"高琳\";s:17:\"source_article_id\";i:1;s:7:\"content\";s:1525:\"未来 10 年,“星光中国芯工程”计划投资 100 亿元用于芯片研发及大规模产业化。北京时间 2019 年 12 月 28 日,1999-2019“星光中国芯工程”创新成果与展望报告会在人民大会堂举行。会议回顾和总结了“星光中国芯工程”20 年来在核心技术自主创新、在研发成果大规模产业化、以及在满足国家重大工程技术需求方面取得的重要进展和成功经验,并对“星光中国芯工程”未来发展进行了规划和展望。中国工程院院士、“星光中国芯工程”总指挥、中星微电子集团创建人兼首席科学家邓中翰作了“星光中国芯工程”20 年成果与展望工作报告,报告中,邓中翰表示,在物理层面智能芯片的发展已经受到了物理规律的限制,看似已经接近了极限的时候,在信息层面的技术创新还远远没有碰到天花板。1999 年,邓中翰等一批海外爱国博士企业家回国承担并启动实施“星光中国芯工程”,在北京中关村设立中星微电子公司,致力于超大规模集成电路芯片的研发、设计及产业化工作。2001 年,中国第一颗百万门级超大规模数字多媒体芯片“星光一号”诞生。其后数年间,“星光多媒体”系列芯片被苹果、三星、飞利浦、惠普、LG、索尼、戴尔等国外知名品牌规模采用,占领了全球计算机图像输入芯片 60% 以上的市场份额,彻底结束了中国无“芯”的历史。\";s:10:\"cover_pics\";a:1:{i:0;s:84:\"https://static001.infoq.cn/resource/image/7c/18/7c55c468adf1d616f48681c23e9b9518.png\";}s:10:\"cover_type\";i:1;s:3:\"tag\";s:62:\"百度,发布,推理引擎,Paddle Lite,华为,NPU,在线编译\";s:5:\"apply\";i:0;s:17:\"original_platform\";i:0;s:12:\"original_url\";s:0:\"\";s:15:\"original_author\";s:0:\"\";}', 3, 0, 1578548928, 1578548928, 0, 'b4f7cd9632a311ea941c54ee75d2ebc1', 1, 'qq_cw', 13, '18cf06d22ac911eaa31854ee75d2ebc1')

15. When fetching the task list for the Penguin account application, the newly added record is present in the list. Checking the SQL statement for fetching the task list shows that it meets expectations, as shown in Figure 11.

Fetching the task list for the Penguin account application, the newly added record is present in the list. Checking the SQL statement for fetching the task list shows that it meets expectations
Figure 11
SQL

SELECT * FROM ((SELECT 'channel_app_task' AS 'model', `cpa_channel_app_task`.`id`, `cpa_task`.`group_id`, `cpa_channel_app_task`.`uuid`, `cpa_channel_app_task`.`channel_id`, `cpa_channel_app_task`.`channel_code`, `cpa_channel_app_task`.`channel_type_id`, `cpa_channel_app_task`.`channel_type_code`, `cpa_channel_app_task`.`channel_app_source_id`, `cpa_channel_app_task`.`channel_app_source_uuid`, `cpa_task`.`type`, `cpa_article_type`.`id` AS `article_type_id`, `cpa_article_type`.`code` AS `article_type_code`, `cpa_article_type`.`name` AS `article_type_name`, `cpa_qq_article`.`article_category_id`, `cpa_qq_article`.`title` AS `article_title`, `cpa_qq_article`.`author` AS `article_author`, `cpa_task`.`source`, `cpa_task`.`source_uuid`, `cpa_task`.`source_pub_user_id`, `cpa_task`.`source_callback_url`, `cpa_qq_article`.`source_article_id`, `cpa_pub_log`.`code` AS `pub_log_code`, `cpa_pub_log`.`message` AS `pub_log_message`, `cpa_channel_app_task`.`status`, `cpa_channel_app_task`.`is_deleted`, `cpa_channel_app_task`.`created_at`, `cpa_channel_app_task`.`updated_at`, `cpa_channel_app_task`.`deleted_at`, `cpa_channel_app_task`.`task_id`, `cpa_channel_app_task`.`have_pub_number`, `cpa_qq_cw_app`.`penguin_name`, `cpa_qq_transaction`.`article_url` FROM `cpa_channel_app_task` LEFT JOIN `cpa_task` ON `cpa_channel_app_task`.`task_id` = `cpa_task`.`id` LEFT JOIN `cpa_qq_article` ON `cpa_task`.`id` = `cpa_qq_article`.`task_id` LEFT JOIN `cpa_article_type` ON `cpa_qq_article`.`article_type_id` = `cpa_article_type`.`id` LEFT JOIN `cpa_qq_cw_app_task` ON `cpa_channel_app_task`.`id` = `cpa_qq_cw_app_task`.`channel_app_task_id` LEFT JOIN `cpa_qq_cw_app` ON `cpa_qq_cw_app_task`.`qq_cw_app_id` = `cpa_qq_cw_app`.`id` LEFT JOIN `cpa_pub_log` ON `cpa_channel_app_task`.`id` = `cpa_pub_log`.`channel_app_task_id` LEFT JOIN `cpa_qq_transaction` ON `cpa_qq_cw_app_task`.`id` = `cpa_qq_transaction`.`qq_app_task_id` AND `cpa_qq_transaction`.`type` = '1' WHERE ((`cpa_channel_app_task`.`is_deleted`=0) AND (`cpa_task`.`is_deleted`=0) AND (`cpa_qq_article`.`is_deleted`=0) AND (`cpa_article_type`.`is_deleted`=0) AND (`cpa_qq_cw_app_task`.`is_deleted`=0) AND (`cpa_qq_cw_app`.`is_deleted`=0)) AND (`cpa_task`.`group_id`='015ce30b116ce86058fa6ab4fea4ac63')) UNION ALL ( SELECT 'pre_pub_log' AS 'model', `cpa_pre_pub_log`.`id`, `cpa_pre_pub_log`.`group_id`, `cpa_pre_pub_log`.`uuid`, `cpa_pre_pub_log`.`channel_id`, `cpa_pre_pub_log`.`channel_code`, `cpa_pre_pub_log`.`channel_type_id`, `cpa_pre_pub_log`.`channel_type_code`, `cpa_pre_pub_log`.`channel_app_source_id`, `cpa_pre_pub_log`.`channel_app_source_uuid`, `cpa_pre_pub_log`.`type`, `cpa_pre_pub_log`.`article_type_id`, `cpa_pre_pub_log`.`article_type_code`, `cpa_pre_pub_log`.`article_type_name`, `cpa_pre_pub_log`.`article_category_id`, `cpa_pre_pub_log`.`article_title`, `cpa_pre_pub_log`.`article_author`, `cpa_pre_pub_log`.`source`, `cpa_pre_pub_log`.`source_uuid`, `cpa_pre_pub_log`.`source_pub_user_id`, `cpa_pre_pub_log`.`source_callback_url`, `cpa_pre_pub_log`.`source_article_id`, `cpa_pre_pub_log`.`pub_log_code`, `cpa_pre_pub_log`.`pub_log_message`, `cpa_pre_pub_log`.`status`, `cpa_pre_pub_log`.`is_deleted`, `cpa_pre_pub_log`.`created_at`, `cpa_pre_pub_log`.`updated_at`, `cpa_pre_pub_log`.`deleted_at`, 0 AS 'task_id', 3 AS 'have_pub_number', `cpa_qq_cw_app`.`penguin_name`, '' AS 'article_url' FROM `cpa_pre_pub_log` LEFT JOIN `cpa_qq_cw_app` ON `cpa_pre_pub_log`.`channel_app_source_id` = `cpa_qq_cw_app`.`channel_app_source_id` WHERE ((`cpa_pre_pub_log`.`is_deleted`=0) AND (`cpa_qq_cw_app`.`is_deleted`=0)) AND (`cpa_pre_pub_log`.`group_id`='015ce30b116ce86058fa6ab4fea4ac63') )) `model` ORDER BY `created_at` DESC, `id` DESC LIMIT 20

关于作者 · 持续学习与技术实践

我是一名拥有 15 年以上开发经验的技术从业者,自 2013 年起持续运营个人技术博客,记录工作与个人项目中遇到的真实问题,以及解决问题过程中的探索、实践和思考。

除了技术写作,我也在持续开发和维护自己的独立项目,探索新技术和新工具在实际场景中的应用。我始终相信,没有不值得去解决的问题,也没有不值得去学习的技术。

如果这篇文章对你有所帮助,欢迎浏览博客中的其他文章,也欢迎交流技术经验与想法。

关于我  ·  GitHub  ·  邮件联系