|
@@ -125,11 +125,11 @@ func (h *HTFuturesAccountController) SyncCustomerRiskLevel() {
|
|
h.FailedResult("身份证号不能为空", result)
|
|
h.FailedResult("身份证号不能为空", result)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- //if !utils.IsValidIDCard(custInfo.IdNo) && !utils.IsValidOldIDCard(custInfo.IdNo) {
|
|
|
|
- // err = exception.New(exception.SyncRiskError)
|
|
|
|
- // h.FailedResult("身份证号不合法", result)
|
|
|
|
- // return
|
|
|
|
- //}
|
|
|
|
|
|
+ if custInfo.DealMobileTel != custInfo.MobileTel {
|
|
|
|
+ err = exception.New(exception.SyncRiskError)
|
|
|
|
+ h.FailedResult(fmt.Sprintf("柜台预留手机号码不一致,测评手机:%s,柜台预留手机:%s", custInfo.DealMobileTel, custInfo.MobileTel), result)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
if riskInfo.CorpRiskLevel == "" {
|
|
if riskInfo.CorpRiskLevel == "" {
|
|
err = exception.New(exception.SyncRiskError)
|
|
err = exception.New(exception.SyncRiskError)
|
|
h.FailedResult("风险等级不能为空", result)
|
|
h.FailedResult("风险等级不能为空", result)
|
|
@@ -176,6 +176,7 @@ func (h *HTFuturesAccountController) SyncCustomerAccountInfo() {
|
|
h.GetPostParams(syncCustomerRiskLevelReq)
|
|
h.GetPostParams(syncCustomerRiskLevelReq)
|
|
custInfo := syncCustomerRiskLevelReq.CustInfo
|
|
custInfo := syncCustomerRiskLevelReq.CustInfo
|
|
riskInfo := syncCustomerRiskLevelReq.RiskInfo
|
|
riskInfo := syncCustomerRiskLevelReq.RiskInfo
|
|
|
|
+
|
|
if custInfo.ClientName == "" {
|
|
if custInfo.ClientName == "" {
|
|
err = exception.New(exception.SyncRiskError)
|
|
err = exception.New(exception.SyncRiskError)
|
|
h.FailedResult("用户名字不能为空", result)
|
|
h.FailedResult("用户名字不能为空", result)
|
|
@@ -191,6 +192,7 @@ func (h *HTFuturesAccountController) SyncCustomerAccountInfo() {
|
|
h.FailedResult("身份证号不能为空", result)
|
|
h.FailedResult("身份证号不能为空", result)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+
|
|
//if !utils.IsValidIDCard(custInfo.IdNo) && !utils.IsValidOldIDCard(custInfo.IdNo) {
|
|
//if !utils.IsValidIDCard(custInfo.IdNo) && !utils.IsValidOldIDCard(custInfo.IdNo) {
|
|
// err = exception.New(exception.SyncRiskError)
|
|
// err = exception.New(exception.SyncRiskError)
|
|
// h.FailedResult("身份证号不合法", result)
|
|
// h.FailedResult("身份证号不合法", result)
|
|
@@ -206,6 +208,7 @@ func (h *HTFuturesAccountController) SyncCustomerAccountInfo() {
|
|
h.FailedResult("风险测评有效结束日期不能为空", result)
|
|
h.FailedResult("风险测评有效结束日期不能为空", result)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+
|
|
err = userService.UpdateRiskLevelInfo(userService.RiskLevelInfoDTO{
|
|
err = userService.UpdateRiskLevelInfo(userService.RiskLevelInfoDTO{
|
|
Name: custInfo.ClientName,
|
|
Name: custInfo.ClientName,
|
|
PhoneNumber: custInfo.MobileTel,
|
|
PhoneNumber: custInfo.MobileTel,
|
|
@@ -231,10 +234,11 @@ type SyncCustomerRiskLevelReq struct {
|
|
}
|
|
}
|
|
|
|
|
|
type CustInfo struct {
|
|
type CustInfo struct {
|
|
- MobileTel string `json:"mobile_tel"`
|
|
|
|
- ClientName string `json:"client_name"`
|
|
|
|
- IdKind string `json:"id_kind"`
|
|
|
|
- IdNo string `json:"id_no"`
|
|
|
|
|
|
+ MobileTel string `json:"mobile_tel"`
|
|
|
|
+ DealMobileTel string `json:"deal_mobile_tel"`
|
|
|
|
+ ClientName string `json:"client_name"`
|
|
|
|
+ IdKind string `json:"id_kind"`
|
|
|
|
+ IdNo string `json:"id_no"`
|
|
}
|
|
}
|
|
|
|
|
|
type RiskInfo struct {
|
|
type RiskInfo struct {
|