ソースを参照

update

tags/v0.0.5
shenjiachi 1週間前
コミット
b18de1f142
2個のファイルの変更10行の追加0行の削除
  1. +1
    -0
      src/dao/public_platoon_free_punish_with_user_dao.go
  2. +9
    -0
      src/implement/public_platoon_free_punish_with_user_implement.go

+ 1
- 0
src/dao/public_platoon_free_punish_with_user_dao.go ファイルの表示

@@ -10,4 +10,5 @@ type PublicPlatoonFreePunishWithUserDao interface {
PublicPlatoonFreePunishWithUserInsert(PublicPlatoonFreePunishWithUser *model.PublicPlatoonFreePunishWithUser) (int, error)
PublicPlatoonFreePunishWithUserUpdate(Db *xorm.Engine, id interface{}, PublicPlatoonFreePunishWithUser *model.PublicPlatoonFreePunishWithUser, forceColums ...string) (int64, error)
PublicPlatoonFreePunishWithUserCountAndGetPageByParams(page int, limit int, params map[string]interface{}) ([]model.PublicPlatoonFreePunishWithUser, int64, error)
PublicPlatoonFreePunishWithUserGetOneByParams(params map[string]interface{}) (*model.PublicPlatoonFreePunishWithUser, error)
}

+ 9
- 0
src/implement/public_platoon_free_punish_with_user_implement.go ファイルの表示

@@ -69,3 +69,12 @@ func (p PublicPlatoonFreePunishWithUserDb) PublicPlatoonFreePunishWithUserCountA
}
return m, total, nil
}

func (p PublicPlatoonFreePunishWithUserDb) PublicPlatoonFreePunishWithUserGetOneByParams(params map[string]interface{}) (*model.PublicPlatoonFreePunishWithUser, error) {
var m model.PublicPlatoonFreePunishWithUser
var query = fmt.Sprintf("%s =?", params["key"])
if has, err := p.Db.Where(query, params["value"]).Get(&m); err != nil || has == false {
return nil, zhios_order_relate_logx.Error(err)
}
return &m, nil
}

読み込み中…
キャンセル
保存