diff --git a/dsBigData/Business/Student/StudentController/StudentController.go b/dsBigData/Business/Student/StudentController/StudentController.go index 28e76600..c63ce5c6 100644 --- a/dsBigData/Business/Student/StudentController/StudentController.go +++ b/dsBigData/Business/Student/StudentController/StudentController.go @@ -40,6 +40,14 @@ func GetStudentCountAggsXbBySchoolId(c *gin.Context) { return } + for i := range resArr { + if resArr[i].XbName == "1" { + resArr[i].XbName = "男" + } else { + resArr[i].XbName = "女" + } + } + c.JSON(http.StatusOK, Model.Res{ Success: true, List: resArr, diff --git a/dsBigData/Business/Student/StudentDao/StudentDao.go b/dsBigData/Business/Student/StudentDao/StudentDao.go index caf90f2a..4352c2a6 100644 --- a/dsBigData/Business/Student/StudentDao/StudentDao.go +++ b/dsBigData/Business/Student/StudentDao/StudentDao.go @@ -21,7 +21,7 @@ func GetStudentCountAggsXb(schoolId string) ([]StudentModel.StudentCountXb, erro bUseTerm := elastic.NewTermQuery("data_content.b_use", 1) enableFlagTerm := elastic.NewTermQuery("enable_flag", 1) delFlagTerm := elastic.NewTermQuery("del_flag", 0) - interfaceArr := CommonUtil.ConvertStringArrToInterfaceArr([]string{"男", "女"}) + interfaceArr := CommonUtil.ConvertStringArrToInterfaceArr([]string{"1", "2"}) xbTerms := elastic.NewTermsQuery("data_content.xbm", interfaceArr...) boolQuery := elastic.NewBoolQuery().Must(orgIdTerm, bUseTerm, enableFlagTerm, delFlagTerm, xbTerms) diff --git a/dsBigData/build/dsBigData b/dsBigData/build/dsBigData index 262dd1fb..6ade2dbe 100644 Binary files a/dsBigData/build/dsBigData and b/dsBigData/build/dsBigData differ