|
|
@ -1,11 +1,11 @@
|
|
|
|
package com.engine.mzg.util;
|
|
|
|
package com.engine.zhewen.util;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
|
|
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
|
|
|
import com.engine.core.exception.ECException;
|
|
|
|
import com.engine.core.exception.ECException;
|
|
|
|
import com.engine.mzg.exception.CustomizeRunTimeException;
|
|
|
|
import com.engine.zhewen.exception.CustomizeRunTimeException;
|
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
@ -50,7 +50,7 @@ public class ResponseResult<T, R> {
|
|
|
|
log.info("run api , param {}", t);
|
|
|
|
log.info("run api , param {}", t);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return getJsonString(f.apply(t));
|
|
|
|
return getJsonString(f.apply(t));
|
|
|
|
} catch (CustomizeRunTimeException e) {
|
|
|
|
} catch (com.engine.zhewen.exception.CustomizeRunTimeException e) {
|
|
|
|
log.error("api run fail", e);
|
|
|
|
log.error("api run fail", e);
|
|
|
|
return Error(e.getMessage());
|
|
|
|
return Error(e.getMessage());
|
|
|
|
} catch (ECException e) {
|
|
|
|
} catch (ECException e) {
|
|
|
@ -72,7 +72,7 @@ public class ResponseResult<T, R> {
|
|
|
|
log.info("run api , param {}", t);
|
|
|
|
log.info("run api , param {}", t);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return Ok(f.apply(t));
|
|
|
|
return Ok(f.apply(t));
|
|
|
|
} catch (CustomizeRunTimeException e) {
|
|
|
|
} catch (com.engine.zhewen.exception.CustomizeRunTimeException e) {
|
|
|
|
log.error("api run fail", e);
|
|
|
|
log.error("api run fail", e);
|
|
|
|
return Error(e.getMessage());
|
|
|
|
return Error(e.getMessage());
|
|
|
|
} catch (ECException e) {
|
|
|
|
} catch (ECException e) {
|
|
|
@ -95,7 +95,7 @@ public class ResponseResult<T, R> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
f.accept(t);
|
|
|
|
f.accept(t);
|
|
|
|
return Ok();
|
|
|
|
return Ok();
|
|
|
|
} catch (CustomizeRunTimeException e) {
|
|
|
|
} catch (com.engine.zhewen.exception.CustomizeRunTimeException e) {
|
|
|
|
log.error("api run fail", e);
|
|
|
|
log.error("api run fail", e);
|
|
|
|
return Error(e.getMessage());
|
|
|
|
return Error(e.getMessage());
|
|
|
|
} catch (ECException e) {
|
|
|
|
} catch (ECException e) {
|