...
|
...
|
@@ -123,13 +123,15 @@ class AdminModel extends global.yoho.BaseModel { |
|
|
* @param id 文章ID
|
|
|
* @returns {*}
|
|
|
*/
|
|
|
createArticle({actId, userName, content}) {
|
|
|
createArticle({actId, userName, content, createTime}) {
|
|
|
return mysqlCli.insert(
|
|
|
`insert into ${TB_ACT_ARTICLE} (act_id, user_name, content) values (:actId, :userName, :content);`,
|
|
|
`insert into ${TB_ACT_ARTICLE}
|
|
|
(act_id, user_name, content, create_time) values (:actId, :userName, :content, :createTime);`,
|
|
|
{
|
|
|
actId,
|
|
|
userName,
|
|
|
content
|
|
|
content,
|
|
|
createTime
|
|
|
}
|
|
|
);
|
|
|
}
|
...
|
...
|
@@ -139,12 +141,14 @@ class AdminModel extends global.yoho.BaseModel { |
|
|
* @param id 文章ID
|
|
|
* @returns {*}
|
|
|
*/
|
|
|
createArticleImg(artId, imgUrl) {
|
|
|
createArticleImg(artId, imgUrl, createTime) {
|
|
|
return mysqlCli.insert(
|
|
|
`insert into ${TB_ACT_ARTICLE_IMG} (article_id, img_url) values (:artId, :imgUrl);`,
|
|
|
`insert into ${TB_ACT_ARTICLE_IMG}
|
|
|
(article_id, img_url, create_time) values (:artId, :imgUrl, :createTime);`,
|
|
|
{
|
|
|
artId,
|
|
|
imgUrl
|
|
|
imgUrl,
|
|
|
createTime
|
|
|
}
|
|
|
);
|
|
|
}
|
...
|
...
|
|