From 3eaf0f2f1b909ac429cac9fc26af767ddecda065 Mon Sep 17 00:00:00 2001
From: huang <1532065656@qq.com>
Date: 星期三, 22 十月 2025 18:54:17 +0800
Subject: [PATCH] 上片接口返回信息国际化,添加定时任务线程池配置类
---
hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/loadglassdevicetaskhistory/controller/LoadGlassDeviceTaskHistoryController.java | 22 ++++++++++++++++++----
1 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/loadglassdevicetaskhistory/controller/LoadGlassDeviceTaskHistoryController.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/loadglassdevicetaskhistory/controller/LoadGlassDeviceTaskHistoryController.java
index 36aa0c8..c0b1e98 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/loadglassdevicetaskhistory/controller/LoadGlassDeviceTaskHistoryController.java
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/loadglassdevicetaskhistory/controller/LoadGlassDeviceTaskHistoryController.java
@@ -5,15 +5,15 @@
import com.mes.opctask.entity.LoadGlassDeviceTaskHistory;
import com.mes.opctask.entity.request.LoadGlassDeviceTaskHistoryRequest;
import com.mes.opctask.service.LoadGlassDeviceTaskHistoryService;
-import com.mes.pp.service.OptimizeProjectService;
-import com.mes.uppattenusage.entity.UpPattenUsage;
import com.mes.utils.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.MessageSource;
+import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
-import java.util.List;
+import javax.annotation.Resource;
/**
* <p>
@@ -30,10 +30,24 @@
@Autowired
private LoadGlassDeviceTaskHistoryService loadGlassDeviceTaskHistoryService;
+ // 鍥介檯璇█搴�
+ @Resource
+ private MessageSource messageSource;
+
@ApiOperation("鎸夌収鏌ヨ鏉′欢鏌ヨ涓婄墖鍘嗗彶浠诲姟")
@PostMapping("/queryLoadGlassHistoryTask") //鏌ヨ鐜板湪涓婄墖鏈虹殑鐜荤拑淇℃伅
public Result<Page<LoadGlassDeviceTaskHistory>> queryBigStorageCageHistoryTask(@RequestBody @Validated LoadGlassDeviceTaskHistoryRequest request) {
- return Result.build(200, "鏌ヨ鎴愬姛", loadGlassDeviceTaskHistoryService.queryLoadGlassHistoryTask(request));
+ Page<LoadGlassDeviceTaskHistory> result = loadGlassDeviceTaskHistoryService.queryLoadGlassHistoryTask(request);
+ if (result != null) {
+ String successMsg = messageSource.getMessage(
+ "rawglass.query.success",
+ null,
+ LocaleContextHolder.getLocale()
+ );
+ return Result.build(200, successMsg, result);
+ }else {
+ return Result.build(500, "fail", result);
+ }
}
}
--
Gitblit v1.8.0