فهرست منبع

wip:提交api接口测试用例及id加密

fuwencai 3 سال پیش
والد
کامیت
b2e74bda7e

+ 7 - 7
api/medical/internal/logic/distributor/claimdistributorlogic.go

@@ -26,22 +26,22 @@ func NewClaimDistributorLogic(ctx context.Context, svcCtx *svc.ServiceContext) *
 
 // ClaimDistributor 我认领的经销商列表
 func (l *ClaimDistributorLogic) ClaimDistributor(req *types.ClaimDistributorReq) (resp *types.CommonRes, err error) {
-	if req.PageSize == 0 {
-		req.PageSize = 10
-	}
-	if req.Page < 0 {
-		req.Page = 0
-	}
 	rs, _ := l.svcCtx.Medical.ClaimedDistributorList(l.ctx, &medical.ClaimedReq{
+		AppId:    req.AppId,
 		UserId:   int64(req.UserId),
 		Page:     int64(req.Page),
 		PageSize: int64(req.PageSize),
 	})
+	var result interface{}
+	result = map[string]interface{}{
+		"list":  rs.Data.List,
+		"total": rs.Data.Total,
+	}
 
 	return &types.CommonRes{
 		Error_msg:  rs.ErrorMsg,
 		Error_code: int(rs.ErrorCode),
-		Data:       rs.Data,
+		Data:       result,
 	}, nil
 
 }

+ 10 - 11
api/medical/internal/logic/institution/claiminstitutionlogic.go

@@ -1,12 +1,10 @@
 package institution
 
 import (
-	"bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/rpc/medical/medical"
-	"context"
-
 	"bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/api/medical/internal/svc"
 	"bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/api/medical/internal/types"
-
+	"bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/rpc/medical/medical"
+	"context"
 	"github.com/zeromicro/go-zero/core/logx"
 )
 
@@ -26,22 +24,23 @@ func NewClaimInstitutionLogic(ctx context.Context, svcCtx *svc.ServiceContext) *
 
 // ClaimInstitution 我认领的医疗机构列表
 func (l *ClaimInstitutionLogic) ClaimInstitution(req *types.ClaimInstitutionReq) (resp *types.CommonRes, err error) {
-	if req.PageSize == 0 {
-		req.PageSize = 10
-	}
-	if req.Page < 0 {
-		req.Page = 0
-	}
 	rs, _ := l.svcCtx.Medical.ClaimedInstitutionList(l.ctx, &medical.ClaimedReq{
+		AppId:    req.AppId,
 		UserId:   int64(req.UserId),
 		Page:     int64(req.Page),
 		PageSize: int64(req.PageSize),
 	})
+	var result interface{}
+
+	result = map[string]interface{}{
+		"list":  rs.Data.List,
+		"total": rs.Data.Total,
+	}
 
 	return &types.CommonRes{
 		Error_msg:  rs.ErrorMsg,
 		Error_code: int(rs.ErrorCode),
-		Data:       rs.Data,
+		Data:       result,
 	}, nil
 
 }

+ 2 - 1
api/medical/internal/logic/public/claimlogic.go

@@ -1,6 +1,7 @@
 package public
 
 import (
+	"app.yhyue.com/moapp/jybase/encrypt"
 	"bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/rpc/medical/medical"
 	"context"
 
@@ -29,7 +30,7 @@ func (l *ClaimLogic) Claim(req *types.ClaimReq) (resp *types.CommonRes, err erro
 
 	rs, _ := l.svcCtx.Medical.Claim(l.ctx, &medical.ClaimReq{
 		UserId: int64(req.UserId),
-		EntId:  req.EntId,
+		EntId:  encrypt.SE.Decode4Hex(req.EntId),
 		Type:   int64(req.Type),
 		AppId:  req.AppId,
 	})

+ 5 - 3
api/medical/internal/logic/public/isclaimedlogic.go

@@ -1,6 +1,7 @@
 package public
 
 import (
+	"app.yhyue.com/moapp/jybase/encrypt"
 	"bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/rpc/medical/medical"
 	"context"
 
@@ -29,14 +30,15 @@ func (l *IsClaimedLogic) IsClaimed(req *types.IsClaimedReq) (resp *types.CommonR
 
 	rs, _ := l.svcCtx.Medical.IsClaimed(l.ctx, &medical.IsClaimedReq{
 		UserId: int64(req.UserId),
-		EntId:  req.CompanyId,
+		EntId:  encrypt.SE.Decode4Hex(req.CompanyId),
 		Type:   int64(req.Type),
 	})
-
 	return &types.CommonRes{
 		Error_msg:  rs.ErrorMsg,
 		Error_code: int(rs.ErrorCode),
-		Data:       rs.Data,
+		Data: map[string]interface{}{
+			"status": rs.Data.Status,
+		},
 	}, nil
 
 }

+ 3 - 1
api/medical/internal/logic/public/unclaimedlogic.go

@@ -1,6 +1,8 @@
 package public
 
 import (
+	"app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/encrypt"
 	"bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/rpc/medical/medical"
 	"context"
 
@@ -28,7 +30,7 @@ func NewUnclaimedLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Unclaim
 func (l *UnclaimedLogic) Unclaimed(req *types.UnclaimedReq) (resp *types.CommonRes, err error) {
 	rs, _ := l.svcCtx.Medical.UnClaimed(l.ctx, &medical.UnclaimedReq{
 		UserId: int64(req.UserId),
-		Id:     int64(req.Id),
+		Id:     common.Int64All(encrypt.SE.Decode4Hex(req.Id)),
 	})
 
 	return &types.CommonRes{

+ 17 - 21
api/medical/internal/types/types.go

@@ -43,16 +43,17 @@ type PortraitReq struct {
 }
 
 type ClaimInstitutionReq struct {
-	UserId      int    `header:"newUserId"`           // 用户id
-	CompanyName string `json:"company_name,optional"` // 要搜索的医疗机构
-	Page        int    `json:"page,optional"`         // 页码
-	PageSize    int    `json:"page_size,optional"`    // 每页条数
+	UserId   int    `header:"newUserId"`          // 用户id
+	Page     int    `json:"page,default=0"`       // 页码
+	PageSize int    `json:"page_size,default=10"` // 每页条数
+	AppId    string `header:"appId"`              // appid
 }
 
 type ClaimDistributorReq struct {
-	UserId   int `header:"newUserId"`        // 用户id
-	Page     int `json:"page,optional"`      // 页码
-	PageSize int `json:"page_size,optional"` // 每页条数
+	UserId   int    `header:"newUserId"`          // 用户id
+	Page     int    `json:"page,default=0"`       // 页码
+	PageSize int    `json:"page_size,default=10"` // 每页条数
+	AppId    string `header:"appId"`              // appid
 }
 
 type DistributorProductsReq struct {
@@ -62,26 +63,21 @@ type DistributorProductsReq struct {
 }
 
 type ClaimReq struct {
-	Type          int    `json:"type"`           // 1 医疗机构 2 经销商
-	EntId         string `json:"entid"`          // 企业标识
-	EntName       string `json:"ent_name"`       // 企业名称
-	Address       string `json:"address"`        // 所在地
-	EstablishDate string `json:"establish_date"` // 成立日期
-	RegistCapital string `json:"regist_capital"` // 注册资本
-	Phone         string `header:"phone"`        // 联系方式
-	UserId        int    `header:"newUserId"`    // 用户id
-	AppId         string `header:"appId"`        // appid
+	Type   int    `json:"type,options=1|2"` // 1 医疗机构 2 经销商
+	EntId  string `json:"ent_id"`           // 企业标识
+	UserId int    `header:"newUserId"`      // 用户id
+	AppId  string `header:"appId"`          // appid
 }
 
 type UnclaimedReq struct {
-	UserId int `header:"newUserId"` // 用户id
-	Id     int `json:"id"`
+	UserId int    `header:"newUserId"` // 用户id
+	Id     string `json:"id"`
 }
 
 type IsClaimedReq struct {
-	UserId    int    `header:"newUserId"` // 用户id
-	CompanyId string `json:"company_id"`  // 机构id
-	Type      int    `json:"type"`        // 1 医疗机构 2 经销商
+	UserId    int    `header:"newUserId"`      // 用户id
+	CompanyId string `json:"company_id"`       // 机构id
+	Type      int    `json:"type,options=1|2"` // 1 医疗机构 2 经销商
 }
 
 type UserInfoReq struct {

+ 19 - 21
api/medical/medical.api

@@ -41,17 +41,20 @@ type PortraitReq {
 }
 // 我认领的医疗机构请求
 type ClaimInstitutionReq {
-	UserId      int    `header:"newUserId"`           // 用户id
-	CompanyName string `json:"company_name,optional"` // 要搜索的医疗机构
-	Page        int    `json:"page,optional"`         // 页码
-	PageSize    int    `json:"page_size,optional"`    // 每页条数
+	UserId   int    `header:"newUserId"`          // 用户id
+	Page     int    `json:"page,default=0"`       // 页码
+	PageSize int    `json:"page_size,default=10"` // 每页条数
+	AppId    string `header:"appId"`              // appid
+
 }
 
 // 我认领的经销商请求
 type ClaimDistributorReq {
-	UserId   int `header:"newUserId"`        // 用户id
-	Page     int `json:"page,optional"`      // 页码
-	PageSize int `json:"page_size,optional"` // 每页条数
+	UserId   int    `header:"newUserId"`          // 用户id
+	Page     int    `json:"page,default=0"`       // 页码
+	PageSize int    `json:"page_size,default=10"` // 每页条数
+	AppId    string `header:"appId"`              // appid
+
 }
 
 // 获取经销商医械信息请求
@@ -62,28 +65,23 @@ type DistributorProductsReq {
 }
 // 认领
 type ClaimReq {
-	Type          int    `json:"type"`           // 1 医疗机构 2 经销商
-	EntId         string `json:"entid"`          // 企业标识
-	EntName       string `json:"ent_name"`       // 企业名称
-	Address       string `json:"address"`        // 所在地
-	EstablishDate string `json:"establish_date"` // 成立日期
-	RegistCapital string `json:"regist_capital"` // 注册资本
-	Phone         string `header:"phone"`        // 联系方式
-	UserId        int    `header:"newUserId"`    // 用户id
-	AppId         string `header:"appId"`        // appid
+	Type   int    `json:"type,options=1|2"` // 1 医疗机构 2 经销商
+	EntId  string `json:"ent_id"`           // 企业标识
+	UserId int    `header:"newUserId"`      // 用户id
+	AppId  string `header:"appId"`          // appid
 }
 
 // 取消认领
 type UnclaimedReq {
-	UserId int `header:"newUserId"` // 用户id
-	Id     int `json:"id"`
+	UserId int    `header:"newUserId"` // 用户id
+	Id     string `json:"id"`
 }
 
 // 是否是认领过的
 type IsClaimedReq {
-	UserId    int    `header:"newUserId"` // 用户id
-	CompanyId string `json:"company_id"`  // 机构id
-	Type      int    `json:"type"`        // 1 医疗机构 2 经销商
+	UserId    int    `header:"newUserId"`      // 用户id
+	CompanyId string `json:"company_id"`       // 机构id
+	Type      int    `json:"type,options=1|2"` // 1 医疗机构 2 经销商
 }
 // 医疗机构
 @server(

+ 3 - 3
rpc/medical/etc/medical.yaml

@@ -6,14 +6,14 @@ Etcd:
   Key: medical.rpc
 MysqlMain:
   dbName: field_medical_data
-  address: 192.168.3.14:4000
+  address: 192.168.3.217:4000
   userName: root
   passWord: =PDT49#80Z!RVv52_z
   maxOpenConns: 5
   maxIdleConns: 5
 BaseMysqlMain:
   dbName: base_service
-  address: 192.168.3.14:4000
+  address: 192.168.3.217:4000
   userName: root
   passWord: =PDT49#80Z!RVv52_z
   maxOpenConns: 5
@@ -25,7 +25,7 @@ Es:
   type: smart
 GlobalCommonData:
   dbName: global_common_data
-  address: 192.168.3.14:4000
+  address: 192.168.3.217:4000
   userName: root
   passWord: =PDT49#80Z!RVv52_z
   maxOpenConns: 5

+ 12 - 10
rpc/medical/internal/logic/claimeddistributorlistlogic.go

@@ -2,10 +2,12 @@ package logic
 
 import (
 	"app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/encrypt"
 	"bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/entity"
 	"bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/rpc/medical/internal/svc"
 	"bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/rpc/medical/medical"
 	"context"
+	"fmt"
 	"github.com/zeromicro/go-zero/core/logx"
 )
 
@@ -31,16 +33,16 @@ func (l *ClaimedDistributorListLogic) ClaimedDistributorList(in *medical.Claimed
 		for i := 0; i < len(*rs); i++ {
 			resultList.List = append(resultList.List,
 				&medical.EntClaim{
-					Id:              common.Int64All((*rs)[i]["id"]),
-					AppId:           common.ObjToString((*rs)[i]["appid"]),
-					EntId:           common.ObjToString((*rs)[i]["ent_id"]),
-					EntName:         common.ObjToString((*rs)[i]["ent_name"]),
-					Address:         common.ObjToString((*rs)[i]["address"]),
-					EstablishDate:   common.ObjToString((*rs)[i]["establish_date"]),
-					RegisterCapital: common.ObjToString((*rs)[i]["regist_capital"]),
-					Phone:           common.ObjToString((*rs)[i]["phone"]),
-					UpdateTime:      common.ObjToString((*rs)[i]["update_time"]),
-					CreateTime:      common.ObjToString((*rs)[i]["create_time"])},
+					Id:            encrypt.SE.Encode2Hex(fmt.Sprintf("%v", (*rs)[i]["id"])),
+					AppId:         common.ObjToString((*rs)[i]["appid"]),
+					EntId:         encrypt.SE.Encode2Hex(common.ObjToString((*rs)[i]["ent_id"])),
+					EntName:       common.ObjToString((*rs)[i]["ent_name"]),
+					Address:       common.ObjToString((*rs)[i]["address"]),
+					EstablishDate: common.ObjToString((*rs)[i]["establish_date"]),
+					Capital:       common.ObjToString((*rs)[i]["regist_capital"]),
+					CompanyPhone:  common.ObjToString((*rs)[i]["phone"]),
+					UpdateTime:    common.ObjToString((*rs)[i]["update_time"]),
+					CreateTime:    common.ObjToString((*rs)[i]["create_time"])},
 			)
 		}
 		resultList.Total = int64(total)

+ 12 - 10
rpc/medical/internal/logic/claimedinstitutionlistlogic.go

@@ -2,8 +2,10 @@ package logic
 
 import (
 	"app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/encrypt"
 	"bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/entity"
 	"context"
+	"fmt"
 
 	"bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/rpc/medical/internal/svc"
 	"bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/rpc/medical/medical"
@@ -33,16 +35,16 @@ func (l *ClaimedInstitutionListLogic) ClaimedInstitutionList(in *medical.Claimed
 		for i := 0; i < len(*rs); i++ {
 			resultList.List = append(resultList.List,
 				&medical.EntClaim{
-					Id:              common.Int64All((*rs)[i]["id"]),
-					AppId:           common.ObjToString((*rs)[i]["appid"]),
-					EntId:           common.ObjToString((*rs)[i]["ent_id"]),
-					EntName:         common.ObjToString((*rs)[i]["ent_name"]),
-					Address:         common.ObjToString((*rs)[i]["address"]),
-					EstablishDate:   common.ObjToString((*rs)[i]["establish_date"]),
-					RegisterCapital: common.ObjToString((*rs)[i]["regist_capital"]),
-					Phone:           common.ObjToString((*rs)[i]["phone"]),
-					UpdateTime:      common.ObjToString((*rs)[i]["update_time"]),
-					CreateTime:      common.ObjToString((*rs)[i]["create_time"])},
+					Id:            encrypt.SE.Encode2Hex(fmt.Sprintf("%v", (*rs)[i]["id"])),
+					AppId:         common.ObjToString((*rs)[i]["appid"]),
+					EntId:         encrypt.SE.Encode2Hex(common.ObjToString((*rs)[i]["ent_id"])),
+					EntName:       common.ObjToString((*rs)[i]["ent_name"]),
+					Address:       common.ObjToString((*rs)[i]["address"]),
+					EstablishDate: common.ObjToString((*rs)[i]["establish_date"]),
+					Capital:       common.ObjToString((*rs)[i]["regist_capital"]),
+					CompanyPhone:  common.ObjToString((*rs)[i]["phone"]),
+					UpdateTime:    common.ObjToString((*rs)[i]["update_time"]),
+					CreateTime:    common.ObjToString((*rs)[i]["create_time"])},
 			)
 		}
 		resultList.Total = int64(total)

+ 15 - 15
rpc/medical/medical.proto

@@ -155,7 +155,7 @@ message IsClaimedResp{
   int64  ErrorCode = 1;  // 响应代码
   string ErrorMsg = 2;   // 响应信息
   message StatusRes{
-    bool Status = 1;
+    bool status = 1;
   }
   StatusRes Data =3;
 
@@ -168,23 +168,23 @@ message ClaimedReq{
   int64 PageSize = 4 ;//appid
 }
 message  EntClaim{
-  int64 Id = 10;
-  int64 UserId = 1 ;// 用户id
-  string EntId = 2 ;// 公司id
-  string EntName = 3 ;// 公司名称
-  int64 Type = 4 ;// 类型;1:医疗机构 2:经销商'
-  string Address = 5 ;// 企业地址
-  string EstablishDate = 6 ;// 成立日期
-  string RegisterCapital = 7 ;// 注册资本
-  string Phone = 8 ;// 联系方式
-  string AppId = 9 ;//appid
-  string CreateTime = 11 ;//appid
-  string UpdateTime = 12 ;//appid
+  string  id = 10;
+  int64  user_id = 1 ;// 用户id
+  string ent_id = 2 ;// 公司id
+  string ent_name = 3 ;// 公司名称
+  int64  type = 4 ;// 类型;1:医疗机构 2:经销商'
+  string address = 5 ;// 企业地址
+  string establish_date = 6 ;// 成立日期
+  string capital = 7 ;// 注册资本
+  string company_phone = 8 ;// 联系方式
+  string appId = 9 ;//appid
+  string create_time = 11 ;//创建时间
+  string update_time = 12 ;//更新时间
 }
 // 列表
 message  EntClaimListStruct{
-  repeated EntClaim List =1;
-  int64    Total = 2;
+  repeated EntClaim list =1;
+  int64    total = 2;
 }
 // 关注列表响应
 message  EntClaimListResp{

+ 103 - 103
rpc/medical/medical/medical.pb.go

@@ -1716,18 +1716,18 @@ type EntClaim struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	Id              int64  `protobuf:"varint,10,opt,name=Id,proto3" json:"Id,omitempty"`
-	UserId          int64  `protobuf:"varint,1,opt,name=UserId,proto3" json:"UserId,omitempty"`                  // 用户id
-	EntId           string `protobuf:"bytes,2,opt,name=EntId,proto3" json:"EntId,omitempty"`                     // 公司id
-	EntName         string `protobuf:"bytes,3,opt,name=EntName,proto3" json:"EntName,omitempty"`                 // 公司名称
-	Type            int64  `protobuf:"varint,4,opt,name=Type,proto3" json:"Type,omitempty"`                      // 类型;1:医疗机构 2:经销商'
-	Address         string `protobuf:"bytes,5,opt,name=Address,proto3" json:"Address,omitempty"`                 // 企业地址
-	EstablishDate   string `protobuf:"bytes,6,opt,name=EstablishDate,proto3" json:"EstablishDate,omitempty"`     // 成立日期
-	RegisterCapital string `protobuf:"bytes,7,opt,name=RegisterCapital,proto3" json:"RegisterCapital,omitempty"` // 注册资本
-	Phone           string `protobuf:"bytes,8,opt,name=Phone,proto3" json:"Phone,omitempty"`                     // 联系方式
-	AppId           string `protobuf:"bytes,9,opt,name=AppId,proto3" json:"AppId,omitempty"`                     //appid
-	CreateTime      string `protobuf:"bytes,11,opt,name=CreateTime,proto3" json:"CreateTime,omitempty"`          //appid
-	UpdateTime      string `protobuf:"bytes,12,opt,name=UpdateTime,proto3" json:"UpdateTime,omitempty"`          //appid
+	Id            string `protobuf:"bytes,10,opt,name=id,proto3" json:"id,omitempty"`
+	UserId        int64  `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`                     // 用户id
+	EntId         string `protobuf:"bytes,2,opt,name=ent_id,json=entId,proto3" json:"ent_id,omitempty"`                         // 公司id
+	EntName       string `protobuf:"bytes,3,opt,name=ent_name,json=entName,proto3" json:"ent_name,omitempty"`                   // 公司名称
+	Type          int64  `protobuf:"varint,4,opt,name=type,proto3" json:"type,omitempty"`                                       // 类型;1:医疗机构 2:经销商'
+	Address       string `protobuf:"bytes,5,opt,name=address,proto3" json:"address,omitempty"`                                  // 企业地址
+	EstablishDate string `protobuf:"bytes,6,opt,name=establish_date,json=establishDate,proto3" json:"establish_date,omitempty"` // 成立日期
+	Capital       string `protobuf:"bytes,7,opt,name=capital,proto3" json:"capital,omitempty"`                                  // 注册资本
+	CompanyPhone  string `protobuf:"bytes,8,opt,name=company_phone,json=companyPhone,proto3" json:"company_phone,omitempty"`    // 联系方式
+	AppId         string `protobuf:"bytes,9,opt,name=appId,proto3" json:"appId,omitempty"`                                      //appid
+	CreateTime    string `protobuf:"bytes,11,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`         //创建时间
+	UpdateTime    string `protobuf:"bytes,12,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`         //更新时间
 }
 
 func (x *EntClaim) Reset() {
@@ -1762,11 +1762,11 @@ func (*EntClaim) Descriptor() ([]byte, []int) {
 	return file_medical_proto_rawDescGZIP(), []int{23}
 }
 
-func (x *EntClaim) GetId() int64 {
+func (x *EntClaim) GetId() string {
 	if x != nil {
 		return x.Id
 	}
-	return 0
+	return ""
 }
 
 func (x *EntClaim) GetUserId() int64 {
@@ -1811,16 +1811,16 @@ func (x *EntClaim) GetEstablishDate() string {
 	return ""
 }
 
-func (x *EntClaim) GetRegisterCapital() string {
+func (x *EntClaim) GetCapital() string {
 	if x != nil {
-		return x.RegisterCapital
+		return x.Capital
 	}
 	return ""
 }
 
-func (x *EntClaim) GetPhone() string {
+func (x *EntClaim) GetCompanyPhone() string {
 	if x != nil {
-		return x.Phone
+		return x.CompanyPhone
 	}
 	return ""
 }
@@ -1852,8 +1852,8 @@ type EntClaimListStruct struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	List  []*EntClaim `protobuf:"bytes,1,rep,name=List,proto3" json:"List,omitempty"`
-	Total int64       `protobuf:"varint,2,opt,name=Total,proto3" json:"Total,omitempty"`
+	List  []*EntClaim `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
+	Total int64       `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
 }
 
 func (x *EntClaimListStruct) Reset() {
@@ -1971,7 +1971,7 @@ type IsClaimedResp_StatusRes struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	Status bool `protobuf:"varint,1,opt,name=Status,proto3" json:"Status,omitempty"`
+	Status bool `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
 }
 
 func (x *IsClaimedResp_StatusRes) Reset() {
@@ -2208,94 +2208,94 @@ var file_medical_proto_rawDesc = []byte{
 	0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x49, 0x73, 0x43,
 	0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75,
 	0x73, 0x52, 0x65, 0x73, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x23, 0x0a, 0x09, 0x53, 0x74,
-	0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75,
-	0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22,
+	0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
+	0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22,
 	0x6a, 0x0a, 0x0a, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a,
 	0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x55,
 	0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x41, 0x70, 0x70, 0x49, 0x64, 0x18, 0x02,
 	0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x41, 0x70, 0x70, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x50,
 	0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x50, 0x61, 0x67, 0x65, 0x12,
 	0x1a, 0x0a, 0x08, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
-	0x03, 0x52, 0x08, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xcc, 0x02, 0x0a, 0x08,
-	0x45, 0x6e, 0x74, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x0a,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72,
-	0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64,
-	0x12, 0x14, 0x0a, 0x05, 0x45, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
-	0x05, 0x45, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x45, 0x6e, 0x74, 0x4e, 0x61, 0x6d,
-	0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x45, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65,
-	0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04,
-	0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18,
-	0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x24,
-	0x0a, 0x0d, 0x45, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x44, 0x61, 0x74, 0x65, 0x18,
-	0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x45, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x69, 0x73, 0x68,
-	0x44, 0x61, 0x74, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72,
-	0x43, 0x61, 0x70, 0x69, 0x74, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x52,
-	0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x61, 0x70, 0x69, 0x74, 0x61, 0x6c, 0x12, 0x14,
-	0x0a, 0x05, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x50,
-	0x68, 0x6f, 0x6e, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x41, 0x70, 0x70, 0x49, 0x64, 0x18, 0x09, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x05, 0x41, 0x70, 0x70, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x72,
-	0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
-	0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x55, 0x70,
-	0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
-	0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x51, 0x0a, 0x12, 0x45, 0x6e,
-	0x74, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74,
-	0x12, 0x25, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11,
-	0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x45, 0x6e, 0x74, 0x43, 0x6c, 0x61, 0x69,
-	0x6d, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x6f, 0x74, 0x61, 0x6c,
-	0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x22, 0x7d, 0x0a,
-	0x10, 0x45, 0x6e, 0x74, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73,
-	0x70, 0x12, 0x1c, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
-	0x1a, 0x0a, 0x08, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x08, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x2f, 0x0a, 0x04, 0x44,
-	0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x65, 0x64, 0x69,
-	0x63, 0x61, 0x6c, 0x2e, 0x45, 0x6e, 0x74, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x4c, 0x69, 0x73, 0x74,
-	0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x32, 0xb4, 0x05, 0x0a,
-	0x07, 0x4d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x12, 0x42, 0x0a, 0x0b, 0x49, 0x6e, 0x73, 0x74,
-	0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61,
-	0x6c, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x6e, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74,
-	0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c,
-	0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x37, 0x0a, 0x0d,
-	0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0d, 0x2e,
-	0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x5a, 0x65, 0x72, 0x6f, 0x1a, 0x17, 0x2e, 0x6d,
-	0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x49, 0x74, 0x65,
-	0x6d, 0x52, 0x65, 0x73, 0x70, 0x12, 0x42, 0x0a, 0x0b, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62,
-	0x75, 0x74, 0x6f, 0x72, 0x12, 0x1d, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x53,
-	0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72,
-	0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x43, 0x6f,
-	0x6d, 0x70, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3a, 0x0a, 0x10, 0x75, 0x73, 0x65,
-	0x72, 0x41, 0x75, 0x74, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x53, 0x61, 0x76, 0x65, 0x12, 0x11, 0x2e,
-	0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f,
-	0x1a, 0x13, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
-	0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x39, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x41, 0x75, 0x74,
-	0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e,
-	0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x6d, 0x65, 0x64, 0x69,
-	0x63, 0x61, 0x6c, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70,
-	0x12, 0x37, 0x0a, 0x08, 0x50, 0x6f, 0x72, 0x74, 0x72, 0x61, 0x69, 0x74, 0x12, 0x14, 0x2e, 0x6d,
-	0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x72, 0x61, 0x69, 0x74, 0x52,
-	0x65, 0x71, 0x1a, 0x15, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x72,
-	0x74, 0x72, 0x61, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2f, 0x0a, 0x05, 0x43, 0x6c, 0x61,
-	0x69, 0x6d, 0x12, 0x11, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x43, 0x6c, 0x61,
-	0x69, 0x6d, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e,
-	0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x37, 0x0a, 0x09, 0x55, 0x6e,
-	0x43, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x12, 0x15, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61,
-	0x6c, 0x2e, 0x55, 0x6e, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x13,
-	0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52,
-	0x65, 0x73, 0x70, 0x12, 0x3a, 0x0a, 0x09, 0x49, 0x73, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64,
-	0x12, 0x15, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x49, 0x73, 0x43, 0x6c, 0x61,
-	0x69, 0x6d, 0x65, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61,
-	0x6c, 0x2e, 0x49, 0x73, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12,
-	0x48, 0x0a, 0x16, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69,
-	0x62, 0x75, 0x74, 0x6f, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x13, 0x2e, 0x6d, 0x65, 0x64, 0x69,
-	0x63, 0x61, 0x6c, 0x2e, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x19,
+	0x03, 0x52, 0x08, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xd1, 0x02, 0x0a, 0x08,
+	0x45, 0x6e, 0x74, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x0a,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72,
+	0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49,
+	0x64, 0x12, 0x15, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x74, 0x5f,
+	0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x4e,
+	0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65,
+	0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
+	0x73, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x5f, 0x64,
+	0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x73, 0x74, 0x61, 0x62,
+	0x6c, 0x69, 0x73, 0x68, 0x44, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x61, 0x70, 0x69,
+	0x74, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x61, 0x70, 0x69, 0x74,
+	0x61, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x5f, 0x70, 0x68,
+	0x6f, 0x6e, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x61,
+	0x6e, 0x79, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64,
+	0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x1f, 0x0a,
+	0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1f,
+	0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22,
+	0x51, 0x0a, 0x12, 0x45, 0x6e, 0x74, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x53,
+	0x74, 0x72, 0x75, 0x63, 0x74, 0x12, 0x25, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20,
+	0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x45, 0x6e,
+	0x74, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05,
+	0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f, 0x74,
+	0x61, 0x6c, 0x22, 0x7d, 0x0a, 0x10, 0x45, 0x6e, 0x74, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x4c, 0x69,
+	0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43,
+	0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72,
+	0x43, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67,
+	0x12, 0x2f, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b,
 	0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x45, 0x6e, 0x74, 0x43, 0x6c, 0x61, 0x69,
-	0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x48, 0x0a, 0x16, 0x43, 0x6c, 0x61,
-	0x69, 0x6d, 0x65, 0x64, 0x49, 0x6e, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4c,
-	0x69, 0x73, 0x74, 0x12, 0x13, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x43, 0x6c,
-	0x61, 0x69, 0x6d, 0x65, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63,
-	0x61, 0x6c, 0x2e, 0x45, 0x6e, 0x74, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52,
-	0x65, 0x73, 0x70, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x2f, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c,
-	0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x6d, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, 0x44, 0x61, 0x74,
+	0x61, 0x32, 0xb4, 0x05, 0x0a, 0x07, 0x4d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x12, 0x42, 0x0a,
+	0x0b, 0x49, 0x6e, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x6d,
+	0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x6e, 0x73,
+	0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x6d, 0x65,
+	0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x73,
+	0x70, 0x12, 0x37, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x49, 0x74,
+	0x65, 0x6d, 0x12, 0x0d, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x5a, 0x65, 0x72,
+	0x6f, 0x1a, 0x17, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x46, 0x69, 0x6c, 0x74,
+	0x65, 0x72, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x12, 0x42, 0x0a, 0x0b, 0x44, 0x69,
+	0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x12, 0x1d, 0x2e, 0x6d, 0x65, 0x64, 0x69,
+	0x63, 0x61, 0x6c, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69,
+	0x62, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63,
+	0x61, 0x6c, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3a,
+	0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x53, 0x61,
+	0x76, 0x65, 0x12, 0x11, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x55, 0x73, 0x65,
+	0x72, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x13, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e,
+	0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x39, 0x0a, 0x0c, 0x75, 0x73,
+	0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x2e, 0x6d, 0x65, 0x64,
+	0x69, 0x63, 0x61, 0x6c, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x15,
+	0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66,
+	0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x37, 0x0a, 0x08, 0x50, 0x6f, 0x72, 0x74, 0x72, 0x61, 0x69,
+	0x74, 0x12, 0x14, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x72, 0x74,
+	0x72, 0x61, 0x69, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61,
+	0x6c, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x72, 0x61, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2f,
+	0x0a, 0x05, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x12, 0x11, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61,
+	0x6c, 0x2e, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x6d, 0x65, 0x64,
+	0x69, 0x63, 0x61, 0x6c, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12,
+	0x37, 0x0a, 0x09, 0x55, 0x6e, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x12, 0x15, 0x2e, 0x6d,
+	0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x55, 0x6e, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64,
+	0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x43, 0x6f,
+	0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3a, 0x0a, 0x09, 0x49, 0x73, 0x43, 0x6c,
+	0x61, 0x69, 0x6d, 0x65, 0x64, 0x12, 0x15, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e,
+	0x49, 0x73, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x6d,
+	0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x49, 0x73, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64,
+	0x52, 0x65, 0x73, 0x70, 0x12, 0x48, 0x0a, 0x16, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x44,
+	0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x13,
+	0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64,
+	0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x45, 0x6e,
+	0x74, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x48,
+	0x0a, 0x16, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x49, 0x6e, 0x73, 0x74, 0x69, 0x74, 0x75,
+	0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x13, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x63,
+	0x61, 0x6c, 0x2e, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e,
+	0x6d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x45, 0x6e, 0x74, 0x43, 0x6c, 0x61, 0x69, 0x6d,
+	0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x2f, 0x6d, 0x65,
+	0x64, 0x69, 0x63, 0x61, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -2348,7 +2348,7 @@ var file_medical_proto_depIdxs = []int32{
 	12, // 4: medical.FilterItemResp.data:type_name -> medical.FilterItem
 	14, // 5: medical.UserInfoResp.data:type_name -> medical.UserInfo
 	26, // 6: medical.IsClaimedResp.Data:type_name -> medical.IsClaimedResp.StatusRes
-	23, // 7: medical.EntClaimListStruct.List:type_name -> medical.EntClaim
+	23, // 7: medical.EntClaimListStruct.list:type_name -> medical.EntClaim
 	24, // 8: medical.EntClaimListResp.Data:type_name -> medical.EntClaimListStruct
 	5,  // 9: medical.Medical.Institution:input_type -> medical.SearchInstitutionReq
 	4,  // 10: medical.Medical.GetFilterItem:input_type -> medical.Zero

+ 2 - 2
service/claim.go

@@ -72,7 +72,7 @@ func (e *EntClaimService) DistributorList(userId int, appId string, page int, pa
 		"type":    entity.TypeDistributor,
 		"status":  entity.StatusClaimed,
 	}
-	field := "id,appid,user_id,ent_id,ent_name,address,create_time"
+	field := "id,appid,user_id,ent_id,ent_name,address,create_time,establish_date,regist_capital,phone"
 	order := "create_time desc"
 	total := e.BaseMysql.Count(entity.TableDomainEntClaim, query)
 	if total == 0 {
@@ -89,7 +89,7 @@ func (e *EntClaimService) InstitutionList(userId int, appId string, page int, pa
 		"type":    entity.TypeInstitution,
 		"status":  entity.StatusClaimed,
 	}
-	field := "id,appid,user_id,ent_id,ent_name,address,create_time"
+	field := "id,appid,user_id,ent_id,ent_name,address,create_time,establish_date,regist_capital,phone"
 	order := "create_time desc"
 	total := e.BaseMysql.Count(entity.TableDomainEntClaim, query)
 	if total == 0 {

+ 6 - 0
service/claim_test.go

@@ -1,6 +1,8 @@
 package service
 
 import (
+	"app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/encrypt"
 	"bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/entity"
 	"fmt"
 	"testing"
@@ -170,3 +172,7 @@ func TestEntClaimService_GetInstitution(t *testing.T) {
 		})
 	}
 }
+func TestName(t *testing.T) {
+	s := encrypt.SE.Encode2Hex(common.ObjToString("90009"))
+	fmt.Print(s)
+}

+ 81 - 0
test/api_test.http

@@ -0,0 +1,81 @@
+### 认领
+POST http://{{host}}:8888/domain/claim
+Content-Type: application/json
+#Cookie:
+newUserId:22
+appId:10000
+
+{
+"ent_id": "1057165a5d1556510256475a470a554c030255534557480d0645065555004658",
+"type": 1
+}
+> {%
+client.test("Request executed successfully", function() {
+  client.assert(response.status === 200, "Response status is not 200");
+});
+%}
+
+### 取消认领
+POST http://{{host}}:8888/domain/unclaimed
+Content-Type: application/json
+#Cookie:
+newUserId:22
+appId:10000
+
+{
+  "id":"4d5f405e5c" ,
+  "type": 1
+}
+> {%
+client.test("Request executed successfully", function() {
+  client.assert(response.status === 200, "Response status is not 200");
+});
+%}
+
+### 是否认领过
+POST http://{{host}}:8888/domain/isClaimed
+Content-Type: application/json
+#Cookie:
+newUserId:22
+appId:10000
+
+{
+  "company_id": "1057165a5d1556510256475a470a554c030255534557480d0645065555004658",
+  "type": 1
+}
+> {%
+client.test("Request executed successfully", function() {
+  client.assert(response.status === 200, "Response status is not 200");
+});
+%}
+
+
+### 我认领的经销商
+POST http://{{host}}:8888/domain/claim/distributor
+Content-Type: application/json
+#Cookie:
+newUserId:22
+appId:10000
+
+> {%
+client.test("Request executed successfully", function() {
+  client.assert(response.status === 200, "Response status is not 200");
+});
+%}
+
+
+
+### 我认领的医疗机构
+POST http://{{host}}:8888/domain/claim/institution
+Content-Type: application/json
+#Cookie:
+newUserId:22
+appId:10000
+
+
+> {%
+client.test("Request executed successfully", function() {
+  client.assert(response.status === 200, "Response status is not 200");
+});
+%}
+

+ 2 - 2
test/rpc_test.http

@@ -3,7 +3,7 @@ GRPC {{host}}:8080/medical.Medical/ClaimedDistributorList
 
 {
   "AppId": "10000",
-  "UserId": 1,
+  "UserId": 22,
   "Page": 0,
   "PageSize": 10
 }
@@ -13,7 +13,7 @@ GRPC {{host}}:8080/medical.Medical/ClaimedInstitutionList
 
 {
   "AppId": "10000",
-  "UserId": 1,
+  "UserId": 22,
   "Page": 0,
   "PageSize": 10
 }