|
|
@@ -34,30 +34,36 @@ type (
|
|
|
}
|
|
|
|
|
|
I2billAcquirerMktQr struct {
|
|
|
- SchoolId sql.NullInt64 `db:"school_id" json:"school_id"` // 校区id
|
|
|
- Qr sql.NullString `db:"qr" json:"qr"` // 二维码url
|
|
|
- LastUpdateBy sql.NullInt64 `db:"last_update_by" json:"last_update_by"`
|
|
|
- Id int64 `db:"id" json:"id"` // 主键
|
|
|
- UserId sql.NullInt64 `db:"user_id" json:"user_id"` // 用户id
|
|
|
- ActivityId sql.NullInt64 `db:"activity_id" json:"activity_id"` // 活动id
|
|
|
- CreateBy sql.NullInt64 `db:"create_by" json:"create_by"`
|
|
|
- LastUpdateTime sql.NullTime `db:"last_update_time" json:"last_update_time"`
|
|
|
- QudaoId sql.NullInt64 `db:"qudao_id" json:"qudao_id"` // 渠道id
|
|
|
- DelFlag sql.NullInt64 `db:"del_flag" json:"del_flag"`
|
|
|
- CreateTime sql.NullTime `db:"create_time" json:"create_time"`
|
|
|
+ SchoolId sql.NullInt64 `db:"school_id" json:"school_id"` // 校区id
|
|
|
+ Qr sql.NullString `db:"qr" json:"qr"` // 二维码url
|
|
|
+ LastUpdateBy sql.NullInt64 `db:"last_update_by" json:"last_update_by"`
|
|
|
+ Id int64 `db:"id" json:"id"` // 主键
|
|
|
+ UserId sql.NullInt64 `db:"user_id" json:"user_id"` // 用户id
|
|
|
+ ActivityId sql.NullInt64 `db:"activity_id" json:"activity_id"` // 活动id
|
|
|
+ CreateBy sql.NullInt64 `db:"create_by" json:"create_by"`
|
|
|
+ LastUpdateTime sql.NullTime `db:"last_update_time" json:"last_update_time"`
|
|
|
+ QuaoYji sql.NullInt64 `db:"quao_yji" json:"quao_yji"` // 渠道一级
|
|
|
+ CallType sql.NullInt64 `db:"call_type" json:"call_type"` // 渠道二级
|
|
|
+ MaType sql.NullInt64 `db:"ma_type" json:"ma_type"` //渠道三级
|
|
|
+ NetworkDetailId sql.NullInt64 `db:"network_detail_id" json:"network_detail_id"` //渠道四级
|
|
|
+ DelFlag sql.NullInt64 `db:"del_flag" json:"del_flag"`
|
|
|
+ CreateTime sql.NullTime `db:"create_time" json:"create_time"`
|
|
|
}
|
|
|
I2billAcquirerMktQrXorm struct {
|
|
|
- SchoolId int64 `json:"school_id"`
|
|
|
- Qr string `json:"qr"`
|
|
|
- LastUpdateBy int64 `json:"last_update_by"`
|
|
|
- Id int64 `json:"id"`
|
|
|
- UserId int64 `json:"user_id"`
|
|
|
- ActivityId int64 `json:"activity_id"`
|
|
|
- CreateBy int64 `json:"create_by"`
|
|
|
- LastUpdateTime time.Time `json:"last_update_time"`
|
|
|
- QudaoId int64 `json:"qudao_id"`
|
|
|
- DelFlag int64 `json:"del_flag"`
|
|
|
- CreateTime time.Time `json:"create_time"`
|
|
|
+ SchoolId int64 `json:"school_id"`
|
|
|
+ Qr string `json:"qr"`
|
|
|
+ LastUpdateBy int64 `json:"last_update_by"`
|
|
|
+ Id int64 `json:"id"`
|
|
|
+ UserId int64 `json:"user_id"`
|
|
|
+ ActivityId int64 `json:"activity_id"`
|
|
|
+ CreateBy int64 `json:"create_by"`
|
|
|
+ LastUpdateTime time.Time `json:"last_update_time"`
|
|
|
+ QuaoYji int64 `json:"quao_yji"` // 渠道一级
|
|
|
+ CallType int64 `json:"call_type"` // 渠道二级
|
|
|
+ MaType int64 `json:"ma_type"` //渠道三级
|
|
|
+ NetworkDetailId int64 `json:"network_detail_id"` //渠道四级
|
|
|
+ DelFlag int64 `json:"del_flag"`
|
|
|
+ CreateTime time.Time `json:"create_time"`
|
|
|
}
|
|
|
)
|
|
|
|
|
|
@@ -70,7 +76,7 @@ func NewI2billAcquirerMktQrModel(conn sqlx.SqlConn) I2billAcquirerMktQrModel {
|
|
|
|
|
|
func (m *defaultI2billAcquirerMktQrModel) Insert(data I2billAcquirerMktQr) (sql.Result, error) {
|
|
|
query := fmt.Sprintf("insert into %s (%s) values (?, ?, ?, ?, ?, ?, ?, ?, ?)", m.table, i2billAcquirerMktQrRowsExpectAutoSet)
|
|
|
- ret, err := m.conn.Exec(query, data.SchoolId, data.Qr, data.LastUpdateBy, data.UserId, data.ActivityId, data.CreateBy, data.LastUpdateTime, data.QudaoId, data.DelFlag)
|
|
|
+ ret, err := m.conn.Exec(query, data.SchoolId, data.Qr, data.LastUpdateBy, data.UserId, data.ActivityId, data.CreateBy, data.LastUpdateTime, data.QuaoYji, data.CallType, data.MaType, data.NetworkDetailId, data.DelFlag)
|
|
|
return ret, err
|
|
|
}
|
|
|
|
|
|
@@ -90,7 +96,7 @@ func (m *defaultI2billAcquirerMktQrModel) FindOne(id int64) (*I2billAcquirerMktQ
|
|
|
|
|
|
func (m *defaultI2billAcquirerMktQrModel) Update(data I2billAcquirerMktQr) error {
|
|
|
query := fmt.Sprintf("update %s set %s where `id` = ?", m.table, i2billAcquirerMktQrRowsWithPlaceHolder)
|
|
|
- _, err := m.conn.Exec(query, data.SchoolId, data.Qr, data.LastUpdateBy, data.UserId, data.ActivityId, data.CreateBy, data.LastUpdateTime, data.QudaoId, data.DelFlag, data.Id)
|
|
|
+ _, err := m.conn.Exec(query, data.SchoolId, data.Qr, data.LastUpdateBy, data.UserId, data.ActivityId, data.CreateBy, data.LastUpdateTime, data.QuaoYji, data.CallType, data.MaType, data.NetworkDetailId, data.DelFlag, data.Id)
|
|
|
return err
|
|
|
}
|
|
|
|