完善任务接口逻辑以及Eran事件上报接入

This commit is contained in:
lianghuanjie
2024-12-13 16:15:20 +08:00
parent 9f4fb0a9d0
commit f9084a0eb3
20 changed files with 408 additions and 84 deletions

View File

@@ -0,0 +1,29 @@
package model
import "github.com/zeromicro/go-zero/core/stores/sqlx"
var _ NhTwitterModel = (*customNhTwitterModel)(nil)
type (
// NhTwitterModel is an interface to be customized, add more methods here,
// and implement the added methods in customNhTwitterModel.
NhTwitterModel interface {
nhTwitterModel
withSession(session sqlx.Session) NhTwitterModel
}
customNhTwitterModel struct {
*defaultNhTwitterModel
}
)
// NewNhTwitterModel returns a model for the database table.
func NewNhTwitterModel(conn sqlx.SqlConn) NhTwitterModel {
return &customNhTwitterModel{
defaultNhTwitterModel: newNhTwitterModel(conn),
}
}
func (m *customNhTwitterModel) withSession(session sqlx.Session) NhTwitterModel {
return NewNhTwitterModel(sqlx.NewSqlConnFromSession(session))
}