aa
This commit is contained in:
@@ -566,6 +566,30 @@ func (a *API) AccessStorePage4(fullURL string, values string) (retVal interface{
|
||||
return retVal, err
|
||||
}
|
||||
|
||||
func (a *API) AccessStorePage5(fullURL string, params map[string]interface{}) (retVal interface{}, err error) {
|
||||
if a.GetCookieCount() == 0 {
|
||||
return nil, fmt.Errorf("需要设置Store Cookie才能使用此方法")
|
||||
}
|
||||
err = platformapi.AccessPlatformAPIWithRetry(a.client,
|
||||
func() *http.Request {
|
||||
request, _ := http.NewRequest(http.MethodPost, fullURL, strings.NewReader(utils.Map2URLValues(params).Encode()))
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
a.FillRequestCookies(request)
|
||||
return request
|
||||
},
|
||||
a.config,
|
||||
func(response *http.Response, bodyStr string, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
||||
if jsonResult1 == nil {
|
||||
return platformapi.ErrLevelRecoverableErr, fmt.Errorf("mapData is nil")
|
||||
}
|
||||
retVal = jsonResult1
|
||||
return "", err
|
||||
})
|
||||
return retVal, err
|
||||
}
|
||||
|
||||
func (a *API) AccessStorePage(fullURL string, params map[string]interface{}, isPost bool) (retVal map[string]interface{}, err error) {
|
||||
result, err := a.AccessStorePage2(fullURL, params, isPost, ResultKeyResult)
|
||||
if err == nil {
|
||||
@@ -1313,3 +1337,32 @@ func (a *API) SetCode(code, jdAppID string) (err error) {
|
||||
}, true, "")
|
||||
return err
|
||||
}
|
||||
|
||||
type QueryMemberTransListByConditionResult struct {
|
||||
Bindingtypestr string `json:"bindingTypeStr"`
|
||||
Cardcreatetime string `json:"cardcreateTime"`
|
||||
Endtimestr string `json:"endTimeStr"`
|
||||
Fromsourcestr string `json:"fromSourceStr"`
|
||||
Fromstorename string `json:"fromStoreName,omitempty"`
|
||||
Merchantcardno string `json:"merchantCardNo"`
|
||||
Orgcodestr string `json:"orgCodeStr"`
|
||||
Paymoney string `json:"payMoney"`
|
||||
Starttimestr string `json:"startTimeStr"`
|
||||
Validtype int `json:"validType"`
|
||||
Createtime string `json:"createTime,omitempty"`
|
||||
Dealstatus int `json:"dealStatus,omitempty"`
|
||||
Orderid string `json:"orderId,omitempty"`
|
||||
Orderstatusstr string `json:"orderStatusStr,omitempty"`
|
||||
Ordertypestr string `json:"orderTypeStr,omitempty"`
|
||||
}
|
||||
|
||||
func (a *API) QueryMemberTransListByCondition(page, pageSize int) (queryMemberTransListByConditionResult []*QueryMemberTransListByConditionResult, err error) {
|
||||
result, err := a.AccessStorePage5("https://mermem-sj.jddj.com/memberQuery/queryMemberTransListByCondition", map[string]interface{}{
|
||||
"page": page,
|
||||
"rows": pageSize,
|
||||
})
|
||||
if err == nil {
|
||||
utils.Map2StructByJson(result.(map[string]interface{})["rows"], &queryMemberTransListByConditionResult, false)
|
||||
}
|
||||
return queryMemberTransListByConditionResult, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user