Merge branch 'jng' into dev
This commit is contained in:
commit
bacedd206f
@ -156,7 +156,7 @@ func SendMsg(c *gin.Context) {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
service.Success1(c, "发送成功", res)
|
||||
return
|
||||
} else {
|
||||
res, err := service.AccountFieeProvider.SendMsg(context.Background(), &req)
|
||||
@ -165,7 +165,7 @@ func SendMsg(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
service.Success(c, res)
|
||||
service.Success1(c, "发送成功", res)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -728,23 +728,18 @@ func HomePageRoll(c *gin.Context) {
|
||||
|
||||
var roll []Roll
|
||||
for _, i := range res.BundleInfo {
|
||||
// Default values if user not found
|
||||
tel := ""
|
||||
name := i.BundleName // Use bundle name as fallback
|
||||
|
||||
if userInfo, exists := userMap[i.CustomerId]; exists && userInfo != nil {
|
||||
// Handle phone number masking
|
||||
tel = userInfo.TelNum
|
||||
if len(tel) >= 11 { // Standard 11-digit phone number
|
||||
tel = tel[:3] + "****" + tel[7:]
|
||||
} else if len(tel) >= 7 { // Short number handling
|
||||
tel = tel[:3] + "****" + tel[7:]
|
||||
if len(tel) >= 2 {
|
||||
masked := ""
|
||||
for j := 0; j < len(tel)-2; j++ {
|
||||
masked += "*"
|
||||
}
|
||||
tel = masked + tel[len(tel)-2:]
|
||||
}
|
||||
|
||||
// Use user's name if available (adjust this based on your actual user struct)
|
||||
// name = userInfo.Name // Uncomment if you want to use user's name instead
|
||||
}
|
||||
|
||||
roll = append(roll, Roll{
|
||||
Tel: tel,
|
||||
Name: name,
|
||||
|
Loading…
Reference in New Issue
Block a user