diff --git a/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonDao/BaseRolePersonDao.go b/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonDao/BaseRolePersonDao.go index 48323c8d..aa3dfe37 100644 --- a/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonDao/BaseRolePersonDao.go +++ b/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonDao/BaseRolePersonDao.go @@ -283,7 +283,7 @@ func GetManageArea(personId string) ([]map[string]interface{}, int32, error) { } } var myBuilder = builder.Dialect(builder.MYSQL).Select("t1.area_code,t1.area_name,(select t2.area_name from t_gov_area as t2 where t2.area_code=t1.master_code) as parent_name,if(substring(t1.master_code,3,5)='0000','-1',t1.master_code) as parent_code"). - From("t_gov_area as t1").Where(builder.In("t1.area_code", areaIds)) + From("t_gov_area as t1").Where(builder.In("t1.area_code", areaIds)).Or(builder.In("t1.master_code",areaIds)) sql, err := myBuilder.ToBoundSQL() if err != nil { diff --git a/dsBaseRpc/Test/log_test.go b/dsBaseRpc/Test/log_test.go index 0035f1e2..7c58a805 100644 --- a/dsBaseRpc/Test/log_test.go +++ b/dsBaseRpc/Test/log_test.go @@ -7,7 +7,6 @@ import ( ) func TestLog(t *testing.T) { - //008E0A31-C48B-4839-BD99-EADF7985723A - list, _, _ := BaseRolePersonDao.GetManageArea("008E0A31-C48B-4839-BD99-EADF7985723A",1) + list, _, _ := BaseRolePersonDao.GetManageArea("C752DFF6-26F3-4012-BA19-F518B5CB2651") fmt.Println(list) }