Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
16c262ef
Commit
16c262ef
authored
Aug 26, 2022
by
查济
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-zhaji' into 'develop'
"feature-zhaJi:修复创建时间等bug" See merge request fangxinjiang/yifu!200
parents
6c622785
c6a77358
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
9 deletions
+27
-9
EKPUtil.java
.../com/yifu/cloud/plus/v1/yifu/insurances/util/EKPUtil.java
+2
-1
EkpDataSourceConfig.java
...d/plus/v1/yifu/insurances/config/EkpDataSourceConfig.java
+4
-1
InsurancesDataSourceConfig.java
...v1/yifu/insurances/config/InsurancesDataSourceConfig.java
+15
-1
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+6
-6
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/EKPUtil.java
View file @
16c262ef
...
...
@@ -88,6 +88,7 @@ public class EKPUtil {
TInsuranceSettlePushParam
pushParam
=
insuranceDetail2PushParam
(
param
);
try
{
String
formValues
=
new
ObjectMapper
().
writeValueAsString
(
pushParam
);
log
.
info
(
"formValues:"
+
formValues
);
//指向EKP的接口url
//把ModelingAppModelParameterAddForm转换成MultiValueMap
JSONObject
loginName
=
new
JSONObject
();
...
...
@@ -104,7 +105,7 @@ public class EKPUtil {
//wholeForm.add("formValues", new String(formValues.getBytes("UTF-8"),"ISO-8859-1"));
wholeForm
.
add
(
"formValues"
,
formValues
);
//wholeForm.add("formValues", new String("{\"fd_3adfe6af71a1cc\":\"王五\", \"fd_3adfe658c6229e\":\"2019-03-26\", \"fd_3adfe6592b4158\":\"这里内容\"}".getBytes("UTF-8"),"ISO-8859-1") );
System
.
out
.
println
(
"wholeForm:"
+
wholeForm
);
//
System.out.println("wholeForm:"+wholeForm);
HttpHeaders
headers
=
new
HttpHeaders
();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
//addAuth(headers,"yourAccount"+":"+"yourPassword");是VO,则使用APPLICATION_JSON
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/config/EkpDataSourceConfig.java
View file @
16c262ef
...
...
@@ -2,9 +2,12 @@ package com.yifu.cloud.plus.v1.yifu.insurances.config;
import
com.baomidou.mybatisplus.annotation.DbType
;
import
com.baomidou.mybatisplus.core.MybatisConfiguration
;
import
com.baomidou.mybatisplus.core.handlers.MetaObjectHandler
;
import
com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor
;
import
com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor
;
import
com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.config.MybatisPlusMetaObjectHandler
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.plugins.YifuPaginationInnerInterceptor
;
import
org.apache.ibatis.session.SqlSessionFactory
;
import
org.mybatis.spring.SqlSessionFactoryBean
;
import
org.mybatis.spring.SqlSessionTemplate
;
...
...
@@ -101,7 +104,7 @@ public class EkpDataSourceConfig {
@Bean
public
MybatisPlusInterceptor
ekpPlusInterceptor
()
{
MybatisPlusInterceptor
interceptor
=
new
MybatisPlusInterceptor
();
interceptor
.
addInnerInterceptor
(
new
PaginationInnerInterceptor
(
DbType
.
MYSQL
));
interceptor
.
addInnerInterceptor
(
new
YifuPaginationInnerInterceptor
(
));
return
interceptor
;
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/config/InsurancesDataSourceConfig.java
View file @
16c262ef
...
...
@@ -2,9 +2,13 @@ package com.yifu.cloud.plus.v1.yifu.insurances.config;
import
com.baomidou.mybatisplus.annotation.DbType
;
import
com.baomidou.mybatisplus.core.MybatisConfiguration
;
import
com.baomidou.mybatisplus.core.config.GlobalConfig
;
import
com.baomidou.mybatisplus.core.handlers.MetaObjectHandler
;
import
com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor
;
import
com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor
;
import
com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.config.MybatisPlusMetaObjectHandler
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.plugins.YifuPaginationInnerInterceptor
;
import
org.apache.ibatis.session.SqlSessionFactory
;
import
org.mybatis.spring.SqlSessionTemplate
;
import
org.mybatis.spring.annotation.MapperScan
;
...
...
@@ -38,19 +42,29 @@ public class InsurancesDataSourceConfig {
}
@Bean
public
SqlSessionFactory
insurancesSqlSessionFactory
(
@Qualifier
(
"insurancesDataSource"
)
DataSource
dataSource
)
throws
Exception
{
MybatisSqlSessionFactoryBean
bean
=
new
MybatisSqlSessionFactoryBean
();
bean
.
setDataSource
(
dataSource
);
//多数据源 myMetaObjectHandler不起作用问题解决
GlobalConfig
globalConfig
=
new
GlobalConfig
();
globalConfig
.
setMetaObjectHandler
(
new
MybatisPlusMetaObjectHandler
());
globalConfig
.
setDbConfig
(
new
GlobalConfig
.
DbConfig
());
bean
.
setGlobalConfig
(
globalConfig
);
//添加XML目录
ResourcePatternResolver
resolver
=
new
PathMatchingResourcePatternResolver
();
try
{
bean
.
setMapperLocations
(
resolver
.
getResources
(
"classpath:mapper/insurances/*.xml"
));
//分页插件配置,不配置分页插件无效,否则会出现total为0的情况
bean
.
setPlugins
(
insurancesPlusInterceptor
());
SqlSessionFactory
sqlSessionFactory
=
bean
.
getObject
();
assert
sqlSessionFactory
!=
null
;
sqlSessionFactory
.
getConfiguration
().
setMapUnderscoreToCamelCase
(
true
);
return
bean
.
getObject
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
RuntimeException
(
e
);
}
/* MybatisSqlSessionFactoryBean bean = new MybatisSqlSessionFactoryBean();
bean.setDataSource(dataSource);
MybatisConfiguration configuration = new MybatisConfiguration();
...
...
@@ -77,7 +91,7 @@ public class InsurancesDataSourceConfig {
@Bean
public
MybatisPlusInterceptor
insurancesPlusInterceptor
()
{
MybatisPlusInterceptor
interceptor
=
new
MybatisPlusInterceptor
();
interceptor
.
addInnerInterceptor
(
new
PaginationInnerInterceptor
(
DbType
.
MYSQL
));
interceptor
.
addInnerInterceptor
(
new
YifuPaginationInnerInterceptor
(
));
return
interceptor
;
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
16c262ef
...
...
@@ -3102,7 +3102,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link List< RefundExportListVo >}
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
value
=
"insurancesTransactionManager"
,
rollbackFor
=
{
Exception
.
class
}
)
public
R
<
List
<
RefundExportListVo
>>
getInsuranceRefundHandlingList
(
RefundExportListParam
param
){
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
RefundExportListVo
>
refundExportList
;
...
...
@@ -3175,7 +3175,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link R}
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
value
=
"insurancesTransactionManager"
,
rollbackFor
=
{
Exception
.
class
}
)
public
R
updateInsuranceRefund
(
InsuranceRefundListParam
insuranceDetail
)
{
Integer
refundType
=
insuranceDetail
.
getRefundType
();
if
(
CommonConstants
.
THREE_INT
!=
refundType
&&
CommonConstants
.
FOUR_INT
!=
refundType
){
...
...
@@ -3252,7 +3252,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @param
* @return void
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
value
=
"insurancesTransactionManager"
,
rollbackFor
=
{
Exception
.
class
}
)
@Override
public
R
insuranceRefundImport
(
List
<
InsuranceHandleImportParam
>
insuranceRefundImportList
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
...
...
@@ -3309,7 +3309,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @param
* @return void
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
value
=
"insurancesTransactionManager"
,
rollbackFor
=
{
Exception
.
class
}
)
@Override
public
R
settleMonthChange
(
List
<
SettleMonthChangeCheckParam
>
settleMonthCheckList
)
{
//初始化线程池
...
...
@@ -3388,7 +3388,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link R}
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
value
=
"insurancesTransactionManager"
,
rollbackFor
=
{
Exception
.
class
}
)
public
R
deptChange
(
List
<
DeptChangeCheckParam
>
deptChangeCheckList
)
{
//初始化线程池
ThreadPoolExecutor
threadPool
=
new
ThreadPoolExecutor
(
50
,
50
,
100
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingQueue
<>(
10
));
...
...
@@ -3965,7 +3965,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link R}
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
value
=
"insurancesTransactionManager"
,
rollbackFor
=
{
Exception
.
class
}
)
public
R
updateIsUse
(
String
id
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
TInsuranceDetail
insuranceDetail
=
getById
(
id
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment