From 28c643cc4d3142503dfa5234777399586e8364e9 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期六, 30 三月 2019 11:41:36 +0800
Subject: [PATCH] 添加员工服务端bug修复
---
CodeService/src/main/java/com/java110/code/api/CodeApi.java | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/CodeService/src/main/java/com/java110/code/api/CodeApi.java b/CodeService/src/main/java/com/java110/code/api/CodeApi.java
index 49268ca..1055cdf 100644
--- a/CodeService/src/main/java/com/java110/code/api/CodeApi.java
+++ b/CodeService/src/main/java/com/java110/code/api/CodeApi.java
@@ -11,11 +11,10 @@
import com.java110.core.factory.DataFlowFactory;
import com.java110.core.factory.DataTransactionFactory;
import com.java110.feign.code.ICodeApi;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
@@ -28,6 +27,9 @@
*/
@RestController
public class CodeApi extends BaseController implements ICodeApi {
+
+ protected final static Logger logger = LoggerFactory.getLogger(CodeApi.class);
+
@Autowired
IPrimaryKeyServiceSMO primaryKeyServiceSMOImpl;
@@ -100,7 +102,8 @@
* @return
*/
@Override
- public String generateCode(String prefix) {
+ @RequestMapping(value = "/codeApi/generateCode",method = RequestMethod.POST)
+ public String generateCode(@RequestParam("prefix") String prefix) {
try {
JSONObject requestInfo = new JSONObject();
@@ -114,7 +117,7 @@
primaryKeyServiceSMOImpl.generateCode(dataFlow);
if (!ResponseConstant.RESULT_CODE_SUCCESS.equals(dataFlow.getResJson().getString("code"))) {
- throw new ResponseErrorException(ResponseConstant.RESULT_CODE_ERROR, "鐢熸垚oId缂栫爜澶辫触 "
+ throw new ResponseErrorException(ResponseConstant.RESULT_CODE_ERROR, "鐢熸垚缂栫爜澶辫触 "
+ dataFlow.getResJson().getString("message"));
}
--
Gitblit v1.8.0