|
|
|
@ -157,8 +157,8 @@ func PageBaseOrganization(in *BaseOrganizationProto.QueryArg) ([]map[string]inte
|
|
|
|
|
if in.IsMainSchool {
|
|
|
|
|
myBuilder.Where(builder.In("t1.main_school_type", []int{1, 2}))
|
|
|
|
|
//如果要排除某个学校
|
|
|
|
|
if in.BureauId!=""{
|
|
|
|
|
myBuilder.Where(builder.Neq{"t1.org_id":in.BureauId})
|
|
|
|
|
if in.BureauId != "" {
|
|
|
|
|
myBuilder.Where(builder.Neq{"t1.org_id": in.BureauId})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
myBuilder.Where(builder.Like{"t1.org_name", in.OrgName}).OrderBy("t1.sort_id asc,t1.id_int asc")
|
|
|
|
@ -421,7 +421,7 @@ func SetEduStatus(ids []string, bUse int) error {
|
|
|
|
|
*/
|
|
|
|
|
func GetChildOrg(orgId string) ([]map[string]interface{}, int32, error) {
|
|
|
|
|
var myBuilder = builder.Dialect(builder.MYSQL).Select("org_id").From("t_base_organization").
|
|
|
|
|
Where(builder.In("parent_id", orgId)).OrderBy("sort_id")
|
|
|
|
|
Where(builder.In("parent_id", orgId)).And(builder.Eq{"b_use": 1}).OrderBy("sort_id")
|
|
|
|
|
sql, err := myBuilder.ToBoundSQL()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, 0, err
|
|
|
|
|