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
79a74970
提交
79a74970
authored
10月 19, 2022
作者:
inroi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
微调
上级
9480d705
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
15 行增加
和
14 行删除
+15
-14
DockingDistributionServiceImpl.java
...m/system/serivce/impl/DockingDistributionServiceImpl.java
+6
-5
DockingServiceImpl.java
...main/java/com/system/serivce/impl/DockingServiceImpl.java
+7
-3
JsonUtil.java
...grate-system/src/main/java/com/system/utils/JsonUtil.java
+1
-6
StringUtil.java
...ate-system/src/main/java/com/system/utils/StringUtil.java
+1
-0
没有找到文件。
integrate-system/src/main/java/com/system/serivce/impl/DockingDistributionServiceImpl.java
浏览文件 @
79a74970
...
...
@@ -5,6 +5,7 @@ import com.system.serivce.IDockingDistributionService;
import
com.system.transfer.response.RestResponse
;
import
com.system.utils.HttpClientUtil
;
import
com.system.utils.JsonUtil
;
import
com.system.utils.StringUtil
;
import
com.system.utils.ThirdPartyLogUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -36,7 +37,7 @@ public class DockingDistributionServiceImpl implements IDockingDistributionServi
data
.
put
(
"secret"
,
secret
);
String
result
=
HttpClientUtil
.
sendPost
(
"http://192.168.0.34:8080/api/v1/memberAdd"
,
JsonUtil
.
toString
(
data
));
thirdPartyLogUtil
.
thirdPartyLogCreate
(
"分销会员创建"
,
"0002"
,
queueId
,
"平台->分销"
,
JsonUtil
.
toString
(
data
),
result
);
thirdPartyLogUtil
.
thirdPartyLogCreate
(
"分销会员创建"
,
"0002"
,
queueId
,
"平台->分销"
,
JsonUtil
.
toString
(
data
),
StringUtil
.
replaceBlank
(
result
)
);
return
result
;
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
...
...
@@ -50,7 +51,7 @@ public class DockingDistributionServiceImpl implements IDockingDistributionServi
data
.
put
(
"secret"
,
secret
);
String
result
=
HttpClientUtil
.
sendPost
(
"http://192.168.0.34:8080/api/v1/trade"
,
JsonUtil
.
toString
(
data
));
thirdPartyLogUtil
.
thirdPartyLogCreate
(
"分销交易创建"
,
"0001"
,
queueId
,
"平台->分销"
,
JsonUtil
.
toString
(
data
),
result
);
thirdPartyLogUtil
.
thirdPartyLogCreate
(
"分销交易创建"
,
"0001"
,
queueId
,
"平台->分销"
,
JsonUtil
.
toString
(
data
),
StringUtil
.
replaceBlank
(
result
)
);
return
result
;
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
...
...
@@ -87,7 +88,7 @@ public class DockingDistributionServiceImpl implements IDockingDistributionServi
data
.
put
(
"memberId"
,
memberId
);
String
result
=
HttpClientUtil
.
sendPost
(
"http://192.168.0.34:8080/api/v1/subordinate"
,
JsonUtil
.
toString
(
data
));
thirdPartyLogUtil
.
thirdPartyLogCreate
(
"分销会员下级查询"
,
"0001"
,
queueId
,
"平台->分销"
,
JsonUtil
.
toString
(
data
),
result
);
thirdPartyLogUtil
.
thirdPartyLogCreate
(
"分销会员下级查询"
,
"0001"
,
queueId
,
"平台->分销"
,
JsonUtil
.
toString
(
data
),
StringUtil
.
replaceBlank
(
result
)
);
return
result
;
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
...
...
@@ -103,7 +104,7 @@ public class DockingDistributionServiceImpl implements IDockingDistributionServi
data
.
put
(
"memberId"
,
memberId
);
String
result
=
HttpClientUtil
.
sendPost
(
"http://192.168.0.34:8080/api/v1/member/balance"
,
JsonUtil
.
toString
(
data
));
thirdPartyLogUtil
.
thirdPartyLogCreate
(
"分销会员余额查询"
,
"0001"
,
queueId
,
"平台->分销"
,
JsonUtil
.
toString
(
data
),
result
);
thirdPartyLogUtil
.
thirdPartyLogCreate
(
"分销会员余额查询"
,
"0001"
,
queueId
,
"平台->分销"
,
JsonUtil
.
toString
(
data
),
StringUtil
.
replaceBlank
(
result
)
);
return
result
;
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
...
...
@@ -121,7 +122,7 @@ public class DockingDistributionServiceImpl implements IDockingDistributionServi
data
.
put
(
"limit"
,
14
);
String
result
=
HttpClientUtil
.
sendPost
(
"http://192.168.0.34:8080/api/v1/member/profit"
,
JsonUtil
.
toString
(
data
));
thirdPartyLogUtil
.
thirdPartyLogCreate
(
"分销会员收益查询"
,
"0001"
,
queueId
,
"平台->分销"
,
JsonUtil
.
toString
(
data
),
result
);
thirdPartyLogUtil
.
thirdPartyLogCreate
(
"分销会员收益查询"
,
"0001"
,
queueId
,
"平台->分销"
,
JsonUtil
.
toString
(
data
),
StringUtil
.
replaceBlank
(
result
)
);
return
result
;
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
...
...
integrate-system/src/main/java/com/system/serivce/impl/DockingServiceImpl.java
浏览文件 @
79a74970
...
...
@@ -42,7 +42,7 @@ public class DockingServiceImpl implements IDockingService {
data
.
put
(
"disParentId"
,
inVo
.
getReferrerId
());
if
(
StringUtil
.
isBlank
(
inVo
.
getReferrerId
()))
{
data
.
put
(
"disPlatformId"
,
"test"
);
}
else
{
}
else
{
data
.
put
(
"disPlatformId"
,
""
);
}
data
.
put
(
"disNote"
,
inVo
.
getRemark
());
...
...
@@ -84,21 +84,25 @@ public class DockingServiceImpl implements IDockingService {
}
String
result
=
dockingDistributionService
.
dockingDistributionMemberSubordinateList
(
inVo
.
getQueueId
(),
inVo
.
getMemberId
());
List
<
Map
<
String
,
Object
>>
recordsList
=
new
ArrayList
<>();
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
))))
{
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
());
Map
<
String
,
Object
>
response
=
tempList
.
stream
().
filter
(
m
->
inVo
.
getMemberId
().
equals
(
m
.
get
(
"memberId"
))).
findFirst
().
orElse
(
new
HashMap
<>(
1
));
List
<
Map
<
String
,
Object
>>
recordsList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
temp01List
=
tempList
.
stream
().
filter
(
m
->
inVo
.
getMemberId
().
equals
(
m
.
get
(
"parentId"
))).
collect
(
Collectors
.
toList
());
for
(
Map
<
String
,
Object
>
temp
:
temp01List
)
{
List
<
Map
<
String
,
Object
>>
temp02List
=
tempList
.
stream
().
filter
(
m
->
temp
.
get
(
"memberId"
).
equals
(
m
.
get
(
"parentId"
))).
collect
(
Collectors
.
toList
());
temp
.
put
(
"children"
,
temp02List
);
recordsList
.
add
(
temp
);
}
response
.
put
(
"children"
,
recordsList
);
return
RestResponse
.
success
(
response
);
}
return
RestResponse
.
success
(
recordsList
);
return
RestResponse
.
success
();
}
@Override
...
...
integrate-system/src/main/java/com/system/utils/JsonUtil.java
浏览文件 @
79a74970
package
com
.
system
.
utils
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
...
...
@@ -18,6 +17,7 @@ import java.util.Map;
*/
@Slf4j
public
class
JsonUtil
{
private
static
final
ObjectMapper
MAPPER
=
new
ObjectMapper
();
...
...
@@ -36,7 +36,6 @@ public class JsonUtil {
}
}
public
static
<
T
>
T
toBean
(
String
json
,
Class
<
T
>
tClass
)
{
try
{
return
MAPPER
.
readValue
(
json
,
tClass
);
...
...
@@ -52,7 +51,6 @@ public class JsonUtil {
}
}
public
static
<
T
>
String
listToJson
(
List
<
T
>
list
)
{
if
(
null
!=
list
&&
list
.
size
()
>
0
)
{
JSONArray
jsonArray
=
JSONArray
.
fromObject
(
list
);
...
...
@@ -61,7 +59,6 @@ public class JsonUtil {
return
""
;
}
public
static
<
E
>
List
<
E
>
toList
(
String
json
,
Class
<
E
>
eClass
)
{
try
{
return
MAPPER
.
readValue
(
json
,
MAPPER
.
getTypeFactory
().
constructCollectionType
(
List
.
class
,
eClass
));
...
...
@@ -71,7 +68,6 @@ public class JsonUtil {
}
}
public
static
<
K
,
V
>
Map
<
K
,
V
>
toMap
(
String
json
,
Class
<
K
>
kClass
,
Class
<
V
>
vClass
)
{
try
{
return
MAPPER
.
readValue
(
json
,
MAPPER
.
getTypeFactory
().
constructMapType
(
Map
.
class
,
kClass
,
vClass
));
...
...
@@ -81,7 +77,6 @@ public class JsonUtil {
}
}
public
static
<
T
>
T
nativeRead
(
String
json
,
TypeReference
<
T
>
type
)
{
try
{
return
MAPPER
.
readValue
(
json
,
type
);
...
...
integrate-system/src/main/java/com/system/utils/StringUtil.java
浏览文件 @
79a74970
...
...
@@ -12,6 +12,7 @@ import java.util.regex.Pattern;
* @author ruoyi
*/
public
class
StringUtil
extends
org
.
apache
.
commons
.
lang3
.
StringUtils
{
/**
* 空字符串
*/
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论