- use Must func when possible.

This commit is contained in:
gazebo
2018-06-14 09:54:19 +08:00
parent 5f6865666a
commit 9696e142ee
5 changed files with 76 additions and 12 deletions

15
platform/elmapi/order.go Normal file
View File

@@ -0,0 +1,15 @@
package elmapi
type ELMOrderInfo map[string]interface{}
func (e *ELMAPI) GetOrder(orderId string) (ELMOrderInfo, error) {
result, err := e.AccessELM("eleme.order.getOrder", map[string]interface{}{
"orderId": orderId,
})
if err == nil {
innerResult := ELMOrderInfo(result.Result.(map[string]interface{}))
return innerResult, nil
}
return nil, err
}