登录科技考勤action修改
parent
6bbb49f0a1
commit
341fa9e043
|
@ -14,7 +14,7 @@ import java.util.function.Consumer;
|
|||
|
||||
|
||||
/**
|
||||
* <h1>自定义请求条件</h1>
|
||||
* <h1>自定义请求</h1>
|
||||
*
|
||||
* @author xuanran.wang
|
||||
* @date 2023/4/6 19:34
|
||||
|
@ -24,25 +24,79 @@ import java.util.function.Consumer;
|
|||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class CusRestTemplateResponse {
|
||||
/**
|
||||
* <h2>响应对象</h2>
|
||||
**/
|
||||
private ResponeVo vo;
|
||||
/**
|
||||
* <h2>请求参数</h2>
|
||||
**/
|
||||
private Object requestParam;
|
||||
/**
|
||||
* <h2>接口成功字段标识</h2>
|
||||
**/
|
||||
private String successField;
|
||||
/**
|
||||
* <h2>接口请求成功时响应值</h2>
|
||||
**/
|
||||
private Object successValue;
|
||||
/**
|
||||
* <h2>接口响应错误字段名</h2>
|
||||
**/
|
||||
private String errorMsg;
|
||||
/**
|
||||
* <h2>data字段路径</h2>
|
||||
**/
|
||||
private String dataKey;
|
||||
/**
|
||||
* <h2>接口响应信息</h2>
|
||||
**/
|
||||
private String msg;
|
||||
/**
|
||||
* <h2>接口响应map</h2>
|
||||
**/
|
||||
private Map<String, Object> response;
|
||||
/**
|
||||
* <h2>解密接口 如果接口有加密可自行实现解密接口</h2>
|
||||
**/
|
||||
private CusDataDecipher cusDataDecipher;
|
||||
/**
|
||||
* <h2>请求url</h2>
|
||||
**/
|
||||
private String url;
|
||||
/**
|
||||
* <h2>运行异常</h2>
|
||||
**/
|
||||
private Exception exception;
|
||||
/**
|
||||
* <h2>请求完是否执行响应验证 默认做校验</h2>
|
||||
**/
|
||||
@Builder.Default
|
||||
private boolean checkResponse = true;
|
||||
/**
|
||||
* <h2>错误回调</h2>
|
||||
**/
|
||||
private BiConsumer<Exception, CusApiLogBaseDto> errorCallBack;
|
||||
/**
|
||||
* <h2>是否将日志写入建模 默认不写入</h2>
|
||||
**/
|
||||
@Builder.Default
|
||||
private boolean writeLog = false;
|
||||
/**
|
||||
* <h2>日志实体类</h2>
|
||||
**/
|
||||
private CusApiLogBaseDto logDto;
|
||||
/**
|
||||
* <h2>日志模块id</h2>
|
||||
**/
|
||||
private String logModelId;
|
||||
/**
|
||||
* <h2>成功回调</h2>
|
||||
**/
|
||||
private Consumer<CusApiLogBaseDto> successCallBack;
|
||||
/**
|
||||
* <h2>是否异步写日志 默认异步</h2>
|
||||
**/
|
||||
@Builder.Default
|
||||
private boolean asyncWriteLog = true;
|
||||
|
||||
|
|
|
@ -163,9 +163,9 @@ public class KqFreezeVacationAction extends BaseBean implements Action {
|
|||
RecordSet tempRs = new RecordSet();
|
||||
String sql = "select duration from " + billTable + " where requestid = ?";
|
||||
if(CollectionUtils.isNotEmpty(splitBeans)){
|
||||
if (tempRs.execute(sql, requestId) && tempRs.next()) {
|
||||
if (tempRs.executeQuery(sql, requestId) && tempRs.next()) {
|
||||
for (SplitBean splitBean : splitBeans) {
|
||||
String workflowDuration = Util.null2String(tempRs.getString(1));
|
||||
String workflowDuration = Util.null2String(tempRs.getString("duration"));
|
||||
if(StringUtils.isBlank(workflowDuration)){
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -43,6 +43,8 @@ public class CusApiLogUtilTest extends BaseTest {
|
|||
.successField("code")
|
||||
.successValue(0)
|
||||
.errorMsg("msg")
|
||||
.writeLog(true)
|
||||
.asyncWriteLog(false)
|
||||
.logDto(demoDto)
|
||||
.build();
|
||||
|
||||
|
|
Loading…
Reference in New Issue