Explorar el Código

update

tags/v0.0.5
shenjiachi hace 1 semana
padre
commit
b18de1f142
Se han modificado 2 ficheros con 10 adiciones y 0 borrados
  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 Ver fichero

@@ -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 Ver fichero

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

Cargando…
Cancelar
Guardar