Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
travel-cloud
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
cloud
travel-cloud
Commits
c546b748
提交
c546b748
authored
5月 21, 2025
作者:
hzh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
代码优化
上级
106bef81
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
28 行增加
和
48 行删除
+28
-48
WeishiService.java
...java/org/dromara/common/weishi/service/WeishiService.java
+0
-6
WeishiServiceImpl.java
...dromara/common/weishi/service/impl/WeishiServiceImpl.java
+12
-30
InsureServiceImpl.java
...g/dromara/mall/service/weishi/impl/InsureServiceImpl.java
+16
-12
没有找到文件。
ruoyi-common/ruoyi-common-51weishi/src/main/java/org/dromara/common/weishi/service/WeishiService.java
浏览文件 @
c546b748
...
@@ -12,12 +12,6 @@ import java.util.List;
...
@@ -12,12 +12,6 @@ import java.util.List;
*/
*/
public
interface
WeishiService
{
public
interface
WeishiService
{
/**
* 认证接口
*
* @return 数据
*/
AuthResponse
authorize
();
/**
/**
* 认证
* 认证
...
...
ruoyi-common/ruoyi-common-51weishi/src/main/java/org/dromara/common/weishi/service/impl/WeishiServiceImpl.java
浏览文件 @
c546b748
...
@@ -7,7 +7,6 @@ import org.dromara.common.weishi.Api;
...
@@ -7,7 +7,6 @@ import org.dromara.common.weishi.Api;
import
org.dromara.common.weishi.base.RequestMethodEnum
;
import
org.dromara.common.weishi.base.RequestMethodEnum
;
import
org.dromara.common.weishi.common.ApiHttpResponse
;
import
org.dromara.common.weishi.common.ApiHttpResponse
;
import
org.dromara.common.weishi.common.Code
;
import
org.dromara.common.weishi.common.Code
;
import
org.dromara.common.weishi.config.UserConfig
;
import
org.dromara.common.weishi.enums.DomainEnum
;
import
org.dromara.common.weishi.enums.DomainEnum
;
import
org.dromara.common.weishi.enums.auth.AuthApiEnum
;
import
org.dromara.common.weishi.enums.auth.AuthApiEnum
;
import
org.dromara.common.weishi.enums.insure.InsureApiEnum
;
import
org.dromara.common.weishi.enums.insure.InsureApiEnum
;
...
@@ -29,27 +28,10 @@ import java.util.Objects;
...
@@ -29,27 +28,10 @@ import java.util.Objects;
**/
**/
public
class
WeishiServiceImpl
implements
WeishiService
{
public
class
WeishiServiceImpl
implements
WeishiService
{
@Override
public
AuthResponse
authorize
()
{
ApiHttpResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
POST
,
DomainEnum
.
TEST
.
getDomain
(),
AuthApiEnum
.
AUTHORIZE
.
getUrl
(),
null
,
JSON
.
toJSONString
(
new
AuthRequest
()
.
setUsername
(
UserConfig
.
USERNAME
)
.
setPassword
(
UserConfig
.
PASSWORD
)
));
if
(!
Objects
.
equals
(
res
.
getResultTp
(),
Code
.
SUCCESS
.
getCode
()))
{
throw
new
WeishiException
(
res
.
getResultMsg
());
}
return
JSON
.
parseObject
(
res
.
getData
(),
AuthResponse
.
class
);
}
@Override
@Override
public
AuthResponse
authorize
(
AuthRequest
request
)
{
public
AuthResponse
authorize
(
AuthRequest
request
)
{
ApiHttpResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
POST
,
ApiHttpResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
POST
,
DomainEnum
.
TEST
.
getDomain
(),
DomainEnum
.
PROD
.
getDomain
(),
AuthApiEnum
.
AUTHORIZE
.
getUrl
(),
AuthApiEnum
.
AUTHORIZE
.
getUrl
(),
null
,
null
,
JSON
.
toJSONString
(
request
));
JSON
.
toJSONString
(
request
));
...
@@ -62,7 +44,7 @@ public class WeishiServiceImpl implements WeishiService {
...
@@ -62,7 +44,7 @@ public class WeishiServiceImpl implements WeishiService {
@Override
@Override
public
ApplyResponse
insureApply
(
String
token
,
ApplyRequest
request
)
{
public
ApplyResponse
insureApply
(
String
token
,
ApplyRequest
request
)
{
ApplyResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
POST
,
ApplyResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
POST
,
DomainEnum
.
TEST
.
getDomain
(),
DomainEnum
.
PROD
.
getDomain
(),
InsureApiEnum
.
APPLY
.
getUrl
(),
InsureApiEnum
.
APPLY
.
getUrl
(),
token
,
token
,
JSON
.
toJSONString
(
request
),
JSON
.
toJSONString
(
request
),
...
@@ -76,7 +58,7 @@ public class WeishiServiceImpl implements WeishiService {
...
@@ -76,7 +58,7 @@ public class WeishiServiceImpl implements WeishiService {
@Override
@Override
public
ProposalResponse
insureProposal
(
String
token
,
ProposalRequest
request
)
{
public
ProposalResponse
insureProposal
(
String
token
,
ProposalRequest
request
)
{
ProposalResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
POST
,
ProposalResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
POST
,
DomainEnum
.
TEST
.
getDomain
(),
DomainEnum
.
PROD
.
getDomain
(),
InsureApiEnum
.
PROPOSAL
.
getUrl
(),
InsureApiEnum
.
PROPOSAL
.
getUrl
(),
token
,
token
,
JSON
.
toJSONString
(
request
),
JSON
.
toJSONString
(
request
),
...
@@ -93,7 +75,7 @@ public class WeishiServiceImpl implements WeishiService {
...
@@ -93,7 +75,7 @@ public class WeishiServiceImpl implements WeishiService {
.
put
(
"OrderNum"
,
orderNum
)
.
put
(
"OrderNum"
,
orderNum
)
.
build
();
.
build
();
IssueResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
POST
,
IssueResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
POST
,
DomainEnum
.
TEST
.
getDomain
(),
DomainEnum
.
PROD
.
getDomain
(),
StrUtil
.
format
(
InsureApiEnum
.
ISSUE
.
getUrl
(),
map
),
StrUtil
.
format
(
InsureApiEnum
.
ISSUE
.
getUrl
(),
map
),
token
,
token
,
null
,
null
,
...
@@ -110,7 +92,7 @@ public class WeishiServiceImpl implements WeishiService {
...
@@ -110,7 +92,7 @@ public class WeishiServiceImpl implements WeishiService {
.
put
(
"orderId"
,
orderId
)
.
put
(
"orderId"
,
orderId
)
.
build
();
.
build
();
IssueResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
POST
,
IssueResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
POST
,
DomainEnum
.
TEST
.
getDomain
(),
DomainEnum
.
PROD
.
getDomain
(),
StrUtil
.
format
(
InsureApiEnum
.
ABANDON
.
getUrl
(),
map
),
StrUtil
.
format
(
InsureApiEnum
.
ABANDON
.
getUrl
(),
map
),
token
,
token
,
null
,
null
,
...
@@ -126,7 +108,7 @@ public class WeishiServiceImpl implements WeishiService {
...
@@ -126,7 +108,7 @@ public class WeishiServiceImpl implements WeishiService {
.
put
(
"orderId"
,
orderId
)
.
put
(
"orderId"
,
orderId
)
.
build
();
.
build
();
ApiHttpResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
GET
,
ApiHttpResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
GET
,
DomainEnum
.
TEST
.
getDomain
(),
DomainEnum
.
PROD
.
getDomain
(),
StrUtil
.
format
(
InsureApiEnum
.
DETAIL
.
getUrl
(),
map
),
StrUtil
.
format
(
InsureApiEnum
.
DETAIL
.
getUrl
(),
map
),
token
,
token
,
null
);
null
);
...
@@ -142,7 +124,7 @@ public class WeishiServiceImpl implements WeishiService {
...
@@ -142,7 +124,7 @@ public class WeishiServiceImpl implements WeishiService {
.
put
(
"orderNum"
,
orderNum
)
.
put
(
"orderNum"
,
orderNum
)
.
build
();
.
build
();
return
Api
.
v1
(
RequestMethodEnum
.
DOWNLOAD
,
return
Api
.
v1
(
RequestMethodEnum
.
DOWNLOAD
,
DomainEnum
.
TEST
.
getDomain
(),
DomainEnum
.
PROD
.
getDomain
(),
StrUtil
.
format
(
InsureApiEnum
.
DOWNLOAD
.
getUrl
(),
map
),
StrUtil
.
format
(
InsureApiEnum
.
DOWNLOAD
.
getUrl
(),
map
),
token
,
token
,
null
,
null
,
...
@@ -156,7 +138,7 @@ public class WeishiServiceImpl implements WeishiService {
...
@@ -156,7 +138,7 @@ public class WeishiServiceImpl implements WeishiService {
.
put
(
"orderNum"
,
orderNum
)
.
put
(
"orderNum"
,
orderNum
)
.
build
();
.
build
();
ApiHttpResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
POST
,
ApiHttpResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
POST
,
DomainEnum
.
TEST
.
getDomain
(),
DomainEnum
.
PROD
.
getDomain
(),
StrUtil
.
format
(
InsureApiEnum
.
CANCEL
.
getUrl
(),
map
),
StrUtil
.
format
(
InsureApiEnum
.
CANCEL
.
getUrl
(),
map
),
token
,
token
,
null
);
null
);
...
@@ -171,7 +153,7 @@ public class WeishiServiceImpl implements WeishiService {
...
@@ -171,7 +153,7 @@ public class WeishiServiceImpl implements WeishiService {
.
put
(
"policyNum"
,
policyNum
)
.
put
(
"policyNum"
,
policyNum
)
.
build
();
.
build
();
ApiHttpResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
POST
,
ApiHttpResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
POST
,
DomainEnum
.
TEST
.
getDomain
(),
DomainEnum
.
PROD
.
getDomain
(),
StrUtil
.
format
(
InsureApiEnum
.
POLICY_CANCEL
.
getUrl
(),
map
),
StrUtil
.
format
(
InsureApiEnum
.
POLICY_CANCEL
.
getUrl
(),
map
),
token
,
token
,
null
);
null
);
...
@@ -183,7 +165,7 @@ public class WeishiServiceImpl implements WeishiService {
...
@@ -183,7 +165,7 @@ public class WeishiServiceImpl implements WeishiService {
@Override
@Override
public
List
<
ProductsResponse
>
productList
(
String
token
)
{
public
List
<
ProductsResponse
>
productList
(
String
token
)
{
ApiHttpResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
GET
,
ApiHttpResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
GET
,
DomainEnum
.
TEST
.
getDomain
(),
DomainEnum
.
PROD
.
getDomain
(),
ProductApiEnum
.
PRODUCT_LIST
.
getUrl
(),
ProductApiEnum
.
PRODUCT_LIST
.
getUrl
(),
token
,
token
,
null
);
null
);
...
@@ -199,7 +181,7 @@ public class WeishiServiceImpl implements WeishiService {
...
@@ -199,7 +181,7 @@ public class WeishiServiceImpl implements WeishiService {
.
put
(
"productId"
,
productId
)
.
put
(
"productId"
,
productId
)
.
build
();
.
build
();
ApiHttpResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
GET
,
ApiHttpResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
GET
,
DomainEnum
.
TEST
.
getDomain
(),
DomainEnum
.
PROD
.
getDomain
(),
StrUtil
.
format
(
ProductApiEnum
.
PRODUCT_DETAIL
.
getUrl
(),
map
),
StrUtil
.
format
(
ProductApiEnum
.
PRODUCT_DETAIL
.
getUrl
(),
map
),
token
,
token
,
null
);
null
);
...
@@ -216,7 +198,7 @@ public class WeishiServiceImpl implements WeishiService {
...
@@ -216,7 +198,7 @@ public class WeishiServiceImpl implements WeishiService {
.
put
(
"annexTp"
,
annexTp
)
.
put
(
"annexTp"
,
annexTp
)
.
build
();
.
build
();
ApiHttpResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
GET
,
ApiHttpResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
GET
,
DomainEnum
.
TEST
.
getDomain
(),
DomainEnum
.
PROD
.
getDomain
(),
StrUtil
.
format
(
ProductApiEnum
.
ANNEX
.
getUrl
(),
map
),
StrUtil
.
format
(
ProductApiEnum
.
ANNEX
.
getUrl
(),
map
),
token
,
token
,
null
);
null
);
...
...
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/service/weishi/impl/InsureServiceImpl.java
浏览文件 @
c546b748
...
@@ -239,18 +239,22 @@ public class InsureServiceImpl extends AbstractBaseService<InsureVo, InsureBo, I
...
@@ -239,18 +239,22 @@ public class InsureServiceImpl extends AbstractBaseService<InsureVo, InsureBo, I
//获取被保人集合
//获取被保人集合
List
<
InsureInsureds
>
insuredsList
=
insuredsMapper
.
selectList
(
new
LambdaQueryWrapper
<
InsureInsureds
>().
in
(
InsureInsureds:
:
getOrderNum
,
orderNumList
));
List
<
InsureInsureds
>
insuredsList
=
insuredsMapper
.
selectList
(
new
LambdaQueryWrapper
<
InsureInsureds
>().
in
(
InsureInsureds:
:
getOrderNum
,
orderNumList
));
insureList
.
forEach
(
i
->
{
insureList
.
forEach
(
i
->
{
DetailResponse
dr
=
weishiService
.
insureDetail
(
thirdWeishiService
.
getToken
(
i
.
getCreateDept
()),
i
.
getOrderId
());
try
{
if
(!
StringUtils
.
equals
(
i
.
getStatus
(),
dr
.
getStatus
()))
{
DetailResponse
dr
=
weishiService
.
insureDetail
(
thirdWeishiService
.
getToken
(
i
.
getCreateDept
()),
i
.
getOrderId
());
i
.
setStatus
(
dr
.
getStatus
());
if
(!
StringUtils
.
equals
(
i
.
getStatus
(),
dr
.
getStatus
()))
{
baseMapper
.
updateById
(
i
);
i
.
setStatus
(
dr
.
getStatus
());
//跟新投保单位
baseMapper
.
updateById
(
i
);
List
<
InsureUnit
>
iuList
=
StreamUtils
.
filter
(
unitList
,
u
->
StringUtils
.
equals
(
u
.
getOrderNum
(),
i
.
getOrderNum
()));
//跟新投保单位
iuList
.
forEach
(
iu
->
iu
.
setStatus
(
dr
.
getStatus
()));
List
<
InsureUnit
>
iuList
=
StreamUtils
.
filter
(
unitList
,
u
->
StringUtils
.
equals
(
u
.
getOrderNum
(),
i
.
getOrderNum
()));
unitMapper
.
updateBatch
(
iuList
);
iuList
.
forEach
(
iu
->
iu
.
setStatus
(
dr
.
getStatus
()));
//跟新被保人信息
unitMapper
.
updateBatch
(
iuList
);
List
<
InsureInsureds
>
iiList
=
StreamUtils
.
filter
(
insuredsList
,
insureds
->
StringUtils
.
equals
(
insureds
.
getOrderNum
(),
i
.
getOrderNum
()));
//跟新被保人信息
iiList
.
forEach
(
ii
->
ii
.
setStatus
(
dr
.
getStatus
()));
List
<
InsureInsureds
>
iiList
=
StreamUtils
.
filter
(
insuredsList
,
insureds
->
StringUtils
.
equals
(
insureds
.
getOrderNum
(),
i
.
getOrderNum
()));
insuredsMapper
.
updateBatch
(
iiList
);
iiList
.
forEach
(
ii
->
ii
.
setStatus
(
dr
.
getStatus
()));
insuredsMapper
.
updateBatch
(
iiList
);
}
}
catch
(
Exception
e
)
{
log
.
info
(
"旅游卫士订单{}更新失败"
,
i
.
getOrderNum
());
}
}
});
});
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论