house_rent.go 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. package impl
  2. import (
  3. "context"
  4. "git.getensh.com/common/gopkgs/tasker/rpctasker"
  5. "property-garden/impl/v1/house_rent"
  6. pb_v1 "property-garden/pb/v1"
  7. )
  8. //
  9. func (c *Rcvr) GardenHouseRentSync(ctx context.Context, req *pb_v1.GardenHouseRentSyncRequest) (reply *pb_v1.GardenHouseRentSyncReply, err error) {
  10. t1 := func() error {
  11. reply, err = house_rent.GardenHouseRentSync(ctx, req)
  12. return err
  13. }
  14. return reply, rpctasker.Exec(ctx, t1)
  15. }
  16. func (c *Rcvr) GardenHouseRentList(ctx context.Context, req *pb_v1.GardenHouseRentListRequest) (reply *pb_v1.GardenHouseRentListReply, err error) {
  17. t1 := func() error {
  18. reply, err = house_rent.GardenHouseRentList(ctx, req)
  19. return err
  20. }
  21. return reply, rpctasker.Exec(ctx, t1)
  22. }
  23. func (c *Rcvr) HouseRentAddManager(ctx context.Context, req *pb_v1.HouseRentAddManagerRequest) (reply *pb_v1.HouseRentAddManagerReply, err error) {
  24. t1 := func() error {
  25. reply, err = house_rent.HouseRentAddManager(ctx, req)
  26. return err
  27. }
  28. return reply, rpctasker.Exec(ctx, t1)
  29. }
  30. func (c *Rcvr) HouseRentDelManager(ctx context.Context, req *pb_v1.HouseRentDelManagerRequest) (reply *pb_v1.HouseRentDelManagerReply, err error) {
  31. t1 := func() error {
  32. reply, err = house_rent.HouseRentDelManager(ctx, req)
  33. return err
  34. }
  35. return reply, rpctasker.Exec(ctx, t1)
  36. }
  37. func (c *Rcvr) HouseRentManagerList(ctx context.Context, req *pb_v1.HouseRentManagerListRequest) (reply *pb_v1.HouseRentManagerListReply, err error) {
  38. t1 := func() error {
  39. reply, err = house_rent.HouseRentManagerList(ctx, req)
  40. return err
  41. }
  42. return reply, rpctasker.Exec(ctx, t1)
  43. }
  44. // 租房预约看房
  45. func (c *Rcvr) HouseRentAppointmentAdd(ctx context.Context, req *pb_v1.HouseRentAppointmentAddRequest) (reply *pb_v1.HouseRentAppointmentAddReply, err error) {
  46. t1 := func() error {
  47. reply, err = house_rent.HouseRentAppointmentAdd(ctx, req)
  48. return err
  49. }
  50. return reply, rpctasker.Exec(ctx, t1)
  51. }
  52. // 租房预约列表
  53. func (c *Rcvr) HouseRentAppointmentList(ctx context.Context, req *pb_v1.HouseRentAppointmentListRequest) (reply *pb_v1.HouseRentAppointmentListReply, err error) {
  54. t1 := func() error {
  55. reply, err = house_rent.HouseRentAppointmentList(ctx, req)
  56. return err
  57. }
  58. return reply, rpctasker.Exec(ctx, t1)
  59. }
  60. // 删除租房预约
  61. func (c *Rcvr) HouseRentAppointmentDel(ctx context.Context, req *pb_v1.HouseRentAppointmentDelRequest) (reply *pb_v1.HouseRentAppointmentDelReply, err error) {
  62. t1 := func() error {
  63. reply, err = house_rent.HouseRentAppointmentDel(ctx, req)
  64. return err
  65. }
  66. return reply, rpctasker.Exec(ctx, t1)
  67. }
  68. // 因小区变动更新租房相关信息
  69. func (c *Rcvr) GardenHouseRentChangeField(ctx context.Context, req *pb_v1.GardenHouseRentChangeFieldRequest) (reply *pb_v1.GardenHouseRentChangeFieldReply, err error) {
  70. t1 := func() error {
  71. reply, err = house_rent.GardenHouseRentChangeField(ctx, req)
  72. return err
  73. }
  74. return reply, rpctasker.Exec(ctx, t1)
  75. }