刘帅
2026-09-29 dcb96821f905f3fd93c059d8703517bdcac4d336
cloud-server-management/src/main/java/com/dsh/guns/modular/system/model/TStoreListVo.java
@@ -47,7 +47,23 @@
     * 列表对外的 phone 统一返回可用的店长手机号。
     */
    public String getPhone() {
        return (phone == null || phone.trim().isEmpty()) ? userPhone : phone;
        return hasText(phone) ? phone : defaultString(userPhone);
    }
    /**
     * 兼容历史门店:当店长资料中未维护 phone 时,列表仍返回可用的门店手机号。
     * 返回空字符串而非 null,避免不同环境的 JSON 忽略 null 配置导致字段消失。
     */
    public String getUserPhone() {
        return hasText(userPhone) ? userPhone : defaultString(phone);
    }
    private boolean hasText(String value) {
        return value != null && !value.trim().isEmpty();
    }
    private String defaultString(String value) {
        return value == null ? "" : value;
    }
    private String account;