新增获取民族列表
This commit is contained in:
@@ -162,3 +162,24 @@ func (r *Basic) GetDiseaseList(c *gin.Context) {
|
||||
|
||||
responses.OkWithData(g, c)
|
||||
}
|
||||
|
||||
// GetNationList 获取民族列表
|
||||
func (r *Basic) GetNationList(c *gin.Context) {
|
||||
// 获取分类数据
|
||||
baseNationDao := dao.BaseNationDao{}
|
||||
maps := make(map[string]interface{})
|
||||
baseNations, err := baseNationDao.GetBaseNationList(maps)
|
||||
if err != nil {
|
||||
responses.FailWithMessage(err.Error(), c)
|
||||
return
|
||||
}
|
||||
|
||||
// 处理返回值
|
||||
g := dto.GetBaseNationListDto(baseNations)
|
||||
if err != nil {
|
||||
responses.FailWithMessage(err.Error(), c)
|
||||
return
|
||||
}
|
||||
|
||||
responses.OkWithData(g, c)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user