|
@@ -235,7 +235,7 @@ func (h *HTFuturesAccountController) SyncCustomerRiskLevel() {
|
|
|
// @router /v1/syncAccountInfo/ [post]
|
|
|
func (h *HTFuturesAccountController) SyncCustomerAccountInfo() {
|
|
|
controllers.WrapWebhook(&h.WebHookController, func() (result *controllers.WrapData, err error) {
|
|
|
- result = h.InitWrapData("同步开户信息")
|
|
|
+ result = h.InitWrapData("同步开户信息失败")
|
|
|
syncCustomerRiskLevelReq := new(AccountOpenInfoReq)
|
|
|
h.GetPostParams(syncCustomerRiskLevelReq)
|
|
|
if ThirdRateLimitFilter(syncCustomerRiskLevelReq.IdNo) != 200 {
|
|
@@ -319,7 +319,7 @@ func (h *HTFuturesAccountController) SyncCustomerAccountInfo() {
|
|
|
// @router /v1/syncIDInfo/ [post]
|
|
|
func (h *HTFuturesAccountController) SyncCustomerIDInfo() {
|
|
|
controllers.WrapWebhook(&h.WebHookController, func() (result *controllers.WrapData, err error) {
|
|
|
- result = h.InitWrapData("证件信息信息")
|
|
|
+ result = h.InitWrapData("证件有效期更新失败")
|
|
|
syncCustomerRiskLevelReq := new(IDInfoReq)
|
|
|
h.GetPostParams(syncCustomerRiskLevelReq)
|
|
|
if ThirdRateLimitFilter(syncCustomerRiskLevelReq.IdNo) != 200 {
|
|
@@ -329,12 +329,12 @@ func (h *HTFuturesAccountController) SyncCustomerIDInfo() {
|
|
|
}
|
|
|
|
|
|
if syncCustomerRiskLevelReq.MobileTel == "" {
|
|
|
- err = exception.New(exception.SyncAccountStatusError)
|
|
|
+ err = exception.New(exception.SyncIdInfoError)
|
|
|
h.FailedResult("手机号码不能为空", result)
|
|
|
return
|
|
|
}
|
|
|
if _, ok := idKindMap[syncCustomerRiskLevelReq.IdKind]; !ok {
|
|
|
- err = exception.New(exception.SyncAccountStatusError)
|
|
|
+ err = exception.New(exception.SyncIdInfoError)
|
|
|
validIdKind := make([]string, 0)
|
|
|
for _, v := range idKindMap {
|
|
|
validIdKind = append(validIdKind, string(v))
|
|
@@ -343,24 +343,24 @@ func (h *HTFuturesAccountController) SyncCustomerIDInfo() {
|
|
|
return
|
|
|
}
|
|
|
if syncCustomerRiskLevelReq.IdNo == "" {
|
|
|
- err = exception.New(exception.SyncAccountStatusError)
|
|
|
+ err = exception.New(exception.SyncIdInfoError)
|
|
|
h.FailedResult("证号号码不能为空", result)
|
|
|
return
|
|
|
}
|
|
|
idBeginDate, parseErr := time.Parse(time.DateOnly, syncCustomerRiskLevelReq.IdBeginDate)
|
|
|
if parseErr != nil {
|
|
|
- err = exception.New(exception.SyncAccountStatusError)
|
|
|
+ err = exception.New(exception.SyncIdInfoError)
|
|
|
h.FailedResult("身份证有效开始时间不合法["+syncCustomerRiskLevelReq.IdBeginDate+"]", result)
|
|
|
return
|
|
|
}
|
|
|
idEndDate, parseErr := time.Parse(time.DateOnly, syncCustomerRiskLevelReq.IdEndDate)
|
|
|
if parseErr != nil {
|
|
|
- err = exception.New(exception.SyncAccountStatusError)
|
|
|
+ err = exception.New(exception.SyncIdInfoError)
|
|
|
h.FailedResult("身份证有效结束时间不合法["+syncCustomerRiskLevelReq.IdEndDate+"]", result)
|
|
|
return
|
|
|
}
|
|
|
if idEndDate.Before(idBeginDate) {
|
|
|
- err = exception.New(exception.SyncAccountStatusError)
|
|
|
+ err = exception.New(exception.SyncIdInfoError)
|
|
|
h.FailedResult("身份证有效结束时间不合法,开始日期不能大于结束日期", result)
|
|
|
return
|
|
|
}
|
|
@@ -374,10 +374,10 @@ func (h *HTFuturesAccountController) SyncCustomerIDInfo() {
|
|
|
if err != nil {
|
|
|
logger.ErrorWithTraceId(h.Ctx, err.Error())
|
|
|
h.FailedResult(err.Error(), result)
|
|
|
- err = exception.New(exception.SyncAccountStatusError)
|
|
|
+ err = exception.New(exception.SyncIdInfoError)
|
|
|
return
|
|
|
}
|
|
|
- result = h.InitWrapData("同步开户信息成功")
|
|
|
+ result = h.InitWrapData("同步证件有效期信息成功")
|
|
|
h.SuccessResult("success", syncCustomerRiskLevelReq, result)
|
|
|
return
|
|
|
})
|