Compare commits
1 Commits
5663c4e126
...
countries_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2fd9472db1 |
@@ -3,6 +3,7 @@ package localeSelectorRepo
|
|||||||
import (
|
import (
|
||||||
"git.ma-al.com/goc_daniel/b2b/app/db"
|
"git.ma-al.com/goc_daniel/b2b/app/db"
|
||||||
"git.ma-al.com/goc_daniel/b2b/app/model"
|
"git.ma-al.com/goc_daniel/b2b/app/model"
|
||||||
|
"git.ma-al.com/goc_daniel/b2b/app/model/dbmodel"
|
||||||
)
|
)
|
||||||
|
|
||||||
type UILocaleSelectorRepo interface {
|
type UILocaleSelectorRepo interface {
|
||||||
@@ -25,7 +26,9 @@ func (r *LocaleSelectorRepo) GetLanguages() ([]model.Language, error) {
|
|||||||
func (r *LocaleSelectorRepo) GetCountriesAndCurrencies() ([]model.Country, error) {
|
func (r *LocaleSelectorRepo) GetCountriesAndCurrencies() ([]model.Country, error) {
|
||||||
var countries []model.Country
|
var countries []model.Country
|
||||||
err := db.Get().
|
err := db.Get().
|
||||||
Preload("PSCurrency").
|
Select("*").
|
||||||
|
Preload("Currency").
|
||||||
|
Joins("LEFT JOIN " + dbmodel.TableNamePsCountryLang + " AS cl ON cl." + dbmodel.PsCountryLangCols.IDCountry.Col() + " = b2b_countries.ps_id_country AND cl." + dbmodel.PsCountryLangCols.IDLang.Col() + " = 2").
|
||||||
Find(&countries).Error
|
Find(&countries).Error
|
||||||
return countries, err
|
return countries, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user