Browse Source

添加日志输出

wangchangsheng 2 năm trước cách đây
mục cha
commit
86789455c2

+ 3 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/homepage/EconomyHomePageController.java

@@ -6,6 +6,7 @@ import com.gyee.runeconomy.dto.ResultMsg;
 import com.gyee.runeconomy.dto.response.ProEconPointCodeDTO;
 import com.gyee.runeconomy.service.homepage.EconomyPointHomePageService;
 import io.swagger.annotations.ApiOperation;
+import lombok.extern.log4j.Log4j2;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -23,6 +24,7 @@ import java.util.Map;
  * @author wang
  * @since 2022-11-22
  */
+@Log4j2
 @RestController
 @RequestMapping("//economy")
 public class EconomyHomePageController {
@@ -81,6 +83,7 @@ public class EconomyHomePageController {
         try {
             dtos = economyPointHomePageService.getEconomyPointRanking(foreignKeyId, dateType, pointCode);
         } catch (Exception e) {
+            log.error("请求异常", e);
             return R.error(ResultMsg.error());
         }
         return R.data(ResultMsg.ok(dtos));