@@ -15,7 +15,7 @@ type PrRepo interface {
1515 UpdatePatronRequest (ctx common.ExtendedContext , params UpdatePatronRequestParams ) (PatronRequest , error )
1616 CreatePatronRequest (ctx common.ExtendedContext , params CreatePatronRequestParams ) (PatronRequest , error )
1717 DeletePatronRequest (ctx common.ExtendedContext , id string ) error
18- GetPatronRequestBySupplierSymbolAndRequesterReqId (ctx common.ExtendedContext , supplierSymbol string , requesterReId string ) (PatronRequest , error )
18+ GetPatronRequestBySupplierSymbolAndRequesterReqId (ctx common.ExtendedContext , supplierSymbol string , requesterReId string , side PatronRequestSide ) (PatronRequest , error )
1919 GetNextHrid (ctx common.ExtendedContext , prefix string ) (string , error )
2020 SaveItem (ctx common.ExtendedContext , params SaveItemParams ) (Item , error )
2121 GetItemById (ctx common.ExtendedContext , id string ) (Item , error )
@@ -56,7 +56,19 @@ func (r *PgPrRepo) ListPatronRequests(ctx common.ExtendedContext, params ListPat
5656 fullCount = rows [0 ].FullCount
5757 for _ , r := range rows {
5858 fullCount = r .FullCount
59- list = append (list , r .PatronRequest )
59+ list = append (list , PatronRequest {
60+ ID : r .ID ,
61+ Timestamp : r .Timestamp ,
62+ IllRequest : r .IllRequest ,
63+ State : PatronRequestState (r .State ),
64+ Side : PatronRequestSide (r .Side ),
65+ Patron : r .Patron ,
66+ RequesterSymbol : r .RequesterSymbol ,
67+ SupplierSymbol : r .SupplierSymbol ,
68+ Tenant : r .Tenant ,
69+ RequesterReqID : r .RequesterReqID ,
70+ NeedsAttention : r .NeedsAttention ,
71+ })
6072 }
6173 } else {
6274 params .Limit = 1
@@ -83,7 +95,7 @@ func (r *PgPrRepo) DeletePatronRequest(ctx common.ExtendedContext, id string) er
8395 return r .queries .DeletePatronRequest (ctx , r .GetConnOrTx (), id )
8496}
8597
86- func (r * PgPrRepo ) GetPatronRequestBySupplierSymbolAndRequesterReqId (ctx common.ExtendedContext , supplierSymbol string , requesterReId string ) (PatronRequest , error ) {
98+ func (r * PgPrRepo ) GetPatronRequestBySupplierSymbolAndRequesterReqId (ctx common.ExtendedContext , supplierSymbol string , requesterReId string , side PatronRequestSide ) (PatronRequest , error ) {
8799 row , err := r .queries .GetPatronRequestBySupplierSymbolAndRequesterReqId (ctx , r .GetConnOrTx (), GetPatronRequestBySupplierSymbolAndRequesterReqIdParams {
88100 SupplierSymbol : pgtype.Text {
89101 String : supplierSymbol ,
@@ -93,6 +105,7 @@ func (r *PgPrRepo) GetPatronRequestBySupplierSymbolAndRequesterReqId(ctx common.
93105 String : requesterReId ,
94106 Valid : true ,
95107 },
108+ Side : side ,
96109 })
97110 return row .PatronRequest , err
98111}
0 commit comments