对接3方系统,开通新人特权

This commit is contained in:
2026-05-16 15:40:04 +08:00
parent d66daf375c
commit 3e753ba8b2
5 changed files with 191 additions and 21 deletions

View File

@@ -31,4 +31,40 @@ public class HxrAdminProperties {
* 仅 PHPSID 会话值(不含 {@code PHPSID=} 前缀);在 {@link #cookie} 为空时使用。
*/
private String phpsid = "";
/**
* 用户列表接口 URL可含默认查询串实际请求会覆盖 {@code mobile} 等参数。
*/
private String userSelectUrl =
"https://hxrdhoutai.hxrdsm.cn/app/admin/user/select?page=1&limit=20";
/**
* 用户更新接口 URL。
*/
private String userUpdateUrl = "https://hxrdhoutai.hxrdsm.cn/app/admin/user/update";
/**
* 组装 Cookie 请求头:优先 {@link #cookie},否则 {@code PHPSID=}{@link #phpsid}。
*
* @return 非空 Cookie 值,或无法组装时的空串
*/
public String resolveCookieHeader() {
String c = firstNonBlank(cookie);
if (c != null) {
return c;
}
String id = firstNonBlank(phpsid);
if (id != null) {
return "PHPSID=" + id;
}
return "";
}
private static String firstNonBlank(String s) {
if (s == null) {
return null;
}
String t = s.trim();
return t.isEmpty() ? null : t;
}
}