对接3方系统,开通新人特权
This commit is contained in:
@@ -106,6 +106,30 @@ public class LbPurchaseApplyController {
|
||||
return ResponseEntity.internalServerError().body(result);
|
||||
}
|
||||
|
||||
@GetMapping("/syncHxrAdminUserVip")
|
||||
@Operation(summary = "按申请日期与租户同步 hxrd 用户 VIP 字段",
|
||||
description = "根据 lb_purchase_apply 的申请日期区间与 tenant_id 逐条处理记录,"
|
||||
+ "以每条记录的 apply_date 为起算日计算 viptime(周末先对齐到下一工作日,再顺延 2 个工作日),"
|
||||
+ "再 GET /app/admin/user/select、POST /app/admin/user/update(max_order、is_vip=1 等)。"
|
||||
+ "需配置 hxr.admin.cookie 或 hxr.admin.phpsid。")
|
||||
public ResponseEntity<Map<String, Object>> syncHxrAdminUserVip(
|
||||
@Parameter(description = "申请开始日期(yyyy-MM-dd)", required = true)
|
||||
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate applyDateStart,
|
||||
@Parameter(description = "申请结束日期(yyyy-MM-dd)", required = true)
|
||||
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate applyDateEnd,
|
||||
@Parameter(description = "租户ID", required = true)
|
||||
@RequestParam String tenantId,
|
||||
@Parameter(description = "最大订单数 max_order", required = true)
|
||||
@RequestParam("max_order") Integer maxOrder) {
|
||||
Map<String, Object> result = lbPurchaseApplyService.syncHxrAdminUserVipByApplyDateRange(
|
||||
applyDateStart, applyDateEnd, tenantId, maxOrder);
|
||||
Boolean success = (Boolean) result.get("success");
|
||||
if (success != null && success) {
|
||||
return ResponseEntity.ok(result);
|
||||
}
|
||||
return ResponseEntity.badRequest().body(result);
|
||||
}
|
||||
|
||||
@GetMapping("/needPrivilegeRecommenders")
|
||||
@Operation(summary = "按日期范围查询需要添加特权的推荐人")
|
||||
public ResponseEntity<Map<String, Object>> needPrivilegeRecommenders(
|
||||
|
||||
Reference in New Issue
Block a user