From a2d027356a641df9903099a5be5a9d6becbc2c01 Mon Sep 17 00:00:00 2001 From: huanghai <10402852@qq.com> Date: Mon, 6 Jul 2020 13:55:14 +0800 Subject: [PATCH 1/2] 'commit' --- .../BaseRolePersonDao/BaseRolePersonDao.go | 18 +- .../BaseRolePersonProto/BaseRolePerson.pb.go | 205 +++++++++--------- .../BaseRolePersonProto/BaseRolePerson.proto | 6 +- .../BaseRolePersonService.go | 4 +- dsBaseRpc/Test/log_test.go | 2 +- 5 files changed, 131 insertions(+), 104 deletions(-) diff --git a/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonDao/BaseRolePersonDao.go b/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonDao/BaseRolePersonDao.go index 59ac59fc..fdd9c93d 100644 --- a/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonDao/BaseRolePersonDao.go +++ b/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonDao/BaseRolePersonDao.go @@ -195,10 +195,17 @@ func IsAdmin(personId string) (bool, error) { 作者:黄海 时间:2020-06-12 */ -func HaveActiveCityList() ([]map[string]interface{}, int32, error) { +func HaveActiveCityList(AreaType int) ([]map[string]interface{}, int32, error) { sql := `select t1.area_code,t2.area_name,if(substring(t2.master_code,3,5)='0000','-1',t2.master_code) as parent_code from t_base_organization as t1 inner join t_gov_area as t2 on t1.area_code=t2.area_code where t1.org_type=1 and t1.b_use=1` + //只要市 + if AreaType == 1 { + sql = sql + ` and t2.area_level_id=2` + } else //只要县区 + { + sql = sql + ` and t2.area_level_id=3` + } list, err := db.SQL(sql).Query().List() return list, int32(len(list)), err } @@ -208,7 +215,7 @@ func HaveActiveCityList() ([]map[string]interface{}, int32, error) { 作者:黄海 时间:2020-06-12 */ -func GetManageArea(personId string) ([]map[string]interface{}, int32, error) { +func GetManageArea(personId string, AreaType int) ([]map[string]interface{}, int32, error) { //此人员有哪些角色 list, _, err := GetPersonRoleList(personId) if err != nil { @@ -223,6 +230,13 @@ func GetManageArea(personId string) ([]map[string]interface{}, int32, error) { } var myBuilder = builder.Dialect(builder.MYSQL).Select("area_code,area_name,if(substring(master_code,3,5)='0000','-1',master_code) as parent_code"). From("t_gov_area").Where(builder.In("area_code", areaIds)) + //只要市 + if AreaType == 1 { + myBuilder.And(builder.Eq{"area_level_id": 2}) + } else //只要县区 + { + myBuilder.And(builder.Eq{"area_level_id": 3}) + } sql, err := myBuilder.ToBoundSQL() if err != nil { return nil, 0, err diff --git a/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonProto/BaseRolePerson.pb.go b/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonProto/BaseRolePerson.pb.go index 3cd19955..a43c1942 100644 --- a/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonProto/BaseRolePerson.pb.go +++ b/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonProto/BaseRolePerson.pb.go @@ -142,10 +142,12 @@ type GetManageAreaArg struct { //人员ID PersonId string `protobuf:"bytes,1,opt,name=PersonId,proto3" json:"PersonId,omitempty"` + //地区类型 1:市 2:区 + AreaType string `protobuf:"bytes,2,opt,name=AreaType,proto3" json:"AreaType,omitempty"` //操作人 - ActionPersonId string `protobuf:"bytes,2,opt,name=ActionPersonId,proto3" json:"ActionPersonId,omitempty"` + ActionPersonId string `protobuf:"bytes,3,opt,name=ActionPersonId,proto3" json:"ActionPersonId,omitempty"` //操作IP - ActionIpAddress string `protobuf:"bytes,3,opt,name=ActionIpAddress,proto3" json:"ActionIpAddress,omitempty"` + ActionIpAddress string `protobuf:"bytes,4,opt,name=ActionIpAddress,proto3" json:"ActionIpAddress,omitempty"` } func (x *GetManageAreaArg) Reset() { @@ -187,6 +189,13 @@ func (x *GetManageAreaArg) GetPersonId() string { return "" } +func (x *GetManageAreaArg) GetAreaType() string { + if x != nil { + return x.AreaType + } + return "" +} + func (x *GetManageAreaArg) GetActionPersonId() string { if x != nil { return x.ActionPersonId @@ -578,105 +587,107 @@ var file_BaseRolePerson_proto_rawDesc = []byte{ 0x52, 0x05, 0x4f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x06, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x08, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x80, 0x01, + 0x03, 0x28, 0x09, 0x52, 0x08, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x9c, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x41, 0x72, 0x65, 0x61, 0x41, 0x72, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x26, - 0x0a, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, - 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x22, 0xda, 0x02, 0x0a, 0x08, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x12, 0x0e, 0x0a, - 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x64, 0x12, 0x14, 0x0a, - 0x05, 0x49, 0x64, 0x49, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x49, 0x64, - 0x49, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x52, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x49, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x50, - 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, - 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x75, 0x6c, 0x65, 0x49, - 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x52, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x12, - 0x12, 0x0a, 0x04, 0x42, 0x55, 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x42, - 0x55, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x4c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x4c, 0x61, - 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2c, 0x0a, - 0x11, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x69, 0x65, 0x6c, - 0x64, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x73, 0x6f, - 0x6e, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x70, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xa2, 0x01, - 0x0a, 0x08, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x72, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x50, 0x61, - 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x50, 0x61, 0x67, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, - 0x12, 0x26, 0x0a, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, - 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x22, 0x65, 0x0a, 0x05, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x53, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x53, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x72, 0x0a, 0x0c, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x49, 0x64, 0x73, 0x41, 0x72, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x49, 0x64, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x49, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x73, 0x6f, - 0x6e, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x70, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x32, 0xf1, 0x04, - 0x0a, 0x14, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, - 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x42, 0x61, 0x73, - 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x42, 0x61, - 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x1a, 0x1a, 0x2e, 0x42, 0x61, 0x73, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, + 0x0a, 0x08, 0x41, 0x72, 0x65, 0x61, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x41, 0x72, 0x65, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x70, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xda, 0x02, 0x0a, + 0x08, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x49, 0x64, 0x49, + 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x49, 0x64, 0x49, 0x6e, 0x74, 0x12, + 0x16, 0x0a, 0x06, 0x52, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x52, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x49, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x65, 0x72, 0x73, 0x6f, + 0x6e, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x65, 0x72, 0x73, 0x6f, + 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x52, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x42, + 0x55, 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x42, 0x55, 0x73, 0x65, 0x12, + 0x28, 0x0a, 0x0f, 0x4c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, + 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x4c, 0x61, 0x73, 0x74, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x46, 0x6f, 0x72, + 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x09, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x12, + 0x28, 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xa2, 0x01, 0x0a, 0x08, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x41, 0x72, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x50, 0x61, 0x67, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x50, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x4c, 0x69, + 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x73, + 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x70, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x65, + 0x0a, 0x05, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x12, 0x18, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x12, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x72, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, + 0x64, 0x73, 0x41, 0x72, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x03, 0x49, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x12, + 0x28, 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x32, 0xf1, 0x04, 0x0a, 0x14, 0x42, 0x61, + 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, + 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, + 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4d, 0x6f, + 0x64, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x1a, 0x1a, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, + 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x42, 0x61, 0x73, 0x65, 0x52, + 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x42, 0x61, 0x73, 0x65, + 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x1a, 0x1a, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, + 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x21, + 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x64, 0x73, 0x41, 0x72, + 0x67, 0x1a, 0x1a, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, + 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, + 0x53, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, + 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, + 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4d, 0x6f, + 0x64, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x1a, 0x1a, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, + 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x12, 0x50, 0x61, 0x67, 0x65, 0x42, 0x61, 0x73, 0x65, + 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x42, - 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, - 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x1a, 0x1a, 0x2e, 0x42, - 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x14, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, - 0x6f, 0x6e, 0x12, 0x21, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, - 0x73, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, - 0x64, 0x73, 0x41, 0x72, 0x67, 0x1a, 0x1a, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, - 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6c, - 0x79, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x73, - 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x42, 0x61, - 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x1a, 0x1a, 0x2e, 0x42, 0x61, 0x73, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x72, 0x67, 0x1a, 0x1a, 0x2e, 0x42, 0x61, 0x73, 0x65, + 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x41, 0x72, 0x65, 0x61, 0x12, 0x25, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, + 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, + 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x41, 0x72, 0x65, 0x61, 0x41, 0x72, 0x67, 0x1a, + 0x1a, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x5e, 0x0a, + 0x12, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, + 0x65, 0x67, 0x65, 0x12, 0x2a, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, + 0x72, 0x73, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x44, + 0x61, 0x74, 0x61, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x41, 0x72, 0x67, 0x1a, + 0x1a, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0x44, 0x0a, + 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x73, 0x69, 0x64, 0x65, 0x61, 0x6c, 0x2e, 0x64, 0x73, 0x6d, + 0x69, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x42, 0x0e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, + 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x50, 0x01, 0x5a, 0x15, 0x2e, 0x3b, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x12, 0x50, 0x61, 0x67, 0x65, - 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x1d, - 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x72, 0x67, 0x1a, 0x1a, 0x2e, - 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x0d, 0x47, - 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x41, 0x72, 0x65, 0x61, 0x12, 0x25, 0x2e, 0x42, - 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x41, 0x72, 0x65, 0x61, - 0x41, 0x72, 0x67, 0x1a, 0x1a, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, - 0x72, 0x73, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, - 0x00, 0x12, 0x5e, 0x0a, 0x12, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x50, 0x72, - 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x12, 0x2a, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, - 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, - 0x41, 0x72, 0x67, 0x1a, 0x1a, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, - 0x72, 0x73, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, - 0x00, 0x42, 0x44, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x73, 0x69, 0x64, 0x65, 0x61, 0x6c, - 0x2e, 0x64, 0x73, 0x6d, 0x69, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x42, 0x0e, 0x42, 0x61, 0x73, - 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x50, 0x01, 0x5a, 0x15, 0x2e, - 0x3b, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0xa2, 0x02, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0xa2, 0x02, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonProto/BaseRolePerson.proto b/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonProto/BaseRolePerson.proto index ecf07d76..0f00a7e3 100644 --- a/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonProto/BaseRolePerson.proto +++ b/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonProto/BaseRolePerson.proto @@ -58,10 +58,12 @@ message CheckDataPrivilegeArg{ message GetManageAreaArg{ //人员ID string PersonId = 1; + //地区类型 1:市 2:区 + string AreaType = 2; //操作人 - string ActionPersonId = 2; + string ActionPersonId = 3; //操作IP - string ActionIpAddress = 3; + string ActionIpAddress = 4; } message ModelArg { diff --git a/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonService/BaseRolePersonService.go b/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonService/BaseRolePersonService.go index 8b68763c..ca96310c 100644 --- a/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonService/BaseRolePersonService.go +++ b/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonService/BaseRolePersonService.go @@ -155,7 +155,7 @@ func (s *Rpc) GetManageArea(ctx context.Context, in *BaseRolePersonProto.GetMana } //如果是超级管理员,那么返回所有开通的城市及下属的县区 if isAdmin { - list, count, err := BaseRolePersonDao.HaveActiveCityList() + list, count, err := BaseRolePersonDao.HaveActiveCityList(in.AreaType) //错误处理 if err != nil { reply.Success = false @@ -180,7 +180,7 @@ func (s *Rpc) GetManageArea(ctx context.Context, in *BaseRolePersonProto.GetMana } } else { //如果不是超级管理员,那么返回此人员对应的城市或县区 - list, count, err := BaseRolePersonDao.GetManageArea(in.PersonId) + list, count, err := BaseRolePersonDao.GetManageArea(in.PersonId,in.AreaType) //错误处理 if err != nil { reply.Success = false diff --git a/dsBaseRpc/Test/log_test.go b/dsBaseRpc/Test/log_test.go index e55ac4ba..0035f1e2 100644 --- a/dsBaseRpc/Test/log_test.go +++ b/dsBaseRpc/Test/log_test.go @@ -8,6 +8,6 @@ import ( func TestLog(t *testing.T) { //008E0A31-C48B-4839-BD99-EADF7985723A - list, _, _ := BaseRolePersonDao.GetManageArea("008E0A31-C48B-4839-BD99-EADF7985723A") + list, _, _ := BaseRolePersonDao.GetManageArea("008E0A31-C48B-4839-BD99-EADF7985723A",1) fmt.Println(list) } From 8eaa728f05303c147cbf4552aa2cbd131612bbaf Mon Sep 17 00:00:00 2001 From: huanghai <10402852@qq.com> Date: Mon, 6 Jul 2020 13:55:54 +0800 Subject: [PATCH 2/2] 'commit' --- .../BaseRolePerson/BaseRolePersonDao/BaseRolePersonDao.go | 4 ++-- .../BaseRolePersonProto/BaseRolePerson.pb.go | 8 ++++---- .../BaseRolePersonProto/BaseRolePerson.proto | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonDao/BaseRolePersonDao.go b/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonDao/BaseRolePersonDao.go index fdd9c93d..1f7a4f54 100644 --- a/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonDao/BaseRolePersonDao.go +++ b/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonDao/BaseRolePersonDao.go @@ -195,7 +195,7 @@ func IsAdmin(personId string) (bool, error) { 作者:黄海 时间:2020-06-12 */ -func HaveActiveCityList(AreaType int) ([]map[string]interface{}, int32, error) { +func HaveActiveCityList(AreaType int32) ([]map[string]interface{}, int32, error) { sql := `select t1.area_code,t2.area_name,if(substring(t2.master_code,3,5)='0000','-1',t2.master_code) as parent_code from t_base_organization as t1 inner join t_gov_area as t2 on t1.area_code=t2.area_code where t1.org_type=1 and t1.b_use=1` @@ -215,7 +215,7 @@ func HaveActiveCityList(AreaType int) ([]map[string]interface{}, int32, error) { 作者:黄海 时间:2020-06-12 */ -func GetManageArea(personId string, AreaType int) ([]map[string]interface{}, int32, error) { +func GetManageArea(personId string, AreaType int32) ([]map[string]interface{}, int32, error) { //此人员有哪些角色 list, _, err := GetPersonRoleList(personId) if err != nil { diff --git a/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonProto/BaseRolePerson.pb.go b/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonProto/BaseRolePerson.pb.go index a43c1942..eb2041f6 100644 --- a/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonProto/BaseRolePerson.pb.go +++ b/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonProto/BaseRolePerson.pb.go @@ -143,7 +143,7 @@ type GetManageAreaArg struct { //人员ID PersonId string `protobuf:"bytes,1,opt,name=PersonId,proto3" json:"PersonId,omitempty"` //地区类型 1:市 2:区 - AreaType string `protobuf:"bytes,2,opt,name=AreaType,proto3" json:"AreaType,omitempty"` + AreaType int32 `protobuf:"varint,2,opt,name=AreaType,proto3" json:"AreaType,omitempty"` //操作人 ActionPersonId string `protobuf:"bytes,3,opt,name=ActionPersonId,proto3" json:"ActionPersonId,omitempty"` //操作IP @@ -189,11 +189,11 @@ func (x *GetManageAreaArg) GetPersonId() string { return "" } -func (x *GetManageAreaArg) GetAreaType() string { +func (x *GetManageAreaArg) GetAreaType() int32 { if x != nil { return x.AreaType } - return "" + return 0 } func (x *GetManageAreaArg) GetActionPersonId() string { @@ -591,7 +591,7 @@ var file_BaseRolePerson_proto_rawDesc = []byte{ 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x41, 0x72, 0x65, 0x61, 0x41, 0x72, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, - 0x0a, 0x08, 0x41, 0x72, 0x65, 0x61, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x0a, 0x08, 0x41, 0x72, 0x65, 0x61, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x41, 0x72, 0x65, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, diff --git a/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonProto/BaseRolePerson.proto b/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonProto/BaseRolePerson.proto index 0f00a7e3..7e3b24fb 100644 --- a/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonProto/BaseRolePerson.proto +++ b/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonProto/BaseRolePerson.proto @@ -59,7 +59,7 @@ message GetManageAreaArg{ //人员ID string PersonId = 1; //地区类型 1:市 2:区 - string AreaType = 2; + int32 AreaType = 2; //操作人 string ActionPersonId = 3; //操作IP