wuxw
2019-03-30 28c643cc4d3142503dfa5234777399586e8364e9
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"));
            }