Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
travel-cloud
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
cloud
travel-cloud
Commits
628c4952
提交
628c4952
authored
5月 16, 2025
作者:
hzh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
订单增加作废接口
上级
be706870
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
54 行增加
和
4 行删除
+54
-4
InsureApiEnum.java
...org/dromara/common/weishi/enums/insure/InsureApiEnum.java
+4
-0
WeishiService.java
...java/org/dromara/common/weishi/service/WeishiService.java
+7
-0
WeishiServiceImpl.java
...dromara/common/weishi/service/impl/WeishiServiceImpl.java
+16
-0
WeishiController.java
.../dromara/mall/controller/weishi/app/WeishiController.java
+12
-0
IInsureService.java
.../java/org/dromara/mall/service/weishi/IInsureService.java
+7
-0
AccountServiceImpl.java
.../dromara/mall/service/weishi/impl/AccountServiceImpl.java
+1
-4
InsureServiceImpl.java
...g/dromara/mall/service/weishi/impl/InsureServiceImpl.java
+7
-0
没有找到文件。
ruoyi-common/ruoyi-common-51weishi/src/main/java/org/dromara/common/weishi/enums/insure/InsureApiEnum.java
浏览文件 @
628c4952
...
...
@@ -22,6 +22,10 @@ public enum InsureApiEnum implements ApiEnum {
* 签单接口
*/
ISSUE
(
"/api/v1/insure/issue/{OrderNum}"
,
"签单接口"
),
/**
* 作废接口
*/
ABANDON
(
"/api/v1/order/abandon/{orderId}"
,
"作废接口"
),
/**
* 订单详情
*/
...
...
ruoyi-common/ruoyi-common-51weishi/src/main/java/org/dromara/common/weishi/service/WeishiService.java
浏览文件 @
628c4952
...
...
@@ -50,6 +50,13 @@ public interface WeishiService {
*/
IssueResponse
insureIssue
(
String
token
,
String
orderNum
);
/**
* 作废接口
* @param token token
* @param orderId 订单id
*/
void
insureAbandon
(
String
token
,
Integer
orderId
);
/**
* 订单详情
*
...
...
ruoyi-common/ruoyi-common-51weishi/src/main/java/org/dromara/common/weishi/service/impl/WeishiServiceImpl.java
浏览文件 @
628c4952
...
...
@@ -104,6 +104,22 @@ public class WeishiServiceImpl implements WeishiService {
return
res
;
}
@Override
public
void
insureAbandon
(
String
token
,
Integer
orderId
)
{
Map
<
String
,
Object
>
map
=
MapUtil
.<
String
,
Object
>
builder
()
.
put
(
"orderId"
,
orderId
)
.
build
();
IssueResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
POST
,
DomainEnum
.
TEST
.
getDomain
(),
StrUtil
.
format
(
InsureApiEnum
.
ABANDON
.
getUrl
(),
map
),
token
,
null
,
IssueResponse
.
class
);
if
(!
Objects
.
equals
(
res
.
getResultTp
(),
Code
.
SUCCESS
.
getCode
()))
{
throw
new
WeishiException
(
res
.
getResultMsg
());
}
}
@Override
public
DetailResponse
insureDetail
(
String
token
,
Integer
orderId
)
{
Map
<
String
,
Object
>
map
=
MapUtil
.<
String
,
Object
>
builder
()
...
...
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/controller/weishi/app/WeishiController.java
浏览文件 @
628c4952
...
...
@@ -140,6 +140,18 @@ public class WeishiController {
return
R
.
ok
();
}
/**
* 作废接口
*
* @param orderId 订单id
*/
@PostMapping
(
"/insureAbandon/{orderId}"
)
public
R
<
IssueResponse
>
insureAbandon
(
@PathVariable
Integer
orderId
)
{
weishiService
.
insureAbandon
(
getToken
(),
orderId
);
insureService
.
insureAbandon
(
orderId
);
return
R
.
ok
();
}
/**
* 保单撤单接口
*
...
...
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/service/weishi/IInsureService.java
浏览文件 @
628c4952
...
...
@@ -63,4 +63,11 @@ public interface IInsureService extends IBaseService<InsureVo, InsureBo, Insure>
* @return 数据
*/
InsureVo
getDetail
(
Long
id
);
/**
* 作废接口
*
* @param orderId 订单id
*/
void
insureAbandon
(
Integer
orderId
);
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/service/weishi/impl/AccountServiceImpl.java
浏览文件 @
628c4952
...
...
@@ -6,15 +6,13 @@ import lombok.RequiredArgsConstructor;
import
org.dromara.common.core.utils.StringUtils
;
import
org.dromara.common.mybatis.core.mapper.BaseMapperPlus
;
import
org.dromara.common.mybatis.service.AbstractBaseService
;
import
org.dromara.mall.domain.weishi.Account
;
import
org.dromara.mall.controller.weishi.admin.bo.AccountBo
;
import
org.dromara.mall.controller.weishi.admin.vo.AccountVo
;
import
org.dromara.mall.domain.weishi.Account
;
import
org.dromara.mall.mapper.weishi.AccountMapper
;
import
org.dromara.mall.service.weishi.IAccountService
;
import
org.springframework.stereotype.Service
;
import
java.util.Map
;
/**
* 保险账号Service业务层处理
*
...
...
@@ -34,7 +32,6 @@ public class AccountServiceImpl extends AbstractBaseService<AccountVo, AccountBo
@Override
public
LambdaQueryWrapper
<
Account
>
buildQueryWrapper
(
AccountBo
bo
)
{
Map
<
String
,
Object
>
params
=
bo
.
getParams
();
LambdaQueryWrapper
<
Account
>
lqw
=
Wrappers
.
lambdaQuery
();
lqw
.
eq
(
bo
.
getDeptId
()
!=
null
,
Account:
:
getDeptId
,
bo
.
getDeptId
());
lqw
.
eq
(
StringUtils
.
isNotBlank
(
bo
.
getUsername
()),
Account:
:
getUsername
,
bo
.
getUsername
());
...
...
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/service/weishi/impl/InsureServiceImpl.java
浏览文件 @
628c4952
...
...
@@ -84,6 +84,7 @@ public class InsureServiceImpl extends AbstractBaseService<InsureVo, InsureBo, I
lqw
.
eq
(
StringUtils
.
isNotBlank
(
bo
.
getDataTp
()),
Insure:
:
getDataTp
,
bo
.
getDataTp
());
lqw
.
like
(
StringUtils
.
isNotBlank
(
bo
.
getInsuredAbbr
()),
Insure:
:
getInsuredAbbr
,
bo
.
getInsuredAbbr
());
lqw
.
eq
(
StringUtils
.
isNotBlank
(
bo
.
getStatus
()),
Insure:
:
getStatus
,
bo
.
getStatus
());
lqw
.
eq
(
bo
.
getCreateDept
()
!=
null
,
Insure:
:
getCreateDept
,
bo
.
getCreateDept
());
lqw
.
eq
(
bo
.
getOrderTime
()
!=
null
,
Insure:
:
getOrderTime
,
bo
.
getOrderTime
());
return
lqw
;
}
...
...
@@ -181,6 +182,12 @@ public class InsureServiceImpl extends AbstractBaseService<InsureVo, InsureBo, I
updateStatus
(
orderNum
,
OrderStatus
.
E
.
getKey
());
}
@Override
public
void
insureAbandon
(
Integer
orderId
)
{
Insure
insure
=
baseMapper
.
selectOne
(
Insure:
:
getOrderId
,
orderId
);
updateStatus
(
insure
.
getOrderNum
(),
OrderStatus
.
A
.
getKey
());
}
private
void
updateStatus
(
String
orderNum
,
String
orderStatus
)
{
Insure
insure
=
baseMapper
.
selectOne
(
Insure:
:
getOrderNum
,
orderNum
);
insure
.
setStatus
(
orderStatus
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论