FakeOrderQueryRaw
This commit is contained in:
@@ -6,6 +6,29 @@ import (
|
|||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func (a *API) FakeOrderQueryRaw(jdParams map[string]interface{}) (retVal []map[string]interface{}, totalCount int, err error) {
|
||||||
|
orderList, totalCount, err := a.AccessAPIHavePage("order/orderQuery", jdParams, nil, nil, nil)
|
||||||
|
if err == nil {
|
||||||
|
for _, v := range orderList {
|
||||||
|
retVal = append(retVal, v.(map[string]interface{}))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return retVal, totalCount, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (a *API) FakeQuerySingleOrderRaw(orderId string) (map[string]interface{}, error) {
|
||||||
|
jdParams := make(map[string]interface{})
|
||||||
|
jdParams["orderId"] = orderId
|
||||||
|
result, _, err := a.FakeOrderQueryRaw(jdParams)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if len(result) == 0 {
|
||||||
|
return nil, ErrCanNotFindOrder
|
||||||
|
}
|
||||||
|
return result[0], nil
|
||||||
|
}
|
||||||
|
|
||||||
func (a *API) FakeOrderQuery(jdParams map[string]interface{}) (retVal []*OrderInfo, totalCount int, err error) {
|
func (a *API) FakeOrderQuery(jdParams map[string]interface{}) (retVal []*OrderInfo, totalCount int, err error) {
|
||||||
orderList, totalCount, err := a.AccessAPIHavePage("order/orderQuery", jdParams, nil, nil, nil)
|
orderList, totalCount, err := a.AccessAPIHavePage("order/orderQuery", jdParams, nil, nil, nil)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user