Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
mall-adapter
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
inroi
mall-adapter
Commits
bbbb9d0b
提交
bbbb9d0b
authored
11月 16, 2022
作者:
inroi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
微调
上级
639a3a9b
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
288 行增加
和
53 行删除
+288
-53
CommonGetApi.java
src/main/java/com/system/api/CommonGetApi.java
+1
-1
MallCommonGetConstants.java
...ain/java/com/system/constants/MallCommonGetConstants.java
+3
-3
MallCommonPostConstants.java
...in/java/com/system/constants/MallCommonPostConstants.java
+4
-4
MallCommonSyncConstants.java
...in/java/com/system/constants/MallCommonSyncConstants.java
+66
-0
MallCommonConfigMapper.java
src/main/java/com/system/dao/MallCommonConfigMapper.java
+9
-3
MallLogMapper.java
src/main/java/com/system/dao/MallLogMapper.java
+18
-0
MallCommonConfigMapper.xml
...ain/java/com/system/dao/mapper/MallCommonConfigMapper.xml
+15
-10
MallLogMapper.xml
src/main/java/com/system/dao/mapper/MallLogMapper.xml
+19
-0
IMallSyncServiceImpl.java
...in/java/com/system/serivce/impl/IMallSyncServiceImpl.java
+41
-2
MallCommonConfigListInVo.java
...va/com/system/transfer/form/MallCommonConfigListInVo.java
+0
-27
MallCommonConfigListOutVoRecords.java
...ystem/transfer/form/MallCommonConfigListOutVoRecords.java
+15
-3
MallLogCreateInVo.java
src/main/java/com/system/transfer/log/MallLogCreateInVo.java
+65
-0
MallLogUtil.java
src/main/java/com/system/utils/MallLogUtil.java
+32
-0
没有找到文件。
src/main/java/com/system/api/CommonGetApi.java
浏览文件 @
bbbb9d0b
...
@@ -80,7 +80,7 @@ public class CommonGetApi {
...
@@ -80,7 +80,7 @@ public class CommonGetApi {
return
""
;
return
""
;
}
}
public
String
commonSync
(
String
responseAddress
,
String
queueId
,
Map
<
String
,
String
>
config
,
String
json
)
{
public
String
commonSync
(
String
responseAddress
,
Map
<
String
,
String
>
config
,
String
queueId
,
String
json
)
{
try
{
try
{
String
result
=
HttpUtil
.
httpPost
(
responseAddress
,
json
).
getBody
();
String
result
=
HttpUtil
.
httpPost
(
responseAddress
,
json
).
getBody
();
thirdPartyLogUtil
.
thirdPartyLogCreate
(
config
.
get
(
"name"
),
config
.
get
(
"docType"
),
queueId
,
config
.
get
(
"configureDirection"
),
json
,
result
);
thirdPartyLogUtil
.
thirdPartyLogCreate
(
config
.
get
(
"name"
),
config
.
get
(
"docType"
),
queueId
,
config
.
get
(
"configureDirection"
),
json
,
result
);
...
...
src/main/java/com/system/constants/MallCommonGetConstants.java
浏览文件 @
bbbb9d0b
package
com
.
system
.
constants
;
package
com
.
system
.
constants
;
import
com.system.dao.MallCommonConfigMapper
;
import
com.system.dao.MallCommonConfigMapper
;
import
com.system.transfer.form.MallCommonConfigListInVo
;
import
com.system.transfer.form.MallCommonConfigListOutVoRecords
;
import
com.system.transfer.form.MallCommonConfigListOutVoRecords
;
import
com.system.utils.JsonUtil
;
import
com.system.utils.JsonUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -14,7 +13,6 @@ import java.util.List;
...
@@ -14,7 +13,6 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
/**
/**
* @author Inori
* @author Inori
...
@@ -30,7 +28,7 @@ public class MallCommonGetConstants {
...
@@ -30,7 +28,7 @@ public class MallCommonGetConstants {
@PostConstruct
@PostConstruct
public
void
init
()
{
public
void
init
()
{
List
<
MallCommonConfigListOutVoRecords
>
recordsList
=
mallCommonConfigMapper
.
mallCommonConfig
List
(
new
MallCommonConfigListInVo
(
Stream
.
of
(
1
,
3
).
collect
(
Collectors
.
toList
()))
);
List
<
MallCommonConfigListOutVoRecords
>
recordsList
=
mallCommonConfigMapper
.
mallCommonConfig
GetList
(
);
if
(!
CollectionUtils
.
isEmpty
(
recordsList
))
{
if
(!
CollectionUtils
.
isEmpty
(
recordsList
))
{
List
<
Integer
>
idList
=
recordsList
.
stream
().
map
(
MallCommonConfigListOutVoRecords:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Integer
>
idList
=
recordsList
.
stream
().
map
(
MallCommonConfigListOutVoRecords:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Map
<
String
,
Object
>>
fieldMappingList
=
mallCommonConfigMapper
.
mallFieldMappingList
(
idList
);
List
<
Map
<
String
,
Object
>>
fieldMappingList
=
mallCommonConfigMapper
.
mallFieldMappingList
(
idList
);
...
@@ -54,9 +52,11 @@ public class MallCommonGetConstants {
...
@@ -54,9 +52,11 @@ public class MallCommonGetConstants {
private
Map
<
String
,
String
>
purchaseCustomFormConfig
(
MallCommonConfigListOutVoRecords
records
,
List
<
Map
<
String
,
Object
>>
tempList
)
{
private
Map
<
String
,
String
>
purchaseCustomFormConfig
(
MallCommonConfigListOutVoRecords
records
,
List
<
Map
<
String
,
Object
>>
tempList
)
{
Map
<
String
,
String
>
result
=
new
HashMap
<>(
10
);
Map
<
String
,
String
>
result
=
new
HashMap
<>(
10
);
result
.
put
(
"docType"
,
records
.
getDocType
());
result
.
put
(
"docType"
,
records
.
getDocType
());
result
.
put
(
"sFormId"
,
records
.
getSFormId
());
result
.
put
(
"name"
,
records
.
getName
());
result
.
put
(
"name"
,
records
.
getName
());
result
.
put
(
"operation"
,
String
.
valueOf
(
records
.
getOperation
()));
result
.
put
(
"operation"
,
String
.
valueOf
(
records
.
getOperation
()));
result
.
put
(
"requestAddress"
,
records
.
getRequestAddress
());
result
.
put
(
"requestAddress"
,
records
.
getRequestAddress
());
result
.
put
(
"entryName"
,
records
.
getEntryName
());
result
.
put
(
"customSql"
,
records
.
getCustomSql
());
result
.
put
(
"customSql"
,
records
.
getCustomSql
());
result
.
put
(
"formFieldMappingDetail"
,
JsonUtil
.
toString
(
tempList
));
result
.
put
(
"formFieldMappingDetail"
,
JsonUtil
.
toString
(
tempList
));
return
result
;
return
result
;
...
...
src/main/java/com/system/constants/MallCommonPostConstants.java
浏览文件 @
bbbb9d0b
package
com
.
system
.
constants
;
package
com
.
system
.
constants
;
import
com.system.dao.MallCommonConfigMapper
;
import
com.system.dao.MallCommonConfigMapper
;
import
com.system.transfer.form.MallCommonConfigListInVo
;
import
com.system.transfer.form.MallCommonConfigListOutVoRecords
;
import
com.system.transfer.form.MallCommonConfigListOutVoRecords
;
import
com.system.utils.JsonUtil
;
import
com.system.utils.JsonUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -14,7 +13,6 @@ import java.util.List;
...
@@ -14,7 +13,6 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
/**
/**
* @author Inori
* @author Inori
...
@@ -30,7 +28,7 @@ public class MallCommonPostConstants {
...
@@ -30,7 +28,7 @@ public class MallCommonPostConstants {
@PostConstruct
@PostConstruct
public
void
init
()
{
public
void
init
()
{
List
<
MallCommonConfigListOutVoRecords
>
recordsList
=
mallCommonConfigMapper
.
mallCommonConfigList
(
new
MallCommonConfigListInVo
(
Stream
.
of
(
2
).
collect
(
Collectors
.
toList
()))
);
List
<
MallCommonConfigListOutVoRecords
>
recordsList
=
mallCommonConfigMapper
.
mallCommonConfigList
(
2
);
if
(!
CollectionUtils
.
isEmpty
(
recordsList
))
{
if
(!
CollectionUtils
.
isEmpty
(
recordsList
))
{
List
<
Integer
>
idList
=
recordsList
.
stream
().
map
(
MallCommonConfigListOutVoRecords:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Integer
>
idList
=
recordsList
.
stream
().
map
(
MallCommonConfigListOutVoRecords:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Map
<
String
,
Object
>>
fieldMappingList
=
mallCommonConfigMapper
.
mallFieldMappingList
(
idList
);
List
<
Map
<
String
,
Object
>>
fieldMappingList
=
mallCommonConfigMapper
.
mallFieldMappingList
(
idList
);
...
@@ -54,9 +52,11 @@ public class MallCommonPostConstants {
...
@@ -54,9 +52,11 @@ public class MallCommonPostConstants {
private
Map
<
String
,
String
>
purchaseCustomFormConfig
(
MallCommonConfigListOutVoRecords
records
,
List
<
Map
<
String
,
Object
>>
tempList
)
{
private
Map
<
String
,
String
>
purchaseCustomFormConfig
(
MallCommonConfigListOutVoRecords
records
,
List
<
Map
<
String
,
Object
>>
tempList
)
{
Map
<
String
,
String
>
result
=
new
HashMap
<>(
10
);
Map
<
String
,
String
>
result
=
new
HashMap
<>(
10
);
result
.
put
(
"docType"
,
records
.
getDocType
());
result
.
put
(
"docType"
,
records
.
getDocType
());
result
.
put
(
"sFormId"
,
records
.
getSFormId
());
result
.
put
(
"name"
,
records
.
getName
());
result
.
put
(
"name"
,
records
.
getName
());
result
.
put
(
"requestAddress"
,
records
.
getRequestAddress
());
result
.
put
(
"operation"
,
String
.
valueOf
(
records
.
getOperation
()));
result
.
put
(
"operation"
,
String
.
valueOf
(
records
.
getOperation
()));
result
.
put
(
"requestAddress"
,
records
.
getRequestAddress
());
result
.
put
(
"entryName"
,
records
.
getEntryName
());
result
.
put
(
"customSql"
,
records
.
getCustomSql
());
result
.
put
(
"customSql"
,
records
.
getCustomSql
());
result
.
put
(
"formFieldMappingDetail"
,
JsonUtil
.
toString
(
tempList
));
result
.
put
(
"formFieldMappingDetail"
,
JsonUtil
.
toString
(
tempList
));
return
result
;
return
result
;
...
...
src/main/java/com/system/constants/MallCommonSyncConstants.java
0 → 100644
浏览文件 @
bbbb9d0b
package
com
.
system
.
constants
;
import
com.system.dao.MallCommonConfigMapper
;
import
com.system.transfer.form.MallCommonConfigListOutVoRecords
;
import
com.system.utils.JsonUtil
;
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
;
import
java.util.stream.Collectors
;
/**
* @author Inori
*/
@Component
public
class
MallCommonSyncConstants
{
private
Map
<
String
,
Map
<
String
,
String
>>
map
=
new
ConcurrentHashMap
<>();
@Autowired
private
MallCommonConfigMapper
mallCommonConfigMapper
;
@PostConstruct
public
void
init
()
{
List
<
MallCommonConfigListOutVoRecords
>
recordsList
=
mallCommonConfigMapper
.
mallCommonConfigList
(
3
);
if
(!
CollectionUtils
.
isEmpty
(
recordsList
))
{
List
<
Integer
>
idList
=
recordsList
.
stream
().
map
(
MallCommonConfigListOutVoRecords:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Map
<
String
,
Object
>>
fieldMappingList
=
mallCommonConfigMapper
.
mallFieldMappingList
(
idList
);
for
(
MallCommonConfigListOutVoRecords
records
:
recordsList
)
{
List
<
Map
<
String
,
Object
>>
tempList
=
fieldMappingList
.
stream
().
filter
(
m
->
records
.
getId
().
equals
(
m
.
get
(
"id"
))).
collect
(
Collectors
.
toList
());
this
.
map
.
put
(
records
.
getSFormId
(),
this
.
purchaseCustomFormConfig
(
records
,
tempList
));
}
}
}
public
Map
<
String
,
String
>
get
(
String
sFormId
)
{
if
(
CollectionUtils
.
isEmpty
(
this
.
map
))
{
return
new
HashMap
<>(
1
);
}
return
this
.
map
.
get
(
sFormId
);
}
/**
* 封装自定义表单配置
*/
private
Map
<
String
,
String
>
purchaseCustomFormConfig
(
MallCommonConfigListOutVoRecords
records
,
List
<
Map
<
String
,
Object
>>
tempList
)
{
Map
<
String
,
String
>
result
=
new
HashMap
<>(
10
);
result
.
put
(
"docType"
,
records
.
getDocType
());
result
.
put
(
"sFormId"
,
records
.
getSFormId
());
result
.
put
(
"name"
,
records
.
getName
());
result
.
put
(
"operation"
,
String
.
valueOf
(
records
.
getOperation
()));
result
.
put
(
"requestAddress"
,
records
.
getRequestAddress
());
result
.
put
(
"entryName"
,
records
.
getEntryName
());
result
.
put
(
"customSql"
,
records
.
getCustomSql
());
result
.
put
(
"formFieldMappingDetail"
,
JsonUtil
.
toString
(
tempList
));
return
result
;
}
}
src/main/java/com/system/dao/MallCommonConfigMapper.java
浏览文件 @
bbbb9d0b
package
com
.
system
.
dao
;
package
com
.
system
.
dao
;
import
com.system.transfer.form.MallCommonConfigListInVo
;
import
com.system.transfer.form.MallCommonConfigListOutVoRecords
;
import
com.system.transfer.form.MallCommonConfigListOutVoRecords
;
import
java.util.List
;
import
java.util.List
;
...
@@ -14,10 +13,17 @@ public interface MallCommonConfigMapper {
...
@@ -14,10 +13,17 @@ public interface MallCommonConfigMapper {
/**
/**
* 商城表单配置列表
* 商城表单配置列表
*
*
* @param
inVo 条件
* @param
operation 操作
* @return 列表
* @return 列表
*/
*/
List
<
MallCommonConfigListOutVoRecords
>
mallCommonConfigList
(
MallCommonConfigListInVo
inVo
);
List
<
MallCommonConfigListOutVoRecords
>
mallCommonConfigList
(
Integer
operation
);
/**
* 商城Get表单配置列表
*
* @return 列表
*/
List
<
MallCommonConfigListOutVoRecords
>
mallCommonConfigGetList
();
/**
/**
* 商城通用配置字段映射列表
* 商城通用配置字段映射列表
...
...
src/main/java/com/system/dao/MallLogMapper.java
0 → 100644
浏览文件 @
bbbb9d0b
package
com
.
system
.
dao
;
import
com.system.transfer.log.MallLogCreateInVo
;
/**
* @author Inori
*/
public
interface
MallLogMapper
{
/**
* 商城日志创建
*
* @param inVo 条件
*/
void
mallLogCreate
(
MallLogCreateInVo
inVo
);
}
src/main/java/com/system/dao/mapper/MallCommonConfigMapper.xml
浏览文件 @
bbbb9d0b
...
@@ -4,20 +4,25 @@
...
@@ -4,20 +4,25 @@
<select
id=
"mallCommonConfigList"
parameterType=
"
com.system.transfer.form.MallCommonConfigListInVo
"
resultType=
"com.system.transfer.form.MallCommonConfigListOutVoRecords"
>
<select
id=
"mallCommonConfigList"
parameterType=
"
java.lang.Integer
"
resultType=
"com.system.transfer.form.MallCommonConfigListOutVoRecords"
>
SELECT
SELECT
m1.id, m1.doc_type, m1.name, m1.request_address, m1.operation, m1.custom_sql, m1.create_time
id, doc_type, s_form_id, name, operation, request_address, entry_name, custom_sql, create_time
FROM tb_mall_common_config WHERE operation = #{operation}
</select>
<select
id=
"mallCommonConfigGetList"
resultType=
"com.system.transfer.form.MallCommonConfigListOutVoRecords"
>
SELECT
m1.id, m1.doc_type, m1.s_form_id, m1.name, m1.operation, m1.request_address, m1.entry_name, m1.custom_sql, m1.create_time
FROM tb_mall_common_config AS m1 INNER JOIN (
FROM tb_mall_common_config AS m1 INNER JOIN (
SELECT
SELECT
doc_type, MIN(operation) AS operation
s_form_id, MIN(operation) AS operation
FROM tb_mall_common_config
FROM tb_mall_common_config WHERE operation IN (1, 3) GROUP BY s_form_id
GROUP BY doc_type
) AS m2 ON m1.s_form_id = m2.s_form_id AND m1.operation = m2.operation
) AS m2 ON m1.doc_type = m2.doc_type AND m1.operation = m2.operation
WHERE m1.operation IN
<foreach
collection=
"operationList"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</select>
</select>
...
...
src/main/java/com/system/dao/mapper/MallLogMapper.xml
0 → 100644
浏览文件 @
bbbb9d0b
<?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.MallLogMapper"
>
<select
id=
"mallLogCreate"
parameterType=
"com.system.transfer.log.MallLogCreateInVo"
>
INSERT INTO tb_mall_log (
`name`, code, queue_id, operation, request, flag, response, message
) VALUES (
#{name}, #{code}, #{queueId}, #{operation}, #{request}, #{flag}, #{response}, #{message}
)
</select>
</mapper>
src/main/java/com/system/serivce/impl/IMallSyncServiceImpl.java
浏览文件 @
bbbb9d0b
package
com
.
system
.
serivce
.
impl
;
package
com
.
system
.
serivce
.
impl
;
import
com.system.api.CommonGetApi
;
import
com.system.api.CommonGetApi
;
import
com.system.constants.MallCommonGetConstants
;
import
com.system.constants.Constants
;
import
com.system.constants.MallCommonSyncConstants
;
import
com.system.serivce.IMallSyncService
;
import
com.system.serivce.IMallSyncService
;
import
com.system.utils.JsonUtil
;
import
com.system.utils.MallLogUtil
;
import
com.system.utils.SnowFlakeIdUtil
;
import
com.system.utils.ThirdPartyLogUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
/**
* @author Inori
* @author Inori
...
@@ -13,14 +22,44 @@ import org.springframework.stereotype.Service;
...
@@ -13,14 +22,44 @@ import org.springframework.stereotype.Service;
public
class
IMallSyncServiceImpl
implements
IMallSyncService
{
public
class
IMallSyncServiceImpl
implements
IMallSyncService
{
@Autowired
@Autowired
private
MallCommon
GetConstants
mallCommonGet
Constants
;
private
MallCommon
SyncConstants
mallCommonSync
Constants
;
@Autowired
@Autowired
private
CommonGetApi
commonGetApi
;
private
CommonGetApi
commonGetApi
;
@Autowired
private
MallLogUtil
mallLogUtil
;
@Autowired
private
ThirdPartyLogUtil
thirdPartyLogUtil
;
@Override
@Override
public
void
synchronization
(
Integer
id
,
String
sFormId
,
Integer
dataId
,
Integer
entryId
)
{
public
void
synchronization
(
Integer
id
,
String
sFormId
,
Integer
dataId
,
Integer
entryId
)
{
String
queueId
=
SnowFlakeIdUtil
.
generateId
().
toString
();
Map
<
String
,
String
>
config
=
mallCommonSyncConstants
.
get
(
sFormId
);
if
(!
CollectionUtils
.
isEmpty
(
config
))
{
mallLogUtil
.
thirdPartyErrorLogCreate
(
"商城同步失败"
,
sFormId
,
queueId
,
3
,
""
,
"sFormId为: "
+
sFormId
+
" 的商城表单不存在"
);
return
;
}
Map
<
String
,
Object
>
data
=
new
HashMap
<>();
String
result
=
commonGetApi
.
commonGet
(
config
,
data
,
queueId
);
Map
<
String
,
Object
>
map
=
JsonUtil
.
toMap
(
result
,
String
.
class
,
Object
.
class
);
if
(!
CollectionUtils
.
isEmpty
(
map
))
{
if
(!
map
.
containsKey
(
Constants
.
SUCCESS_NAME
)
||
!
Constants
.
SUCCESS_CODE
.
equals
(
String
.
valueOf
(
map
.
get
(
Constants
.
SUCCESS_NAME
))))
{
return
;
}
}
else
{
return
;
}
Map
<
String
,
Object
>
request
=
new
HashMap
<>();
request
.
put
(
"docType"
,
config
.
get
(
"docType"
));
request
.
put
(
"update"
,
""
);
request
.
put
(
"data"
,
map
.
get
(
"data"
));
//TODO 同步至某某地址
String
response
=
commonGetApi
.
commonSync
(
""
,
config
,
queueId
,
JsonUtil
.
toString
(
request
));
/*List<Object> objectList = JsonUtil.toList(responseEntity.getBody(), Object.class);
/*List<Object> objectList = JsonUtil.toList(responseEntity.getBody(), Object.class);
for (Object object : objectList) {
for (Object object : objectList) {
Map<String, Object> temp = JsonUtil.toMap(JsonUtil.toString(object), String.class, Object.class);
Map<String, Object> temp = JsonUtil.toMap(JsonUtil.toString(object), String.class, Object.class);
...
...
src/main/java/com/system/transfer/form/MallCommonConfigListInVo.java
deleted
100644 → 0
浏览文件 @
639a3a9b
package
com
.
system
.
transfer
.
form
;
import
lombok.Data
;
import
java.util.List
;
/**
* @author Inori
*/
@Data
public
class
MallCommonConfigListInVo
{
/**
* 操作(1-查询 2-创建/更新 3-同步)
*/
private
List
<
Integer
>
operationList
;
public
MallCommonConfigListInVo
()
{
}
public
MallCommonConfigListInVo
(
List
<
Integer
>
operationList
)
{
this
.
operationList
=
operationList
;
}
}
src/main/java/com/system/transfer/form/MallCommonConfigListOutVoRecords.java
浏览文件 @
bbbb9d0b
...
@@ -18,27 +18,39 @@ public class MallCommonConfigListOutVoRecords {
...
@@ -18,27 +18,39 @@ public class MallCommonConfigListOutVoRecords {
/**
/**
* 第三方标识
* 第三方
唯一
标识
*/
*/
private
String
docType
;
private
String
docType
;
/**
/**
* 商城标识
*/
private
String
sFormId
;
/**
* 日志名称
* 日志名称
*/
*/
private
String
name
;
private
String
name
;
/**
/**
* 操作(1-查询 2-创建/更新 3-同步)
*/
private
Integer
operation
;
/**
* 请求地址
* 请求地址
*/
*/
private
String
requestAddress
;
private
String
requestAddress
;
/**
/**
*
操作(1-查询 2-创建/更新 3-同步)
*
分类标识
*/
*/
private
Integer
operation
;
private
String
entryName
;
/**
/**
...
...
src/main/java/com/system/transfer/log/MallLogCreateInVo.java
0 → 100644
浏览文件 @
bbbb9d0b
package
com
.
system
.
transfer
.
log
;
import
lombok.Data
;
/**
* @author Inori
*/
@Data
public
class
MallLogCreateInVo
{
/**
* ID
*/
private
Integer
id
;
/**
* 业务名称
*/
private
String
name
;
/**
* 业务标识
*/
private
String
code
;
/**
* 唯一标识
*/
private
String
queueId
;
/**
* 操作(1-查询 2-创建/更新 3-同步)
*/
private
Integer
operation
;
/**
* 请求参数
*/
private
String
request
;
/**
* 是否成功(0-失败,1-成功)
*/
private
Integer
flag
;
/**
* 响应信息
*/
private
String
response
;
/**
* 错误原因
*/
private
String
message
;
}
src/main/java/com/system/utils/MallLogUtil.java
0 → 100644
浏览文件 @
bbbb9d0b
package
com
.
system
.
utils
;
import
com.system.dao.MallLogMapper
;
import
com.system.transfer.log.MallLogCreateInVo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
/**
* @author Inori
*/
@Component
public
class
MallLogUtil
{
@Autowired
private
MallLogMapper
mallLogMapper
;
public
void
thirdPartyErrorLogCreate
(
String
name
,
String
sFormId
,
String
queueId
,
Integer
operation
,
String
request
,
String
message
)
{
MallLogCreateInVo
inVo
=
new
MallLogCreateInVo
();
inVo
.
setName
(
name
);
inVo
.
setCode
(
sFormId
);
inVo
.
setQueueId
(
queueId
);
inVo
.
setOperation
(
operation
);
inVo
.
setRequest
(
request
);
inVo
.
setFlag
(
0
);
inVo
.
setMessage
(
message
);
mallLogMapper
.
mallLogCreate
(
inVo
);
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论