// Copyright 2019 getensh.com. All rights reserved. // Use of this source code is governed by getensh.com. package impl import ( "context" "property-household/impl/v1/gate" "property-household/impl/v1/house" "property-household/impl/v1/house_rent" "property-household/impl/v1/user" "property-household/pb" pb_v1 "property-household/pb/v1" "git.getensh.com/common/gopkgs/tasker/rpctasker" "google.golang.org/grpc" ) // 具体实现 type Rcvr struct { } func Register(s *grpc.Server) { pb.RegisterHouseholdServer(s, &Rcvr{}) } // 登录 func (c *Rcvr) Login(ctx context.Context, req *pb_v1.LoginRequest) (reply *pb_v1.LoginReply, err error) { t1 := func() error { reply, err = user.Login(ctx, req) return err } return reply, rpctasker.Exec(ctx, t1) } func (c *Rcvr) UserWxPublicAdd(ctx context.Context, req *pb_v1.UserWxPublicAddRequest) (reply *pb_v1.UserWxPublicAddReply, err error) { t1 := func() error { reply, err = user.UserWxPublicAdd(ctx, req) return err } return reply, rpctasker.Exec(ctx, t1) } func (c *Rcvr) WxPublicEmptyUnionId(ctx context.Context, req *pb_v1.WxPublicEmptyUnionIdRequest) (reply *pb_v1.WxPublicEmptyUnionIdReply, err error) { t1 := func() error { reply, err = user.WxPublicEmptyUnionId(ctx, req) return err } return reply, rpctasker.Exec(ctx, t1) } func (c *Rcvr) HouseholdHouses(ctx context.Context, req *pb_v1.HouseholdHousesRequest) (reply *pb_v1.HouseholdHousesReply, err error) { t1 := func() error { reply, err = house.HouseholdHouses(ctx, req) return err } return reply, rpctasker.Exec(ctx, t1) } func (c *Rcvr) HouseholdRefuse(ctx context.Context, req *pb_v1.HouseholdRefuseRequest) (reply *pb_v1.HouseholdRefuseReply, err error) { t1 := func() error { reply, err = house.HouseholdRefuse(ctx, req) return err } return reply, rpctasker.Exec(ctx, t1) } func (c *Rcvr) HouseholdWaitCount(ctx context.Context, req *pb_v1.HouseholdWaitCountRequest) (reply *pb_v1.HouseholdWaitCountReply, err error) { t1 := func() error { reply, err = house.HouseholdWaitCount(ctx, req) return err } return reply, rpctasker.Exec(ctx, t1) } func (c *Rcvr) UserInfo(ctx context.Context, req *pb_v1.UserInfoRequest) (reply *pb_v1.UserInfoReply, err error) { t1 := func() error { reply, err = user.UserInfo(ctx, req) return err } return reply, rpctasker.Exec(ctx, t1) } func (c *Rcvr) RealNameAuth(ctx context.Context, req *pb_v1.RealNameAuthRequest) (reply *pb_v1.RealNameAuthReply, err error) { t1 := func() error { reply, err = user.RealNameAuth(ctx, req) return err } return reply, rpctasker.Exec(ctx, t1) } func (c *Rcvr) UserUpdateNickName(ctx context.Context, req *pb_v1.UserUpdateNickNameRequest) (reply *pb_v1.UserUpdateNickNameReply, err error) { t1 := func() error { reply, err = user.UserUpdateNickName(ctx, req) return err } return reply, rpctasker.Exec(ctx, t1) } func (c *Rcvr) HouseholdList(ctx context.Context, req *pb_v1.HouseholdListRequest) (reply *pb_v1.HouseholdListReply, err error) { t1 := func() error { reply, err = house.HouseholdList(ctx, req) return err } return reply, rpctasker.Exec(ctx, t1) } func (c *Rcvr) HouseholdApply(ctx context.Context, req *pb_v1.HouseholdApplyRequest) (reply *pb_v1.HouseholdApplyReply, err error) { t1 := func() error { reply, err = house.HouseholdApply(ctx, req) return err } return reply, rpctasker.Exec(ctx, t1) } func (c *Rcvr) HouseholdDelApply(ctx context.Context, req *pb_v1.HouseholdDelApplyRequest) (reply *pb_v1.HouseholdDelApplyReply, err error) { t1 := func() error { reply, err = house.HouseholdDelApply(ctx, req) return err } return reply, rpctasker.Exec(ctx, t1) } func (c *Rcvr) HouseholdGardenNameChange(ctx context.Context, req *pb_v1.HouseholdGardenNameChangeRequest) (reply *pb_v1.HouseholdGardenNameChangeReply, err error) { t1 := func() error { reply, err = house.HouseholdGardenNameChange(ctx, req) return err } return reply, rpctasker.Exec(ctx, t1) } func (c *Rcvr) HouseholdApprove(ctx context.Context, req *pb_v1.HouseholdApproveRequest) (reply *pb_v1.HouseholdApproveReply, err error) { t1 := func() error { reply, err = house.HouseholdApprove(ctx, req) return err } return reply, rpctasker.Exec(ctx, t1) } func (c *Rcvr) HouseholdUserList(ctx context.Context, req *pb_v1.HouseholdUserListRequest) (reply *pb_v1.HouseholdUserListReply, err error) { t1 := func() error { reply, err = house.HouseholdUserList(ctx, req) return err } return reply, rpctasker.Exec(ctx, t1) } func (c *Rcvr) HouseRentApply(ctx context.Context, req *pb_v1.HouseRentApplyRequest) (reply *pb_v1.HouseRentApplyReply, err error) { t1 := func() error { reply, err = house_rent.HouseRentApply(ctx, req) return err } return reply, rpctasker.Exec(ctx, t1) } func (c *Rcvr) HouseRentApprove(ctx context.Context, req *pb_v1.HouseRentApproveRequest) (reply *pb_v1.HouseRentApproveReply, err error) { t1 := func() error { reply, err = house_rent.HouseRentApprove(ctx, req) return err } return reply, rpctasker.Exec(ctx, t1) } func (c *Rcvr) HouseRentUpdate(ctx context.Context, req *pb_v1.HouseRentUpdateRequest) (reply *pb_v1.HouseRentUpdateReply, err error) { t1 := func() error { reply, err = house_rent.HouseRentUpdate(ctx, req) return err } return reply, rpctasker.Exec(ctx, t1) } func (c *Rcvr) HouseRentDown(ctx context.Context, req *pb_v1.HouseRentDownRequest) (reply *pb_v1.HouseRentDownReply, err error) { t1 := func() error { reply, err = house_rent.HouseRentDown(ctx, req) return err } return reply, rpctasker.Exec(ctx, t1) } func (c *Rcvr) HouseRentList(ctx context.Context, req *pb_v1.HouseRentListRequest) (reply *pb_v1.HouseRentListReply, err error) { t1 := func() error { reply, err = house_rent.HouseRentList(ctx, req) return err } return reply, rpctasker.Exec(ctx, t1) } func (c *Rcvr) HouseRentChangeField(ctx context.Context, req *pb_v1.HouseRentChangeFieldRequest) (reply *pb_v1.HouseRentChangeFieldReply, err error) { t1 := func() error { reply, err = house_rent.HouseRentChangeField(ctx, req) return err } return reply, rpctasker.Exec(ctx, t1) } func (c *Rcvr) GateQcode(ctx context.Context, req *pb_v1.GateQcodeRequest) (reply *pb_v1.GateQcodeReply, err error) { t1 := func() error { reply, err = gate.GateQcode(ctx, req) return err } return reply, rpctasker.Exec(ctx, t1) } // 住户退出房屋 func (c *Rcvr) HouseholdDelHouse(ctx context.Context, req *pb_v1.HouseholdDelHouseRequest) (reply *pb_v1.HouseholdDelHouseReply, err error) { t1 := func() error { reply, err = house.HouseholdDelHouse(ctx, req) return err } return reply, rpctasker.Exec(ctx, t1) } // 租房预约看房 func (c *Rcvr) HouseRentAppointmentAdd(ctx context.Context, req *pb_v1.HouseRentAppointmentAddRequest) (reply *pb_v1.HouseRentAppointmentAddReply, err error) { t1 := func() error { reply, err = house_rent.HouseRentAppointmentAdd(ctx, req) return err } return reply, rpctasker.Exec(ctx, t1) } // 租房预约列表 func (c *Rcvr) HouseRentAppointmentList(ctx context.Context, req *pb_v1.HouseRentAppointmentListRequest) (reply *pb_v1.HouseRentAppointmentListReply, err error) { t1 := func() error { reply, err = house_rent.HouseRentAppointmentList(ctx, req) return err } return reply, rpctasker.Exec(ctx, t1) } // 删除租房预约 func (c *Rcvr) HouseRentAppointmentDel(ctx context.Context, req *pb_v1.HouseRentAppointmentDelRequest) (reply *pb_v1.HouseRentAppointmentDelReply, err error) { t1 := func() error { reply, err = house_rent.HouseRentAppointmentDel(ctx, req) return err } return reply, rpctasker.Exec(ctx, t1) } func (c *Rcvr) HouseRentAppointmentStatus(ctx context.Context, req *pb_v1.HouseRentAppointmentStatusRequest) (reply *pb_v1.HouseRentAppointmentStatusReply, err error) { t1 := func() error { reply, err = house_rent.HouseRentAppointmentStatus(ctx, req) return err } return reply, rpctasker.Exec(ctx, t1) }