修改短信日志的条件查询逻辑
This commit is contained in:
parent
7abcad0396
commit
119eedeb93
@ -24,9 +24,16 @@ func (a *SMSLog) Query(ctx context.Context, params schema.SMSLogQueryParam, opts
|
||||
if len(opts) > 0 {
|
||||
opt = opts[0]
|
||||
}
|
||||
|
||||
db := GetSMSLogDB(ctx, a.DB)
|
||||
|
||||
if params.CustomerName != "" {
|
||||
db = db.Where("customer_name=?", params.CustomerName)
|
||||
}
|
||||
if params.Phone != "" {
|
||||
db = db.Where("phone = ?", params.Phone)
|
||||
}
|
||||
if params.SMSType != "" {
|
||||
db = db.Where("sms_type=?", params.SMSType)
|
||||
}
|
||||
var list schema.SMSLogs
|
||||
pageResult, err := util.WrapPageQuery(ctx, db, params.PaginationParam, opt.QueryOptions, &list)
|
||||
if err != nil {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user