|
@@ -156,11 +156,17 @@ func (h *HTFuturesAccountController) SyncCustomerRiskLevel() {
|
|
|
h.FailedResult("风险测评有效结束日期不合法["+riskInfo.CorpEndDate+"]", result)
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
+ if risk, ok := riskMappingMap[riskInfo.CorpRiskLevel]; ok {
|
|
|
+ riskInfo.CorpRiskLevel = risk
|
|
|
+ } else {
|
|
|
+ err = exception.New(exception.SyncRiskError)
|
|
|
+ h.FailedResult(fmt.Sprintf("风险等级不合法,应答结果:%s", riskInfo.CorpRiskLevel), result)
|
|
|
+ return
|
|
|
+ }
|
|
|
err = userService.UpdateRiskLevelInfo(userService.RiskLevelInfoDTO{
|
|
|
Name: custInfo.ClientName,
|
|
|
PhoneNumber: custInfo.DealMobileTel,
|
|
|
- RiskLevel: fmt.Sprintf("C%s", riskInfo.CorpRiskLevel),
|
|
|
+ RiskLevel: riskInfo.CorpRiskLevel,
|
|
|
RiskValidEndDate: riskEndDate.Format(time.DateOnly),
|
|
|
})
|
|
|
if err != nil {
|