2023-06-15 11:14:19 +00:00
|
|
|
package gmodel
|
|
|
|
|
|
|
|
import "context"
|
|
|
|
|
|
|
|
func (p *FsPayModel) GetListByOrderNumber(ctx context.Context, sn string) (resp []FsPay, err error) {
|
|
|
|
err = p.db.WithContext(ctx).Model(&FsPay{}).Where("`order_number` = ? ", sn).Find(&resp).Error
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return resp, nil
|
|
|
|
}
|
2023-06-20 11:36:28 +00:00
|
|
|
|
2023-06-16 10:24:31 +00:00
|
|
|
func (p *FsPayModel) GetOrderPayList(ctx context.Context, sn string, payStatus int64, isRefund int64) (resp []FsPay, err error) {
|
|
|
|
err = p.db.WithContext(ctx).Model(&FsPay{}).Where("`order_number` = ? and `pay_status` = ? and `is_refund` = ?", sn, payStatus, isRefund).Find(&resp).Error
|
2023-06-20 11:36:28 +00:00
|
|
|
return resp, err
|
2023-06-16 10:24:31 +00:00
|
|
|
}
|