Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
semi-server
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
inroi
semi-server
Commits
54669429
提交
54669429
authored
10月 21, 2022
作者:
inroi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
微调
上级
3af32253
显示空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
369 行增加
和
63 行删除
+369
-63
CommonHttpApi.java
...te-system/src/main/java/com/system/api/CommonHttpApi.java
+100
-0
CommonGetConstants.java
...rc/main/java/com/system/constants/CommonGetConstants.java
+61
-0
CommonPostConstants.java
...c/main/java/com/system/constants/CommonPostConstants.java
+59
-0
Constants.java
...-system/src/main/java/com/system/constants/Constants.java
+9
-0
SynchronizationOperationMapper.java
...n/java/com/system/dao/SynchronizationOperationMapper.java
+20
-0
CustomFormConfigMapper.xml
...ain/java/com/system/dao/mapper/CustomFormConfigMapper.xml
+6
-5
SynchronizationOperationMapper.xml
.../com/system/dao/mapper/SynchronizationOperationMapper.xml
+15
-0
SynchronizationJob.java
...c/main/java/com/system/quartz/job/SynchronizationJob.java
+1
-1
CustomFormConfigServiceImpl.java
.../com/system/serivce/impl/CustomFormConfigServiceImpl.java
+2
-9
SynchronizationServiceImpl.java
...a/com/system/serivce/impl/SynchronizationServiceImpl.java
+19
-25
CustomFormConfigCreateInVo.java
.../com/system/transfer/form/CustomFormConfigCreateInVo.java
+18
-6
CustomFormConfigListInVo.java
...va/com/system/transfer/form/CustomFormConfigListInVo.java
+14
-0
CustomFormConfigListOutVoRecords.java
...ystem/transfer/form/CustomFormConfigListOutVoRecords.java
+12
-6
CustomFormConfigUpdateInVo.java
.../com/system/transfer/form/CustomFormConfigUpdateInVo.java
+18
-6
FormFieldMappingUtil.java
.../src/main/java/com/system/utils/FormFieldMappingUtil.java
+2
-4
StringUtil.java
...ate-system/src/main/java/com/system/utils/StringUtil.java
+0
-1
ThirdPartyLogUtil.java
...tem/src/main/java/com/system/utils/ThirdPartyLogUtil.java
+13
-0
没有找到文件。
integrate-system/src/main/java/com/system/api/CommonHttpApi.java
0 → 100644
浏览文件 @
54669429
package
com
.
system
.
api
;
import
com.system.constants.Constants
;
import
com.system.transfer.form.FormFieldMappingDetailOutVoRecords
;
import
com.system.utils.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.CollectionUtils
;
import
java.io.IOException
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* @author Inori
*/
@Component
public
class
CommonHttpApi
{
@Autowired
private
ThirdPartyLogUtil
thirdPartyLogUtil
;
public
String
commonSend
(
String
requestAddress
,
String
json
,
Map
<
String
,
String
>
config
,
String
queueId
)
{
String
result
=
""
;
try
{
if
(
StringUtil
.
isNotBlank
(
json
))
{
result
=
HttpClientUtil
.
sendPost
(
config
.
get
(
"requestAddress"
),
json
);
}
else
{
result
=
HttpClientUtil
.
sendGet
(
config
.
get
(
"requestAddress"
));
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
int
flag
=
0
;
Map
<
String
,
Object
>
response
=
new
HashMap
<>(
3
);
Map
<
String
,
Object
>
map
=
JsonUtil
.
toMap
(
result
,
String
.
class
,
Object
.
class
);
if
(!
CollectionUtils
.
isEmpty
(
map
))
{
if
(
Constants
.
SUCCESS_CODE
.
equals
(
String
.
valueOf
(
map
.
get
(
Constants
.
SUCCESS_NAME
))))
{
List
<
FormFieldMappingDetailOutVoRecords
>
recordsList
=
FormFieldMappingUtil
.
purchaseMapping
(
config
.
get
(
"formFieldMappingDetail"
));
List
<
Map
<
String
,
Object
>>
dataList
=
new
ArrayList
<>();
List
<
Object
>
objectList
=
JsonUtil
.
toList
(
JsonUtil
.
toString
(
map
.
get
(
"data"
)),
Object
.
class
);
List
<
Map
<
String
,
Object
>>
tempList
=
objectList
.
stream
().
map
(
m
->
JsonUtil
.
toMap
(
JsonUtil
.
toString
(
m
),
String
.
class
,
Object
.
class
)).
collect
(
Collectors
.
toList
());
for
(
Map
<
String
,
Object
>
temp
:
tempList
)
{
Map
<
String
,
Object
>
data
=
new
LinkedHashMap
<>(
recordsList
.
size
());
for
(
FormFieldMappingDetailOutVoRecords
records
:
recordsList
)
{
if
(
Constants
.
STRING_NAME
.
equals
(
records
.
getFieldType
()))
{
if
(
temp
.
containsKey
(
records
.
getFieldBeforeMapping
()))
{
data
.
put
(
records
.
getFieldAfterMapping
(),
String
.
valueOf
(
temp
.
get
(
records
.
getFieldBeforeMapping
())));
}
else
{
data
.
put
(
records
.
getFieldAfterMapping
(),
""
);
}
}
else
if
(
Constants
.
INT_NAME
.
equals
(
records
.
getFieldType
()))
{
if
(
temp
.
containsKey
(
records
.
getFieldBeforeMapping
()))
{
try
{
data
.
put
(
records
.
getFieldAfterMapping
(),
Integer
.
valueOf
(
String
.
valueOf
(
temp
.
get
(
records
.
getFieldBeforeMapping
()))));
}
catch
(
NumberFormatException
e
)
{
data
.
put
(
records
.
getFieldAfterMapping
(),
String
.
valueOf
(
temp
.
get
(
records
.
getFieldBeforeMapping
())));
}
}
else
{
data
.
put
(
records
.
getFieldAfterMapping
(),
""
);
}
}
else
{
data
.
put
(
records
.
getFieldAfterMapping
(),
temp
.
get
(
records
.
getFieldBeforeMapping
()));
}
}
dataList
.
add
(
data
);
}
flag
=
1
;
response
.
put
(
"data"
,
dataList
);
response
.
put
(
"success"
,
true
);
}
}
else
if
(!
Constants
.
SUCCESS_CODE
.
equals
(
String
.
valueOf
(
map
.
get
(
Constants
.
SUCCESS_NAME
)))
&&
map
.
containsKey
(
Constants
.
ERROR_MESSAGE
))
{
response
.
put
(
"message"
,
map
.
get
(
Constants
.
ERROR_MESSAGE
));
response
.
put
(
"success"
,
false
);
}
else
{
response
.
put
(
"message"
,
""
);
response
.
put
(
"success"
,
false
);
}
thirdPartyLogUtil
.
thirdPartyLogCreate
(
config
.
get
(
"name"
),
config
.
get
(
"docType"
),
queueId
,
config
.
get
(
"configureDirection"
),
StringUtil
.
isNotBlank
(
json
)
?
json
:
config
.
get
(
"requestAddress"
),
result
,
flag
);
return
JsonUtil
.
toString
(
response
);
}
public
String
commonSendBySync
(
Map
<
String
,
String
>
config
,
String
json
,
String
queueId
)
{
try
{
String
result
=
HttpClientUtil
.
sendPost
(
config
.
get
(
"responseAddress"
),
json
);
thirdPartyLogUtil
.
thirdPartyLogCreate
(
config
.
get
(
"name"
),
config
.
get
(
"docType"
),
queueId
,
config
.
get
(
"configureDirection"
),
json
,
result
);
return
result
;
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
return
""
;
}
}
}
integrate-system/src/main/java/com/system/constants/CommonGetConstants.java
0 → 100644
浏览文件 @
54669429
package
com
.
system
.
constants
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.system.dao.CustomFormConfigMapper
;
import
com.system.transfer.form.CustomFormConfigListInVo
;
import
com.system.transfer.form.CustomFormConfigListOutVoRecords
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.CollectionUtils
;
import
javax.annotation.PostConstruct
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
/**
* @author Inori
*/
@Component
public
class
CommonGetConstants
{
private
Map
<
String
,
Map
<
String
,
String
>>
map
=
new
ConcurrentHashMap
<>();
@Autowired
private
CustomFormConfigMapper
customFormConfigMapper
;
@PostConstruct
public
void
init
()
{
List
<
CustomFormConfigListOutVoRecords
>
recordsList
=
customFormConfigMapper
.
customFormConfigList
(
new
Page
<>(
0
,
10000
),
new
CustomFormConfigListInVo
(
1
));
for
(
CustomFormConfigListOutVoRecords
records
:
recordsList
)
{
this
.
map
.
put
(
records
.
getDocType
(),
this
.
purchaseCustomFormConfig
(
records
));
}
}
public
Map
<
String
,
String
>
get
(
String
docType
)
{
if
(
CollectionUtils
.
isEmpty
(
this
.
map
))
{
return
new
HashMap
<>(
1
);
}
return
this
.
map
.
get
(
docType
);
}
/**
* 封装自定义表单配置
*/
private
Map
<
String
,
String
>
purchaseCustomFormConfig
(
CustomFormConfigListOutVoRecords
records
)
{
Map
<
String
,
String
>
result
=
new
HashMap
<>(
10
);
result
.
put
(
"docType"
,
records
.
getDocType
());
result
.
put
(
"name"
,
records
.
getName
());
result
.
put
(
"configureDirection"
,
records
.
getConfigureDirection
());
result
.
put
(
"operation"
,
records
.
getOperation
()
==
1
?
"Get"
:
"Post"
);
result
.
put
(
"requestAddress"
,
records
.
getRequestAddress
());
result
.
put
(
"responseAddress"
,
records
.
getResponseAddress
());
result
.
put
(
"customSql"
,
records
.
getCustomSql
());
result
.
put
(
"formFieldMappingDetail"
,
records
.
getFormFieldMappingDetail
());
return
result
;
}
}
integrate-system/src/main/java/com/system/constants/CommonPostConstants.java
0 → 100644
浏览文件 @
54669429
package
com
.
system
.
constants
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.system.dao.CustomFormConfigMapper
;
import
com.system.transfer.form.CustomFormConfigListInVo
;
import
com.system.transfer.form.CustomFormConfigListOutVoRecords
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.CollectionUtils
;
import
javax.annotation.PostConstruct
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
/**
* @author Inori
*/
@Component
public
class
CommonPostConstants
{
private
Map
<
String
,
Map
<
String
,
String
>>
map
=
new
ConcurrentHashMap
<>();
@Autowired
private
CustomFormConfigMapper
customFormConfigMapper
;
@PostConstruct
public
void
init
()
{
List
<
CustomFormConfigListOutVoRecords
>
recordsList
=
customFormConfigMapper
.
customFormConfigList
(
new
Page
<>(
0
,
10000
),
new
CustomFormConfigListInVo
(
2
));
for
(
CustomFormConfigListOutVoRecords
records
:
recordsList
)
{
this
.
map
.
put
(
records
.
getDocType
(),
this
.
purchaseCustomFormConfig
(
records
));
}
}
public
Map
<
String
,
String
>
get
(
String
docType
)
{
if
(
CollectionUtils
.
isEmpty
(
this
.
map
))
{
return
new
HashMap
<>(
1
);
}
return
this
.
map
.
get
(
docType
);
}
/**
* 封装自定义表单配置
*/
private
Map
<
String
,
String
>
purchaseCustomFormConfig
(
CustomFormConfigListOutVoRecords
records
)
{
Map
<
String
,
String
>
result
=
new
HashMap
<>(
10
);
result
.
put
(
"docType"
,
records
.
getDocType
());
result
.
put
(
"name"
,
records
.
getName
());
result
.
put
(
"configureDirection"
,
records
.
getConfigureDirection
());
result
.
put
(
"operation"
,
records
.
getOperation
()
==
1
?
"Get"
:
"Post"
);
result
.
put
(
"customSql"
,
records
.
getCustomSql
());
result
.
put
(
"formFieldMappingDetail"
,
records
.
getFormFieldMappingDetail
());
return
result
;
}
}
integrate-system/src/main/java/com/system/constants/Constants.java
浏览文件 @
54669429
...
...
@@ -20,7 +20,16 @@ public interface Constants {
String
SUCCESS_NAME
=
"success"
;
String
ERROR_MESSAGE
=
"message"
;
String
SUCCESS_CODE
=
"true"
;
String
STRING_NAME
=
"字符"
;
String
INT_NAME
=
"数值"
;
}
integrate-system/src/main/java/com/system/dao/SynchronizationOperationMapper.java
0 → 100644
浏览文件 @
54669429
package
com
.
system
.
dao
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author Inori
*/
public
interface
SynchronizationOperationMapper
{
/**
* 同步操作列表
*
* @param jobClassName 任务类名
* @return 列表
*/
List
<
Map
<
String
,
Object
>>
synchronizationOperationList
(
String
jobClassName
);
}
integrate-system/src/main/java/com/system/dao/mapper/CustomFormConfigMapper.xml
浏览文件 @
54669429
...
...
@@ -7,7 +7,8 @@
<select
id=
"customFormConfigList"
parameterType=
"com.system.transfer.form.CustomFormConfigListInVo"
resultType=
"com.system.transfer.form.CustomFormConfigListOutVoRecords"
>
SELECT
id, doc_type, `name`, request_address, configure_direction, operation, custom_sql, create_time
id, doc_type, `name`, configure_direction, operation, request_address,
response_address, custom_sql, form_field_mapping_detail, create_time
FROM tb_custom_form_config
</select>
...
...
@@ -17,9 +18,9 @@
<insert
id=
"customFormConfigCreate"
parameterType=
"com.system.transfer.form.CustomFormConfigCreateInVo"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
INSERT INTO tb_custom_form_config (
doc_type, `name`,
request_address, configure_direction, operation, custom_sq
l
doc_type, `name`,
configure_direction, operation, request_address, response_address, custom_sql, form_field_mapping_detai
l
) VALUES (
#{docType}, #{name}, #{
requestAddress}, #{configureDirection}, #{operation}, #{customSq
l}
#{docType}, #{name}, #{
configureDirection}, #{operation}, #{requestAddress}, #{responseAddress}, #{customSql}, #{formFieldMappingDetai
l}
)
</insert>
...
...
@@ -29,8 +30,8 @@
<update
id=
"customFormConfigUpdate"
parameterType=
"com.system.transfer.form.CustomFormConfigUpdateInVo"
>
UPDATE tb_custom_form_config SET
doc_type = #{docType}, `name` = #{name}, request_address = #{requestAddress},
configure_direction = #{configureDirection}, operation = #{operation}, custom_sql = #{customSq
l}
doc_type = #{docType}, `name` = #{name},
configure_direction = #{configureDirection}, operation = #{operation},
request_address = #{requestAddress},
response_address = #{responseAddress}, custom_sql = #{customSql}, form_field_mapping_detail = #{formFieldMappingDetai
l}
WHERE id = #{id}
</update>
...
...
integrate-system/src/main/java/com/system/dao/mapper/SynchronizationOperationMapper.xml
0 → 100644
浏览文件 @
54669429
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.system.dao.SynchronizationOperationMapper"
>
<select
id=
"synchronizationOperationList"
resultType=
"java.util.Map"
>
SELECT id, job_class_name, doc_type FROM tb_synchronization_operation WHERE job_class_name = #{jobClassName}
</select>
</mapper>
integrate-system/src/main/java/com/system/quartz/job/SynchronizationJob.java
浏览文件 @
54669429
...
...
@@ -29,7 +29,7 @@ public class SynchronizationJob implements Job {
e
.
printStackTrace
();
}
//
synchronizationService.synchronization();
synchronizationService
.
synchronization
();
}
...
...
integrate-system/src/main/java/com/system/serivce/impl/CustomFormConfigServiceImpl.java
浏览文件 @
54669429
...
...
@@ -2,16 +2,12 @@ package com.system.serivce.impl;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.system.dao.CustomFormConfigMapper
;
import
com.system.dao.FormFieldMappingDetailMapper
;
import
com.system.serivce.ICustomFormConfigService
;
import
com.system.transfer.form.*
;
import
com.system.utils.JsonUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* @author Inori
...
...
@@ -22,16 +18,13 @@ public class CustomFormConfigServiceImpl implements ICustomFormConfigService {
@Autowired
private
CustomFormConfigMapper
customFormConfigMapper
;
@Autowired
private
FormFieldMappingDetailMapper
formFieldMappingDetailMapper
;
@Override
public
CustomFormConfigListOutVo
customFormConfigList
(
CustomFormConfigListInVo
inVo
)
{
Page
<
CustomFormConfigListOutVoRecords
>
page
=
new
Page
<>(
inVo
.
getPageNo
(),
inVo
.
getPageSize
());
List
<
CustomFormConfigListOutVoRecords
>
recordsList
=
customFormConfigMapper
.
customFormConfigList
(
page
,
inVo
);
List
<
Integer
>
idList
=
recordsList
.
stream
().
map
(
CustomFormConfigListOutVoRecords:
:
getId
).
collect
(
Collectors
.
toList
());
/*
List<Integer> idList = recordsList.stream().map(CustomFormConfigListOutVoRecords::getId).collect(Collectors.toList());
if (!CollectionUtils.isEmpty(idList)) {
List<FormFieldMappingDetailOutVoRecords> tempList = formFieldMappingDetailMapper.formFieldMappingDetailList(new FormFieldMappingDetailListInVo(idList));
recordsList.forEach(m -> {
...
...
@@ -40,7 +33,7 @@ public class CustomFormConfigServiceImpl implements ICustomFormConfigService {
m.setFormFieldMappingDetail(JsonUtil.toString(collectList));
}
});
}
}
*/
CustomFormConfigListOutVo
outVo
=
new
CustomFormConfigListOutVo
();
outVo
.
setTotal
((
int
)
page
.
getTotal
());
...
...
integrate-system/src/main/java/com/system/serivce/impl/SynchronizationServiceImpl.java
浏览文件 @
54669429
package
com
.
system
.
serivce
.
impl
;
import
com.google.common.util.concurrent.ThreadFactoryBuilder
;
import
com.system.api.CommonHttpApi
;
import
com.system.constants.CommonGetConstants
;
import
com.system.constants.Constants
;
import
com.system.dao.SynchronizationOperationMapper
;
import
com.system.serivce.IDockingDistributionService
;
import
com.system.serivce.IDockingShoppingMallService
;
import
com.system.serivce.ISynchronizationService
;
import
com.system.utils.JsonUtil
;
import
com.system.utils.SnowFlakeIdUtil
;
import
com.system.utils.StringUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.ExecutorService
;
...
...
@@ -39,40 +40,33 @@ public class SynchronizationServiceImpl implements ISynchronizationService {
@Autowired
private
IDockingDistributionService
dockingDistributionService
;
@Autowired
private
SynchronizationOperationMapper
synchronizationOperationMapper
;
@Autowired
private
CommonGetConstants
commonGetConstants
;
@Autowired
private
CommonHttpApi
commonHttpApi
;
@Override
public
void
synchronization
()
{
List
<
Map
<
String
,
Object
>>
tempList
=
synchronizationOperationMapper
.
synchronizationOperationList
(
"com.system.quartz.job.SynchronizationJob"
);
for
(
Map
<
String
,
Object
>
temp
:
tempList
)
{
threadPool
.
execute
(()
->
{
Map
<
String
,
String
>
config
=
commonGetConstants
.
get
(
String
.
valueOf
(
temp
.
get
(
"doc_type"
)));
String
queueId
=
SnowFlakeIdUtil
.
generateId
().
toString
();
Map
<
String
,
Object
>
request
=
new
HashMap
<>(
3
);
String
result
=
commonHttpApi
.
commonSend
(
config
.
get
(
"requestAddress"
),
""
,
config
,
queueId
);
String
result
=
dockingShoppingMallService
.
shoppingMallMemberList
(
queueId
);
Map
<
String
,
Object
>
map
=
JsonUtil
.
toMap
(
result
,
String
.
class
,
Object
.
class
);
if
(!
CollectionUtils
.
isEmpty
(
map
)
&&
Constants
.
SUCCESS_CODE
.
equals
(
String
.
valueOf
(
map
.
get
(
Constants
.
SUCCESS_NAME
))))
{
Map
<
String
,
Object
>
data
=
JsonUtil
.
toMap
(
JsonUtil
.
toString
(
map
.
get
(
"data"
)),
String
.
class
,
Object
.
class
);
List
<
Object
>
objectList
=
JsonUtil
.
toList
(
JsonUtil
.
toString
(
data
.
get
(
"records"
)),
Object
.
class
);
if
(!
CollectionUtils
.
isEmpty
(
objectList
))
{
for
(
Object
o
:
objectList
)
{
Map
<
String
,
Object
>
temp
=
JsonUtil
.
toMap
(
JsonUtil
.
toString
(
o
),
String
.
class
,
Object
.
class
);
request
.
put
(
"disUserId"
,
temp
.
get
(
"userId"
).
toString
());
request
.
put
(
"disUserName"
,
temp
.
get
(
"nickName"
));
if
(
temp
.
containsKey
(
"referrerId"
)
&&
StringUtil
.
isNotBlank
(
String
.
valueOf
(
temp
.
get
(
"referrerId"
))))
{
request
.
put
(
"disParentId"
,
temp
.
get
(
"referrerId"
));
request
.
put
(
"disPlatformId"
,
""
);
}
else
{
request
.
put
(
"disParentId"
,
""
);
request
.
put
(
"disPlatformId"
,
"test"
);
}
request
.
put
(
"disNote"
,
""
);
}
}
}
if
(!
CollectionUtils
.
isEmpty
(
request
))
{
dockingDistributionService
.
dockingDistributionMemberCreate
(
queueId
,
request
);
List
<
Object
>
objectList
=
JsonUtil
.
toList
(
JsonUtil
.
toString
(
map
.
get
(
"data"
)),
Object
.
class
);
commonHttpApi
.
commonSendBySync
(
config
,
JsonUtil
.
toString
(
JsonUtil
.
toMap
(
JsonUtil
.
toString
(
objectList
.
get
(
0
)),
String
.
class
,
Object
.
class
)),
queueId
);
}
});
}
}
}
integrate-system/src/main/java/com/system/transfer/form/CustomFormConfigCreateInVo.java
浏览文件 @
54669429
...
...
@@ -27,12 +27,6 @@ public class CustomFormConfigCreateInVo {
/**
* 请求地址
*/
private
String
requestAddress
;
/**
* 配置方向
*/
private
String
configureDirection
;
...
...
@@ -45,9 +39,27 @@ public class CustomFormConfigCreateInVo {
/**
* 请求地址
*/
private
String
requestAddress
;
/**
* 发送地址
*/
private
String
responseAddress
;
/**
* 自定义Sql
*/
private
String
customSql
;
/**
* 表单字段映射明细
*/
private
String
formFieldMappingDetail
;
}
integrate-system/src/main/java/com/system/transfer/form/CustomFormConfigListInVo.java
浏览文件 @
54669429
...
...
@@ -9,6 +9,12 @@ import lombok.Data;
public
class
CustomFormConfigListInVo
{
/**
* 操作(1-查询 2-创建)
*/
private
Integer
operation
;
/**
* 页码
*/
private
Integer
pageNo
=
1
;
...
...
@@ -20,4 +26,12 @@ public class CustomFormConfigListInVo {
private
Integer
pageSize
=
20
;
public
CustomFormConfigListInVo
()
{
}
public
CustomFormConfigListInVo
(
Integer
operation
)
{
this
.
operation
=
operation
;
}
}
integrate-system/src/main/java/com/system/transfer/form/CustomFormConfigListOutVoRecords.java
浏览文件 @
54669429
...
...
@@ -27,12 +27,6 @@ public class CustomFormConfigListOutVoRecords {
/**
* 请求地址
*/
private
String
requestAddress
;
/**
* 配置方向
*/
private
String
configureDirection
;
...
...
@@ -45,6 +39,18 @@ public class CustomFormConfigListOutVoRecords {
/**
* 请求地址
*/
private
String
requestAddress
;
/**
* 发送地址
*/
private
String
responseAddress
;
/**
* 自定义Sql
*/
private
String
customSql
;
...
...
integrate-system/src/main/java/com/system/transfer/form/CustomFormConfigUpdateInVo.java
浏览文件 @
54669429
...
...
@@ -27,12 +27,6 @@ public class CustomFormConfigUpdateInVo {
/**
* 请求地址
*/
private
String
requestAddress
;
/**
* 配置方向
*/
private
String
configureDirection
;
...
...
@@ -45,9 +39,27 @@ public class CustomFormConfigUpdateInVo {
/**
* 请求地址
*/
private
String
requestAddress
;
/**
* 发送地址
*/
private
String
responseAddress
;
/**
* 自定义Sql
*/
private
String
customSql
;
/**
* 表单字段映射明细
*/
private
String
formFieldMappingDetail
;
}
integrate-system/src/main/java/com/system/utils/FormFieldMappingUtil.java
浏览文件 @
54669429
...
...
@@ -10,11 +10,9 @@ import java.util.stream.Collectors;
*/
public
class
FormFieldMappingUtil
{
public
static
List
<
FormFieldMappingDetailOutVoRecords
>
purchaseMapping
(
Integer
id
,
String
formFieldMappingDetail
)
{
public
static
List
<
FormFieldMappingDetailOutVoRecords
>
purchaseMapping
(
String
formFieldMappingDetail
)
{
List
<
Object
>
objectList
=
JsonUtil
.
toList
(
formFieldMappingDetail
,
Object
.
class
);
List
<
FormFieldMappingDetailOutVoRecords
>
recordsList
=
objectList
.
stream
().
map
(
m
->
JsonUtil
.
toBean
(
JsonUtil
.
toString
(
m
),
FormFieldMappingDetailOutVoRecords
.
class
)).
collect
(
Collectors
.
toList
());
recordsList
.
forEach
(
m
->
m
.
setCustomFormConfigId
(
id
));
return
recordsList
;
return
objectList
.
stream
().
map
(
m
->
JsonUtil
.
toBean
(
JsonUtil
.
toString
(
m
),
FormFieldMappingDetailOutVoRecords
.
class
)).
collect
(
Collectors
.
toList
());
}
...
...
integrate-system/src/main/java/com/system/utils/StringUtil.java
浏览文件 @
54669429
package
com
.
system
.
utils
;
import
java.util.Collection
;
import
java.util.Map
;
import
java.util.regex.Matcher
;
...
...
integrate-system/src/main/java/com/system/utils/ThirdPartyLogUtil.java
浏览文件 @
54669429
...
...
@@ -42,5 +42,18 @@ public class ThirdPartyLogUtil {
thirdPartyLogMapper
.
thirdPartyLogCreate
(
inVo
);
}
public
void
thirdPartyLogCreate
(
String
name
,
String
docType
,
String
queueId
,
String
direction
,
String
request
,
String
response
,
Integer
flag
)
{
ThirdPartyLogCreateInVo
inVo
=
new
ThirdPartyLogCreateInVo
();
inVo
.
setName
(
name
);
inVo
.
setCode
(
docType
);
inVo
.
setQueueId
(
queueId
);
inVo
.
setDirection
(
direction
);
inVo
.
setRequest
(
request
);
inVo
.
setResponse
(
response
);
inVo
.
setFlag
(
flag
);
thirdPartyLogMapper
.
thirdPartyLogCreate
(
inVo
);
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论