|
|
@@ -18,6 +18,31 @@ type FinWithdrawApplyDb struct { |
|
|
|
Db *xorm.Engine |
|
|
|
} |
|
|
|
|
|
|
|
func (f FinWithdrawApplyDb) UpdateFinWithdrawApplyBySession(session *xorm.Session, m *model.FinWithdrawApply, columns ...string) (int64, error) { |
|
|
|
affected, err := session.Where("id =?", m.Id).Cols(columns...).Update(m) |
|
|
|
if err != nil { |
|
|
|
return 0, err |
|
|
|
} |
|
|
|
return affected, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (f FinWithdrawApplyDb) UpdateFinWithdrawApply(m *model.FinWithdrawApply, columns ...string) (int64, error) { |
|
|
|
affected, err := f.Db.Where("id =?", m.Id).Cols(columns...).Update(m) |
|
|
|
if err != nil { |
|
|
|
return 0, err |
|
|
|
} |
|
|
|
return affected, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (f FinWithdrawApplyDb) FinWithdrawApplyGet(id int64) (*model.FinWithdrawApply, error) { |
|
|
|
var m model.FinWithdrawApply |
|
|
|
_, err := f.Db.Where("id = ?", id).Get(&m) |
|
|
|
if err != nil { |
|
|
|
return nil, zhios_order_relate_logx.Error(err.Error()) |
|
|
|
} |
|
|
|
return &m, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (f FinWithdrawApplyDb) FinWithdrawApplyInsertOneBySession(session *xorm.Session, m *model.FinWithdrawApply) (int64, error) { |
|
|
|
affected, err := session.InsertOne(m) |
|
|
|
if err != nil { |
|
|
|