1
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
// MerchantIncoming 商户进件接口
|
||||
func (a *API) MerchantIncoming(incoming *MerchantIncomingReq) (string, string, error) {
|
||||
data := utils.Struct2Map(incoming, "", false)
|
||||
result, err := a.AccessAPI2(BaseTestUrl, IncomingAction, http.MethodPost, "", data)
|
||||
result, err := a.AccessAPI2(BaseProdUrl, IncomingAction, http.MethodPost, "", data)
|
||||
if err != nil {
|
||||
return "", "", err
|
||||
}
|
||||
@@ -21,7 +21,7 @@ func (a *API) MerchantIncoming(incoming *MerchantIncomingReq) (string, string, e
|
||||
// GetMerchantInfo 获取商户详细信息
|
||||
func (a *API) GetMerchantInfo(customerNo string) (*MerchantObj, error) {
|
||||
data := map[string]interface{}{"customerNo": customerNo}
|
||||
result, err := a.AccessAPI2(BaseTestChangeUrl, GetMerchantInfo, http.MethodPost, "", data)
|
||||
result, err := a.AccessAPI2(BaseProdChangeUrl, GetMerchantInfo, http.MethodPost, "", data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -39,7 +39,7 @@ func (a *API) GetMerchantInfo(customerNo string) (*MerchantObj, error) {
|
||||
|
||||
// GetOrganizationCode 获取城市组织代码 parentCode = 1 查所有,城市code看看和我们系统一致不
|
||||
func (a *API) GetOrganizationCode(parentCode string) ([]*OrganizationList, error) {
|
||||
result, err := a.AccessAPI(BaseTestUrl, OrganizationAction, http.MethodGet, parentCode, nil)
|
||||
result, err := a.AccessAPI(BaseProdUrl, OrganizationAction, http.MethodGet, parentCode, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -66,7 +66,7 @@ func (a *API) GetBankList(areaCode, bankName string) ([]*BankListResult, error)
|
||||
if bankName != "" {
|
||||
param["bankName"] = bankName
|
||||
}
|
||||
result, err := a.AccessAPI(BaseTestUrl, BankList, http.MethodGet, "", param)
|
||||
result, err := a.AccessAPI(BaseProdUrl, BankList, http.MethodGet, "", param)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -92,12 +92,12 @@ func (a *API) GetMerchantMcc(businessScene string, parentCode string) (data []*B
|
||||
retVal := map[string]interface{}{}
|
||||
|
||||
if parentCode != "" { // 获取小类
|
||||
retVal, err = a.AccessAPI(BaseTestUrl, MerchantMcc, http.MethodGet, parentCode, nil)
|
||||
retVal, err = a.AccessAPI(BaseProdUrl, MerchantMcc, http.MethodGet, parentCode, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
} else {
|
||||
retVal, err = a.AccessAPI(BaseTestUrl, MerchantMcc, http.MethodGet, "", map[string]interface{}{"businessScene": businessScene})
|
||||
retVal, err = a.AccessAPI(BaseProdUrl, MerchantMcc, http.MethodGet, "", map[string]interface{}{"businessScene": businessScene})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -126,7 +126,7 @@ func (a *API) MerchantFeeQuery(customerNo string, productCode string) (*Merchant
|
||||
if productCode != "" {
|
||||
param["productCode"] = productCode
|
||||
}
|
||||
result, err := a.AccessAPI(BaseTestChangeUrl, UpdateFeeQuery, http.MethodGet, customerNo, param)
|
||||
result, err := a.AccessAPI(BaseProdChangeUrl, UpdateFeeQuery, http.MethodGet, customerNo, param)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -145,7 +145,7 @@ func (a *API) MerchantFeeChange(param *FeeChangeReq, customerNo string) (int, st
|
||||
}
|
||||
mapParam := utils.Struct2Map(param, "", false)
|
||||
|
||||
result, err := a.AccessAPI2(BaseTestChangeUrl, UpdateFeeQuery, http.MethodPost, customerNo, mapParam)
|
||||
result, err := a.AccessAPI2(BaseProdChangeUrl, UpdateFeeQuery, http.MethodPost, customerNo, mapParam)
|
||||
|
||||
if err != nil {
|
||||
return 0, "", err
|
||||
@@ -168,7 +168,7 @@ func (a *API) UpdateSettleInfo(customerNo string, param *UpdateSettleInfoReq) (*
|
||||
}
|
||||
mapParam := utils.Struct2Map(param, "", false)
|
||||
|
||||
result, err := a.AccessAPI2(BaseTestChangeUrl, UpdateSettleChange, http.MethodPost, customerNo, mapParam)
|
||||
result, err := a.AccessAPI2(BaseProdChangeUrl, UpdateSettleChange, http.MethodPost, customerNo, mapParam)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
@@ -196,7 +196,7 @@ func (a *API) UpdateBaseInfo(customerNo string, changeBaseMap *UpdateBaseInfoReq
|
||||
newMap := utils.Struct2Map(changeBaseMap, "'", false)
|
||||
base := utils.MergeMaps(newMap, map[string]interface{}{"customerNo": customerNo})
|
||||
|
||||
result, err := a.AccessAPI2(BaseTestChangeUrl, UpdateBaseChange, http.MethodPost, "", base)
|
||||
result, err := a.AccessAPI2(BaseProdChangeUrl, UpdateBaseChange, http.MethodPost, "", base)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -209,7 +209,7 @@ func (a *API) UpdateBaseInfo(customerNo string, changeBaseMap *UpdateBaseInfoReq
|
||||
|
||||
// QueryMerchantReviewStatus 查询变更门店审核状态
|
||||
func (a *API) QueryMerchantReviewStatus(reviewRelatedId string) (string, string, error) {
|
||||
result, err := a.AccessAPI(BaseTestQueryReviewStatus, QueryChangeReviewStatus, http.MethodGet, "", map[string]interface{}{"reviewRelatedId": reviewRelatedId})
|
||||
result, err := a.AccessAPI(BaseProdQueryReviewStatus, QueryChangeReviewStatus, http.MethodGet, "", map[string]interface{}{"reviewRelatedId": reviewRelatedId})
|
||||
if err != nil {
|
||||
return "", "", err
|
||||
}
|
||||
@@ -227,7 +227,7 @@ func (a *API) QueryMerchantReviewStatus(reviewRelatedId string) (string, string,
|
||||
|
||||
// CheckImgIsSupplement 查看是否补充照片
|
||||
func (a *API) CheckImgIsSupplement(externalCustomerNo string) (*OpenCustomerExtImgVo, error) {
|
||||
result, err := a.AccessAPI(BaseTestChangeUrl, CheckImgIsSupplement, http.MethodGet, externalCustomerNo, nil)
|
||||
result, err := a.AccessAPI(BaseProdChangeUrl, CheckImgIsSupplement, http.MethodGet, externalCustomerNo, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -251,7 +251,7 @@ func (a *API) CheckImgIsSupplement(externalCustomerNo string) (*OpenCustomerExtI
|
||||
|
||||
// ImgSupplement 照片补充
|
||||
func (a *API) ImgSupplement(param *ImgSupplementReq) error {
|
||||
result, err := a.AccessAPI(BaseTestChangeUrl, ImgIsSupplement, http.MethodPost, "", utils.Struct2Map(param, "", false))
|
||||
result, err := a.AccessAPI(BaseProdChangeUrl, ImgIsSupplement, http.MethodPost, "", utils.Struct2Map(param, "", false))
|
||||
imgSupplementResp := &ImgSupplementResp{}
|
||||
if err = utils.Map2StructByJson(result, imgSupplementResp, false); err != nil {
|
||||
return err
|
||||
@@ -270,7 +270,7 @@ func (a *API) GetMerchantReportStatus(orgCode, agentNo, externalCustomerNo strin
|
||||
"agentNo": agentNo,
|
||||
"externalCustomerNo": externalCustomerNo,
|
||||
}
|
||||
result, err := a.AccessAPI2(BaseTestChangeUrl, ImgIsSupplement, http.MethodPost, "", param)
|
||||
result, err := a.AccessAPI2(BaseProdChangeUrl, ImgIsSupplement, http.MethodPost, "", param)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -299,7 +299,7 @@ func (a *API) GetMerchantTerminal(orgCode, agentNo, externalCustomerNo, posSn st
|
||||
"externalCustomerNo": externalCustomerNo,
|
||||
"posSn": posSn,
|
||||
}
|
||||
result, err := a.AccessAPI2(BaseTestChangeUrl, TerminalStatus, http.MethodPost, "", param)
|
||||
result, err := a.AccessAPI2(BaseProdChangeUrl, TerminalStatus, http.MethodPost, "", param)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -323,7 +323,7 @@ func (a *API) GetMerchantTerminal(orgCode, agentNo, externalCustomerNo, posSn st
|
||||
// SupplementBusinessLicense 变更营业执照
|
||||
func (a *API) SupplementBusinessLicense(param *BusinessLicenseReq) (string, string, error) {
|
||||
req := utils.Struct2Map(param, "", false)
|
||||
result, err := a.AccessAPI2(BaseTestChangeUrl, SupplementBusinessLicense, http.MethodPost, "", req)
|
||||
result, err := a.AccessAPI2(BaseProdChangeUrl, SupplementBusinessLicense, http.MethodPost, "", req)
|
||||
if err != nil {
|
||||
return "", "", err
|
||||
}
|
||||
@@ -341,7 +341,7 @@ func (a *API) SupplementBusinessLicense(param *BusinessLicenseReq) (string, stri
|
||||
|
||||
// UnionPayMerInfo 银联商户信息共享联防机制查询
|
||||
func (a *API) UnionPayMerInfo(larName, larIdcard string) (*DishonestPerson, error) {
|
||||
result, err := a.AccessAPI(BaseTestChangeUrl, UnionPayMerInfo, http.MethodPost, "", map[string]interface{}{
|
||||
result, err := a.AccessAPI(BaseProdChangeUrl, UnionPayMerInfo, http.MethodPost, "", map[string]interface{}{
|
||||
"larName": larName,
|
||||
"larIdcard": larIdcard,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user