切换导航条
此项目
正在载入...
登录
周海龙
/
mail-serve
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
邓超
7 months ago
提交
3fe5240cf66ce0e6fa88570a5fe7183a5a9f94b6
1 个父辈
2d0ca7fe
x
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
21 行增加
和
4 行删除
cmd/auto_reply_mail.php
lib/DbQuery.php
cmd/auto_reply_mail.php
查看文件 @
3fe5240
...
...
@@ -110,8 +110,7 @@ class AutoMail {
}
if
(
stripos
(
$haystack
,
$str
)
!==
false
){
if
(
!
$this
->
db
->
count
(
"select count(*) from `lists_auto` where `list_id` = "
.
$item
[
'id'
])){
$this
->
db
->
insert
(
'`lists_auto`'
,[
'list_id'
=>
$item
[
'id'
]],
false
);
echo
"插入数据 "
.
$item
[
'id'
]
.
"
\n
"
;
echo
"插入数据 "
.
$item
[
'id'
]
.
'==>'
.
$this
->
db
->
create
(
'lists_auto'
,[
'list_id'
=>
$item
[
'id'
]],
false
)
.
'==>'
.
$haystack
.
"
\n
"
;
}
}
}
...
...
lib/DbQuery.php
查看文件 @
3fe5240
...
...
@@ -172,6 +172,24 @@ trait DbQuery {
*/
public
function
insert
(
string
$table
,
array
$data
,
$timeauto
=
true
)
:
int
{
if
(
$this
->
create
(
$table
,
$data
,
$timeauto
)){
return
$this
->
getClient
()
->
lastInsertId
();
}
return
0
;
}
/**
* 插入数据
* @param string $table
* @param array $data
* @param bool $timeauto
* @return int
* @author:dc
* @time 2023/2/17 14:04
*/
public
function
create
(
string
$table
,
array
$data
,
$timeauto
=
true
)
:
int
{
if
(
$timeauto
){
$data
[
'created_at'
]
=
empty
(
$data
[
'created_at'
])
?
date
(
'Y-m-d H:i:s'
)
:
$data
[
'created_at'
];
}
...
...
@@ -183,10 +201,10 @@ trait DbQuery {
$query
=
$this
->
query
([
$sql
,
$data
]);
if
(
$query
){
return
$this
->
getClient
()
->
lastInsertId
()
;
return
true
;
}
return
0
;
return
false
;
}
/**
...
...
请
注册
或
登录
后发表评论