切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
tangxvhui
2 years ago
提交
0576e5f98de3a7bb7426959e5ef23e757cc8fcb9
1 个父辈
4271a440
修复数据更新错误
显示空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
6 行增加
和
19 行删除
pkg/domain/log_sms.go
pkg/infrastructure/repository/pg_log_sms_repository.go
pkg/domain/log_sms.go
查看文件 @
0576e5f
...
...
@@ -41,7 +41,6 @@ func (sms *LogSms) SummaryEvaluationMessage(phone string, name string) {
}
type
LogSmsRepository
interface
{
Insert
(
param
*
LogSms
)
error
Save
(
param
*
LogSms
)
error
Find
(
queryOptions
map
[
string
]
interface
{})
(
int
,
[]
*
LogSms
,
error
)
}
...
...
pkg/infrastructure/repository/pg_log_sms_repository.go
查看文件 @
0576e5f
package
repository
import
(
"time"
pgTransaction
"github.com/linmadan/egglib-go/transaction/pg"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/infrastructure/pg/models"
...
...
@@ -16,24 +18,6 @@ func NewLogSmsRepository(transactionContext *pgTransaction.TransactionContext) *
var
_
domain
.
LogSmsRepository
=
(
*
LogSmsRepository
)(
nil
)
func
(
repo
*
LogSmsRepository
)
Insert
(
param
*
domain
.
LogSms
)
error
{
m
:=
models
.
LogSms
{
Id
:
param
.
Id
,
Phone
:
param
.
Phone
,
TemplateId
:
param
.
TemplateId
,
Template
:
param
.
Template
,
Value
:
param
.
Value
,
CreatedAt
:
param
.
CreatedAt
,
Result
:
param
.
Result
,
}
tx
:=
repo
.
transactionContext
.
PgTx
_
,
err
:=
tx
.
Model
(
&
m
)
.
Insert
()
if
err
!=
nil
{
return
err
}
return
nil
}
func
(
repo
*
LogSmsRepository
)
Save
(
param
*
domain
.
LogSms
)
error
{
m
:=
models
.
LogSms
{
Id
:
param
.
Id
,
...
...
@@ -43,6 +27,10 @@ func (repo *LogSmsRepository) Save(param *domain.LogSms) error {
Value
:
param
.
Value
,
CreatedAt
:
param
.
CreatedAt
,
Result
:
param
.
Result
,
Status
:
string
(
param
.
Status
),
From
:
param
.
From
,
Index
:
param
.
Index
,
ExecuteAt
:
time
.
Time
{},
}
tx
:=
repo
.
transactionContext
.
PgTx
_
,
err
:=
tx
.
Model
(
&
m
)
.
Insert
()
...
...
请
注册
或
登录
后发表评论