Salon 侧全场景脱敏与拨号单次取号改造:收掉预约选择客户的完整手机号出口,新增按门店与订单上下文授权的拨号取号端点及隐私号占位渠道,前端改为脱敏展示加呼叫取号,并同步更新协议条款
自动发布开发环境 Nacos 配置 / publish (push) Successful in 24s
自动发布开发环境 Nacos 配置 / publish (push) Successful in 24s
This commit is contained in:
+2
@@ -28,6 +28,8 @@ public class RateLimitProperties {
|
||||
|
||||
private LimitRule orderCreate = new LimitRule(10, 60);
|
||||
|
||||
private LimitRule customerDial = new LimitRule(10, 60);
|
||||
|
||||
@Data
|
||||
/**
|
||||
* Purpose: LimitRule supports RateLimitProperties.java by holding or executing the limit rule business role.
|
||||
|
||||
+15
@@ -33,6 +33,8 @@ import com.xiaowang.jayucloud.salon.core.modules.shop.service.ShopService;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.shop.vo.ShopVO;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.shop.vo.ShopAppointmentSettingsVO;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.manager.vo.AppointmentCustomerOptionVO;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.privacy.service.CustomerDialService;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.privacy.vo.CustomerDialVO;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.user.dto.UserDTO;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.user.entity.UserDO;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.user.service.UserService;
|
||||
@@ -49,6 +51,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
@@ -65,6 +68,7 @@ public class AdminManagerController {
|
||||
private final ProductService productService;
|
||||
private final ShopService shopService;
|
||||
private final AdminScopeHelper adminScopeHelper;
|
||||
private final CustomerDialService customerDialService;
|
||||
|
||||
@GetMapping("/planning/calendar")
|
||||
@RequirePermission("schedule:view")
|
||||
@@ -179,6 +183,17 @@ public class AdminManagerController {
|
||||
return Result.success(userService.listCustomersForAppointment(page, size, keyword, shopId));
|
||||
}
|
||||
|
||||
@PostMapping("/customers/{customerId}/dial")
|
||||
@RequirePermission("user:view")
|
||||
public Result<CustomerDialVO> dialCustomer(HttpServletRequest request,
|
||||
HttpServletResponse response,
|
||||
@PathVariable Long customerId,
|
||||
@RequestParam Long orderId) {
|
||||
UserDO currentUser = adminScopeHelper.getCurrentUser(request);
|
||||
response.setHeader("Cache-Control", "no-store");
|
||||
return Result.success(customerDialService.dial(currentUser, customerId, orderId, request));
|
||||
}
|
||||
|
||||
@GetMapping("/customers/{id}")
|
||||
@RequirePermission("user:view")
|
||||
public Result<UserVO> customer(HttpServletRequest request, @PathVariable Long id) {
|
||||
|
||||
+3
@@ -11,7 +11,10 @@ public class AppointmentCustomerOptionVO {
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
private String name;
|
||||
/** 脱敏后的手机号,永不返回完整号码 */
|
||||
private String phone;
|
||||
/** 是否存在可拨打的手机号,呼叫按钮据此展示 */
|
||||
private Boolean phoneAvailable;
|
||||
private String avatar;
|
||||
private LocalDateTime createdAt;
|
||||
}
|
||||
|
||||
+7
-1
@@ -37,6 +37,7 @@ import com.xiaowang.jayucloud.salon.core.modules.file.support.ObjectStorageUrlSu
|
||||
import com.xiaowang.jayucloud.salon.core.modules.planning.support.PlanningCalendarSupport;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.planning.support.PlanningTodayOverviewSupport;
|
||||
import com.xiaowang.jayucloud.salon.core.support.id.TimeOrderedSnowflakeIdGenerator;
|
||||
import com.xiaowang.jayucloud.salon.core.support.privacy.PhoneCrypto;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.planning.vo.PlanningAppointmentVO;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.planning.vo.PlanningArtistCountVO;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.planning.vo.PlanningArtistVO;
|
||||
@@ -103,6 +104,7 @@ public class PlanningServiceImpl implements PlanningService {
|
||||
private final WechatSubscribeMessageService wechatSubscribeMessageService;
|
||||
private final TimeOrderedSnowflakeIdGenerator snowflakeIdGenerator;
|
||||
private final ObjectStorageUrlSupport objectStorageUrlSupport;
|
||||
private final PhoneCrypto phoneCrypto;
|
||||
|
||||
@Override
|
||||
public PlanningCalendarVO getCalendar(UserDO currentUser, LocalDate startDate, LocalDate endDate, Long artistId) {
|
||||
@@ -621,7 +623,11 @@ public class PlanningServiceImpl implements PlanningService {
|
||||
vo.setOrderItemId(item == null ? reservation == null ? null : reservation.getOrderItemId() : item.getId());
|
||||
vo.setCustomerId(customer == null ? order == null ? null : order.getUserId() : customer.getId());
|
||||
vo.setCustomerName(customer == null ? firstNonBlank(order == null ? null : order.getCustomerNameSnapshot(), "散客") : firstNonBlank(customer.getNickname(), customer.getAccount(), "到店客户"));
|
||||
vo.setCustomerPhone(customer == null ? order == null ? null : order.getCustomerPhoneSnapshot() : firstNonBlank(customer.getContactPhone(), customer.getPhone(), ""));
|
||||
String plainPhone = customer == null
|
||||
? (order == null ? null : order.getCustomerPhoneSnapshot())
|
||||
: firstNonBlank(customer.getContactPhone(), customer.getPhone(), "");
|
||||
vo.setCustomerPhone(phoneCrypto.mask(plainPhone));
|
||||
vo.setCustomerPhoneAvailable(StringUtils.hasText(plainPhone) && !plainPhone.contains("*"));
|
||||
vo.setProductId(product == null ? item == null ? null : item.getProductId() : product.getId());
|
||||
vo.setProductTitle(reservation != null && hasText(reservation.getProductTitle())
|
||||
? reservation.getProductTitle()
|
||||
|
||||
+3
@@ -11,7 +11,10 @@ public class PlanningAppointmentVO {
|
||||
private Long orderItemId;
|
||||
private Long customerId;
|
||||
private String customerName;
|
||||
/** 脱敏后的客户手机号,完整号码仅通过拨号取号端点单次获取 */
|
||||
private String customerPhone;
|
||||
/** 是否存在可拨打的手机号,呼叫按钮据此展示 */
|
||||
private Boolean customerPhoneAvailable;
|
||||
private Long productId;
|
||||
private String productTitle;
|
||||
private Long artistId;
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.xiaowang.jayucloud.salon.core.modules.privacy.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* 拨号取号配置。
|
||||
* provider 取值:direct(直拨真实号码)或 privacy-number(隐私号码,暂未对接)。
|
||||
*/
|
||||
@Data
|
||||
@Configuration
|
||||
@ConfigurationProperties(prefix = "jayucloud-salon.dial")
|
||||
public class DialProperties {
|
||||
|
||||
private String provider = "direct";
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.xiaowang.jayucloud.salon.core.modules.privacy.dial;
|
||||
|
||||
/**
|
||||
* 拨号返回模式。
|
||||
*/
|
||||
public final class DialMode {
|
||||
|
||||
public static final String DIRECT = "DIRECT";
|
||||
|
||||
public static final String PRIVACY_NUMBER = "PRIVACY_NUMBER";
|
||||
|
||||
private DialMode() {
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package com.xiaowang.jayucloud.salon.core.modules.privacy.dial;
|
||||
|
||||
/**
|
||||
* 单次取号结果,仅在本次响应中返回,不落库、不写日志、不缓存。
|
||||
*/
|
||||
public class DialTarget {
|
||||
|
||||
private final String mode;
|
||||
private final String dialNumber;
|
||||
private final int expiresInSeconds;
|
||||
|
||||
public DialTarget(String mode, String dialNumber, int expiresInSeconds) {
|
||||
this.mode = mode;
|
||||
this.dialNumber = dialNumber;
|
||||
this.expiresInSeconds = expiresInSeconds;
|
||||
}
|
||||
|
||||
public String getMode() {
|
||||
return mode;
|
||||
}
|
||||
|
||||
public String getDialNumber() {
|
||||
return dialNumber;
|
||||
}
|
||||
|
||||
public int getExpiresInSeconds() {
|
||||
return expiresInSeconds;
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.xiaowang.jayucloud.salon.core.modules.privacy.dial;
|
||||
|
||||
import com.xiaowang.jayucloud.salon.core.modules.order.entity.OrderDO;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.user.entity.UserDO;
|
||||
|
||||
/**
|
||||
* 拨号目标渠道。不同渠道返回不同的号码类型,调用方不得自行降级为真实号码。
|
||||
*/
|
||||
public interface DialTargetProvider {
|
||||
|
||||
/**
|
||||
* 配置项中使用的渠道标识,例如 direct、privacy-number。
|
||||
*/
|
||||
String providerKey();
|
||||
|
||||
/**
|
||||
* 解析本次拨号目标。
|
||||
*/
|
||||
DialTarget resolve(UserDO customer, OrderDO order);
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
package com.xiaowang.jayucloud.salon.core.modules.privacy.dial;
|
||||
|
||||
import com.xiaowang.jayucloud.salon.core.common.BusinessException;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.order.entity.OrderDO;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.user.entity.UserDO;
|
||||
import com.xiaowang.jayucloud.salon.core.support.privacy.PhoneCrypto;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* 直拨渠道:实时读取客户档案中的号码,仅在本次响应返回。
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class DirectDialTargetProvider implements DialTargetProvider {
|
||||
|
||||
private final PhoneCrypto phoneCrypto;
|
||||
|
||||
@Override
|
||||
public String providerKey() {
|
||||
return "direct";
|
||||
}
|
||||
|
||||
@Override
|
||||
public DialTarget resolve(UserDO customer, OrderDO order) {
|
||||
String plainPhone = resolvePlainPhone(customer, order);
|
||||
if (!StringUtils.hasText(plainPhone) || plainPhone.contains("*")) {
|
||||
throw new BusinessException(422, "该客户未登记可拨打的手机号");
|
||||
}
|
||||
return new DialTarget(DialMode.DIRECT, plainPhone.trim(), 0);
|
||||
}
|
||||
|
||||
private String resolvePlainPhone(UserDO customer, OrderDO order) {
|
||||
if (customer != null) {
|
||||
if (StringUtils.hasText(customer.getContactPhone())) {
|
||||
String contactPhone = phoneCrypto.decrypt(customer.getContactPhone());
|
||||
if (StringUtils.hasText(contactPhone)) {
|
||||
return contactPhone;
|
||||
}
|
||||
}
|
||||
if (StringUtils.hasText(customer.getPhone())) {
|
||||
String phone = phoneCrypto.decrypt(customer.getPhone());
|
||||
if (StringUtils.hasText(phone)) {
|
||||
return phone;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (order != null && StringUtils.hasText(order.getCustomerPhoneSnapshot())) {
|
||||
return phoneCrypto.decrypt(order.getCustomerPhoneSnapshot());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.xiaowang.jayucloud.salon.core.modules.privacy.dial;
|
||||
|
||||
import com.xiaowang.jayucloud.salon.core.common.BusinessException;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.order.entity.OrderDO;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.user.entity.UserDO;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 隐私号码占位渠道:未对接时明确报错,绝不静默回退为真实号码。
|
||||
*/
|
||||
@Component
|
||||
public class PlaceholderPrivacyNumberProvider implements DialTargetProvider {
|
||||
|
||||
public static final int NOT_CONFIGURED_CODE = 4250;
|
||||
|
||||
public static final String NOT_CONFIGURED_BUSINESS_CODE = "DIAL_PRIVACY_NUMBER_NOT_CONFIGURED";
|
||||
|
||||
@Override
|
||||
public String providerKey() {
|
||||
return "privacy-number";
|
||||
}
|
||||
|
||||
@Override
|
||||
public DialTarget resolve(UserDO customer, OrderDO order) {
|
||||
throw new BusinessException(NOT_CONFIGURED_CODE,
|
||||
"隐私号码服务未配置(" + NOT_CONFIGURED_BUSINESS_CODE + "),请联系平台开通");
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.xiaowang.jayucloud.salon.core.modules.privacy.service;
|
||||
|
||||
import com.xiaowang.jayucloud.salon.core.modules.privacy.vo.CustomerDialVO;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.user.entity.UserDO;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* 客户拨号取号服务:按门店范围与订单上下文单次授权,号码不落库、不写日志、不缓存。
|
||||
*/
|
||||
public interface CustomerDialService {
|
||||
|
||||
CustomerDialVO dial(UserDO currentUser, Long customerId, Long orderId, HttpServletRequest request);
|
||||
}
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
package com.xiaowang.jayucloud.salon.core.modules.privacy.service.impl;
|
||||
|
||||
import com.xiaowang.jayucloud.salon.core.common.BusinessException;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.order.entity.OrderDO;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.order.mapper.OrderMapper;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.privacy.config.DialProperties;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.privacy.dial.DialTarget;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.privacy.dial.DialTargetProvider;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.privacy.service.CustomerDialService;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.privacy.vo.CustomerDialVO;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.security.support.AdminScopeHelper;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.security.support.SecurityAuditActions;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.security.support.SecurityAuditSupport;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.user.entity.UserDO;
|
||||
import com.xiaowang.jayucloud.salon.core.modules.user.service.UserService;
|
||||
import com.xiaowang.jayucloud.salon.core.support.security.RequestThrottleService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 客户拨号取号实现:先校验门店范围与订单归属,再按配置渠道单次取号并记录审计。
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class CustomerDialServiceImpl implements CustomerDialService {
|
||||
|
||||
private static final String AUDIT_ACTION = SecurityAuditActions.CUSTOMER_DIAL;
|
||||
|
||||
private final AdminScopeHelper adminScopeHelper;
|
||||
private final UserService userService;
|
||||
private final OrderMapper orderMapper;
|
||||
private final RequestThrottleService requestThrottleService;
|
||||
private final SecurityAuditSupport securityAuditSupport;
|
||||
private final DialProperties dialProperties;
|
||||
private final List<DialTargetProvider> providers;
|
||||
|
||||
@Override
|
||||
public CustomerDialVO dial(UserDO currentUser, Long customerId, Long orderId, HttpServletRequest request) {
|
||||
adminScopeHelper.requireShopContext(currentUser, "请先选择店铺后再拨号");
|
||||
Long currentShopId = currentUser.getShopId();
|
||||
requestThrottleService.checkCustomerDial(request, currentUser.getId());
|
||||
|
||||
UserDO customer = userService.getById(customerId);
|
||||
if (customer == null || Objects.equals(1, customer.getIsDelete()) || !Objects.equals(0, customer.getType())) {
|
||||
throw new BusinessException(404, "客户不存在");
|
||||
}
|
||||
adminScopeHelper.ensureUserAccessibleInCurrentShop(currentUser, customerId, "无权拨打其他店铺客户");
|
||||
|
||||
OrderDO order = orderMapper.selectById(orderId);
|
||||
if (order == null || Objects.equals(1, order.getIsDelete()) || !Objects.equals(customerId, order.getUserId())) {
|
||||
throw new BusinessException(403, "该客户与订单不匹配,或无权拨打");
|
||||
}
|
||||
if (!Objects.equals(currentShopId, order.getShopId())) {
|
||||
throw new BusinessException(403, "无权拨打其他店铺订单客户");
|
||||
}
|
||||
|
||||
DialTargetProvider provider = resolveProvider();
|
||||
String reason = "customerId=" + customerId + ";orderId=" + orderId + ";provider=" + provider.providerKey();
|
||||
try {
|
||||
DialTarget target = provider.resolve(customer, order);
|
||||
securityAuditSupport.success(request, AUDIT_ACTION, reason + ";mode=" + target.getMode() + ";result=SUCCESS");
|
||||
CustomerDialVO vo = new CustomerDialVO();
|
||||
vo.setMode(target.getMode());
|
||||
vo.setDialNumber(target.getDialNumber());
|
||||
vo.setExpiresInSeconds(target.getExpiresInSeconds());
|
||||
return vo;
|
||||
} catch (BusinessException exception) {
|
||||
securityAuditSupport.fail(request, AUDIT_ACTION,
|
||||
reason + ";result=FAIL;errorCode=" + exception.getCode());
|
||||
throw exception;
|
||||
} catch (RuntimeException exception) {
|
||||
securityAuditSupport.fail(request, AUDIT_ACTION,
|
||||
reason + ";result=FAIL;errorType=" + exception.getClass().getSimpleName());
|
||||
throw exception;
|
||||
}
|
||||
}
|
||||
|
||||
private DialTargetProvider resolveProvider() {
|
||||
String configured = StringUtils.hasText(dialProperties.getProvider())
|
||||
? dialProperties.getProvider().trim()
|
||||
: "direct";
|
||||
for (DialTargetProvider provider : providers) {
|
||||
if (configured.equalsIgnoreCase(provider.providerKey())) {
|
||||
return provider;
|
||||
}
|
||||
}
|
||||
throw new BusinessException(500, "拨号渠道配置无效(jayucloud-salon.dial.provider=" + configured + ")");
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.xiaowang.jayucloud.salon.core.modules.privacy.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 单次拨号取号响应。
|
||||
*/
|
||||
@Data
|
||||
public class CustomerDialVO {
|
||||
|
||||
/** DIRECT:真实号码;PRIVACY_NUMBER:隐私号码 */
|
||||
private String mode;
|
||||
|
||||
/** 本次可拨打的号码,仅用于当前客户端一次性拨号 */
|
||||
private String dialNumber;
|
||||
|
||||
/** 号码有效秒数,DIRECT 为 0 表示不设时效 */
|
||||
private Integer expiresInSeconds;
|
||||
}
|
||||
+1
@@ -108,6 +108,7 @@ public final class SecurityAuditActions {
|
||||
public static final String ANALYTICS_VIEW = "ANALYTICS_VIEW";
|
||||
public static final String PERFORMANCE_VIEW = "PERFORMANCE_VIEW";
|
||||
public static final String SECURE_CONFIG_UPDATE = "SECURE_CONFIG_UPDATE";
|
||||
public static final String CUSTOMER_DIAL = "CUSTOMER_DIAL";
|
||||
|
||||
private SecurityAuditActions() {
|
||||
}
|
||||
|
||||
+6
-2
@@ -629,7 +629,9 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserDO> implements
|
||||
AppointmentCustomerOptionVO customer = new AppointmentCustomerOptionVO();
|
||||
customer.setId(user.getId());
|
||||
customer.setName(user.getNickname());
|
||||
customer.setPhone(resolveCustomerPhone(user));
|
||||
String plainPhone = resolveCustomerPhone(user);
|
||||
customer.setPhone(phoneCrypto.mask(plainPhone));
|
||||
customer.setPhoneAvailable(StringUtils.hasText(plainPhone));
|
||||
customer.setAvatar(resolveAccessibleAvatar(user.getAvatar()));
|
||||
customer.setCreatedAt(user.getCreateTime());
|
||||
return customer;
|
||||
@@ -658,7 +660,9 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserDO> implements
|
||||
AppointmentCustomerOptionVO option = new AppointmentCustomerOptionVO();
|
||||
option.setId(user.getId());
|
||||
option.setName(user.getNickname());
|
||||
option.setPhone(resolveCustomerPhone(user));
|
||||
String plainPhone = resolveCustomerPhone(user);
|
||||
option.setPhone(phoneCrypto.mask(plainPhone));
|
||||
option.setPhoneAvailable(StringUtils.hasText(plainPhone));
|
||||
option.setAvatar(resolveAccessibleAvatar(user.getAvatar()));
|
||||
option.setCreatedAt(user.getCreateTime());
|
||||
return option;
|
||||
|
||||
+8
@@ -90,6 +90,14 @@ public class RequestThrottleService {
|
||||
assertAllowed("agreement-read", request, sanitize(agreementType), rateLimitProperties.getAgreementRead(), "协议读取过于频繁,请稍后再试");
|
||||
}
|
||||
|
||||
/**
|
||||
* 客户拨号取号按用户维度限流,避免管理员批量拉取完整号码。
|
||||
*/
|
||||
public void checkCustomerDial(HttpServletRequest request, Long userId) {
|
||||
assertAllowed("customer-dial", request, userId == null ? "" : String.valueOf(userId),
|
||||
rateLimitProperties.getCustomerDial(), "拨号取号过于频繁,请稍后再试");
|
||||
}
|
||||
|
||||
/**
|
||||
* Purpose: checkAuthenticatedWrite supports RequestThrottleService.java by holding or executing the check authenticated write business role.
|
||||
* Usage: reference this method from the owning layer and pass validated inputs before reading or updating related state.
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
-- 隐私政策与用户协议条款修订:对齐“全场景脱敏 + 拨号按需单次取号 + 可接隐私号码”口径
|
||||
-- 版本:2026.11.04(V18)
|
||||
-- 说明:仅更新当前生效版本的条款正文,不新增协议版本、不触发重新同意;静态 HTML 正文由 public/legal 读库渲染,不再维护副本。
|
||||
|
||||
UPDATE t_legal_agreement
|
||||
SET content = REPLACE(
|
||||
content,
|
||||
'常规页面展示脱敏号码,完整号码仅在必要业务场景和权限校验通过时展示。',
|
||||
'所有页面统一脱敏展示;确需联系客户时,须通过门店数据权限与预约/订单上下文校验后按需单次取号拨号,不批量展示完整号码;接入隐私号码服务时返回临时隐私号码。'
|
||||
),
|
||||
update_time = NOW()
|
||||
WHERE agreement_type = 'USER_TERMS'
|
||||
AND status = 1
|
||||
AND is_delete = 0
|
||||
AND content LIKE '%常规页面展示脱敏号码,完整号码仅在必要业务场景和权限校验通过时展示。%';
|
||||
|
||||
UPDATE t_legal_agreement
|
||||
SET content = REPLACE(
|
||||
content,
|
||||
'常规客户列表、详情页、日志、导出文件、通知消息及面向第三方的展示,手机号一律脱敏。',
|
||||
'全部客户列表、详情页、日志、导出文件、通知消息及面向第三方的展示,手机号一律脱敏。'
|
||||
),
|
||||
update_time = NOW()
|
||||
WHERE agreement_type = 'PRIVACY_POLICY'
|
||||
AND status = 1
|
||||
AND is_delete = 0
|
||||
AND content LIKE '%常规客户列表、详情页、日志、导出文件、通知消息及面向第三方的展示,手机号一律脱敏。%';
|
||||
|
||||
UPDATE t_legal_agreement
|
||||
SET content = REPLACE(
|
||||
content,
|
||||
'仅在门店预约选择客户、需要与客户进行业务联系等必要场景,且请求通过门店数据权限校验时,才向授权人员展示完整号码。',
|
||||
'确需与客户进行业务联系时,由授权人员在门店数据权限和预约/订单上下文校验通过后按需单次取号:直拨模式仅返回本次拨号号码,隐私号码模式返回临时隐私号码;完整号码不下发列表、不落库、不写日志、不进入缓存,且隐私号码未开通时不会回退为真实号码。'
|
||||
),
|
||||
update_time = NOW()
|
||||
WHERE agreement_type = 'PRIVACY_POLICY'
|
||||
AND status = 1
|
||||
AND is_delete = 0
|
||||
AND content LIKE '%仅在门店预约选择客户、需要与客户进行业务联系等必要场景,且请求通过门店数据权限校验时,才向授权人员展示完整号码。%';
|
||||
|
||||
UPDATE t_legal_agreement
|
||||
SET content = REPLACE(
|
||||
content,
|
||||
'客户本人资料页、员工账号资料页默认展示脱敏号码;',
|
||||
'客户本人资料页、员工账号资料页一律展示脱敏号码;'
|
||||
),
|
||||
update_time = NOW()
|
||||
WHERE agreement_type = 'PRIVACY_POLICY'
|
||||
AND status = 1
|
||||
AND is_delete = 0
|
||||
AND content LIKE '%客户本人资料页、员工账号资料页默认展示脱敏号码;%';
|
||||
Reference in New Issue
Block a user