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
8bd1fa35
提交
8bd1fa35
authored
11月 28, 2022
作者:
inroi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
微调
上级
ef1192d6
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
99 行增加
和
13 行删除
+99
-13
MallCommonSyncConfigController.java
...com/system/controller/MallCommonSyncConfigController.java
+25
-0
MallCommonSyncController.java
.../java/com/system/controller/MallCommonSyncController.java
+1
-1
MallLoginScheduler.java
src/main/java/com/system/scheduler/MallLoginScheduler.java
+2
-1
IMallCommonSyncConfigService.java
...java/com/system/serivce/IMallCommonSyncConfigService.java
+7
-0
IMallSyncServiceImpl.java
...in/java/com/system/serivce/impl/IMallSyncServiceImpl.java
+16
-11
MallCommonSyncConfigServiceImpl.java
.../system/serivce/impl/MallCommonSyncConfigServiceImpl.java
+11
-0
SynchronizationServiceImpl.java
...a/com/system/serivce/impl/SynchronizationServiceImpl.java
+2
-0
InitConnectParamCreateInVo.java
...system/transfer/configure/InitConnectParamCreateInVo.java
+35
-0
没有找到文件。
src/main/java/com/system/controller/MallCommonSyncConfigController.java
0 → 100644
浏览文件 @
8bd1fa35
package
com
.
system
.
controller
;
import
com.system.transfer.configure.InitConnectParamCreateInVo
;
import
com.system.transfer.response.RestResponse
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* @author Inori
*/
@Api
(
tags
=
"商城同步配置"
)
@RestController
@RequestMapping
(
"/api"
)
public
class
MallCommonSyncConfigController
{
@PostMapping
(
"/init/connect/param/create"
)
public
RestResponse
initConnectParamCreate
(
@RequestBody
InitConnectParamCreateInVo
inVo
)
{
return
RestResponse
.
success
();
}
}
src/main/java/com/system/controller/MallCommonSyncController.java
浏览文件 @
8bd1fa35
...
...
@@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.*;
/**
* @author Inori
*/
@Api
(
tags
=
"
自动
同步"
)
@Api
(
tags
=
"
商城
同步"
)
@RestController
@RequestMapping
(
"/api"
)
public
class
MallCommonSyncController
{
...
...
src/main/java/com/system/scheduler/MallLoginScheduler.java
浏览文件 @
8bd1fa35
...
...
@@ -28,8 +28,9 @@ public class MallLoginScheduler {
InitConnectParam
initConnectParam
=
commonHttpApi
.
getInitConnectParam
();
if
(
StringUtil
.
isNotNull
(
initConnectParam
))
{
B
oolean
flag
;
b
oolean
flag
;
try
{
//TODO 商城登陆
flag
=
true
;
}
catch
(
Exception
e
)
{
flag
=
false
;
...
...
src/main/java/com/system/serivce/IMallCommonSyncConfigService.java
0 → 100644
浏览文件 @
8bd1fa35
package
com
.
system
.
serivce
;
/**
* @author Inori
*/
public
interface
IMallCommonSyncConfigService
{
}
src/main/java/com/system/serivce/impl/IMallSyncServiceImpl.java
浏览文件 @
8bd1fa35
...
...
@@ -60,17 +60,22 @@ public class IMallSyncServiceImpl implements IMallSyncService {
return
;
}
Map
<
String
,
Object
>
where
=
new
HashMap
<>(
3
);
where
.
put
(
"dataId"
,
dataId
);
if
(
StringUtil
.
isNotNull
(
entryId
))
{
where
.
put
(
"entryId"
,
entryId
);
}
Map
<
String
,
Object
>
map
=
mallCommonSyncApi
.
synchronization
(
config
,
queueId
,
config
.
get
(
"name"
),
where
);
if
(!
Constants
.
SUCCESS_CODE
.
equals
(
String
.
valueOf
(
map
.
get
(
Constants
.
SUCCESS_NAME
))))
{
synchronizationRecordsMapper
.
synchronizationRecordsUpdate
(
new
SynchronizationRecordsUpdateInVo
(
id
,
queueId
,
String
.
valueOf
(
map
.
get
(
Constants
.
ERROR_MESSAGE
)),
2
));
return
;
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
String
customSql
=
config
.
get
(
"customSql"
);
if
(!
StringUtil
.
isNotBlank
(
customSql
))
{
//TODO SQL查询
}
else
{
Map
<
String
,
Object
>
where
=
new
HashMap
<>(
3
);
where
.
put
(
"dataId"
,
dataId
);
if
(
StringUtil
.
isNotNull
(
entryId
))
{
where
.
put
(
"entryId"
,
entryId
);
}
map
=
mallCommonSyncApi
.
synchronization
(
config
,
queueId
,
config
.
get
(
"name"
),
where
);
if
(!
Constants
.
SUCCESS_CODE
.
equals
(
String
.
valueOf
(
map
.
get
(
Constants
.
SUCCESS_NAME
))))
{
synchronizationRecordsMapper
.
synchronizationRecordsUpdate
(
new
SynchronizationRecordsUpdateInVo
(
id
,
queueId
,
String
.
valueOf
(
map
.
get
(
Constants
.
ERROR_MESSAGE
)),
2
));
return
;
}
}
this
.
encapsulationRequest
(
config
,
operation
,
queueId
,
id
,
map
);
...
...
src/main/java/com/system/serivce/impl/MallCommonSyncConfigServiceImpl.java
0 → 100644
浏览文件 @
8bd1fa35
package
com
.
system
.
serivce
.
impl
;
import
com.system.serivce.IMallCommonSyncConfigService
;
import
org.springframework.stereotype.Service
;
/**
* @author Inori
*/
@Service
public
class
MallCommonSyncConfigServiceImpl
implements
IMallCommonSyncConfigService
{
}
src/main/java/com/system/serivce/impl/SynchronizationServiceImpl.java
浏览文件 @
8bd1fa35
...
...
@@ -6,6 +6,7 @@ import com.system.mall.MallCommonApi;
import
com.system.serivce.ISynchronizationService
;
import
com.system.transfer.mall.MallTriggerSynchronizationInVo
;
import
com.system.transfer.mall.SynchronizationRecordsListOutVoRecords
;
import
com.system.utils.JsonUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -60,6 +61,7 @@ public class SynchronizationServiceImpl implements ISynchronizationService {
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
synchronization
(
List
<
Integer
>
request
)
{
System
.
out
.
println
(
JsonUtil
.
toString
(
request
));
List
<
Map
<
String
,
Object
>>
tempList
=
mallCommonApi
.
getSynchronizationRecords
(
request
);
if
(!
CollectionUtils
.
isEmpty
(
tempList
))
{
...
...
src/main/java/com/system/transfer/configure/InitConnectParamCreateInVo.java
0 → 100644
浏览文件 @
8bd1fa35
package
com
.
system
.
transfer
.
configure
;
import
lombok.Data
;
/**
* @author Inori
*/
@Data
public
class
InitConnectParamCreateInVo
{
/**
* 商城地址
*/
private
String
mallAddress
;
/**
* 用户名
*/
private
String
account
;
/**
* 密码
*/
private
String
password
;
/**
* 任务时长/分钟
*/
private
Integer
duration
;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论