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
}

Завантаження…
Відмінити
Зберегти