Răsfoiți Sursa

更新使用记录刷新接口逻辑

woody 1 an în urmă
părinte
comite
5d7b11bfc2

+ 4 - 10
src/main/java/com/chelvc/cloud/maintain/controller/IndexController.java

@@ -4,7 +4,6 @@ import javax.validation.Valid;
 
 import com.chelvc.cloud.maintain.copier.MerchantCopier;
 import com.chelvc.cloud.maintain.param.CustomerIndexParam;
-import com.chelvc.cloud.maintain.vo.ConfigurationVO;
 import com.chelvc.cloud.maintain.vo.CustomerIndexVO;
 import com.chelvc.cloud.uc.api.service.UsageService;
 import com.chelvc.cloud.vehicle.api.param.NearbyQueryParam;
@@ -13,6 +12,7 @@ import com.chelvc.framework.base.annotation.UnifiedResponseBody;
 import org.apache.dubbo.config.annotation.DubboReference;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 /**
@@ -32,17 +32,11 @@ public class IndexController {
     private MerchantService merchantService;
 
     /**
-     * 获取系统配置信息
-     *
-     * @return 配置信息
+     * 刷新用户使用记录
      */
-    @GetMapping("/configuration")
-    public ConfigurationVO getConfiguration() {
-        // 刷新系统使用记录
+    @PostMapping("/usage")
+    public void refreshUsage() {
         this.usageService.refresh();
-
-        // 构建系统配置
-        return new ConfigurationVO();
     }
 
     /**

+ 5 - 0
src/main/java/com/chelvc/cloud/maintain/vo/CustomerIndexVO.java

@@ -19,6 +19,11 @@ import lombok.experimental.SuperBuilder;
 @NoArgsConstructor
 @AllArgsConstructor
 public class CustomerIndexVO implements Serializable {
+    /**
+     * 配置信息
+     */
+    private ConfigurationVO configuration;
+
     /**
      * 推荐商家列表
      */