Răsfoiți Sursa

fix: add updateTier(Long, String, String) overload to match call in PromotionTierEvalService

iwt 3 luni în urmă
părinte
comite
2f57499e22

+ 8 - 1
cfc-backend/src/main/java/com/etotem/cfc/service/PromotionTierService.java

@@ -112,6 +112,13 @@ public class PromotionTierService {
      * 手动更新推广等级(管理员)
      */
     public void updateTier(Long userId, String tierCode) {
+        updateTier(userId, tierCode, "admin");
+    }
+
+    /**
+     * 更新推广等级(指定原因)
+     */
+    public void updateTier(Long userId, String tierCode, String reason) {
         PromotionTier tier = getCurrentTier(userId);
         String fromTier = tier != null ? tier.getTier() : null;
 
@@ -119,7 +126,7 @@ public class PromotionTierService {
         log.setUserId(userId);
         log.setOldTier(fromTier);
         log.setNewTier(tierCode);
-        log.setReason("admin");
+        log.setReason(reason);
         log.setChangedAt(new Date());
         changeLogMapper.insert(log);