Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
travel-cloud
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
cloud
travel-cloud
Commits
06987a4a
提交
06987a4a
authored
5月 21, 2025
作者:
hzh
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev'
上级
7645ab40
7f260ac6
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
66 个修改的文件
包含
3003 行增加
和
486 行删除
+3003
-486
RemoteWeishiService.java
...java/org/dromara/mall/api/weishi/RemoteWeishiService.java
+18
-0
RemoteDeptService.java
...c/main/java/org/dromara/system/api/RemoteDeptService.java
+8
-0
Api.java
...51weishi/src/main/java/org/dromara/common/weishi/Api.java
+0
-0
AbstractHttpDelegate.java
.../org/dromara/common/weishi/base/AbstractHttpDelegate.java
+13
-19
RequestMethodEnum.java
...ava/org/dromara/common/weishi/base/RequestMethodEnum.java
+4
-0
OrderStatus.java
.../java/org/dromara/common/weishi/constant/OrderStatus.java
+20
-0
InsureApiEnum.java
...org/dromara/common/weishi/enums/insure/InsureApiEnum.java
+13
-1
ApplyRequest.java
...ava/org/dromara/common/weishi/model/req/ApplyRequest.java
+35
-0
ApplyResponse.java
...va/org/dromara/common/weishi/model/res/ApplyResponse.java
+14
-121
AuthResponse.java
...ava/org/dromara/common/weishi/model/res/AuthResponse.java
+1
-1
DetailResponse.java
...a/org/dromara/common/weishi/model/res/DetailResponse.java
+141
-0
IssueResponse.java
...va/org/dromara/common/weishi/model/res/IssueResponse.java
+20
-142
ProposalResponse.java
...org/dromara/common/weishi/model/res/ProposalResponse.java
+10
-118
WeishiService.java
...java/org/dromara/common/weishi/service/WeishiService.java
+39
-12
WeishiServiceImpl.java
...dromara/common/weishi/service/impl/WeishiServiceImpl.java
+87
-52
WeishiJob.java
.../java/org/dromara/job/snailjob/mall/weishi/WeishiJob.java
+29
-0
WeishiOrderUpdateStatusJob.java
.../job/snailjob/mall/weishi/WeishiOrderUpdateStatusJob.java
+29
-0
AccountController.java
...omara/mall/controller/weishi/admin/AccountController.java
+53
-0
InsureController.java
...romara/mall/controller/weishi/admin/InsureController.java
+66
-0
AccountBo.java
...rg/dromara/mall/controller/weishi/admin/bo/AccountBo.java
+50
-0
InsureBo.java
...org/dromara/mall/controller/weishi/admin/bo/InsureBo.java
+177
-0
InsureInsuredsBo.java
...ara/mall/controller/weishi/admin/bo/InsureInsuredsBo.java
+98
-0
InsurePolicyHolderBo.java
...mall/controller/weishi/admin/bo/InsurePolicyHolderBo.java
+78
-0
InsureTaxpayerBo.java
...ara/mall/controller/weishi/admin/bo/InsureTaxpayerBo.java
+72
-0
InsureUnitBo.java
...dromara/mall/controller/weishi/admin/bo/InsureUnitBo.java
+68
-0
AccountVo.java
...rg/dromara/mall/controller/weishi/admin/vo/AccountVo.java
+52
-0
InsureInsuredsVo.java
...ara/mall/controller/weishi/admin/vo/InsureInsuredsVo.java
+102
-0
InsurePolicyHolderVo.java
...mall/controller/weishi/admin/vo/InsurePolicyHolderVo.java
+82
-0
InsureTaxpayerVo.java
...ara/mall/controller/weishi/admin/vo/InsureTaxpayerVo.java
+76
-0
InsureUnitVo.java
...dromara/mall/controller/weishi/admin/vo/InsureUnitVo.java
+83
-0
InsureVo.java
...org/dromara/mall/controller/weishi/admin/vo/InsureVo.java
+193
-0
WeishiController.java
.../dromara/mall/controller/weishi/app/WeishiController.java
+103
-12
Account.java
...src/main/java/org/dromara/mall/domain/weishi/Account.java
+54
-0
Insure.java
.../src/main/java/org/dromara/mall/domain/weishi/Insure.java
+198
-0
InsureInsureds.java
...n/java/org/dromara/mall/domain/weishi/InsureInsureds.java
+110
-0
InsurePolicyHolder.java
...va/org/dromara/mall/domain/weishi/InsurePolicyHolder.java
+79
-0
InsureTaxpayer.java
...n/java/org/dromara/mall/domain/weishi/InsureTaxpayer.java
+74
-0
InsureUnit.java
.../main/java/org/dromara/mall/domain/weishi/InsureUnit.java
+82
-0
RemoteWeishiServiceImpl.java
...rg/dromara/mall/dubbo/weishi/RemoteWeishiServiceImpl.java
+31
-0
AccountMapper.java
...in/java/org/dromara/mall/mapper/weishi/AccountMapper.java
+14
-0
InsureInsuredsMapper.java
.../org/dromara/mall/mapper/weishi/InsureInsuredsMapper.java
+15
-0
InsureMapper.java
...ain/java/org/dromara/mall/mapper/weishi/InsureMapper.java
+44
-0
InsurePolicyHolderMapper.java
.../dromara/mall/mapper/weishi/InsurePolicyHolderMapper.java
+15
-0
InsureTaxpayerMapper.java
.../org/dromara/mall/mapper/weishi/InsureTaxpayerMapper.java
+15
-0
InsureUnitMapper.java
...java/org/dromara/mall/mapper/weishi/InsureUnitMapper.java
+15
-0
ProductCommentServiceImpl.java
.../mall/service/product/impl/ProductCommentServiceImpl.java
+6
-3
IAccountService.java
...java/org/dromara/mall/service/weishi/IAccountService.java
+23
-0
IInsureService.java
.../java/org/dromara/mall/service/weishi/IInsureService.java
+66
-0
IThirdWeishiService.java
.../org/dromara/mall/service/weishi/IThirdWeishiService.java
+31
-0
AccountServiceImpl.java
.../dromara/mall/service/weishi/impl/AccountServiceImpl.java
+63
-0
InsureServiceImpl.java
...g/dromara/mall/service/weishi/impl/InsureServiceImpl.java
+0
-0
ThirdWeishiServiceImpl.java
...mara/mall/service/weishi/impl/ThirdWeishiServiceImpl.java
+79
-0
AccountMapper.xml
...i-mall/src/main/resources/mapper/weishi/AccountMapper.xml
+7
-0
InsureInsuredsMapper.xml
...src/main/resources/mapper/weishi/InsureInsuredsMapper.xml
+7
-0
InsureMapper.xml
...yi-mall/src/main/resources/mapper/weishi/InsureMapper.xml
+7
-0
InsurePolicyHolderMapper.xml
...main/resources/mapper/weishi/InsurePolicyHolderMapper.xml
+7
-0
InsureTaxpayerMapper.xml
...src/main/resources/mapper/weishi/InsureTaxpayerMapper.xml
+7
-0
InsureUnitMapper.xml
...all/src/main/resources/mapper/weishi/InsureUnitMapper.xml
+7
-0
SysDeptTravelLineBo.java
...ava/org/dromara/system/domain/bo/SysDeptTravelLineBo.java
+0
-3
RemoteDeptServiceImpl.java
.../java/org/dromara/system/dubbo/RemoteDeptServiceImpl.java
+23
-2
pom.xml
ruoyi-modules/ruoyi-workflow/pom.xml
+14
-0
FlowableConfig.java
.../org/dromara/workflow/flowable/config/FlowableConfig.java
+6
-0
DynamicAssigneeListener.java
...a/workflow/flowable/listener/DynamicAssigneeListener.java
+29
-0
WorkflowApplicationRunner.java
...rg/dromara/workflow/runner/WorkflowApplicationRunner.java
+3
-0
IDeptService.java
.../main/java/org/dromara/workflow/service/IDeptService.java
+13
-0
DeptServiceImpl.java
...va/org/dromara/workflow/service/impl/DeptServiceImpl.java
+25
-0
没有找到文件。
ruoyi-api/ruoyi-api-mall/src/main/java/org/dromara/mall/api/weishi/RemoteWeishiService.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
api
.
weishi
;
/**
* @author wenhe
*/
public
interface
RemoteWeishiService
{
/**
* 获取token
*/
void
getToken
();
/**
* 更新订单状态
*/
void
updateOrderStatus
();
}
ruoyi-api/ruoyi-api-system/src/main/java/org/dromara/system/api/RemoteDeptService.java
浏览文件 @
06987a4a
...
@@ -15,4 +15,12 @@ public interface RemoteDeptService {
...
@@ -15,4 +15,12 @@ public interface RemoteDeptService {
*/
*/
String
selectDeptNameByIds
(
String
deptIds
);
String
selectDeptNameByIds
(
String
deptIds
);
/**
* 获取部门负责人id
*
* @param userId 用户id
* @return 负责人id
*/
Long
selectLeaderIdByUserId
(
Long
userId
);
}
}
ruoyi-common/ruoyi-common-51weishi/src/main/java/org/dromara/common/weishi/Api.java
浏览文件 @
06987a4a
差异被折叠。
点击展开。
ruoyi-common/ruoyi-common-51weishi/src/main/java/org/dromara/common/weishi/base/AbstractHttpDelegate.java
浏览文件 @
06987a4a
...
@@ -74,9 +74,8 @@ public abstract class AbstractHttpDelegate {
...
@@ -74,9 +74,8 @@ public abstract class AbstractHttpDelegate {
* @param headers 请求头
* @param headers 请求头
* @return {@link ApiHttpResponse} 请求返回的结果
* @return {@link ApiHttpResponse} 请求返回的结果
*/
*/
public
ApiHttpResponse
get
(
String
url
,
Map
<
String
,
Object
>
paramMap
,
Map
<
String
,
String
>
headers
)
{
public
String
get
(
String
url
,
Map
<
String
,
Object
>
paramMap
,
Map
<
String
,
String
>
headers
)
{
HttpResponse
httpResponse
=
getToResponse
(
url
,
paramMap
,
headers
);
return
getToResponse
(
url
,
paramMap
,
headers
).
body
();
return
JSONObject
.
parseObject
(
httpResponse
.
body
(),
ApiHttpResponse
.
class
);
}
}
/**
/**
...
@@ -109,9 +108,8 @@ public abstract class AbstractHttpDelegate {
...
@@ -109,9 +108,8 @@ public abstract class AbstractHttpDelegate {
* @param headers 请求头
* @param headers 请求头
* @return {@link ApiHttpResponse} 请求返回的结果
* @return {@link ApiHttpResponse} 请求返回的结果
*/
*/
public
ApiHttpResponse
post
(
String
url
,
Map
<
String
,
Object
>
paramMap
,
Map
<
String
,
String
>
headers
)
{
public
String
post
(
String
url
,
Map
<
String
,
Object
>
paramMap
,
Map
<
String
,
String
>
headers
)
{
HttpResponse
httpResponse
=
postToResponse
(
url
,
headers
,
paramMap
);
return
postToResponse
(
url
,
headers
,
paramMap
).
body
();
return
JSONObject
.
parseObject
(
httpResponse
.
body
(),
ApiHttpResponse
.
class
);
}
}
/**
/**
...
@@ -122,9 +120,8 @@ public abstract class AbstractHttpDelegate {
...
@@ -122,9 +120,8 @@ public abstract class AbstractHttpDelegate {
* @param headers 请求头
* @param headers 请求头
* @return {@link ApiHttpResponse} 请求返回的结果
* @return {@link ApiHttpResponse} 请求返回的结果
*/
*/
public
ApiHttpResponse
post
(
String
url
,
String
data
,
Map
<
String
,
String
>
headers
)
{
public
String
post
(
String
url
,
String
data
,
Map
<
String
,
String
>
headers
)
{
HttpResponse
httpResponse
=
postToResponse
(
url
,
headers
,
data
);
return
postToResponse
(
url
,
headers
,
data
).
body
();
return
JSONObject
.
parseObject
(
httpResponse
.
body
(),
ApiHttpResponse
.
class
);
}
}
/**
/**
...
@@ -148,9 +145,8 @@ public abstract class AbstractHttpDelegate {
...
@@ -148,9 +145,8 @@ public abstract class AbstractHttpDelegate {
* @param headers 请求头
* @param headers 请求头
* @return {@link ApiHttpResponse} 请求返回的结果
* @return {@link ApiHttpResponse} 请求返回的结果
*/
*/
public
ApiHttpResponse
patch
(
String
url
,
String
data
,
Map
<
String
,
String
>
headers
)
{
public
String
patch
(
String
url
,
String
data
,
Map
<
String
,
String
>
headers
)
{
HttpResponse
httpResponse
=
patchToResponse
(
url
,
headers
,
data
);
return
patchToResponse
(
url
,
headers
,
data
).
body
();
return
JSONObject
.
parseObject
(
httpResponse
.
body
(),
ApiHttpResponse
.
class
);
}
}
/**
/**
...
@@ -174,9 +170,8 @@ public abstract class AbstractHttpDelegate {
...
@@ -174,9 +170,8 @@ public abstract class AbstractHttpDelegate {
* @param headers 请求头
* @param headers 请求头
* @return {@link ApiHttpResponse} 请求返回的结果
* @return {@link ApiHttpResponse} 请求返回的结果
*/
*/
public
ApiHttpResponse
delete
(
String
url
,
String
data
,
Map
<
String
,
String
>
headers
)
{
public
String
delete
(
String
url
,
String
data
,
Map
<
String
,
String
>
headers
)
{
HttpResponse
httpResponse
=
deleteToResponse
(
url
,
headers
,
data
);
return
deleteToResponse
(
url
,
headers
,
data
).
body
();
return
JSONObject
.
parseObject
(
httpResponse
.
body
(),
ApiHttpResponse
.
class
);
}
}
/**
/**
...
@@ -200,9 +195,8 @@ public abstract class AbstractHttpDelegate {
...
@@ -200,9 +195,8 @@ public abstract class AbstractHttpDelegate {
* @param headers 请求头
* @param headers 请求头
* @return {@link ApiHttpResponse} 请求返回的结果
* @return {@link ApiHttpResponse} 请求返回的结果
*/
*/
public
ApiHttpResponse
put
(
String
url
,
String
data
,
Map
<
String
,
String
>
headers
)
{
public
String
put
(
String
url
,
String
data
,
Map
<
String
,
String
>
headers
)
{
HttpResponse
httpResponse
=
putToResponse
(
url
,
headers
,
data
);
return
putToResponse
(
url
,
headers
,
data
).
body
();
return
JSONObject
.
parseObject
(
httpResponse
.
body
(),
ApiHttpResponse
.
class
);
}
}
/**
/**
...
@@ -330,7 +324,7 @@ public abstract class AbstractHttpDelegate {
...
@@ -330,7 +324,7 @@ public abstract class AbstractHttpDelegate {
* @param headers 请求头
* @param headers 请求头
* @return {@link HttpResponse} 请求返回的结果
* @return {@link HttpResponse} 请求返回的结果
*/
*/
p
rivate
HttpResponse
getToResponse
(
String
url
,
Map
<
String
,
Object
>
paramMap
,
Map
<
String
,
String
>
headers
)
{
p
ublic
HttpResponse
getToResponse
(
String
url
,
Map
<
String
,
Object
>
paramMap
,
Map
<
String
,
String
>
headers
)
{
return
HttpRequest
.
get
(
url
)
return
HttpRequest
.
get
(
url
)
.
setProxy
(
getProxy
())
.
setProxy
(
getProxy
())
.
addHeaders
(
headers
)
.
addHeaders
(
headers
)
...
...
ruoyi-common/ruoyi-common-51weishi/src/main/java/org/dromara/common/weishi/base/RequestMethodEnum.java
浏览文件 @
06987a4a
...
@@ -47,6 +47,10 @@ public enum RequestMethodEnum {
...
@@ -47,6 +47,10 @@ public enum RequestMethodEnum {
* PATCH 请求
* PATCH 请求
*/
*/
PATCH
(
"PATCH"
),
PATCH
(
"PATCH"
),
/**
*
*/
DOWNLOAD
(
"GET"
);
;
;
private
final
String
method
;
private
final
String
method
;
...
...
ruoyi-common/ruoyi-common-51weishi/src/main/java/org/dromara/common/weishi/constant/OrderStatus.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
common
.
weishi
.
constant
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
/**
* @author wenhe
*/
@Getter
@AllArgsConstructor
public
enum
OrderStatus
{
E
(
"E"
,
"已承保"
),
W
(
"W"
,
"已撤单"
),
P
(
"P"
,
"待支付"
),
A
(
"A"
,
"已作废"
),
D
(
"D"
,
"已删除"
);
private
final
String
key
;
private
final
String
value
;
}
ruoyi-common/ruoyi-common-51weishi/src/main/java/org/dromara/common/weishi/enums/insure/InsureApiEnum.java
浏览文件 @
06987a4a
...
@@ -22,10 +22,18 @@ public enum InsureApiEnum implements ApiEnum {
...
@@ -22,10 +22,18 @@ public enum InsureApiEnum implements ApiEnum {
* 签单接口
* 签单接口
*/
*/
ISSUE
(
"/api/v1/insure/issue/{OrderNum}"
,
"签单接口"
),
ISSUE
(
"/api/v1/insure/issue/{OrderNum}"
,
"签单接口"
),
/**
* 作废接口
*/
ABANDON
(
"/api/v1/order/abandon/{orderId}"
,
"作废接口"
),
/**
* 订单详情
*/
DETAIL
(
"/api/v1/order/detail/{orderId}"
,
"订单详情"
),
/**
/**
* 订单撤单接口
* 订单撤单接口
*/
*/
CANCEL
(
"/api/v1/
order/insure
/{orderNum}"
,
"订单撤单接口"
),
CANCEL
(
"/api/v1/
insure/withdraw
/{orderNum}"
,
"订单撤单接口"
),
/**
/**
* 保单撤单接口
* 保单撤单接口
*/
*/
...
@@ -38,6 +46,10 @@ public enum InsureApiEnum implements ApiEnum {
...
@@ -38,6 +46,10 @@ public enum InsureApiEnum implements ApiEnum {
* 获取投/被保险人申明接口
* 获取投/被保险人申明接口
*/
*/
AVOW_LIST
(
"/api/v1/insurer/1/avow/list"
,
"获取投/被保险人申明接口"
),
AVOW_LIST
(
"/api/v1/insurer/1/avow/list"
,
"获取投/被保险人申明接口"
),
/**
* 保单下载
*/
DOWNLOAD
(
"/api/v1/insure/download/order/{orderNum}"
,
"保单下载接口"
),
;
;
/**
/**
...
...
ruoyi-common/ruoyi-common-51weishi/src/main/java/org/dromara/common/weishi/model/req/ApplyRequest.java
浏览文件 @
06987a4a
package
org
.
dromara
.
common
.
weishi
.
model
.
req
;
package
org
.
dromara
.
common
.
weishi
.
model
.
req
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
...
@@ -14,50 +15,67 @@ public class ApplyRequest {
...
@@ -14,50 +15,67 @@ public class ApplyRequest {
/**
/**
* 流水号,幂等且唯一不能重复
* 流水号,幂等且唯一不能重复
*/
*/
@JSONField
(
name
=
"BatchNum"
)
private
String
BatchNum
;
private
String
BatchNum
;
/**
* 产品id
*/
@JSONField
(
name
=
"ProductId"
)
private
Integer
ProductId
;
/**
/**
* 产品计划代码,需联系客户经理提供
* 产品计划代码,需联系客户经理提供
*/
*/
@JSONField
(
name
=
"ProductNum"
)
private
String
ProductNum
;
private
String
ProductNum
;
/**
/**
* 保单生效时间,格式为YYYY-MM-DD HH:MM:SS
* 保单生效时间,格式为YYYY-MM-DD HH:MM:SS
*/
*/
@JSONField
(
name
=
"BeginDate"
)
private
String
BeginDate
;
private
String
BeginDate
;
/**
/**
* 保单终止时间,格式为YYYY-MM-DD HH:MM:SS
* 保单终止时间,格式为YYYY-MM-DD HH:MM:SS
*/
*/
@JSONField
(
name
=
"EndDate"
)
private
String
EndDate
;
private
String
EndDate
;
/**
/**
* 旅行目的地
* 旅行目的地
*/
*/
@JSONField
(
name
=
"TourDest"
)
private
String
TourDest
;
private
String
TourDest
;
/**
/**
* 旅行团编号/航班号
* 旅行团编号/航班号
*/
*/
@JSONField
(
name
=
"TourNum"
)
private
String
TourNum
;
private
String
TourNum
;
/**
/**
* 标准保费合计,是Units中所有标准保费的总和
* 标准保费合计,是Units中所有标准保费的总和
*/
*/
@JSONField
(
name
=
"StdPremium"
)
private
BigDecimal
StdPremium
;
private
BigDecimal
StdPremium
;
/**
/**
* 实收保费合计,是Units中所有实收保费的总和
* 实收保费合计,是Units中所有实收保费的总和
*/
*/
@JSONField
(
name
=
"ActPremium"
)
private
BigDecimal
ActPremium
;
private
BigDecimal
ActPremium
;
/**
/**
* 投保单元列表,每个投保必须包含一个以上投保单元,一次投保多个被保险人且要求单人保单时此字段为多个元素,否则为单个元素
* 投保单元列表,每个投保必须包含一个以上投保单元,一次投保多个被保险人且要求单人保单时此字段为多个元素,否则为单个元素
*/
*/
@JSONField
(
name
=
"Units"
)
private
List
<
InsureUnit
>
Units
;
private
List
<
InsureUnit
>
Units
;
/**
/**
* 投保可选参数
* 投保可选参数
*/
*/
@JSONField
(
name
=
"Options"
)
private
Options
Options
;
private
Options
Options
;
/**
/**
* 支付参数,在余额不足时需要此参数
* 支付参数,在余额不足时需要此参数
*/
*/
@JSONField
(
name
=
"PaymentOptions"
)
private
PaymentOptions
PaymentOptions
;
private
PaymentOptions
PaymentOptions
;
/**
/**
* 发票信息,需要开票时填写
* 发票信息,需要开票时填写
*/
*/
@JSONField
(
name
=
"Taxpayer"
)
private
Taxpayer
Taxpayer
;
private
Taxpayer
Taxpayer
;
@Data
@Data
...
@@ -65,10 +83,12 @@ public class ApplyRequest {
...
@@ -65,10 +83,12 @@ public class ApplyRequest {
/**
/**
* 投保人信息,若未指定投保人,默认选取第一个成年人作为投保人
* 投保人信息,若未指定投保人,默认选取第一个成年人作为投保人
*/
*/
@JSONField
(
name
=
"PolicyHolder"
)
private
PolicyHolder
PolicyHolder
;
private
PolicyHolder
PolicyHolder
;
/**
/**
* 被保人列表
* 被保人列表
*/
*/
@JSONField
(
name
=
"Insureds"
)
private
List
<
Insurant
>
Insureds
;
private
List
<
Insurant
>
Insureds
;
}
}
...
@@ -77,26 +97,32 @@ public class ApplyRequest {
...
@@ -77,26 +97,32 @@ public class ApplyRequest {
/**
/**
* 投保人姓名/名称
* 投保人姓名/名称
*/
*/
@JSONField
(
name
=
"Name"
)
private
String
Name
;
private
String
Name
;
/**
/**
* 投保人性别
* 投保人性别
*/
*/
@JSONField
(
name
=
"Gender"
)
private
String
Gender
;
private
String
Gender
;
/**
/**
* 证件类型,参考字段枚举
* 证件类型,参考字段枚举
*/
*/
@JSONField
(
name
=
"IDTp"
)
private
String
IDTp
;
private
String
IDTp
;
/**
/**
* 证件代码
* 证件代码
*/
*/
@JSONField
(
name
=
"IDNum"
)
private
String
IDNum
;
private
String
IDNum
;
/**
/**
* 出生日期
* 出生日期
*/
*/
@JSONField
(
name
=
"Birthday"
)
private
String
Birthday
;
private
String
Birthday
;
/**
/**
* 手机号码
* 手机号码
*/
*/
@JSONField
(
name
=
"Mobile"
)
private
String
Mobile
;
private
String
Mobile
;
}
}
...
@@ -105,38 +131,47 @@ public class ApplyRequest {
...
@@ -105,38 +131,47 @@ public class ApplyRequest {
/**
/**
* 被保险人姓名
* 被保险人姓名
*/
*/
@JSONField
(
name
=
"Name"
)
private
String
Name
;
private
String
Name
;
/**
/**
* 性别,M代表男,F代表女,U代表未知
* 性别,M代表男,F代表女,U代表未知
*/
*/
@JSONField
(
name
=
"Gender"
)
private
String
Gender
;
private
String
Gender
;
/**
/**
* 证件类型,参考字段枚举
* 证件类型,参考字段枚举
*/
*/
@JSONField
(
name
=
"IDTp"
)
private
String
IDTp
;
private
String
IDTp
;
/**
/**
* 证件号码
* 证件号码
*/
*/
@JSONField
(
name
=
"IDNum"
)
private
String
IDNum
;
private
String
IDNum
;
/**
/**
* 出生日期
* 出生日期
*/
*/
@JSONField
(
name
=
"Birthday"
)
private
String
Birthday
;
private
String
Birthday
;
/**
/**
* 手机号码
* 手机号码
*/
*/
@JSONField
(
name
=
"Mobile"
)
private
String
Mobile
;
private
String
Mobile
;
/**
/**
* 与投保人关系,参考字段枚举
* 与投保人关系,参考字段枚举
*/
*/
@JSONField
(
name
=
"RelationTp"
)
private
String
RelationTp
;
private
String
RelationTp
;
/**
/**
* 标准保费
* 标准保费
*/
*/
@JSONField
(
name
=
"StdPremium"
)
private
BigDecimal
StdPremium
;
private
BigDecimal
StdPremium
;
/**
/**
* 实收保费
* 实收保费
*/
*/
@JSONField
(
name
=
"ActPremium"
)
private
BigDecimal
ActPremium
;
private
BigDecimal
ActPremium
;
}
}
...
...
ruoyi-common/ruoyi-common-51weishi/src/main/java/org/dromara/common/weishi/model/res/ApplyResponse.java
浏览文件 @
06987a4a
...
@@ -12,13 +12,13 @@ import java.util.List;
...
@@ -12,13 +12,13 @@ import java.util.List;
@AllArgsConstructor
@AllArgsConstructor
public
class
ApplyResponse
{
public
class
ApplyResponse
{
/**
/**
*
流水号
*
订单id
*/
*/
private
String
BatchNum
;
private
Integer
OrderID
;
/**
/**
*
产品代码
*
订单号
*/
*/
private
String
Product
Num
;
private
String
Order
Num
;
/**
/**
* 保单生效时间
* 保单生效时间
*/
*/
...
@@ -27,22 +27,6 @@ public class ApplyResponse {
...
@@ -27,22 +27,6 @@ public class ApplyResponse {
* 保单终止时间
* 保单终止时间
*/
*/
private
String
EndDate
;
private
String
EndDate
;
/**
* 旅行团编号
*/
private
String
TourNum
;
/**
* 旅行目的地
*/
private
String
TourDest
;
/**
* 发票大类,p - 个人,E - 企业,U - 未知
*/
private
String
InvoiceKind
;
/**
* 开具发票的类型
*/
private
String
InvoiceTp
;
/**
/**
* 标准保费
* 标准保费
*/
*/
...
@@ -52,48 +36,24 @@ public class ApplyResponse {
...
@@ -52,48 +36,24 @@ public class ApplyResponse {
*/
*/
private
BigDecimal
ActPremium
;
private
BigDecimal
ActPremium
;
/**
/**
* 投保单元列表
* 订单下载链接
*/
private
List
<
Unit
>
Units
;
/**
* 投保数据格式,P:图片, D - 数据
*/
private
String
DataTp
;
/**
* 订单号
*/
*/
private
String
Order
Num
;
private
String
Order
Url
;
/**
/**
*
计划ID
*
投保单元列表
*/
*/
private
int
PlanID
;
private
List
<
Unit
>
Units
;
/**
/**
* 返回代码,0:成功,其他:失败
* 返回代码,0:成功,其他:失败
*/
*/
private
int
ResultTp
;
private
Integer
ResultTp
;
/**
/**
* 返回内容
* 返回内容
*/
*/
private
String
ResultMsg
;
private
String
ResultMsg
;
/**
* 保单下载链接
*/
private
String
PolicyUrl
;
/**
* 订单下载链接
*/
private
String
OrderUrl
;
@Data
@Data
public
static
class
Unit
{
public
static
class
Unit
{
/**
* 投保人信息,投保人年龄必须大于18周岁
*/
private
PolicyHolder
PolicyHolder
;
/**
* 被保人列表
*/
private
List
<
Insured
>
Insureds
;
/**
/**
* 标准保费,Insureds下总被保险人数*标准单价
* 标准保费,Insureds下总被保险人数*标准单价
*/
*/
...
@@ -106,85 +66,18 @@ public class ApplyResponse {
...
@@ -106,85 +66,18 @@ public class ApplyResponse {
* 保单号,投保时返回
* 保单号,投保时返回
*/
*/
private
String
PolicyNum
;
private
String
PolicyNum
;
/**
* 保单url
*/
private
String
PolicyUrl
;
/**
/**
* 返回代码,0:成功,其他:失败
* 返回代码,0:成功,其他:失败
*/
*/
private
int
ResultTp
;
private
Integer
ResultTp
;
/**
/**
* 返回消息
* 返回消息
*/
*/
private
String
ResultMsg
;
private
String
ResultMsg
;
}
}
@Data
public
static
class
PolicyHolder
{
/**
* 投保人姓名/名称
*/
private
String
Name
;
/**
* 投保人性别
*/
private
String
Gender
;
/**
* 证件类型,参考字段枚举
*/
private
String
IDTp
;
/**
* 证件代码
*/
private
String
IDNum
;
/**
* 出生日期
*/
private
String
Birthday
;
/**
* 手机号码
*/
private
String
Mobile
;
}
@Data
public
static
class
Insured
{
/**
* 被保险人姓名
*/
private
String
Name
;
/**
* 性别,M男/F女/U未知
*/
private
String
Gender
;
/**
* 证件类型,参考字段枚举
*/
private
String
IDTp
;
/**
* 证件号码
*/
private
String
IDNum
;
/**
* 出生日期
*/
private
String
Birthday
;
/**
* 手机号码
*/
private
String
Mobile
;
/**
* 与投保人关系,参考字段枚举
*/
private
String
RelationTp
;
/**
* 标准保费
*/
private
BigDecimal
StdPremium
;
/**
* 实收保费
*/
private
BigDecimal
ActPremium
;
/**
* 被保险人ID
*/
private
int
InsuredID
;
}
}
}
ruoyi-common/ruoyi-common-51weishi/src/main/java/org/dromara/common/weishi/model/res/AuthResponse.java
浏览文件 @
06987a4a
...
@@ -15,7 +15,7 @@ public class AuthResponse {
...
@@ -15,7 +15,7 @@ public class AuthResponse {
/**
/**
* 超时时间
* 超时时间
*/
*/
private
int
expires_in
;
private
Integer
expires_in
;
/**
/**
* 令牌类型
* 令牌类型
*/
*/
...
...
ruoyi-common/ruoyi-common-51weishi/src/main/java/org/dromara/common/weishi/model/res/DetailResponse.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
common
.
weishi
.
model
.
res
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.math.BigDecimal
;
import
java.util.List
;
/**
* @author wenhe
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
DetailResponse
{
/**
* 订单id
*/
private
Integer
OrderID
;
/**
* 订单号
*/
private
String
OrderNum
;
/**
* 保单生效时间
*/
private
String
BeginDate
;
/**
* 保单终止时间
*/
private
String
EndDate
;
/**
* 创建时间
*/
private
String
CreatedTime
;
/**
* 过期时间
*/
private
String
OverDate
;
/**
* 计划名称
*/
private
String
PlanName
;
/**
* 保险公司
*/
private
String
InsurerAbbr
;
/**
* 保单数量
*/
private
Integer
PolicyCount
;
/**
* 被保人数量
*/
private
Integer
InsuredCount
;
/**
* 标准保费
*/
private
BigDecimal
StdPremium
;
/**
* 实收保费
*/
private
BigDecimal
ActPremium
;
/**
* 订单状态
*/
private
String
status
;
/**
* 被保人列表
*/
private
List
<
Insured
>
Insureds
;
@Data
public
static
class
Insured
{
/**
* 标准保费,Insureds下总被保险人数*标准单价
*/
private
BigDecimal
StdPremium
;
/**
* 实收保费
*/
private
BigDecimal
ActPremium
;
/**
* 受益人
*/
private
String
Beneficiaries
;
/**
* 出生日期
*/
private
String
Birthday
;
/**
* 性别,M代表男,F代表女,U代表未知
*/
private
String
Gender
;
/**
* 证件号码
*/
private
String
IDNum
;
/**
* 证件类型,参考字段枚举
*/
private
String
IDTp
;
/**
* 被保人id
*/
private
Integer
InsuredID
;
/**
* 手机号码
*/
private
String
Mobile
;
/**
* 被保险人姓名
*/
private
String
Name
;
/**
* 停顿
*/
private
Boolean
Pausing
;
/**
* 计划名称
*/
private
String
PlanName
;
/**
* 保单id
*/
private
Integer
PolicyID
;
/**
* 保单编码
*/
private
String
PolicyNum
;
/**
* 与投保人关系,参考字段枚举
*/
private
String
RelationTp
;
/**
* 状态
*/
private
String
Status
;
}
}
ruoyi-common/ruoyi-common-51weishi/src/main/java/org/dromara/common/weishi/model/res/IssueResponse.java
浏览文件 @
06987a4a
...
@@ -15,37 +15,21 @@ import java.util.List;
...
@@ -15,37 +15,21 @@ import java.util.List;
@AllArgsConstructor
@AllArgsConstructor
public
class
IssueResponse
{
public
class
IssueResponse
{
/**
/**
*
渠道类型,默认是B
*
订单id
*/
*/
private
String
ChannelTp
;
private
Integer
OrderID
;
/**
/**
* 流水号
* 订单号
*/
private
String
BatchNum
;
/**
* 产品代码
*/
*/
private
String
Product
Num
;
private
String
Order
Num
;
/**
/**
* 保单生效时间
,格式:yyyy-MM-dd HH:mm:ss
* 保单生效时间
*/
*/
private
String
BeginDate
;
private
String
BeginDate
;
/**
/**
* 保单终止时间
,格式:yyyy-MM-dd HH:mm:ss
* 保单终止时间
*/
*/
private
String
EndDate
;
private
String
EndDate
;
/**
* 旅行团编号
*/
private
String
TourNum
;
/**
* 旅行目的地
*/
private
String
TourDest
;
/**
* 开具发票的类型
*/
private
String
InvoiceTp
;
/**
/**
* 标准保费
* 标准保费
*/
*/
...
@@ -55,54 +39,24 @@ public class IssueResponse {
...
@@ -55,54 +39,24 @@ public class IssueResponse {
*/
*/
private
BigDecimal
ActPremium
;
private
BigDecimal
ActPremium
;
/**
/**
*
投保单元列表
*
订单下载链接
*/
*/
private
List
<
Unit
>
Units
;
private
String
OrderUrl
;
/**
/**
* 投保数据格式
* 投保单元列表
*/
private
String
DataTp
;
/**
* 订单号
*/
private
String
OrderNum
;
/**
* 返回代码,0表示成功
*/
private
int
ResultNum
;
/**
* 付款链接,余额不足时返回
*/
private
String
PaymentUrl
;
/**
* 付款单号
*/
private
String
PaymentNum
;
/**
* 付款金额
*/
*/
private
BigDecimal
PaymentAmt
;
private
List
<
Unit
>
Units
;
/**
/**
* 返回代码
* 返回代码
,0:成功,其他:失败
*/
*/
private
String
ResultTp
;
private
Integer
ResultTp
;
/**
/**
*
提示文本
*
返回内容
*/
*/
private
String
ResultMsg
;
private
String
ResultMsg
;
@Data
@Data
@NoArgsConstructor
@AllArgsConstructor
public
static
class
Unit
{
public
static
class
Unit
{
/**
* 投保人信息,年龄必须大于18周岁
*/
private
PolicyHolder
PolicyHolder
;
/**
* 被保人列表
*/
private
List
<
Insured
>
Insureds
;
/**
/**
* 标准保费,Insureds下总被保险人数*标准单价
* 标准保费,Insureds下总被保险人数*标准单价
*/
*/
...
@@ -112,96 +66,20 @@ public class IssueResponse {
...
@@ -112,96 +66,20 @@ public class IssueResponse {
*/
*/
private
BigDecimal
ActPremium
;
private
BigDecimal
ActPremium
;
/**
/**
* 标准退款金额
* 保单号,投保时返回
*/
private
BigDecimal
StdRefund
;
/**
* 实际退款金额
*/
private
BigDecimal
ActRefund
;
/**
* 保单号,成功时返回
*/
*/
private
String
PolicyNum
;
private
String
PolicyNum
;
/**
/**
*
返回代码,0表示成功
*
保单url
*/
*/
private
String
ResultTp
;
private
String
PolicyUrl
;
/**
/**
*
提示文本
*
返回代码,0:成功,其他:失败
*/
*/
private
String
ResultMsg
;
private
Integer
ResultTp
;
}
@Data
@NoArgsConstructor
@AllArgsConstructor
public
static
class
PolicyHolder
{
/**
* 投保人姓名/名称
*/
private
String
Name
;
/**
* 投保人性别
*/
private
String
Gender
;
/**
* 证件类型:I-身份证,P-护照,J-军官证,K-通行证,T-台湾通行证,G-港澳通行证,O-其他,E-统一信用代码
*/
private
String
IDTp
;
/**
* 证件代码
*/
private
String
IDNum
;
/**
* 出生日期,格式:yyyy-MM-dd
*/
private
String
Birthday
;
}
@Data
@NoArgsConstructor
@AllArgsConstructor
public
static
class
Insured
{
/**
* 被保险人姓名
*/
private
String
Name
;
/**
* 性别:M-男,F-女,U-未知
*/
private
String
Gender
;
/**
/**
*
证件类型:I-身份证,P-护照,J-军官证,K-通行证,T-台湾通行证,G-港澳通行证,O-其他,E-统一信用代码
*
返回消息
*/
*/
private
String
IDTp
;
private
String
ResultMsg
;
/**
* 证件号码
*/
private
String
IDNum
;
/**
* 出生日期,格式:yyyy-MM-dd
*/
private
String
Birthday
;
/**
* 与投保人关系
*/
private
String
RelationTp
;
/**
* 标准保费
*/
private
BigDecimal
StdPremium
;
/**
* 实收保费
*/
private
BigDecimal
ActPremium
;
/**
* 标准退款金额
*/
private
BigDecimal
StdRefund
;
/**
* 实际退款金额
*/
private
BigDecimal
ActRefund
;
}
}
}
}
ruoyi-common/ruoyi-common-51weishi/src/main/java/org/dromara/common/weishi/model/res/ProposalResponse.java
浏览文件 @
06987a4a
...
@@ -7,13 +7,13 @@ import java.util.List;
...
@@ -7,13 +7,13 @@ import java.util.List;
@Data
@Data
public
class
ProposalResponse
{
public
class
ProposalResponse
{
/**
/**
*
流水号
*
订单id
*/
*/
private
String
BatchNum
;
private
Integer
OrderID
;
/**
/**
*
产品代码
*
订单号
*/
*/
private
String
Product
Num
;
private
String
Order
Num
;
/**
/**
* 保单生效时间
* 保单生效时间
*/
*/
...
@@ -22,22 +22,6 @@ public class ProposalResponse {
...
@@ -22,22 +22,6 @@ public class ProposalResponse {
* 保单终止时间
* 保单终止时间
*/
*/
private
String
EndDate
;
private
String
EndDate
;
/**
* 旅行团编号
*/
private
String
TourNum
;
/**
* 旅行目的地
*/
private
String
TourDest
;
/**
* 发票大类,p-个人,E-企业,U-未知
*/
private
String
InvoiceKind
;
/**
* 开具发票的类型
*/
private
String
InvoiceTp
;
/**
/**
* 标准保费
* 标准保费
*/
*/
...
@@ -49,23 +33,11 @@ public class ProposalResponse {
...
@@ -49,23 +33,11 @@ public class ProposalResponse {
/**
/**
* 投保单元列表
* 投保单元列表
*/
*/
private
List
<
Unit
>
Units
;
private
List
<
IssueResponse
.
Unit
>
Units
;
/**
* 投保数据格式,P-图片, D-数据
*/
private
String
DataTp
;
/**
* 订单号,后续签单,下载,撤单需要用
*/
private
String
OrderNum
;
/**
* 计划ID
*/
private
int
PlanID
;
/**
/**
* 返回代码,0:成功
,
其他:失败
* 返回代码,0:成功
,
其他:失败
*/
*/
private
int
ResultTp
;
private
Integer
ResultTp
;
/**
/**
* 返回内容
* 返回内容
*/
*/
...
@@ -73,14 +45,6 @@ public class ProposalResponse {
...
@@ -73,14 +45,6 @@ public class ProposalResponse {
@Data
@Data
public
static
class
Unit
{
public
static
class
Unit
{
/**
* 投保人信息,投保人年龄必须大于18周岁
*/
private
PolicyHolder
PolicyHolder
;
/**
* 被保人列表
*/
private
List
<
Insured
>
Insureds
;
/**
/**
* 标准保费,Insureds下总被保险人数*标准单价
* 标准保费,Insureds下总被保险人数*标准单价
*/
*/
...
@@ -90,88 +54,16 @@ public class ProposalResponse {
...
@@ -90,88 +54,16 @@ public class ProposalResponse {
*/
*/
private
BigDecimal
ActPremium
;
private
BigDecimal
ActPremium
;
/**
/**
*
核
保单号,投保时返回
* 保单号,投保时返回
*/
*/
private
String
PolicyNum
;
private
String
PolicyNum
;
/**
/**
* 返回代码,0:成功
,
其他:失败
* 返回代码,0:成功
,
其他:失败
*/
*/
private
int
ResultTp
;
private
Integer
ResultTp
;
/**
/**
* 返回消息
* 返回消息
*/
*/
private
String
ResultMsg
;
private
String
ResultMsg
;
}
}
@Data
public
static
class
PolicyHolder
{
/**
* 投保人姓名/名称
*/
private
String
Name
;
/**
* 投保人性别
*/
private
String
Gender
;
/**
* 证件类型,参考字段枚举
*/
private
String
IDTp
;
/**
* 证件代码
*/
private
String
IDNum
;
/**
* 出生日期
*/
private
String
Birthday
;
/**
* 手机号码
*/
private
String
Mobile
;
}
@Data
public
static
class
Insured
{
/**
* 被保险人姓名
*/
private
String
Name
;
/**
* 性别,M男/F女/U未知
*/
private
String
Gender
;
/**
* 证件类型,参考字段枚举
*/
private
String
IDTp
;
/**
* 证件号码
*/
private
String
IDNum
;
/**
* 出生日期
*/
private
String
Birthday
;
/**
* 手机号码
*/
private
String
Mobile
;
/**
* 与投保人关系,参考字段枚举
*/
private
String
RelationTp
;
/**
* 标准保费
*/
private
BigDecimal
StdPremium
;
/**
* 实收保费
*/
private
BigDecimal
ActPremium
;
/**
* 被保险人ID
*/
private
int
InsuredID
;
}
}
}
ruoyi-common/ruoyi-common-51weishi/src/main/java/org/dromara/common/weishi/service/WeishiService.java
浏览文件 @
06987a4a
package
org
.
dromara
.
common
.
weishi
.
service
;
package
org
.
dromara
.
common
.
weishi
.
service
;
import
org.dromara.common.weishi.model.req.ApplyRequest
;
import
org.dromara.common.weishi.model.req.ApplyRequest
;
import
org.dromara.common.weishi.model.req.AuthRequest
;
import
org.dromara.common.weishi.model.req.ProposalRequest
;
import
org.dromara.common.weishi.model.req.ProposalRequest
;
import
org.dromara.common.weishi.model.res.*
;
import
org.dromara.common.weishi.model.res.*
;
...
@@ -11,12 +12,13 @@ import java.util.List;
...
@@ -11,12 +12,13 @@ import java.util.List;
*/
*/
public
interface
WeishiService
{
public
interface
WeishiService
{
/**
/**
* 认证
接口
* 认证
*
*
@param request 请求参数
* @return
数据
* @return
响应参数
*/
*/
AuthResponse
authorize
();
AuthResponse
authorize
(
AuthRequest
request
);
/**
/**
* 保险下单接口
* 保险下单接口
...
@@ -24,7 +26,7 @@ public interface WeishiService {
...
@@ -24,7 +26,7 @@ public interface WeishiService {
* @param request 请求参数
* @param request 请求参数
* @return 响应数据
* @return 响应数据
*/
*/
ApplyResponse
insureApply
(
ApplyRequest
request
);
ApplyResponse
insureApply
(
String
token
,
ApplyRequest
request
);
/**
/**
* 核保接口
* 核保接口
...
@@ -32,7 +34,7 @@ public interface WeishiService {
...
@@ -32,7 +34,7 @@ public interface WeishiService {
* @param request 请求参数
* @param request 请求参数
* @return 响应数据
* @return 响应数据
*/
*/
ProposalResponse
insureProposal
(
ProposalRequest
request
);
ProposalResponse
insureProposal
(
String
token
,
ProposalRequest
request
);
/**
/**
* 签单接口
* 签单接口
...
@@ -40,28 +42,53 @@ public interface WeishiService {
...
@@ -40,28 +42,53 @@ public interface WeishiService {
* @param orderNum 订单号
* @param orderNum 订单号
* @return 数据
* @return 数据
*/
*/
IssueResponse
insureDetail
(
String
orderNum
);
IssueResponse
insureIssue
(
String
token
,
String
orderNum
);
/**
* 作废接口
* @param token token
* @param orderId 订单id
*/
void
insureAbandon
(
String
token
,
Integer
orderId
);
/**
* 订单详情
*
* @param token token
* @param orderId 订单id
* @return 数据
*/
DetailResponse
insureDetail
(
String
token
,
Integer
orderId
);
/**
* 保单下载
*
* @param token token
* @param orderNum 订单编码
* @return base64
*/
String
insureDownload
(
String
token
,
String
orderNum
);
/**
/**
* 订单撤单接口
* 订单撤单接口
*
*
* @param orderNum 订单号
* @param orderNum 订单号
*/
*/
void
insureCancel
(
String
orderNum
);
void
insureCancel
(
String
token
,
String
orderNum
);
/**
/**
* 保单撤单接口
* 保单撤单接口
*
*
* @param policyNum 保单号
* @param policyNum 保单号
*/
*/
void
policyCancel
(
String
policyNum
);
void
policyCancel
(
String
token
,
String
policyNum
);
/**
/**
* 产品列表接口
* 产品列表接口
*
*
* @return 产品列表
* @return 产品列表
*/
*/
List
<
ProductsResponse
>
productList
();
List
<
ProductsResponse
>
productList
(
String
token
);
/**
/**
* 产品详情
* 产品详情
...
@@ -69,7 +96,7 @@ public interface WeishiService {
...
@@ -69,7 +96,7 @@ public interface WeishiService {
* @param productId 产品id
* @param productId 产品id
* @return 产品详情
* @return 产品详情
*/
*/
ProductResponse
productDetail
(
Integer
productId
);
ProductResponse
productDetail
(
String
token
,
Integer
productId
);
/**
/**
* 获取保险公司相关文档接口
* 获取保险公司相关文档接口
...
@@ -78,5 +105,5 @@ public interface WeishiService {
...
@@ -78,5 +105,5 @@ public interface WeishiService {
* @param annexTp annexTp
* @param annexTp annexTp
* @return 数据
* @return 数据
*/
*/
AnnexResponse
annex
(
Integer
productId
,
String
annexTp
);
AnnexResponse
annex
(
String
token
,
Integer
productId
,
String
annexTp
);
}
}
ruoyi-common/ruoyi-common-51weishi/src/main/java/org/dromara/common/weishi/service/impl/WeishiServiceImpl.java
浏览文件 @
06987a4a
...
@@ -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
;
...
@@ -30,16 +29,12 @@ import java.util.Objects;
...
@@ -30,16 +29,12 @@ import java.util.Objects;
public
class
WeishiServiceImpl
implements
WeishiService
{
public
class
WeishiServiceImpl
implements
WeishiService
{
@Override
@Override
public
AuthResponse
authorize
()
{
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
(
JSON
.
toJSONString
(
request
));
new
AuthRequest
()
.
setUsername
(
UserConfig
.
USERNAME
)
.
setPassword
(
UserConfig
.
PASSWORD
)
));
if
(!
Objects
.
equals
(
res
.
getResultTp
(),
Code
.
SUCCESS
.
getCode
()))
{
if
(!
Objects
.
equals
(
res
.
getResultTp
(),
Code
.
SUCCESS
.
getCode
()))
{
throw
new
WeishiException
(
res
.
getResultMsg
());
throw
new
WeishiException
(
res
.
getResultMsg
());
}
}
...
@@ -47,56 +42,105 @@ public class WeishiServiceImpl implements WeishiService {
...
@@ -47,56 +42,105 @@ public class WeishiServiceImpl implements WeishiService {
}
}
@Override
@Override
public
ApplyResponse
insureApply
(
ApplyRequest
request
)
{
public
ApplyResponse
insureApply
(
String
token
,
ApplyRequest
request
)
{
Ap
iHttp
Response
res
=
Api
.
v1
(
RequestMethodEnum
.
POST
,
Ap
ply
Response
res
=
Api
.
v1
(
RequestMethodEnum
.
POST
,
DomainEnum
.
TEST
.
getDomain
(),
DomainEnum
.
PROD
.
getDomain
(),
InsureApiEnum
.
APPLY
.
getUrl
(),
InsureApiEnum
.
APPLY
.
getUrl
(),
getToken
(),
token
,
JSON
.
toJSONString
(
request
));
JSON
.
toJSONString
(
request
),
ApplyResponse
.
class
);
if
(!
Objects
.
equals
(
res
.
getResultTp
(),
Code
.
SUCCESS
.
getCode
()))
{
if
(!
Objects
.
equals
(
res
.
getResultTp
(),
Code
.
SUCCESS
.
getCode
()))
{
throw
new
WeishiException
(
res
.
getResultMsg
());
throw
new
WeishiException
(
res
.
getResultMsg
());
}
}
return
JSON
.
parseObject
(
res
.
getData
(),
ApplyResponse
.
class
)
;
return
res
;
}
}
@Override
@Override
public
ProposalResponse
insureProposal
(
ProposalRequest
request
)
{
public
ProposalResponse
insureProposal
(
String
token
,
ProposalRequest
request
)
{
ApiHttp
Response
res
=
Api
.
v1
(
RequestMethodEnum
.
POST
,
Proposal
Response
res
=
Api
.
v1
(
RequestMethodEnum
.
POST
,
DomainEnum
.
TEST
.
getDomain
(),
DomainEnum
.
PROD
.
getDomain
(),
InsureApiEnum
.
PROPOSAL
.
getUrl
(),
InsureApiEnum
.
PROPOSAL
.
getUrl
(),
getToken
(),
token
,
JSON
.
toJSONString
(
request
));
JSON
.
toJSONString
(
request
),
ProposalResponse
.
class
);
if
(!
Objects
.
equals
(
res
.
getResultTp
(),
Code
.
SUCCESS
.
getCode
()))
{
if
(!
Objects
.
equals
(
res
.
getResultTp
(),
Code
.
SUCCESS
.
getCode
()))
{
throw
new
WeishiException
(
res
.
getResultMsg
());
throw
new
WeishiException
(
res
.
getResultMsg
());
}
}
return
JSON
.
parseObject
(
res
.
getData
(),
ProposalResponse
.
class
)
;
return
res
;
}
}
@Override
@Override
public
IssueResponse
insure
Detail
(
String
orderNum
)
{
public
IssueResponse
insure
Issue
(
String
token
,
String
orderNum
)
{
Map
<
String
,
Object
>
map
=
MapUtil
.<
String
,
Object
>
builder
()
Map
<
String
,
Object
>
map
=
MapUtil
.<
String
,
Object
>
builder
()
.
put
(
"OrderNum"
,
orderNum
)
.
put
(
"OrderNum"
,
orderNum
)
.
build
();
.
build
();
ApiHttp
Response
res
=
Api
.
v1
(
RequestMethodEnum
.
POST
,
Issue
Response
res
=
Api
.
v1
(
RequestMethodEnum
.
POST
,
DomainEnum
.
TEST
.
getDomain
(),
DomainEnum
.
PROD
.
getDomain
(),
StrUtil
.
format
(
InsureApiEnum
.
ISSUE
.
getUrl
(),
map
),
StrUtil
.
format
(
InsureApiEnum
.
ISSUE
.
getUrl
(),
map
),
getToken
(),
token
,
null
,
IssueResponse
.
class
);
if
(!
Objects
.
equals
(
res
.
getResultTp
(),
Code
.
SUCCESS
.
getCode
()))
{
throw
new
WeishiException
(
res
.
getResultMsg
());
}
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
.
PROD
.
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
()
.
put
(
"orderId"
,
orderId
)
.
build
();
ApiHttpResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
GET
,
DomainEnum
.
PROD
.
getDomain
(),
StrUtil
.
format
(
InsureApiEnum
.
DETAIL
.
getUrl
(),
map
),
token
,
null
);
null
);
if
(!
Objects
.
equals
(
res
.
getResultTp
(),
Code
.
SUCCESS
.
getCode
()))
{
if
(!
Objects
.
equals
(
res
.
getResultTp
(),
Code
.
SUCCESS
.
getCode
()))
{
throw
new
WeishiException
(
res
.
getResultMsg
());
throw
new
WeishiException
(
res
.
getResultMsg
());
}
}
return
JSON
.
parseObject
(
res
.
getData
(),
Issue
Response
.
class
);
return
JSON
.
parseObject
(
res
.
getData
(),
Detail
Response
.
class
);
}
}
@Override
@Override
public
void
insureCancel
(
String
orderNum
)
{
public
String
insureDownload
(
String
token
,
String
orderNum
)
{
Map
<
String
,
Object
>
map
=
MapUtil
.<
String
,
Object
>
builder
()
Map
<
String
,
Object
>
map
=
MapUtil
.<
String
,
Object
>
builder
()
.
put
(
"OrderNum"
,
orderNum
)
.
put
(
"orderNum"
,
orderNum
)
.
build
();
return
Api
.
v1
(
RequestMethodEnum
.
DOWNLOAD
,
DomainEnum
.
PROD
.
getDomain
(),
StrUtil
.
format
(
InsureApiEnum
.
DOWNLOAD
.
getUrl
(),
map
),
token
,
null
,
null
,
String
.
class
);
}
@Override
public
void
insureCancel
(
String
token
,
String
orderNum
)
{
Map
<
String
,
Object
>
map
=
MapUtil
.<
String
,
Object
>
builder
()
.
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
),
getToken
()
,
token
,
null
);
null
);
if
(!
Objects
.
equals
(
res
.
getResultTp
(),
Code
.
SUCCESS
.
getCode
()))
{
if
(!
Objects
.
equals
(
res
.
getResultTp
(),
Code
.
SUCCESS
.
getCode
()))
{
throw
new
WeishiException
(
res
.
getResultMsg
());
throw
new
WeishiException
(
res
.
getResultMsg
());
...
@@ -104,35 +148,26 @@ public class WeishiServiceImpl implements WeishiService {
...
@@ -104,35 +148,26 @@ public class WeishiServiceImpl implements WeishiService {
}
}
@Override
@Override
public
void
policyCancel
(
String
policyNum
)
{
public
void
policyCancel
(
String
token
,
String
policyNum
)
{
Map
<
String
,
Object
>
map
=
MapUtil
.<
String
,
Object
>
builder
()
Map
<
String
,
Object
>
map
=
MapUtil
.<
String
,
Object
>
builder
()
.
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
),
getToken
()
,
token
,
null
);
null
);
if
(!
Objects
.
equals
(
res
.
getResultTp
(),
Code
.
SUCCESS
.
getCode
()))
{
if
(!
Objects
.
equals
(
res
.
getResultTp
(),
Code
.
SUCCESS
.
getCode
()))
{
throw
new
WeishiException
(
res
.
getResultMsg
());
throw
new
WeishiException
(
res
.
getResultMsg
());
}
}
}
}
/**
* 获取token
*
* @return token
*/
private
String
getToken
()
{
return
authorize
().
getAccess_token
();
}
@Override
@Override
public
List
<
ProductsResponse
>
productList
()
{
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
(),
getToken
()
,
token
,
null
);
null
);
if
(!
Objects
.
equals
(
res
.
getResultTp
(),
Code
.
SUCCESS
.
getCode
()))
{
if
(!
Objects
.
equals
(
res
.
getResultTp
(),
Code
.
SUCCESS
.
getCode
()))
{
throw
new
WeishiException
(
res
.
getResultMsg
());
throw
new
WeishiException
(
res
.
getResultMsg
());
...
@@ -141,14 +176,14 @@ public class WeishiServiceImpl implements WeishiService {
...
@@ -141,14 +176,14 @@ public class WeishiServiceImpl implements WeishiService {
}
}
@Override
@Override
public
ProductResponse
productDetail
(
Integer
productId
)
{
public
ProductResponse
productDetail
(
String
token
,
Integer
productId
)
{
Map
<
String
,
Object
>
map
=
MapUtil
.<
String
,
Object
>
builder
()
Map
<
String
,
Object
>
map
=
MapUtil
.<
String
,
Object
>
builder
()
.
put
(
"productId"
,
productId
)
.
put
(
"productId"
,
productId
)
.
build
();
.
build
();
ApiHttpResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
POS
T
,
ApiHttpResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
GE
T
,
DomainEnum
.
TEST
.
getDomain
(),
DomainEnum
.
PROD
.
getDomain
(),
StrUtil
.
format
(
ProductApiEnum
.
PRODUCT_DETAIL
.
getUrl
(),
map
),
StrUtil
.
format
(
ProductApiEnum
.
PRODUCT_DETAIL
.
getUrl
(),
map
),
getToken
()
,
token
,
null
);
null
);
if
(!
Objects
.
equals
(
res
.
getResultTp
(),
Code
.
SUCCESS
.
getCode
()))
{
if
(!
Objects
.
equals
(
res
.
getResultTp
(),
Code
.
SUCCESS
.
getCode
()))
{
throw
new
WeishiException
(
res
.
getResultMsg
());
throw
new
WeishiException
(
res
.
getResultMsg
());
...
@@ -157,15 +192,15 @@ public class WeishiServiceImpl implements WeishiService {
...
@@ -157,15 +192,15 @@ public class WeishiServiceImpl implements WeishiService {
}
}
@Override
@Override
public
AnnexResponse
annex
(
Integer
productId
,
String
annexTp
)
{
public
AnnexResponse
annex
(
String
token
,
Integer
productId
,
String
annexTp
)
{
Map
<
String
,
Object
>
map
=
MapUtil
.<
String
,
Object
>
builder
()
Map
<
String
,
Object
>
map
=
MapUtil
.<
String
,
Object
>
builder
()
.
put
(
"productId"
,
productId
)
.
put
(
"productId"
,
productId
)
.
put
(
"annexTp"
,
annexTp
)
.
put
(
"annexTp"
,
annexTp
)
.
build
();
.
build
();
ApiHttpResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
POS
T
,
ApiHttpResponse
res
=
Api
.
v1
(
RequestMethodEnum
.
GE
T
,
DomainEnum
.
TEST
.
getDomain
(),
DomainEnum
.
PROD
.
getDomain
(),
StrUtil
.
format
(
ProductApiEnum
.
ANNEX
.
getUrl
(),
map
),
StrUtil
.
format
(
ProductApiEnum
.
ANNEX
.
getUrl
(),
map
),
getToken
()
,
token
,
null
);
null
);
if
(!
Objects
.
equals
(
res
.
getResultTp
(),
Code
.
SUCCESS
.
getCode
()))
{
if
(!
Objects
.
equals
(
res
.
getResultTp
(),
Code
.
SUCCESS
.
getCode
()))
{
throw
new
WeishiException
(
res
.
getResultMsg
());
throw
new
WeishiException
(
res
.
getResultMsg
());
...
...
ruoyi-modules/ruoyi-job/src/main/java/org/dromara/job/snailjob/mall/weishi/WeishiJob.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
job
.
snailjob
.
mall
.
weishi
;
import
com.aizuda.snailjob.client.job.core.annotation.JobExecutor
;
import
com.aizuda.snailjob.client.job.core.dto.JobArgs
;
import
com.aizuda.snailjob.client.model.ExecuteResult
;
import
lombok.AllArgsConstructor
;
import
org.apache.dubbo.config.annotation.DubboReference
;
import
org.dromara.mall.api.weishi.RemoteWeishiService
;
import
org.springframework.stereotype.Component
;
/**
* 获取token
*
* @author wenhe
*/
@AllArgsConstructor
@Component
@JobExecutor
(
name
=
"WeishiJob"
)
public
class
WeishiJob
{
@DubboReference
private
RemoteWeishiService
weishiService
;
public
ExecuteResult
jobExecute
(
JobArgs
jobArgs
)
{
weishiService
.
getToken
();
return
ExecuteResult
.
success
(
"跟新卫士token成功"
);
}
}
ruoyi-modules/ruoyi-job/src/main/java/org/dromara/job/snailjob/mall/weishi/WeishiOrderUpdateStatusJob.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
job
.
snailjob
.
mall
.
weishi
;
import
com.aizuda.snailjob.client.job.core.annotation.JobExecutor
;
import
com.aizuda.snailjob.client.job.core.dto.JobArgs
;
import
com.aizuda.snailjob.client.model.ExecuteResult
;
import
lombok.AllArgsConstructor
;
import
org.apache.dubbo.config.annotation.DubboReference
;
import
org.dromara.mall.api.weishi.RemoteWeishiService
;
import
org.springframework.stereotype.Component
;
/**
* 获取token
*
* @author wenhe
*/
@AllArgsConstructor
@Component
@JobExecutor
(
name
=
"WeishiOrderUpdateStatusJob"
)
public
class
WeishiOrderUpdateStatusJob
{
@DubboReference
private
RemoteWeishiService
weishiService
;
public
ExecuteResult
jobExecute
(
JobArgs
jobArgs
)
{
weishiService
.
updateOrderStatus
();
return
ExecuteResult
.
success
(
"跟新卫士token成功"
);
}
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/controller/weishi/admin/AccountController.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
controller
.
weishi
.
admin
;
import
jakarta.validation.constraints.NotNull
;
import
lombok.RequiredArgsConstructor
;
import
org.dromara.common.core.domain.R
;
import
org.dromara.common.core.validate.EditGroup
;
import
org.dromara.common.idempotent.annotation.RepeatSubmit
;
import
org.dromara.common.log.annotation.Log
;
import
org.dromara.common.log.enums.BusinessType
;
import
org.dromara.common.web.core.BaseController
;
import
org.dromara.mall.controller.weishi.admin.bo.AccountBo
;
import
org.dromara.mall.controller.weishi.admin.vo.AccountVo
;
import
org.dromara.mall.service.weishi.IAccountService
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
/**
* 保险账号
* 前端访问路由地址为:/mall/account
*
* @author hzh
* @date 2025-05-15
*/
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping
(
"/account"
)
public
class
AccountController
extends
BaseController
{
private
final
IAccountService
accountService
;
/**
* 获取保险账号详细信息
*
* @param deptId 主键
*/
@GetMapping
(
"/{deptId}"
)
public
R
<
AccountVo
>
getInfo
(
@NotNull
(
message
=
"部门id不能为空"
)
@PathVariable
Long
deptId
)
{
return
R
.
ok
(
accountService
.
getOne
(
new
AccountBo
().
setDeptId
(
deptId
)));
}
/**
* 修改保险账号
*/
@Log
(
title
=
"保险账号"
,
businessType
=
BusinessType
.
UPDATE
)
@RepeatSubmit
()
@PutMapping
()
public
R
<
Void
>
edit
(
@Validated
(
EditGroup
.
class
)
@RequestBody
AccountBo
bo
)
{
return
toAjax
(
accountService
.
update
(
bo
));
}
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/controller/weishi/admin/InsureController.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
controller
.
weishi
.
admin
;
import
cn.dev33.satoken.annotation.SaCheckPermission
;
import
jakarta.servlet.http.HttpServletResponse
;
import
jakarta.validation.constraints.NotNull
;
import
lombok.RequiredArgsConstructor
;
import
org.dromara.common.core.domain.R
;
import
org.dromara.common.excel.utils.ExcelUtil
;
import
org.dromara.common.log.annotation.Log
;
import
org.dromara.common.log.enums.BusinessType
;
import
org.dromara.common.mybatis.core.page.PageQuery
;
import
org.dromara.common.mybatis.core.page.TableDataInfo
;
import
org.dromara.common.web.core.BaseController
;
import
org.dromara.mall.controller.weishi.admin.bo.InsureBo
;
import
org.dromara.mall.controller.weishi.admin.vo.InsureVo
;
import
org.dromara.mall.service.weishi.IInsureService
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* 保险订单
* 前端访问路由地址为:/weishi/insure
*
* @author hzh
* @date 2025-05-13
*/
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping
(
"/insure"
)
public
class
InsureController
extends
BaseController
{
private
final
IInsureService
insureService
;
/**
* 查询保险订单列表
*/
@SaCheckPermission
(
"weishi:insure:list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
<
InsureVo
>
list
(
InsureBo
bo
,
PageQuery
pageQuery
)
{
return
insureService
.
queryPageList
(
bo
,
pageQuery
);
}
/**
* 导出保险订单列表
*/
@Log
(
title
=
"保险订单"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
InsureBo
bo
,
HttpServletResponse
response
)
{
List
<
InsureVo
>
list
=
insureService
.
queryList
(
bo
);
ExcelUtil
.
exportExcel
(
list
,
"保险订单"
,
InsureVo
.
class
,
response
);
}
/**
* 获取保险订单详细信息
*
* @param id 主键
*/
@GetMapping
(
"/{id}"
)
public
R
<
InsureVo
>
getInfo
(
@NotNull
(
message
=
"主键不能为空"
)
@PathVariable
Long
id
)
{
return
R
.
ok
(
insureService
.
getDetail
(
id
));
}
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/controller/weishi/admin/bo/AccountBo.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
controller
.
weishi
.
admin
.
bo
;
import
io.github.linpeilie.annotations.AutoMapper
;
import
jakarta.validation.constraints.NotBlank
;
import
jakarta.validation.constraints.NotNull
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
org.dromara.common.core.validate.AddGroup
;
import
org.dromara.common.core.validate.EditGroup
;
import
org.dromara.common.mybatis.core.domain.BaseEntity
;
import
org.dromara.mall.domain.weishi.Account
;
/**
* 保险账号业务对象 weishi_account
*
* @author hzh
* @date 2025-05-15
*/
@Data
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@AutoMapper
(
target
=
Account
.
class
,
reverseConvertGenerate
=
false
)
public
class
AccountBo
extends
BaseEntity
{
/**
* id
*/
private
Long
id
;
/**
* 部门id
*/
@NotNull
(
message
=
"部门id不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
Long
deptId
;
/**
* 账号
*/
@NotBlank
(
message
=
"账号不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
String
username
;
/**
* 密码
*/
@NotBlank
(
message
=
"密码不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
String
password
;
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/controller/weishi/admin/bo/InsureBo.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
controller
.
weishi
.
admin
.
bo
;
import
io.github.linpeilie.annotations.AutoMapper
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
org.dromara.common.mybatis.core.domain.BaseEntity
;
import
org.dromara.mall.domain.weishi.Insure
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* 保险订单业务对象 weishi_insure
*
* @author hzh
* @date 2025-05-13
*/
@Data
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@AutoMapper
(
target
=
Insure
.
class
,
reverseConvertGenerate
=
false
)
public
class
InsureBo
extends
BaseEntity
{
private
Long
id
;
/**
* 用户id
*/
private
Long
userId
;
/**
* 会员id
*/
private
Long
memberId
;
/**
* 请求参数
*/
private
String
reqJson
;
/**
* 响应参数
*/
private
String
resJson
;
/**
* 产品信息
*/
private
String
productJson
;
/**
* 产品列表信息
*/
private
String
productListJson
;
/**
* 渠道类型
*/
private
String
channelTp
;
/**
* 流水号,幂等且唯一不能重复
*/
private
String
batchNum
;
/**
* 产品计划代码,需联系客户经理提供
*/
private
String
productNum
;
/**
* 保单生效时间,格式为YYYY-MM-DD HH:MM:SS
*/
private
Date
beginDate
;
/**
* 保单终止时间,格式为YYYY-MM-DD HH:MM:SS
*/
private
Date
endDate
;
/**
* 订单过期时间,格式为YYYY-MM-DD HH:MM:SS
*/
private
Date
overDate
;
/**
* 旅行目的地
*/
private
String
tourDest
;
/**
* 旅行团编号/航班号
*/
private
String
tourNum
;
/**
* 标准保费合计,是Units中所有标准保费的总和
*/
private
BigDecimal
stdPremium
;
/**
* 实收保费合计,是Units中所有实收保费的总和
*/
private
BigDecimal
actPremium
;
/**
* 付款链接
*/
private
String
paymentUrl
;
/**
* 付款单号
*/
private
String
paymentNum
;
/**
* 付款金额
*/
private
BigDecimal
paymentAmt
;
/**
* 投保数据格式( P:图片, D - 数据)
*/
private
String
dataTp
;
/**
* 计划ID
*/
private
Integer
planId
;
/**
* 下单日期
*/
private
Date
orderTime
;
/**
* 订单id
*/
private
Integer
orderId
;
/**
* 订单编码
*/
private
String
orderNum
;
/**
* 订单url
*/
private
String
orderUrl
;
/**
* 状态
*/
private
String
status
;
/**
* 被保人数
*/
private
Integer
insuredCount
;
/**
* 投保人
*/
private
String
insuredName
;
/**
* 保险公司
*/
private
String
insuredAbbr
;
/**
* 计划名称
*/
private
String
planName
;
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/controller/weishi/admin/bo/InsureInsuredsBo.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
controller
.
weishi
.
admin
.
bo
;
import
io.github.linpeilie.annotations.AutoMapper
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.dromara.common.mybatis.core.domain.BaseEntity
;
import
org.dromara.mall.domain.weishi.InsureInsureds
;
import
java.math.BigDecimal
;
/**
* 保险订单-被保人业务对象 weishi_insure_insureds
*
* @author hzh
* @date 2025-05-14
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@AutoMapper
(
target
=
InsureInsureds
.
class
,
reverseConvertGenerate
=
false
)
public
class
InsureInsuredsBo
extends
BaseEntity
{
/**
* id
*/
private
Long
id
;
/**
* 订单编号
*/
private
String
orderNum
;
/**
* 保单号
*/
private
String
policyNum
;
/**
* 姓名
*/
private
String
name
;
/**
* 性别
*/
private
String
gender
;
/**
* 证件类型
*/
private
String
idTp
;
/**
* 证件代码
*/
private
String
idNum
;
/**
* 出生日期
*/
private
String
birthday
;
/**
* 手机号码
*/
private
String
mobile
;
/**
* 与投保人关系
*/
private
String
relationTp
;
/**
* 标准保费
*/
private
BigDecimal
stdPremium
;
/**
* 实收保费
*/
private
BigDecimal
actPremium
;
/**
* 标准退费
*/
private
BigDecimal
stdRefund
;
/**
* 实收退费
*/
private
BigDecimal
actRefund
;
/**
* 状态
*/
private
String
status
;
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/controller/weishi/admin/bo/InsurePolicyHolderBo.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
controller
.
weishi
.
admin
.
bo
;
import
org.dromara.mall.domain.weishi.InsurePolicyHolder
;
import
org.dromara.common.mybatis.core.domain.BaseEntity
;
import
org.dromara.common.core.validate.AddGroup
;
import
org.dromara.common.core.validate.EditGroup
;
import
io.github.linpeilie.annotations.AutoMapper
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
jakarta.validation.constraints.*
;
/**
* 保险订单-投保人业务对象 weishi_insure_policy_holder
*
* @author hzh
* @date 2025-05-14
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@AutoMapper
(
target
=
InsurePolicyHolder
.
class
,
reverseConvertGenerate
=
false
)
public
class
InsurePolicyHolderBo
extends
BaseEntity
{
/**
* id
*/
@NotNull
(
message
=
"id不能为空"
,
groups
=
{
EditGroup
.
class
})
private
Long
id
;
/**
* 订单编号
*/
@NotBlank
(
message
=
"订单编号不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
String
orderNum
;
/**
* 保单号
*/
@NotBlank
(
message
=
"保单号不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
String
policyNum
;
/**
* 姓名
*/
@NotBlank
(
message
=
"姓名不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
String
name
;
/**
* 性别
*/
@NotBlank
(
message
=
"性别不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
String
gender
;
/**
* 证件类型
*/
@NotBlank
(
message
=
"证件类型不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
String
idTp
;
/**
* 证件代码
*/
@NotBlank
(
message
=
"证件代码不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
String
idNum
;
/**
* 出生日期
*/
@NotBlank
(
message
=
"出生日期不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
String
birthday
;
/**
* 手机号码
*/
@NotBlank
(
message
=
"手机号码不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
String
mobile
;
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/controller/weishi/admin/bo/InsureTaxpayerBo.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
controller
.
weishi
.
admin
.
bo
;
import
org.dromara.mall.domain.weishi.InsureTaxpayer
;
import
org.dromara.common.mybatis.core.domain.BaseEntity
;
import
org.dromara.common.core.validate.AddGroup
;
import
org.dromara.common.core.validate.EditGroup
;
import
io.github.linpeilie.annotations.AutoMapper
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
jakarta.validation.constraints.*
;
/**
* 保险订单-发票信息业务对象 weishi_insure_taxpayer
*
* @author hzh
* @date 2025-05-14
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@AutoMapper
(
target
=
InsureTaxpayer
.
class
,
reverseConvertGenerate
=
false
)
public
class
InsureTaxpayerBo
extends
BaseEntity
{
/**
* id
*/
@NotNull
(
message
=
"id不能为空"
,
groups
=
{
EditGroup
.
class
})
private
Long
id
;
/**
* 订单编号
*/
@NotBlank
(
message
=
"订单编号不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
String
orderNum
;
/**
* 企业名称
*/
@NotBlank
(
message
=
"企业名称不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
String
taxpayerName
;
/**
* 信用代码
*/
@NotBlank
(
message
=
"信用代码不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
String
taxpayerNum
;
/**
* 企业开户银行
*/
@NotBlank
(
message
=
"企业开户银行不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
String
taxpayerBank
;
/**
* 银行账户
*/
@NotBlank
(
message
=
"银行账户不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
String
taxpayerAccount
;
/**
* 税务登记电话
*/
@NotBlank
(
message
=
"税务登记电话不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
String
taxpayerTelephone
;
/**
* 税务登记地址
*/
@NotBlank
(
message
=
"税务登记地址不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
String
taxpayerAddr
;
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/controller/weishi/admin/bo/InsureUnitBo.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
controller
.
weishi
.
admin
.
bo
;
import
io.github.linpeilie.annotations.AutoMapper
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.dromara.common.mybatis.core.domain.BaseEntity
;
import
org.dromara.mall.domain.weishi.InsureUnit
;
import
java.math.BigDecimal
;
/**
* 保险订单-投保单元业务对象 weishi_insure_unit
*
* @author hzh
* @date 2025-05-14
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@AutoMapper
(
target
=
InsureUnit
.
class
,
reverseConvertGenerate
=
false
)
public
class
InsureUnitBo
extends
BaseEntity
{
/**
* id
*/
private
Long
id
;
/**
* 订单编号
*/
private
String
orderNum
;
/**
* 标准保费
*/
private
BigDecimal
stdPremium
;
/**
* 实收保费
*/
private
BigDecimal
actPremium
;
/**
* 标准退费
*/
private
BigDecimal
stdRefund
;
/**
* 实收退费
*/
private
BigDecimal
actRefund
;
/**
* 保单号
*/
private
String
policyNum
;
/**
* 保单url
*/
private
String
policyUrl
;
/**
* 状态
*/
private
String
status
;
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/controller/weishi/admin/vo/AccountVo.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
controller
.
weishi
.
admin
.
vo
;
import
org.dromara.mall.domain.weishi.Account
;
import
com.alibaba.excel.annotation.ExcelIgnoreUnannotated
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
io.github.linpeilie.annotations.AutoMapper
;
import
lombok.Data
;
import
java.io.Serial
;
import
java.io.Serializable
;
/**
* 保险账号视图对象 weishi_account
*
* @author hzh
* @date 2025-05-15
*/
@Data
@ExcelIgnoreUnannotated
@AutoMapper
(
target
=
Account
.
class
)
public
class
AccountVo
implements
Serializable
{
@Serial
private
static
final
long
serialVersionUID
=
1L
;
/**
* id
*/
@ExcelProperty
(
value
=
"id"
)
private
Long
id
;
/**
* 部门id
*/
@ExcelProperty
(
value
=
"部门id"
)
private
Long
deptId
;
/**
* 账号
*/
@ExcelProperty
(
value
=
"账号"
)
private
String
username
;
/**
* 密码
*/
@ExcelProperty
(
value
=
"密码"
)
private
String
password
;
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/controller/weishi/admin/vo/InsureInsuredsVo.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
controller
.
weishi
.
admin
.
vo
;
import
com.alibaba.excel.annotation.ExcelIgnoreUnannotated
;
import
io.github.linpeilie.annotations.AutoMapper
;
import
lombok.Data
;
import
org.dromara.mall.domain.weishi.InsureInsureds
;
import
java.io.Serial
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
* 保险订单-被保人视图对象 weishi_insure_insureds
*
* @author hzh
* @date 2025-05-14
*/
@Data
@ExcelIgnoreUnannotated
@AutoMapper
(
target
=
InsureInsureds
.
class
)
public
class
InsureInsuredsVo
implements
Serializable
{
@Serial
private
static
final
long
serialVersionUID
=
1L
;
/**
* id
*/
private
Long
id
;
/**
* 订单编号
*/
private
String
orderNum
;
/**
* 保单号
*/
private
String
policyNum
;
/**
* 姓名
*/
private
String
name
;
/**
* 性别
*/
private
String
gender
;
/**
* 证件类型
*/
private
String
idTp
;
/**
* 证件代码
*/
private
String
idNum
;
/**
* 出生日期
*/
private
String
birthday
;
/**
* 手机号码
*/
private
String
mobile
;
/**
* 与投保人关系
*/
private
String
relationTp
;
/**
* 标准保费
*/
private
BigDecimal
stdPremium
;
/**
* 实收保费
*/
private
BigDecimal
actPremium
;
/**
* 标准退费
*/
private
BigDecimal
stdRefund
;
/**
* 实收退费
*/
private
BigDecimal
actRefund
;
/**
* 状态
*/
private
String
status
;
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/controller/weishi/admin/vo/InsurePolicyHolderVo.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
controller
.
weishi
.
admin
.
vo
;
import
org.dromara.mall.domain.weishi.InsurePolicyHolder
;
import
com.alibaba.excel.annotation.ExcelIgnoreUnannotated
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
io.github.linpeilie.annotations.AutoMapper
;
import
lombok.Data
;
import
java.io.Serial
;
import
java.io.Serializable
;
/**
* 保险订单-投保人视图对象 weishi_insure_policy_holder
*
* @author hzh
* @date 2025-05-14
*/
@Data
@ExcelIgnoreUnannotated
@AutoMapper
(
target
=
InsurePolicyHolder
.
class
)
public
class
InsurePolicyHolderVo
implements
Serializable
{
@Serial
private
static
final
long
serialVersionUID
=
1L
;
/**
* id
*/
@ExcelProperty
(
value
=
"id"
)
private
Long
id
;
/**
* 订单编号
*/
@ExcelProperty
(
value
=
"订单编号"
)
private
String
orderNum
;
/**
* 保单号
*/
@ExcelProperty
(
value
=
"保单号"
)
private
String
policyNum
;
/**
* 姓名
*/
@ExcelProperty
(
value
=
"姓名"
)
private
String
name
;
/**
* 性别
*/
@ExcelProperty
(
value
=
"性别"
)
private
String
gender
;
/**
* 证件类型
*/
@ExcelProperty
(
value
=
"证件类型"
)
private
String
idTp
;
/**
* 证件代码
*/
@ExcelProperty
(
value
=
"证件代码"
)
private
String
idNum
;
/**
* 出生日期
*/
@ExcelProperty
(
value
=
"出生日期"
)
private
String
birthday
;
/**
* 手机号码
*/
@ExcelProperty
(
value
=
"手机号码"
)
private
String
mobile
;
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/controller/weishi/admin/vo/InsureTaxpayerVo.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
controller
.
weishi
.
admin
.
vo
;
import
org.dromara.mall.domain.weishi.InsureTaxpayer
;
import
com.alibaba.excel.annotation.ExcelIgnoreUnannotated
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
io.github.linpeilie.annotations.AutoMapper
;
import
lombok.Data
;
import
java.io.Serial
;
import
java.io.Serializable
;
/**
* 保险订单-发票信息视图对象 weishi_insure_taxpayer
*
* @author hzh
* @date 2025-05-14
*/
@Data
@ExcelIgnoreUnannotated
@AutoMapper
(
target
=
InsureTaxpayer
.
class
)
public
class
InsureTaxpayerVo
implements
Serializable
{
@Serial
private
static
final
long
serialVersionUID
=
1L
;
/**
* id
*/
@ExcelProperty
(
value
=
"id"
)
private
Long
id
;
/**
* 订单编号
*/
@ExcelProperty
(
value
=
"订单编号"
)
private
String
orderNum
;
/**
* 企业名称
*/
@ExcelProperty
(
value
=
"企业名称"
)
private
String
taxpayerName
;
/**
* 信用代码
*/
@ExcelProperty
(
value
=
"信用代码"
)
private
String
taxpayerNum
;
/**
* 企业开户银行
*/
@ExcelProperty
(
value
=
"企业开户银行"
)
private
String
taxpayerBank
;
/**
* 银行账户
*/
@ExcelProperty
(
value
=
"银行账户"
)
private
String
taxpayerAccount
;
/**
* 税务登记电话
*/
@ExcelProperty
(
value
=
"税务登记电话"
)
private
String
taxpayerTelephone
;
/**
* 税务登记地址
*/
@ExcelProperty
(
value
=
"税务登记地址"
)
private
String
taxpayerAddr
;
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/controller/weishi/admin/vo/InsureUnitVo.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
controller
.
weishi
.
admin
.
vo
;
import
com.alibaba.excel.annotation.ExcelIgnoreUnannotated
;
import
io.github.linpeilie.annotations.AutoMapper
;
import
lombok.Data
;
import
org.dromara.mall.domain.weishi.InsureUnit
;
import
java.io.Serial
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.List
;
/**
* 保险订单-投保单元视图对象 weishi_insure_unit
*
* @author hzh
* @date 2025-05-14
*/
@Data
@ExcelIgnoreUnannotated
@AutoMapper
(
target
=
InsureUnit
.
class
)
public
class
InsureUnitVo
implements
Serializable
{
@Serial
private
static
final
long
serialVersionUID
=
1L
;
/**
* id
*/
private
Long
id
;
/**
* 订单编号
*/
private
String
orderNum
;
/**
* 标准保费
*/
private
BigDecimal
stdPremium
;
/**
* 实收保费
*/
private
BigDecimal
actPremium
;
/**
* 标准退费
*/
private
BigDecimal
stdRefund
;
/**
* 实收退费
*/
private
BigDecimal
actRefund
;
/**
* 保单号
*/
private
String
policyNum
;
/**
* 保单url
*/
private
String
policyUrl
;
/**
* 状态
*/
private
String
status
;
/**
* 被保人列表
*/
private
List
<
InsureInsuredsVo
>
insuredsList
;
/**
* 投保人信息
*/
private
InsurePolicyHolderVo
policyHolder
;
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/controller/weishi/admin/vo/InsureVo.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
controller
.
weishi
.
admin
.
vo
;
import
com.alibaba.excel.annotation.ExcelIgnoreUnannotated
;
import
io.github.linpeilie.annotations.AutoMapper
;
import
lombok.Data
;
import
org.dromara.common.translation.annotation.Translation
;
import
org.dromara.common.translation.constant.TransConstant
;
import
org.dromara.mall.domain.weishi.Insure
;
import
java.io.Serial
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.List
;
/**
* 保险订单视图对象 weishi_insure
*
* @author hzh
* @date 2025-05-13
*/
@Data
@ExcelIgnoreUnannotated
@AutoMapper
(
target
=
Insure
.
class
)
public
class
InsureVo
implements
Serializable
{
@Serial
private
static
final
long
serialVersionUID
=
1L
;
private
Long
id
;
/**
* 用户id
*/
private
Long
userId
;
/**
* 会员id
*/
private
Long
memberId
;
/**
* 请求参数
*/
private
String
reqJson
;
/**
* 响应参数
*/
private
String
resJson
;
/**
* 产品信息
*/
private
String
productJson
;
/**
* 产品列表信息
*/
private
String
productListJson
;
/**
* 渠道类型
*/
private
String
channelTp
;
/**
* 流水号,幂等且唯一不能重复
*/
private
String
batchNum
;
/**
* 产品计划代码,需联系客户经理提供
*/
private
String
productNum
;
/**
* 保单生效时间,格式为YYYY-MM-DD HH:MM:SS
*/
private
Date
beginDate
;
/**
* 保单终止时间,格式为YYYY-MM-DD HH:MM:SS
*/
private
Date
endDate
;
/**
* 订单过期时间,格式为YYYY-MM-DD HH:MM:SS
*/
private
Date
overDate
;
/**
* 旅行目的地
*/
private
String
tourDest
;
/**
* 旅行团编号/航班号
*/
private
String
tourNum
;
/**
* 标准保费合计,是Units中所有标准保费的总和
*/
private
BigDecimal
stdPremium
;
/**
* 实收保费合计,是Units中所有实收保费的总和
*/
private
BigDecimal
actPremium
;
/**
* 付款链接
*/
private
String
paymentUrl
;
/**
* 付款单号
*/
private
String
paymentNum
;
/**
* 付款金额
*/
private
BigDecimal
paymentAmt
;
/**
* 投保数据格式( P:图片, D - 数据)
*/
private
String
dataTp
;
/**
* 计划ID
*/
private
Integer
planId
;
/**
* 下单日期
*/
private
Date
orderTime
;
/**
* 订单id
*/
private
Integer
orderId
;
/**
* 订单编码
*/
private
String
orderNum
;
/**
* 订单url
*/
private
String
orderUrl
;
/**
* 状态
*/
private
String
status
;
/**
* 被保人数
*/
private
Integer
insuredCount
;
/**
* 投保人
*/
private
String
insuredName
;
/**
* 保险公司
*/
private
String
insuredAbbr
;
/**
* 计划名称
*/
private
String
planName
;
/**
* 创建部门
*/
@Translation
(
type
=
TransConstant
.
DEPT_ID_TO_NAME
)
private
Long
createDept
;
/**
* 投保单元集合
*/
private
List
<
InsureUnitVo
>
unitList
;
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/controller/weishi/app/WeishiController.java
浏览文件 @
06987a4a
...
@@ -3,10 +3,17 @@ package org.dromara.mall.controller.weishi.app;
...
@@ -3,10 +3,17 @@ package org.dromara.mall.controller.weishi.app;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
org.dromara.common.core.domain.R
;
import
org.dromara.common.core.domain.R
;
import
org.dromara.common.mybatis.core.page.PageQuery
;
import
org.dromara.common.mybatis.core.page.TableDataInfo
;
import
org.dromara.common.satoken.utils.LoginHelper
;
import
org.dromara.common.weishi.model.req.ApplyRequest
;
import
org.dromara.common.weishi.model.req.ApplyRequest
;
import
org.dromara.common.weishi.model.req.ProposalRequest
;
import
org.dromara.common.weishi.model.req.ProposalRequest
;
import
org.dromara.common.weishi.model.res.*
;
import
org.dromara.common.weishi.model.res.*
;
import
org.dromara.common.weishi.service.WeishiService
;
import
org.dromara.common.weishi.service.WeishiService
;
import
org.dromara.mall.controller.weishi.admin.bo.InsureBo
;
import
org.dromara.mall.controller.weishi.admin.vo.InsureVo
;
import
org.dromara.mall.service.weishi.IInsureService
;
import
org.dromara.mall.service.weishi.IThirdWeishiService
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -24,6 +31,8 @@ import java.util.List;
...
@@ -24,6 +31,8 @@ import java.util.List;
public
class
WeishiController
{
public
class
WeishiController
{
private
final
WeishiService
weishiService
;
private
final
WeishiService
weishiService
;
private
final
IInsureService
insureService
;
private
final
IThirdWeishiService
thirdWeishiService
;
/**
/**
* 产品列表
* 产品列表
...
@@ -32,7 +41,7 @@ public class WeishiController {
...
@@ -32,7 +41,7 @@ public class WeishiController {
*/
*/
@GetMapping
(
"/productList"
)
@GetMapping
(
"/productList"
)
public
R
<
List
<
ProductsResponse
>>
productList
()
{
public
R
<
List
<
ProductsResponse
>>
productList
()
{
return
R
.
ok
(
weishiService
.
productList
());
return
R
.
ok
(
weishiService
.
productList
(
getToken
()
));
}
}
/**
/**
...
@@ -43,7 +52,7 @@ public class WeishiController {
...
@@ -43,7 +52,7 @@ public class WeishiController {
*/
*/
@GetMapping
(
"/productDetail"
)
@GetMapping
(
"/productDetail"
)
public
R
<
ProductResponse
>
productDetail
(
@RequestParam
Integer
productId
)
{
public
R
<
ProductResponse
>
productDetail
(
@RequestParam
Integer
productId
)
{
return
R
.
ok
(
weishiService
.
productDetail
(
productId
));
return
R
.
ok
(
weishiService
.
productDetail
(
getToken
(),
productId
));
}
}
/**
/**
...
@@ -56,7 +65,7 @@ public class WeishiController {
...
@@ -56,7 +65,7 @@ public class WeishiController {
@GetMapping
(
"/annex"
)
@GetMapping
(
"/annex"
)
public
R
<
AnnexResponse
>
annex
(
@RequestParam
(
value
=
"productId"
)
Integer
productId
,
public
R
<
AnnexResponse
>
annex
(
@RequestParam
(
value
=
"productId"
)
Integer
productId
,
@RequestParam
(
value
=
"annexTp"
)
String
annexTp
)
{
@RequestParam
(
value
=
"annexTp"
)
String
annexTp
)
{
return
R
.
ok
(
weishiService
.
annex
(
productId
,
annexTp
));
return
R
.
ok
(
weishiService
.
annex
(
getToken
(),
productId
,
annexTp
));
}
}
/**
/**
...
@@ -67,7 +76,9 @@ public class WeishiController {
...
@@ -67,7 +76,9 @@ public class WeishiController {
*/
*/
@PostMapping
(
"/insureApply"
)
@PostMapping
(
"/insureApply"
)
public
R
<
ApplyResponse
>
insureApply
(
@RequestBody
ApplyRequest
req
)
{
public
R
<
ApplyResponse
>
insureApply
(
@RequestBody
ApplyRequest
req
)
{
return
R
.
ok
(
weishiService
.
insureApply
(
req
));
ApplyResponse
res
=
weishiService
.
insureApply
(
getToken
(),
req
);
insureService
.
apply
(
req
,
res
);
return
R
.
ok
(
res
);
}
}
...
@@ -79,19 +90,43 @@ public class WeishiController {
...
@@ -79,19 +90,43 @@ public class WeishiController {
*/
*/
@PostMapping
(
"/insureProposal"
)
@PostMapping
(
"/insureProposal"
)
public
R
<
ProposalResponse
>
insureProposal
(
@RequestBody
ProposalRequest
req
)
{
public
R
<
ProposalResponse
>
insureProposal
(
@RequestBody
ProposalRequest
req
)
{
return
R
.
ok
(
weishiService
.
insureProposal
(
req
));
return
R
.
ok
(
weishiService
.
insureProposal
(
getToken
(),
req
));
}
}
/**
/**
*
保单详情
*
签单接口
*
*
* @param orderNum 订单号
* @param orderNum 订单号
* @return
保单详情
* @return
签单数据
*/
*/
@GetMapping
(
"/insureDetail"
)
@PostMapping
(
"/insureIssue/{orderNum}"
)
public
R
<
IssueResponse
>
insureDetail
(
@RequestParam
String
orderNum
)
{
public
R
<
IssueResponse
>
insureIssue
(
@PathVariable
String
orderNum
)
{
return
R
.
ok
(
weishiService
.
insureDetail
(
orderNum
));
IssueResponse
res
=
weishiService
.
insureIssue
(
getToken
(
orderNum
),
orderNum
);
insureService
.
insureIssue
(
orderNum
);
return
R
.
ok
(
res
);
}
/**
* 订单详情
*
* @param orderId orderId
* @return 订单详情
*/
@PostMapping
(
"/insureDetail/{orderId}"
)
public
R
<
DetailResponse
>
insureDetail
(
@PathVariable
Integer
orderId
)
{
return
R
.
ok
(
weishiService
.
insureDetail
(
getToken
(
orderId
),
orderId
));
}
/**
* 保单下载
*
* @param orderNum orderNum
* @return 保单base64
*/
@GetMapping
(
"/insureDownload/{orderNum}"
)
public
R
<
String
>
insureDownload
(
@PathVariable
String
orderNum
)
{
return
R
.
ok
(
"操作成功"
,
weishiService
.
insureDownload
(
getToken
(
orderNum
),
orderNum
));
}
}
...
@@ -102,7 +137,20 @@ public class WeishiController {
...
@@ -102,7 +137,20 @@ public class WeishiController {
*/
*/
@PostMapping
(
"/insureCancel/{orderNum}"
)
@PostMapping
(
"/insureCancel/{orderNum}"
)
public
R
<
Void
>
insureCancel
(
@PathVariable
String
orderNum
)
{
public
R
<
Void
>
insureCancel
(
@PathVariable
String
orderNum
)
{
weishiService
.
insureCancel
(
orderNum
);
weishiService
.
insureCancel
(
getToken
(
orderNum
),
orderNum
);
insureService
.
insureCancel
(
orderNum
);
return
R
.
ok
();
}
/**
* 作废接口
*
* @param orderId 订单id
*/
@PostMapping
(
"/insureAbandon/{orderId}"
)
public
R
<
IssueResponse
>
insureAbandon
(
@PathVariable
Integer
orderId
)
{
weishiService
.
insureAbandon
(
getToken
(
orderId
),
orderId
);
insureService
.
insureAbandon
(
orderId
);
return
R
.
ok
();
return
R
.
ok
();
}
}
...
@@ -113,8 +161,51 @@ public class WeishiController {
...
@@ -113,8 +161,51 @@ public class WeishiController {
*/
*/
@PostMapping
(
"/policyCancel/{policyNum}"
)
@PostMapping
(
"/policyCancel/{policyNum}"
)
public
R
<
Void
>
policyCancel
(
@PathVariable
String
policyNum
)
{
public
R
<
Void
>
policyCancel
(
@PathVariable
String
policyNum
)
{
weishiService
.
policyCancel
(
policyNum
);
weishiService
.
policyCancel
(
getToken
(),
policyNum
);
insureService
.
policyCancel
(
policyNum
);
return
R
.
ok
();
return
R
.
ok
();
}
}
/**
* 获取token
*
* @param orderId 订单id
* @return 数据
*/
@GetMapping
(
"/token"
)
public
R
<
String
>
token
(
@RequestParam
Integer
orderId
)
{
return
R
.
ok
(
"操作成功"
,
getToken
(
orderId
));
}
/**
* 订单列表
*/
@GetMapping
(
"/insureList"
)
public
TableDataInfo
<
InsureVo
>
list
(
PageQuery
pageQuery
)
{
InsureBo
bo
=
new
InsureBo
();
bo
.
setUserId
(
LoginHelper
.
getUserId
());
return
insureService
.
queryPageList
(
bo
,
pageQuery
);
}
/**
* 获取token
*
* @return token
*/
private
String
getToken
()
{
return
thirdWeishiService
.
getToken
(
LoginHelper
.
getDeptId
());
}
private
String
getToken
(
Integer
orderId
)
{
InsureVo
insure
=
insureService
.
getOne
(
new
InsureBo
().
setOrderId
(
orderId
));
return
thirdWeishiService
.
getToken
(
insure
.
getCreateDept
());
}
private
String
getToken
(
String
orderNum
)
{
InsureVo
insure
=
insureService
.
getOne
(
new
InsureBo
().
setOrderNum
(
orderNum
));
return
thirdWeishiService
.
getToken
(
insure
.
getCreateDept
());
}
}
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/domain/weishi/Account.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
domain
.
weishi
;
import
lombok.experimental.Accessors
;
import
org.dromara.common.tenant.core.TenantEntity
;
import
com.baomidou.mybatisplus.annotation.*
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serial
;
/**
* 保险账号对象 weishi_account
*
* @author hzh
* @date 2025-05-15
*/
@Data
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"weishi_account"
)
public
class
Account
extends
TenantEntity
{
@Serial
private
static
final
long
serialVersionUID
=
1L
;
/**
* id
*/
@TableId
(
value
=
"id"
)
private
Long
id
;
/**
* 部门id
*/
private
Long
deptId
;
/**
* 账号
*/
private
String
username
;
/**
* 密码
*/
private
String
password
;
/**
* 删除标志(0代表存在 2代表删除)
*/
@TableLogic
private
String
delFlag
;
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/domain/weishi/Insure.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
domain
.
weishi
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
org.dromara.common.tenant.core.TenantEntity
;
import
java.io.Serial
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* 保险订单对象 weishi_insure
*
* @author hzh
* @date 2025-05-13
*/
@Data
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"weishi_insure"
)
public
class
Insure
extends
TenantEntity
{
@Serial
private
static
final
long
serialVersionUID
=
1L
;
/**
* id
*/
@TableId
(
value
=
"id"
)
private
Long
id
;
/**
* 用户id
*/
private
Long
userId
;
/**
* 会员id
*/
private
Long
memberId
;
/**
* 请求参数
*/
private
String
reqJson
;
/**
* 响应参数
*/
private
String
resJson
;
/**
* 产品信息
*/
private
String
productJson
;
/**
* 产品列表信息
*/
private
String
productListJson
;
/**
* 渠道类型
*/
private
String
channelTp
;
/**
* 流水号,幂等且唯一不能重复
*/
private
String
batchNum
;
/**
* 产品id
*/
private
Integer
productId
;
/**
* 产品计划代码,需联系客户经理提供
*/
private
String
productNum
;
/**
* 保单生效时间,格式为YYYY-MM-DD HH:MM:SS
*/
private
Date
beginDate
;
/**
* 保单终止时间,格式为YYYY-MM-DD HH:MM:SS
*/
private
Date
endDate
;
/**
* 订单过期时间,格式为YYYY-MM-DD HH:MM:SS
*/
private
Date
overDate
;
/**
* 旅行目的地
*/
private
String
tourDest
;
/**
* 旅行团编号/航班号
*/
private
String
tourNum
;
/**
* 标准保费合计,是Units中所有标准保费的总和
*/
private
BigDecimal
stdPremium
;
/**
* 实收保费合计,是Units中所有实收保费的总和
*/
private
BigDecimal
actPremium
;
/**
* 付款链接
*/
private
String
paymentUrl
;
/**
* 付款单号
*/
private
String
paymentNum
;
/**
* 付款金额
*/
private
BigDecimal
paymentAmt
;
/**
* 投保数据格式( P:图片, D - 数据)
*/
private
String
dataTp
;
/**
* 计划ID
*/
private
Integer
planId
;
/**
* 下单日期
*/
private
Date
orderTime
;
/**
* 订单id
*/
private
Integer
orderId
;
/**
* 订单编码
*/
private
String
orderNum
;
/**
* 订单url
*/
private
String
orderUrl
;
/**
* 状态
*/
private
String
status
;
/**
* 被保人数
*/
private
Integer
insuredCount
;
/**
* 投保人
*/
private
String
insuredName
;
/**
* 保险公司
*/
private
String
insuredAbbr
;
/**
* 计划名称
*/
private
String
planName
;
/**
* 删除标志(0代表存在 2代表删除)
*/
@TableLogic
private
String
delFlag
;
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/domain/weishi/InsureInsureds.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
domain
.
weishi
;
import
lombok.experimental.Accessors
;
import
org.dromara.common.tenant.core.TenantEntity
;
import
com.baomidou.mybatisplus.annotation.*
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.math.BigDecimal
;
import
java.io.Serial
;
/**
* 保险订单-被保人对象 weishi_insure_insureds
*
* @author hzh
* @date 2025-05-14
*/
@Data
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"weishi_insure_insureds"
)
public
class
InsureInsureds
extends
TenantEntity
{
@Serial
private
static
final
long
serialVersionUID
=
1L
;
/**
* id
*/
@TableId
(
value
=
"id"
)
private
Long
id
;
/**
* 订单编号
*/
private
String
orderNum
;
/**
* 保单号
*/
private
String
policyNum
;
/**
* 姓名
*/
private
String
name
;
/**
* 性别
*/
private
String
gender
;
/**
* 证件类型
*/
private
String
idTp
;
/**
* 证件代码
*/
private
String
idNum
;
/**
* 出生日期
*/
private
String
birthday
;
/**
* 手机号码
*/
private
String
mobile
;
/**
* 与投保人关系
*/
private
String
relationTp
;
/**
* 标准保费
*/
private
BigDecimal
stdPremium
;
/**
* 实收保费
*/
private
BigDecimal
actPremium
;
/**
* 标准退费
*/
private
BigDecimal
stdRefund
;
/**
* 实收退费
*/
private
BigDecimal
actRefund
;
/**
* 状态
*/
private
String
status
;
/**
* 删除标志(0代表存在 2代表删除)
*/
@TableLogic
private
String
delFlag
;
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/domain/weishi/InsurePolicyHolder.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
domain
.
weishi
;
import
lombok.experimental.Accessors
;
import
org.dromara.common.tenant.core.TenantEntity
;
import
com.baomidou.mybatisplus.annotation.*
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serial
;
/**
* 保险订单-投保人对象 weishi_insure_policy_holder
*
* @author hzh
* @date 2025-05-14
*/
@Data
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"weishi_insure_policy_holder"
)
public
class
InsurePolicyHolder
extends
TenantEntity
{
@Serial
private
static
final
long
serialVersionUID
=
1L
;
/**
* id
*/
@TableId
(
value
=
"id"
)
private
Long
id
;
/**
* 订单编号
*/
private
String
orderNum
;
/**
* 保单号
*/
private
String
policyNum
;
/**
* 姓名
*/
private
String
name
;
/**
* 性别
*/
private
String
gender
;
/**
* 证件类型
*/
private
String
idTp
;
/**
* 证件代码
*/
private
String
idNum
;
/**
* 出生日期
*/
private
String
birthday
;
/**
* 手机号码
*/
private
String
mobile
;
/**
* 删除标志(0代表存在 2代表删除)
*/
@TableLogic
private
String
delFlag
;
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/domain/weishi/InsureTaxpayer.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
domain
.
weishi
;
import
lombok.experimental.Accessors
;
import
org.dromara.common.tenant.core.TenantEntity
;
import
com.baomidou.mybatisplus.annotation.*
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serial
;
/**
* 保险订单-发票信息对象 weishi_insure_taxpayer
*
* @author hzh
* @date 2025-05-14
*/
@Data
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"weishi_insure_taxpayer"
)
public
class
InsureTaxpayer
extends
TenantEntity
{
@Serial
private
static
final
long
serialVersionUID
=
1L
;
/**
* id
*/
@TableId
(
value
=
"id"
)
private
Long
id
;
/**
* 订单编号
*/
private
String
orderNum
;
/**
* 企业名称
*/
private
String
taxpayerName
;
/**
* 信用代码
*/
private
String
taxpayerNum
;
/**
* 企业开户银行
*/
private
String
taxpayerBank
;
/**
* 银行账户
*/
private
String
taxpayerAccount
;
/**
* 税务登记电话
*/
private
String
taxpayerTelephone
;
/**
* 税务登记地址
*/
private
String
taxpayerAddr
;
/**
* 删除标志(0代表存在 2代表删除)
*/
@TableLogic
private
String
delFlag
;
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/domain/weishi/InsureUnit.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
domain
.
weishi
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
org.dromara.common.tenant.core.TenantEntity
;
import
java.io.Serial
;
import
java.math.BigDecimal
;
/**
* 保险订单-投保单元对象 weishi_insure_unit
*
* @author hzh
* @date 2025-05-14
*/
@Data
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"weishi_insure_unit"
)
public
class
InsureUnit
extends
TenantEntity
{
@Serial
private
static
final
long
serialVersionUID
=
1L
;
/**
* id
*/
@TableId
(
value
=
"id"
)
private
Long
id
;
/**
* 订单编号
*/
private
String
orderNum
;
/**
* 标准保费
*/
private
BigDecimal
stdPremium
;
/**
* 实收保费
*/
private
BigDecimal
actPremium
;
/**
* 标准退费
*/
private
BigDecimal
stdRefund
;
/**
* 实收退费
*/
private
BigDecimal
actRefund
;
/**
* 保单号
*/
private
String
policyNum
;
/**
* 保单url
*/
private
String
policyUrl
;
/**
* 状态
*/
private
String
status
;
/**
* 删除标志(0代表存在 2代表删除)
*/
@TableLogic
private
String
delFlag
;
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/dubbo/weishi/RemoteWeishiServiceImpl.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
dubbo
.
weishi
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.dubbo.config.annotation.DubboService
;
import
org.dromara.mall.api.weishi.RemoteWeishiService
;
import
org.dromara.mall.service.weishi.IInsureService
;
import
org.dromara.mall.service.weishi.IThirdWeishiService
;
import
org.springframework.stereotype.Service
;
/**
* @author hzh
* @date 2025-05-13
**/
@RequiredArgsConstructor
@Service
@DubboService
public
class
RemoteWeishiServiceImpl
implements
RemoteWeishiService
{
private
final
IThirdWeishiService
thirdWeishiService
;
private
final
IInsureService
insureService
;
@Override
public
void
getToken
()
{
thirdWeishiService
.
updateToken
(
null
);
}
@Override
public
void
updateOrderStatus
()
{
insureService
.
updateOrderStatus
(
null
);
}
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/mapper/weishi/AccountMapper.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
mapper
.
weishi
;
import
org.dromara.mall.domain.weishi.Account
;
import
org.dromara.mall.controller.weishi.admin.vo.AccountVo
;
import
org.dromara.common.mybatis.core.mapper.BaseMapperPlus
;
/**
* 保险账号Mapper接口
*
* @author hzh
* @date 2025-05-15
*/
public
interface
AccountMapper
extends
BaseMapperPlus
<
Account
,
AccountVo
>
{
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/mapper/weishi/InsureInsuredsMapper.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
mapper
.
weishi
;
import
org.dromara.common.mybatis.core.mapper.BaseMapperPlus
;
import
org.dromara.mall.controller.weishi.admin.vo.InsureInsuredsVo
;
import
org.dromara.mall.domain.weishi.InsureInsureds
;
/**
* 保险订单-被保人Mapper接口
*
* @author hzh
* @date 2025-05-13
*/
public
interface
InsureInsuredsMapper
extends
BaseMapperPlus
<
InsureInsureds
,
InsureInsuredsVo
>
{
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/mapper/weishi/InsureMapper.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
mapper
.
weishi
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.dromara.common.core.utils.StreamUtils
;
import
org.dromara.common.mybatis.core.mapper.BaseMapperPlus
;
import
org.dromara.common.mybatis.helper.CustomerDataPermissionHelper
;
import
org.dromara.common.satoken.utils.LoginHelper
;
import
org.dromara.mall.controller.weishi.admin.vo.InsureVo
;
import
org.dromara.mall.domain.weishi.Insure
;
import
java.util.List
;
/**
* 保险订单Mapper接口
*
* @author hzh
* @date 2025-05-13
*/
public
interface
InsureMapper
extends
BaseMapperPlus
<
Insure
,
InsureVo
>
{
/**
* 获取有权限的spuId集合
*
* @return spuId集合
*/
default
List
<
Long
>
selectOrderIdsByDataPermission
()
{
// 设置权限
if
(
CustomerDataPermissionHelper
.
isNeedFilter
())
{
LambdaQueryWrapper
<
Insure
>
lqw
=
new
LambdaQueryWrapper
<>();
lqw
.
select
(
Insure:
:
getId
);
if
(
CustomerDataPermissionHelper
.
isNeedFilterDeptId
())
{
lqw
.
in
(
Insure:
:
getCreateDept
,
CustomerDataPermissionHelper
.
getDeptIds
());
}
else
{
lqw
.
eq
(
Insure:
:
getCreateBy
,
LoginHelper
.
getUserId
());
}
List
<
Insure
>
spuList
=
selectList
(
lqw
);
return
CollectionUtils
.
isEmpty
(
spuList
)
?
List
.
of
(-
1L
)
:
StreamUtils
.
toList
(
spuList
,
Insure:
:
getId
);
}
else
{
return
List
.
of
();
}
}
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/mapper/weishi/InsurePolicyHolderMapper.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
mapper
.
weishi
;
import
org.dromara.common.mybatis.core.mapper.BaseMapperPlus
;
import
org.dromara.mall.controller.weishi.admin.vo.InsurePolicyHolderVo
;
import
org.dromara.mall.domain.weishi.InsurePolicyHolder
;
/**
* 保险订单-投保人Mapper接口
*
* @author hzh
* @date 2025-05-13
*/
public
interface
InsurePolicyHolderMapper
extends
BaseMapperPlus
<
InsurePolicyHolder
,
InsurePolicyHolderVo
>
{
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/mapper/weishi/InsureTaxpayerMapper.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
mapper
.
weishi
;
import
org.dromara.common.mybatis.core.mapper.BaseMapperPlus
;
import
org.dromara.mall.controller.weishi.admin.vo.InsureTaxpayerVo
;
import
org.dromara.mall.domain.weishi.InsureTaxpayer
;
/**
* 保险订单-发票信息Mapper接口
*
* @author hzh
* @date 2025-05-13
*/
public
interface
InsureTaxpayerMapper
extends
BaseMapperPlus
<
InsureTaxpayer
,
InsureTaxpayerVo
>
{
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/mapper/weishi/InsureUnitMapper.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
mapper
.
weishi
;
import
org.dromara.common.mybatis.core.mapper.BaseMapperPlus
;
import
org.dromara.mall.controller.weishi.admin.vo.InsureUnitVo
;
import
org.dromara.mall.domain.weishi.InsureUnit
;
/**
* 保险订单-投保单元Mapper接口
*
* @author hzh
* @date 2025-05-13
*/
public
interface
InsureUnitMapper
extends
BaseMapperPlus
<
InsureUnit
,
InsureUnitVo
>
{
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/service/product/impl/ProductCommentServiceImpl.java
浏览文件 @
06987a4a
...
@@ -3,21 +3,22 @@ package org.dromara.mall.service.product.impl;
...
@@ -3,21 +3,22 @@ package org.dromara.mall.service.product.impl;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
jakarta.annotation.Resource
;
import
jakarta.annotation.Resource
;
import
lombok.extern.slf4j.Slf4j
;
import
org.dromara.common.mybatis.core.page.PageResult
;
import
org.dromara.common.mybatis.core.page.PageResult
;
import
org.dromara.common.mybatis.core.query.LambdaQueryWrapperX
;
import
org.dromara.common.mybatis.core.query.LambdaQueryWrapperX
;
import
org.dromara.mall.api.dto.member.MemberUserRespDTO
;
import
org.dromara.mall.api.dto.product.ProductCommentCreateReqDTO
;
import
org.dromara.mall.api.service.member.MemberUserApi
;
import
org.dromara.mall.controller.product.admin.comment.vo.ProductCommentCreateReqVO
;
import
org.dromara.mall.controller.product.admin.comment.vo.ProductCommentCreateReqVO
;
import
org.dromara.mall.controller.product.admin.comment.vo.ProductCommentPageReqVO
;
import
org.dromara.mall.controller.product.admin.comment.vo.ProductCommentPageReqVO
;
import
org.dromara.mall.controller.product.admin.comment.vo.ProductCommentReplyReqVO
;
import
org.dromara.mall.controller.product.admin.comment.vo.ProductCommentReplyReqVO
;
import
org.dromara.mall.controller.product.admin.comment.vo.ProductCommentUpdateVisibleReqVO
;
import
org.dromara.mall.controller.product.admin.comment.vo.ProductCommentUpdateVisibleReqVO
;
import
org.dromara.mall.controller.product.app.comment.vo.AppCommentPageReqVO
;
import
org.dromara.mall.controller.product.app.comment.vo.AppCommentPageReqVO
;
import
org.dromara.mall.convert.product.ProductCommentConvert
;
import
org.dromara.mall.convert.product.ProductCommentConvert
;
import
org.dromara.mall.api.dto.member.MemberUserRespDTO
;
import
org.dromara.mall.api.dto.product.ProductCommentCreateReqDTO
;
import
org.dromara.mall.domain.product.ProductCommentDO
;
import
org.dromara.mall.domain.product.ProductCommentDO
;
import
org.dromara.mall.domain.product.ProductSkuDO
;
import
org.dromara.mall.domain.product.ProductSkuDO
;
import
org.dromara.mall.domain.product.ProductSpuDO
;
import
org.dromara.mall.domain.product.ProductSpuDO
;
import
org.dromara.mall.mapper.product.ProductCommentMapper
;
import
org.dromara.mall.mapper.product.ProductCommentMapper
;
import
org.dromara.mall.api.service.member.MemberUserApi
;
import
org.dromara.mall.service.product.ProductCommentService
;
import
org.dromara.mall.service.product.ProductCommentService
;
import
org.dromara.mall.service.product.ProductSkuService
;
import
org.dromara.mall.service.product.ProductSkuService
;
import
org.dromara.mall.service.product.ProductSpuService
;
import
org.dromara.mall.service.product.ProductSpuService
;
...
@@ -38,6 +39,7 @@ import static org.dromara.mall.enums.product.ErrorCodeConstants.*;
...
@@ -38,6 +39,7 @@ import static org.dromara.mall.enums.product.ErrorCodeConstants.*;
*/
*/
@Service
@Service
@Validated
@Validated
@Slf4j
public
class
ProductCommentServiceImpl
implements
ProductCommentService
{
public
class
ProductCommentServiceImpl
implements
ProductCommentService
{
@Resource
@Resource
...
@@ -100,6 +102,7 @@ public class ProductCommentServiceImpl implements ProductCommentService {
...
@@ -100,6 +102,7 @@ public class ProductCommentServiceImpl implements ProductCommentService {
private
ProductSkuDO
validateSku
(
Long
skuId
)
{
private
ProductSkuDO
validateSku
(
Long
skuId
)
{
ProductSkuDO
sku
=
productSkuService
.
getSku
(
skuId
);
ProductSkuDO
sku
=
productSkuService
.
getSku
(
skuId
);
if
(
sku
==
null
)
{
if
(
sku
==
null
)
{
log
.
info
(
"商品 SKU {} 不存在"
,
skuId
);
throw
exception
(
SKU_NOT_EXISTS
);
throw
exception
(
SKU_NOT_EXISTS
);
}
}
return
sku
;
return
sku
;
...
...
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/service/weishi/IAccountService.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
service
.
weishi
;
import
org.dromara.common.mybatis.service.IBaseService
;
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
;
/**
* 保险账号Service接口
*
* @author hzh
* @date 2025-05-15
*/
public
interface
IAccountService
extends
IBaseService
<
AccountVo
,
AccountBo
,
Account
>
{
/**
* 跟新
*
* @param bo bo
* @return 是否成功
*/
int
update
(
AccountBo
bo
);
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/service/weishi/IInsureService.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
service
.
weishi
;
import
org.dromara.common.mybatis.service.IBaseService
;
import
org.dromara.common.weishi.model.req.ApplyRequest
;
import
org.dromara.common.weishi.model.res.ApplyResponse
;
import
org.dromara.mall.controller.weishi.admin.bo.InsureBo
;
import
org.dromara.mall.controller.weishi.admin.vo.InsureVo
;
import
org.dromara.mall.domain.weishi.Insure
;
/**
* 保险订单Service接口
*
* @author hzh
* @date 2025-05-13
*/
public
interface
IInsureService
extends
IBaseService
<
InsureVo
,
InsureBo
,
Insure
>
{
/**
* 保存
*
* @param req 请求参数
* @param res 响应参数
*/
void
apply
(
ApplyRequest
req
,
ApplyResponse
res
);
/**
* 订单取消
*
* @param orderNum 订单号
*/
void
insureCancel
(
String
orderNum
);
/**
* 签单
*
* @param orderNum 订单编码
*/
void
insureIssue
(
String
orderNum
);
/**
* 保单取消
*
* @param policyNum 保单号
*/
void
policyCancel
(
String
policyNum
);
/**
* 更新订单状态
*/
void
updateOrderStatus
(
Integer
orderId
);
/**
* 订单详情
*
* @param id id
* @return 数据
*/
InsureVo
getDetail
(
Long
id
);
/**
* 作废接口
*
* @param orderId 订单id
*/
void
insureAbandon
(
Integer
orderId
);
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/service/weishi/IThirdWeishiService.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
service
.
weishi
;
import
org.dromara.mall.domain.weishi.Account
;
/**
* @author wenhe
*/
public
interface
IThirdWeishiService
{
/**
* 获取token
*
* @param deptId 部门id
* @return token
*/
String
getToken
(
Long
deptId
);
/**
* 更新部门token
*
* @param deptId 部门id
*/
void
updateToken
(
Long
deptId
);
/**
* 更新
* @param account 账号
*/
void
updateTokens
(
Account
account
);
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/service/weishi/impl/AccountServiceImpl.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
service
.
weishi
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
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.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.dromara.mall.service.weishi.IThirdWeishiService
;
import
org.springframework.stereotype.Service
;
import
java.util.Objects
;
/**
* 保险账号Service业务层处理
*
* @author hzh
* @date 2025-05-15
*/
@RequiredArgsConstructor
@Service
public
class
AccountServiceImpl
extends
AbstractBaseService
<
AccountVo
,
AccountBo
,
Account
>
implements
IAccountService
{
private
final
AccountMapper
baseMapper
;
private
final
IThirdWeishiService
thirdWeishiService
;
@Override
public
BaseMapperPlus
<
Account
,
AccountVo
>
mapper
()
{
return
baseMapper
;
}
@Override
public
LambdaQueryWrapper
<
Account
>
buildQueryWrapper
(
AccountBo
bo
)
{
LambdaQueryWrapper
<
Account
>
lqw
=
Wrappers
.
lambdaQuery
();
lqw
.
eq
(
bo
.
getDeptId
()
!=
null
,
Account:
:
getDeptId
,
bo
.
getDeptId
());
lqw
.
eq
(
StringUtils
.
isNotBlank
(
bo
.
getUsername
()),
Account:
:
getUsername
,
bo
.
getUsername
());
lqw
.
eq
(
StringUtils
.
isNotBlank
(
bo
.
getPassword
()),
Account:
:
getPassword
,
bo
.
getPassword
());
return
lqw
;
}
@Override
public
int
update
(
AccountBo
bo
)
{
Account
account
=
baseMapper
.
selectOne
(
new
LambdaQueryWrapper
<
Account
>().
eq
(
Account:
:
getDeptId
,
bo
.
getDeptId
()));
int
rows
;
if
(
Objects
.
isNull
(
account
))
{
account
=
BeanUtil
.
copyProperties
(
bo
,
Account
.
class
);
rows
=
baseMapper
.
insert
(
account
);
thirdWeishiService
.
updateTokens
(
account
);
}
else
{
account
.
setUsername
(
bo
.
getUsername
())
.
setPassword
(
bo
.
getPassword
());
rows
=
baseMapper
.
updateById
(
account
);
thirdWeishiService
.
updateTokens
(
account
);
}
return
rows
;
}
}
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/service/weishi/impl/InsureServiceImpl.java
0 → 100644
浏览文件 @
06987a4a
差异被折叠。
点击展开。
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/service/weishi/impl/ThirdWeishiServiceImpl.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
mall
.
service
.
weishi
.
impl
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.dromara.common.core.utils.StringUtils
;
import
org.dromara.common.redis.utils.RedisUtils
;
import
org.dromara.common.weishi.exception.WeishiException
;
import
org.dromara.common.weishi.model.req.AuthRequest
;
import
org.dromara.common.weishi.model.res.AuthResponse
;
import
org.dromara.common.weishi.service.WeishiService
;
import
org.dromara.mall.domain.weishi.Account
;
import
org.dromara.mall.mapper.weishi.AccountMapper
;
import
org.dromara.mall.service.weishi.IThirdWeishiService
;
import
org.springframework.stereotype.Service
;
import
java.time.Duration
;
import
java.util.List
;
import
java.util.Objects
;
/**
* @author hzh
* @date 2025-05-15
**/
@Service
@RequiredArgsConstructor
@Slf4j
public
class
ThirdWeishiServiceImpl
implements
IThirdWeishiService
{
private
final
WeishiService
weishiService
;
private
final
AccountMapper
accountMapper
;
String
WEISHI_TOKEN
=
"mall:third:weishi:token:{}:{}"
;
@Override
public
String
getToken
(
Long
deptId
)
{
if
(
Objects
.
isNull
(
deptId
))
{
throw
new
WeishiException
(
"该账号无部门,请先配置部门在使用旅游产品接口"
);
}
Account
account
=
accountMapper
.
selectOne
(
Account:
:
getDeptId
,
deptId
);
if
(
Objects
.
isNull
(
account
))
{
throw
new
WeishiException
(
"当前部门没有配置旅游产品账号密码,请先配置再使用"
);
}
return
updateToken
(
account
);
}
private
String
updateToken
(
Account
account
)
{
String
key
=
StringUtils
.
format
(
WEISHI_TOKEN
,
account
.
getTenantId
(),
account
.
getDeptId
());
String
token
=
RedisUtils
.
getCacheObject
(
key
);
if
(
StringUtils
.
isEmpty
(
token
))
{
AuthResponse
res
=
weishiService
.
authorize
(
new
AuthRequest
(
account
.
getUsername
(),
account
.
getPassword
()));
RedisUtils
.
setCacheObject
(
key
,
res
.
getAccess_token
(),
Duration
.
ofSeconds
(
res
.
getExpires_in
().
longValue
()));
token
=
res
.
getAccess_token
();
}
return
token
;
}
@Override
public
void
updateTokens
(
Account
account
)
{
String
key
=
StringUtils
.
format
(
WEISHI_TOKEN
,
account
.
getTenantId
(),
account
.
getDeptId
());
AuthResponse
res
=
weishiService
.
authorize
(
new
AuthRequest
(
account
.
getUsername
(),
account
.
getPassword
()));
RedisUtils
.
setCacheObject
(
key
,
res
.
getAccess_token
(),
Duration
.
ofSeconds
(
res
.
getExpires_in
().
longValue
()));
}
@Override
public
void
updateToken
(
Long
deptId
)
{
List
<
Account
>
accountList
;
if
(
Objects
.
nonNull
(
deptId
))
{
accountList
=
accountMapper
.
selectList
(
Account:
:
getDeptId
,
deptId
);
}
else
{
accountList
=
accountMapper
.
selectList
();
}
accountList
.
forEach
(
account
->
{
try
{
updateToken
(
account
);
}
catch
(
Exception
e
)
{
log
.
info
(
"旅游卫士token更新失败,部门id:{},账号:{},密码:{}"
,
account
.
getDeptId
(),
account
.
getUsername
(),
account
.
getPassword
());
}
});
}
}
ruoyi-modules/ruoyi-mall/src/main/resources/mapper/weishi/AccountMapper.xml
0 → 100644
浏览文件 @
06987a4a
<?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=
"org.dromara.mall.mapper.weishi.AccountMapper"
>
</mapper>
ruoyi-modules/ruoyi-mall/src/main/resources/mapper/weishi/InsureInsuredsMapper.xml
0 → 100644
浏览文件 @
06987a4a
<?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=
"org.dromara.mall.mapper.weishi.InsureInsuredsMapper"
>
</mapper>
ruoyi-modules/ruoyi-mall/src/main/resources/mapper/weishi/InsureMapper.xml
0 → 100644
浏览文件 @
06987a4a
<?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=
"org.dromara.mall.mapper.weishi.InsureMapper"
>
</mapper>
ruoyi-modules/ruoyi-mall/src/main/resources/mapper/weishi/InsurePolicyHolderMapper.xml
0 → 100644
浏览文件 @
06987a4a
<?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=
"org.dromara.mall.mapper.weishi.InsurePolicyHolderMapper"
>
</mapper>
ruoyi-modules/ruoyi-mall/src/main/resources/mapper/weishi/InsureTaxpayerMapper.xml
0 → 100644
浏览文件 @
06987a4a
<?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=
"org.dromara.mall.mapper.weishi.InsureTaxpayerMapper"
>
</mapper>
ruoyi-modules/ruoyi-mall/src/main/resources/mapper/weishi/InsureUnitMapper.xml
0 → 100644
浏览文件 @
06987a4a
<?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=
"org.dromara.mall.mapper.weishi.InsureUnitMapper"
>
</mapper>
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysDeptTravelLineBo.java
浏览文件 @
06987a4a
...
@@ -42,19 +42,16 @@ public class SysDeptTravelLineBo extends BaseEntity {
...
@@ -42,19 +42,16 @@ public class SysDeptTravelLineBo extends BaseEntity {
/**
/**
* 部门简介
* 部门简介
*/
*/
@NotBlank
(
message
=
"部门简介不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
String
desc
;
private
String
desc
;
/**
/**
* 二维码
* 二维码
*/
*/
@NotBlank
(
message
=
"二维码不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
String
qrCode
;
private
String
qrCode
;
/**
/**
* 服务商
* 服务商
*/
*/
// @NotBlank(message = "服务商不能为空", groups = { AddGroup.class, EditGroup.class })
private
String
service
;
private
String
service
;
...
...
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteDeptServiceImpl.java
浏览文件 @
06987a4a
package
org
.
dromara
.
system
.
dubbo
;
package
org
.
dromara
.
system
.
dubbo
;
import
org.dromara.system.api.RemoteDeptService
;
import
org.dromara.system.service.ISysDeptService
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.dubbo.config.annotation.DubboService
;
import
org.apache.dubbo.config.annotation.DubboService
;
import
org.dromara.system.api.RemoteDeptService
;
import
org.dromara.system.domain.vo.SysDeptVo
;
import
org.dromara.system.domain.vo.SysUserVo
;
import
org.dromara.system.service.ISysDeptService
;
import
org.dromara.system.service.ISysUserService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
/**
/**
...
@@ -17,6 +20,7 @@ import org.springframework.stereotype.Service;
...
@@ -17,6 +20,7 @@ import org.springframework.stereotype.Service;
public
class
RemoteDeptServiceImpl
implements
RemoteDeptService
{
public
class
RemoteDeptServiceImpl
implements
RemoteDeptService
{
private
final
ISysDeptService
sysDeptService
;
private
final
ISysDeptService
sysDeptService
;
private
final
ISysUserService
userService
;
/**
/**
* 通过部门ID查询部门名称
* 通过部门ID查询部门名称
...
@@ -28,4 +32,21 @@ public class RemoteDeptServiceImpl implements RemoteDeptService {
...
@@ -28,4 +32,21 @@ public class RemoteDeptServiceImpl implements RemoteDeptService {
public
String
selectDeptNameByIds
(
String
deptIds
)
{
public
String
selectDeptNameByIds
(
String
deptIds
)
{
return
sysDeptService
.
selectDeptNameByIds
(
deptIds
);
return
sysDeptService
.
selectDeptNameByIds
(
deptIds
);
}
}
/**
* 获取部门负责人id
*
* @param userId 用户id
* @return 负责人id
*/
@Override
public
Long
selectLeaderIdByUserId
(
Long
userId
)
{
SysUserVo
user
=
userService
.
selectUserById
(
userId
);
if
(
user
.
getDeptId
()
==
null
)
{
return
null
;
}
//获取部门
SysDeptVo
dept
=
sysDeptService
.
selectDeptById
(
user
.
getDeptId
());
return
dept
.
getLeader
();
}
}
}
ruoyi-modules/ruoyi-workflow/pom.xml
浏览文件 @
06987a4a
...
@@ -22,6 +22,11 @@
...
@@ -22,6 +22,11 @@
<artifactId>
ruoyi-common-nacos
</artifactId>
<artifactId>
ruoyi-common-nacos
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
org.dromara
</groupId>
<artifactId>
ruoyi-common-sentinel
</artifactId>
</dependency>
<!--引入flowable依赖-->
<!--引入flowable依赖-->
<dependency>
<dependency>
<groupId>
org.flowable
</groupId>
<groupId>
org.flowable
</groupId>
...
@@ -113,6 +118,10 @@
...
@@ -113,6 +118,10 @@
<groupId>
org.dromara
</groupId>
<groupId>
org.dromara
</groupId>
<artifactId>
ruoyi-common-tenant
</artifactId>
<artifactId>
ruoyi-common-tenant
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
org.dromara
</groupId>
<artifactId>
ruoyi-api-system
</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>
org.dromara
</groupId>
<groupId>
org.dromara
</groupId>
...
@@ -134,6 +143,11 @@
...
@@ -134,6 +143,11 @@
<artifactId>
ruoyi-api-workflow
</artifactId>
<artifactId>
ruoyi-api-workflow
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
org.dromara
</groupId>
<artifactId>
ruoyi-common-core
</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>
commons-io
</groupId>
<groupId>
commons-io
</groupId>
<artifactId>
commons-io
</artifactId>
<artifactId>
commons-io
</artifactId>
...
...
ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/flowable/config/FlowableConfig.java
浏览文件 @
06987a4a
...
@@ -2,11 +2,14 @@ package org.dromara.workflow.flowable.config;
...
@@ -2,11 +2,14 @@ package org.dromara.workflow.flowable.config;
import
com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator
;
import
com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator
;
import
org.dromara.workflow.flowable.handler.TaskTimeoutJobHandler
;
import
org.dromara.workflow.flowable.handler.TaskTimeoutJobHandler
;
import
org.flowable.common.engine.impl.cfg.SpringBeanFactoryProxyMap
;
import
org.flowable.spring.SpringProcessEngineConfiguration
;
import
org.flowable.spring.SpringProcessEngineConfiguration
;
import
org.flowable.spring.boot.EngineConfigurationConfigurer
;
import
org.flowable.spring.boot.EngineConfigurationConfigurer
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
javax.annotation.Resource
;
import
java.util.Collections
;
import
java.util.Collections
;
...
@@ -22,11 +25,14 @@ public class FlowableConfig implements EngineConfigurationConfigurer<SpringProce
...
@@ -22,11 +25,14 @@ public class FlowableConfig implements EngineConfigurationConfigurer<SpringProce
private
GlobalFlowableListener
globalFlowableListener
;
private
GlobalFlowableListener
globalFlowableListener
;
@Autowired
@Autowired
private
IdentifierGenerator
identifierGenerator
;
private
IdentifierGenerator
identifierGenerator
;
@Resource
private
ApplicationContext
applicationContext
;
@Override
@Override
public
void
configure
(
SpringProcessEngineConfiguration
processEngineConfiguration
)
{
public
void
configure
(
SpringProcessEngineConfiguration
processEngineConfiguration
)
{
processEngineConfiguration
.
setIdGenerator
(()
->
identifierGenerator
.
nextId
(
null
).
toString
());
processEngineConfiguration
.
setIdGenerator
(()
->
identifierGenerator
.
nextId
(
null
).
toString
());
processEngineConfiguration
.
setEventListeners
(
Collections
.
singletonList
(
globalFlowableListener
));
processEngineConfiguration
.
setEventListeners
(
Collections
.
singletonList
(
globalFlowableListener
));
processEngineConfiguration
.
addCustomJobHandler
(
new
TaskTimeoutJobHandler
());
processEngineConfiguration
.
addCustomJobHandler
(
new
TaskTimeoutJobHandler
());
processEngineConfiguration
.
setBeans
(
new
SpringBeanFactoryProxyMap
(
applicationContext
));
}
}
}
}
ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/flowable/listener/DynamicAssigneeListener.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
workflow
.
flowable
.
listener
;
import
org.dromara.common.core.utils.SpringUtils
;
import
org.dromara.workflow.common.constant.FlowConstant
;
import
org.dromara.workflow.service.IDeptService
;
import
org.flowable.task.service.delegate.DelegateTask
;
import
org.flowable.task.service.delegate.TaskListener
;
import
org.springframework.stereotype.Component
;
import
java.util.Objects
;
@Component
public
class
DynamicAssigneeListener
implements
TaskListener
{
@Override
public
void
notify
(
DelegateTask
delegateTask
)
{
// 获取申请人ID(从流程变量中获取)
Long
applicantId
=
Long
.
parseLong
(
delegateTask
.
getVariable
(
FlowConstant
.
INITIATOR
).
toString
());
IDeptService
deptService
=
SpringUtils
.
getBean
(
IDeptService
.
class
);
// 调用服务获取审批人列表
Long
approveId
=
deptService
.
selectLeaderIdByUserId
(
applicantId
);
// 设置候选用户
delegateTask
.
setAssignee
(
Objects
.
isNull
(
approveId
)
?
null
:
approveId
.
toString
());
}
}
ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/runner/WorkflowApplicationRunner.java
浏览文件 @
06987a4a
...
@@ -4,6 +4,7 @@ import lombok.RequiredArgsConstructor;
...
@@ -4,6 +4,7 @@ import lombok.RequiredArgsConstructor;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.dubbo.config.annotation.DubboReference
;
import
org.apache.dubbo.config.annotation.DubboReference
;
import
org.dromara.resource.api.RemoteFileService
;
import
org.dromara.resource.api.RemoteFileService
;
import
org.dromara.system.api.RemoteDeptService
;
import
org.dromara.system.api.RemoteUserService
;
import
org.dromara.system.api.RemoteUserService
;
import
org.springframework.boot.ApplicationArguments
;
import
org.springframework.boot.ApplicationArguments
;
import
org.springframework.boot.ApplicationRunner
;
import
org.springframework.boot.ApplicationRunner
;
...
@@ -23,6 +24,8 @@ public class WorkflowApplicationRunner implements ApplicationRunner {
...
@@ -23,6 +24,8 @@ public class WorkflowApplicationRunner implements ApplicationRunner {
private
RemoteUserService
remoteUserService
;
private
RemoteUserService
remoteUserService
;
@DubboReference
@DubboReference
private
RemoteFileService
remoteFileService
;
private
RemoteFileService
remoteFileService
;
@DubboReference
private
RemoteDeptService
remoteDeptService
;
@Override
@Override
public
void
run
(
ApplicationArguments
args
)
throws
Exception
{
public
void
run
(
ApplicationArguments
args
)
throws
Exception
{
...
...
ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/IDeptService.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
workflow
.
service
;
public
interface
IDeptService
{
/**
* 获取部门负责人id
*
* @param userId 用户id
* @return 负责人id
*/
Long
selectLeaderIdByUserId
(
Long
userId
);
}
ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/DeptServiceImpl.java
0 → 100644
浏览文件 @
06987a4a
package
org
.
dromara
.
workflow
.
service
.
impl
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.dubbo.config.annotation.DubboReference
;
import
org.dromara.system.api.RemoteDeptService
;
import
org.dromara.workflow.service.IDeptService
;
import
org.springframework.stereotype.Service
;
/**
* @author hzh
* @date 2025-05-20
* @desc TODO
**/
@Service
@RequiredArgsConstructor
public
class
DeptServiceImpl
implements
IDeptService
{
@DubboReference
private
RemoteDeptService
remoteDeptService
;
@Override
public
Long
selectLeaderIdByUserId
(
Long
userId
)
{
return
remoteDeptService
.
selectLeaderIdByUserId
(
userId
);
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论