Ver código fonte

chore: auto bump version and changelog [skip ci]

iwt 9 horas atrás
pai
commit
e41c00c59b

+ 33 - 0
cfc-backend/src/main/java/com/etotem/cfc/controller/CommissionController.java

@@ -118,4 +118,37 @@ public class CommissionController {
                 : 3;
         return Result.success(commissionService.getTeamTree(userId, maxLevel));
     }
+
+    /**
+     * 获取团队成长曲线数据(按月份统计注册人数)
+     */
+    @PostMapping("/team/growth-curve")
+    public Result<Map<String, Object>> teamGrowthCurve(@RequestAttribute("userId") Long userId,
+                                                        @RequestBody Map<String, Object> params) {
+        Integer months = params.get("months") != null ? (Integer) params.get("months") : null;
+        Map<String, Object> result = commissionService.getTeamGrowthCurve(userId, months);
+        return Result.success(result);
+    }
+
+    /**
+     * 获取团队所有成员消费曲线数据(按月份统计成员消费总额)
+     */
+    @PostMapping("/team/consumption-curve")
+    public Result<Map<String, Object>> teamAllMembersConsumptionCurve(@RequestAttribute("userId") Long userId,
+                                                                      @RequestBody Map<String, Object> params) {
+        Integer months = params.get("months") != null ? (Integer) params.get("months") : null;
+        Map<String, Object> result = commissionService.getTeamAllMembersConsumptionCurve(userId, months);
+        return Result.success(result);
+    }
+
+    /**
+     * 获取直推团队(L1)消费曲线数据(按月份统计L1成员消费总额)
+     */
+    @PostMapping("/team/l1-consumption-curve")
+    public Result<Map<String, Object>> teamL1ConsumptionCurve(@RequestAttribute("userId") Long userId,
+                                                               @RequestBody Map<String, Object> params) {
+        Integer months = params.get("months") != null ? (Integer) params.get("months") : null;
+        Map<String, Object> result = commissionService.getTeamL1ConsumptionCurve(userId, months);
+        return Result.success(result);
+    }
 }

+ 5 - 0
cfc-frontend/utils/api.js

@@ -1948,6 +1948,11 @@ export const getMyReferrer = (memberId) => request('/api/commission/my-referrer'
 
 export const getTeamTree = (maxLevel = 3) => request('/api/commission/team/tree', 'POST', { maxLevel })
 
+// 团队曲线数据
+export const getTeamGrowthCurve = (months = 12) => request('/api/commission/team/growth-curve', 'POST', { months })
+export const getTeamAllMembersConsumptionCurve = (months = 12) => request('/api/commission/team/consumption-curve', 'POST', { months })
+export const getTeamL1ConsumptionCurve = (months = 12) => request('/api/commission/team/l1-consumption-curve', 'POST', { months })
+
 // CF 分佣
 export const getCfRate = () => request('/api/commission/cf/rate', 'POST')
 export const getCfSummary = () => request('/api/commission/cf/summary', 'POST')

+ 1 - 1
cfc-web/.last_build_commit

@@ -1 +1 @@
-01f6f6483765275b413ca0ec19966acb405a13bf
+1382d9ee3ac6e8912f3f29c8fac5410b7601d380

+ 2 - 2
cfc-web/package-lock.json

@@ -1,12 +1,12 @@
 {
   "name": "cfc-web",
-  "version": "1.0.1473",
+  "version": "1.0.1474",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "cfc-web",
-      "version": "1.0.1473",
+      "version": "1.0.1474",
       "dependencies": {
         "@wangeditor/editor": "^5.1.23",
         "@wangeditor/editor-for-vue": "^1.0.2",