Commit 5c011de9 authored by chenweijian's avatar chenweijian

群组优化

parent 2d9e6c66
...@@ -217,6 +217,6 @@ func GetLangeByCountry(db *gorm.DB, country mysql.Str) (string, error) { ...@@ -217,6 +217,6 @@ func GetLangeByCountry(db *gorm.DB, country mysql.Str) (string, error) {
//获取所有国家名字列表 //获取所有国家名字列表
func GetCountryNameList(model *domain.Model) ([]string, error) { func GetCountryNameList(model *domain.Model) ([]string, error) {
res := make([]string, 0) res := make([]string, 0)
err := model.DB().Select("distinct(name) name").Pluck("name", &res).Error err := model.DB().Table("res_country").Select("distinct(name) name").Pluck("name", &res).Error
return res, myerr.WrapErr(err) return res, myerr.WrapErr(err)
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment