This commit is contained in:
邹宗楠
2025-07-29 11:34:42 +08:00
parent 82f70f317d
commit 9fb8c12120
3 changed files with 14 additions and 10 deletions

View File

@@ -10,7 +10,6 @@ import (
"git.rosy.net.cn/jx-callback/business/model/dao"
"git.rosy.net.cn/jx-callback/business/partner"
"git.rosy.net.cn/jx-callback/globals/api"
"strings"
"time"
)
@@ -113,16 +112,20 @@ func GetMerchantInfo(merchantNo string) (*lakala.MerchantObj, error) {
}
if merchantInfo.TermNo == "" {
termNo := make([]string, 0, 0)
for _, v := range result.TerminalInfo {
termNo = append(termNo, v.TermNoList...)
}
if len(termNo) != model.NO {
merchantInfo.TermNo = strings.Join(termNo, ",")
dao.UpdateEntity(db, merchantInfo, "TermNo")
}
//termNo := make([]string, 0, 0)
//for _, v := range result.TerminalInfo {
// termNo = append(termNo, v.TermNoList...)
//}
//if len(termNo) != model.NO {
// merchantInfo.TermNo = strings.Join(termNo, ",")
// dao.UpdateEntity(db, merchantInfo, "TermNo")
//}
merchantInfo.TermNo = result.Customer.TermNo
}
merchantInfo.MerchantStatus = result.Customer.CustomerStatus
if merchantInfo.MerchantNo2 == "" {
merchantInfo.MerchantNo2 = result.Customer.ExternalCustomerNo
}
dao.UpdateEntity(db, merchantInfo, "TermNo", "MerchantStatus")
return result, err