Browse Source

update

master
dengbiao 17 hours ago
parent
commit
3f457fafaf
2 changed files with 28 additions and 0 deletions
  1. +3
    -0
      src/dao/fin_withdraw_apply_dao.go
  2. +25
    -0
      src/implement/fin_withdraw_apply_implement.go

+ 3
- 0
src/dao/fin_withdraw_apply_dao.go View File

@@ -9,4 +9,7 @@ type FinWithdrawApplyDao interface {
FinWithdrawApplyGetBySession(session *xorm.Session, startAt, endAt string, params map[string]interface{}) (*[]model.FinWithdrawApply, error)
FinWithdrawApplyInsertOneBySession(session *xorm.Session, m *model.FinWithdrawApply) (int64, error)
FinWithdrawApplyAmountGetByParams(params map[string]interface{}) (float64, error)
FinWithdrawApplyGet(id int64) (*model.FinWithdrawApply, error)
UpdateFinWithdrawApply(m *model.FinWithdrawApply, columns ...string) (int64, error)
UpdateFinWithdrawApplyBySession(session *xorm.Session, m *model.FinWithdrawApply, columns ...string) (int64, error)
}

+ 25
- 0
src/implement/fin_withdraw_apply_implement.go View File

@@ -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 {


Loading…
Cancel
Save