Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
ec118016
Commit
ec118016
authored
May 27, 2022
by
翁国栋
Committed by
284718418@qq.com
Mar 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8小时后台--
保单增员支付
parent
9d5ca1ab
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
104 additions
and
16 deletions
+104
-16
src/main/java/cn/timer/api/bean/insure/InsurePay.java
+2
-0
src/main/java/cn/timer/api/controller/insure/CallBackContorll.java
+81
-9
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
+3
-3
src/main/java/cn/timer/api/dao/qyzx/QyzxEntInfoMMapper.java
+2
-2
src/main/java/cn/timer/api/dto/qyzx/EntInfoDto.java
+2
-0
src/main/resources/mapping/insure/InsurePayMapper.xml
+1
-0
src/main/resources/mapping/qyzx/QyzxEntInfoMMapper.xml
+13
-2
No files found.
src/main/java/cn/timer/api/bean/insure/InsurePay.java
View file @
ec118016
...
@@ -73,6 +73,8 @@ public class InsurePay extends Model<InsurePay> {
...
@@ -73,6 +73,8 @@ public class InsurePay extends Model<InsurePay> {
private
String
serialNumber
;
private
String
serialNumber
;
private
String
payUrl
;
/**
/**
* 设置:id
* 设置:id
*/
*/
...
...
src/main/java/cn/timer/api/controller/insure/CallBackContorll.java
View file @
ec118016
...
@@ -3,6 +3,7 @@ package cn.timer.api.controller.insure;
...
@@ -3,6 +3,7 @@ package cn.timer.api.controller.insure;
import
cn.timer.api.bean.insure.*
;
import
cn.timer.api.bean.insure.*
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.utils.HttpUtils
;
import
cn.timer.api.utils.HttpUtils
;
import
cn.timer.api.utils.ResultUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
...
@@ -10,6 +11,7 @@ import com.google.common.collect.Maps;
...
@@ -10,6 +11,7 @@ import com.google.common.collect.Maps;
import
com.mysql.cj.util.StringUtils
;
import
com.mysql.cj.util.StringUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.models.auth.In
;
import
org.apache.commons.codec.digest.DigestUtils
;
import
org.apache.commons.codec.digest.DigestUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -52,6 +54,10 @@ public class CallBackContorll {
...
@@ -52,6 +54,10 @@ public class CallBackContorll {
@Value
(
"${BASE_API_URL}"
)
@Value
(
"${BASE_API_URL}"
)
private
String
base_api_url
;
private
String
base_api_url
;
/*保全支付*/
@Value
(
"${insure.batchToPayUrl}"
)
private
String
batchToPayUrl
;
private
Map
setParams
(
String
sign
,
String
appid
,
String
secret
)
{
private
Map
setParams
(
String
sign
,
String
appid
,
String
secret
)
{
/*当前时间戳*/
/*当前时间戳*/
...
@@ -103,8 +109,81 @@ public class CallBackContorll {
...
@@ -103,8 +109,81 @@ public class CallBackContorll {
return
trueMap
;
return
trueMap
;
}
}
@PostMapping
(
value
=
"/addpPayCallBack"
)
@ApiOperation
(
value
=
"11.增员核保回调"
,
httpMethod
=
"POST"
,
notes
=
"增员核保回调"
)
private
Map
addpPayCallBack
(
HttpServletRequest
request
,
@RequestParam
String
pid
,
@RequestParam
String
sign
,
@RequestParam
String
timestamp
)
throws
IOException
{
/*核保*/
/*如果是在线支付的话*/
Map
map
=
Maps
.
newHashMap
();
map
.
put
(
"status"
,
"error"
);
if
(
StringUtils
.
isNullOrEmpty
(
pid
)
||
StringUtils
.
isNullOrEmpty
(
sign
)
&&
StringUtils
.
isNullOrEmpty
(
timestamp
))
{
return
map
;
}
if
(!
pid
.
equals
(
appidq
))
{
return
map
;
}
InputStream
is
=
null
;
is
=
request
.
getInputStream
();
StringBuilder
sb
=
new
StringBuilder
();
byte
[]
b
=
new
byte
[
4096
];
for
(
int
n
;
(
n
=
is
.
read
(
b
))
!=
-
1
;
)
{
sb
.
append
(
new
String
(
b
,
0
,
n
));
}
String
value
=
DigestUtils
.
md5Hex
(
appidq
+
secretq
+
timestamp
+
sb
.
toString
());
if
(!
value
.
equals
(
sign
))
{
return
map
;
}
CallBack
callBack
=
JSONObject
.
parseObject
(
sb
.
toString
(),
CallBack
.
class
);
if
(
callBack
.
getCallback_type
().
equals
(
"1"
))
{
List
<
InsureUser
>
insureUserList
=
InsureUser
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
InsureUser
>().
lambda
().
eq
(
InsureUser:
:
getBatchNo
,
callBack
.
getOrder_import_info
().
getUuid
()));
InsurePolicy
insurePolicy
=
InsurePolicy
.
builder
().
id
(
insureUserList
.
get
(
0
).
getPolicyId
()).
build
().
selectById
();
if
(
callBack
.
getStatus
().
equals
(
"1"
))
{
if
(
insureUserList
.
size
()
>
0
)
{
insurePolicy
.
setStatus
(
"4"
);
/*设置为支付状态*/
insurePolicy
.
setUpdateTime
(
new
Date
());
InsurePay
insurePay
=
InsurePay
.
builder
().
payStatus
(
1
).
serialNumber
(
callBack
.
getOrder_import_info
().
getUuid
()).
policyId
(
insurePolicy
.
getId
()).
build
();
insurePay
.
insert
();
insurePolicy
.
setPayId
(
insurePay
.
getId
());
insurePolicy
.
updateById
();
}
InsureLog
.
builder
().
type
(
7
)
.
requestData
(
sb
.
toString
()).
createTime
(
new
Date
()).
requestType
(
1
).
returnBody
(
JSONObject
.
toJSONString
(
callBack
)).
requestPath
(
base_api_url
+
"/callBack/policy/addpPayCallBack"
)
.
returnCode
(
callBack
.
getStatus
()).
returnMsg
(
"核保通过"
).
policyId
(
insurePolicy
.
getId
()).
build
();
}
else
{
insureUserList
.
stream
().
forEach
(
v
->{
v
.
setStatus
(
"2"
);
v
.
setInsureStatus
(
2
);
v
.
updateById
();
});
insurePolicy
.
setStatus
(
"1"
);
insurePolicy
.
updateById
();
List
<
Map
>
errMap
=
callBack
.
getOrder_import_info
().
getErr_list
();
String
errorMsg
=
""
;
if
(
errMap
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
errMap
.
size
();
i
++)
{
errorMsg
=
errorMsg
+
(
"姓名:"
+
errMap
.
get
(
i
).
get
(
"name"
).
toString
()
+
",错误:"
+
errMap
.
get
(
i
).
get
(
"err_content"
).
toString
()
+
','
);
}
}
else
{
errorMsg
=
callBack
.
getErr_msg
();
}
//TODO 写入日志
InsureLog
.
builder
().
type
(
7
)
.
requestData
(
sb
.
toString
()).
createTime
(
new
Date
()).
requestType
(
1
).
returnBody
(
JSONObject
.
toJSONString
(
callBack
)).
requestPath
(
base_api_url
+
"/callBack/policy/addpPayCallBack"
)
.
returnCode
(
callBack
.
getStatus
()).
returnMsg
(
errorMsg
).
policyId
(
insurePolicy
.
getId
()).
build
().
insert
();
}
}
Map
trueMap
=
Maps
.
newHashMap
();
trueMap
.
put
(
"status"
,
"1"
);
return
trueMap
;
}
@PostMapping
(
value
=
"/CallBack"
)
@PostMapping
(
value
=
"/CallBack"
)
@ApiOperation
(
value
=
"7.保全增员申请回调"
,
httpMethod
=
"POST"
,
notes
=
"投保申请回调"
)
@ApiOperation
(
value
=
"7.保全增员申请回调"
,
httpMethod
=
"POST"
,
notes
=
"投保申请回调"
)
@ApiOperationSupport
(
order
=
2
)
private
Map
callBack
(
HttpServletRequest
request
,
@RequestParam
String
pid
,
@RequestParam
String
sign
,
@RequestParam
String
timestamp
)
throws
IOException
{
private
Map
callBack
(
HttpServletRequest
request
,
@RequestParam
String
pid
,
@RequestParam
String
sign
,
@RequestParam
String
timestamp
)
throws
IOException
{
Map
map
=
Maps
.
newHashMap
();
Map
map
=
Maps
.
newHashMap
();
map
.
put
(
"status"
,
"error"
);
map
.
put
(
"status"
,
"error"
);
...
@@ -130,12 +209,6 @@ public class CallBackContorll {
...
@@ -130,12 +209,6 @@ public class CallBackContorll {
paramsMap
.
put
(
"timestamp"
,
timestamp
);
paramsMap
.
put
(
"timestamp"
,
timestamp
);
paramsMap
.
put
(
"sign"
,
sign
);
paramsMap
.
put
(
"sign"
,
sign
);
CallBack
callBack
=
JSONObject
.
parseObject
(
sb
.
toString
(),
CallBack
.
class
);
CallBack
callBack
=
JSONObject
.
parseObject
(
sb
.
toString
(),
CallBack
.
class
);
/*1保全复核回调*/
if
(
callBack
.
getCallback_type
().
equals
(
"1"
))
{
/*核保*/
}
else
{
/*到这就已经支付成功出单了*/
log
.
info
(
"callBack====="
+
sb
.
toString
());
log
.
info
(
"callBack====="
+
sb
.
toString
());
if
(
callBack
.
getStatus
().
equals
(
"1"
))
{
if
(
callBack
.
getStatus
().
equals
(
"1"
))
{
List
<
InsureUser
>
list
=
InsureUser
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
InsureUser
>().
lambda
().
eq
(
InsureUser:
:
getBatchNo
,
callBack
.
getOrder_import_info
().
getUuid
()).
eq
(
InsureUser:
:
getInsureStatus
,
3
));
List
<
InsureUser
>
list
=
InsureUser
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
InsureUser
>().
lambda
().
eq
(
InsureUser:
:
getBatchNo
,
callBack
.
getOrder_import_info
().
getUuid
()).
eq
(
InsureUser:
:
getInsureStatus
,
3
));
...
@@ -159,6 +232,7 @@ public class CallBackContorll {
...
@@ -159,6 +232,7 @@ public class CallBackContorll {
}
}
insurePolicy
.
setPolicyFile
(
callBack
.
getOrder_import_info
().
getEndorsement_file
());
insurePolicy
.
setPolicyFile
(
callBack
.
getOrder_import_info
().
getEndorsement_file
());
insurePolicy
.
setUpdateTime
(
new
Date
());
insurePolicy
.
setUpdateTime
(
new
Date
());
insurePolicy
.
setStatus
(
"1"
);
insurePolicy
.
updateById
();
insurePolicy
.
updateById
();
InsureLog
.
builder
().
requestParam
(
JSONObject
.
toJSONString
(
paramsMap
)).
type
(
7
)
InsureLog
.
builder
().
requestParam
(
JSONObject
.
toJSONString
(
paramsMap
)).
type
(
7
)
.
requestData
(
sb
.
toString
()).
createTime
(
new
Date
()).
requestType
(
1
).
returnBody
(
JSONObject
.
toJSONString
(
callBack
)).
requestPath
(
base_api_url
+
"/callBack/policy/CallBack"
)
.
requestData
(
sb
.
toString
()).
createTime
(
new
Date
()).
requestType
(
1
).
returnBody
(
JSONObject
.
toJSONString
(
callBack
)).
requestPath
(
base_api_url
+
"/callBack/policy/CallBack"
)
...
@@ -179,8 +253,6 @@ public class CallBackContorll {
...
@@ -179,8 +253,6 @@ public class CallBackContorll {
.
requestData
(
sb
.
toString
()).
createTime
(
new
Date
()).
requestType
(
1
).
returnBody
(
JSONObject
.
toJSONString
(
callBack
)).
requestPath
(
base_api_url
+
"/callBack/policy/CallBack"
)
.
requestData
(
sb
.
toString
()).
createTime
(
new
Date
()).
requestType
(
1
).
returnBody
(
JSONObject
.
toJSONString
(
callBack
)).
requestPath
(
base_api_url
+
"/callBack/policy/CallBack"
)
.
returnCode
(
callBack
.
getStatus
()).
returnMsg
(
errorMsg
).
policyId
(
insureLog
.
getPolicyId
()).
build
().
insert
();
.
returnCode
(
callBack
.
getStatus
()).
returnMsg
(
errorMsg
).
policyId
(
insureLog
.
getPolicyId
()).
build
().
insert
();
}
}
}
Map
trueMap
=
Maps
.
newHashMap
();
Map
trueMap
=
Maps
.
newHashMap
();
trueMap
.
put
(
"status"
,
"1"
);
trueMap
.
put
(
"status"
,
"1"
);
...
@@ -292,9 +364,9 @@ public class CallBackContorll {
...
@@ -292,9 +364,9 @@ public class CallBackContorll {
u
.
setInsureStatus
(
2
);
u
.
setInsureStatus
(
2
);
u
.
updateById
();
u
.
updateById
();
});
});
}
insurePolicy
.
updateById
();
insurePolicy
.
updateById
();
insurePay
.
updateById
();
insurePay
.
updateById
();
}
InsureLog
.
builder
().
type
(
7
).
createTime
(
new
Date
()).
requestType
(
1
).
returnBody
(
sb
.
toString
()).
requestPath
(
getPolicyUrl
)
InsureLog
.
builder
().
type
(
7
).
createTime
(
new
Date
()).
requestType
(
1
).
returnBody
(
sb
.
toString
()).
requestPath
(
getPolicyUrl
)
.
returnCode
(
callBack
.
getStatus
()).
policyId
(
insurePay
.
getPolicyId
()).
returnMsg
(
callBack
.
getErr_msg
()).
build
().
insert
();
.
returnCode
(
callBack
.
getStatus
()).
policyId
(
insurePay
.
getPolicyId
()).
returnMsg
(
callBack
.
getErr_msg
()).
build
().
insert
();
return
map
;
return
map
;
...
...
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
View file @
ec118016
...
@@ -657,10 +657,10 @@ public class QyzxController {
...
@@ -657,10 +657,10 @@ public class QyzxController {
*/
*/
@PostMapping
(
value
=
"/companyAdminList"
)
@PostMapping
(
value
=
"/companyAdminList"
)
@ApiOperation
(
value
=
"运营后台---企业信息列表"
,
httpMethod
=
"POST"
,
notes
=
""
)
@ApiOperation
(
value
=
"运营后台---企业信息列表"
,
httpMethod
=
"POST"
,
notes
=
""
)
public
Result
<
Object
>
companyAdminList
(
@RequestBody
cn
.
timer
.
api
.
utils
.
Page
page
)
{
public
Result
<
Object
>
companyAdminList
(
@RequestBody
EntInfoDto
entInfoDto
)
{
Map
map
=
Maps
.
newHashMap
();
Map
map
=
Maps
.
newHashMap
();
List
<
EntInfoDto
>
list
=
Optional
.
ofNullable
(
qyzxEntInfoMMapper
.
companyAdminList
(
page
)).
orElse
(
Lists
.
newArrayList
());
List
<
EntInfoDto
>
list
=
Optional
.
ofNullable
(
qyzxEntInfoMMapper
.
companyAdminList
(
entInfoDto
)).
orElse
(
Lists
.
newArrayList
());
Integer
count
=
qyzxEntInfoMMapper
.
companyAdminCount
();
Integer
count
=
qyzxEntInfoMMapper
.
companyAdminCount
(
entInfoDto
);
map
.
put
(
"list"
,
list
);
map
.
put
(
"list"
,
list
);
map
.
put
(
"count"
,
count
);
map
.
put
(
"count"
,
count
);
return
ResultUtil
.
data
(
map
);
return
ResultUtil
.
data
(
map
);
...
...
src/main/java/cn/timer/api/dao/qyzx/QyzxEntInfoMMapper.java
View file @
ec118016
...
@@ -18,9 +18,9 @@ import java.util.Map;
...
@@ -18,9 +18,9 @@ import java.util.Map;
*/
*/
@Repository
@Repository
public
interface
QyzxEntInfoMMapper
extends
BaseMapper
<
QyzxEntInfoM
>
{
public
interface
QyzxEntInfoMMapper
extends
BaseMapper
<
QyzxEntInfoM
>
{
public
List
<
EntInfoDto
>
companyAdminList
(
@Param
(
"pa
ge"
)
Page
page
);
public
List
<
EntInfoDto
>
companyAdminList
(
@Param
(
"pa
ram"
)
EntInfoDto
entInfoDto
);
public
Integer
companyAdminCount
();
public
Integer
companyAdminCount
(
@Param
(
"param"
)
EntInfoDto
entInfoDto
);
public
List
<
Map
<
String
,
String
>>
getCompanyList
();
public
List
<
Map
<
String
,
String
>>
getCompanyList
();
...
...
src/main/java/cn/timer/api/dto/qyzx/EntInfoDto.java
View file @
ec118016
package
cn
.
timer
.
api
.
dto
.
qyzx
;
package
cn
.
timer
.
api
.
dto
.
qyzx
;
import
cn.timer.api.utils.Page
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -26,4 +27,5 @@ public class EntInfoDto {
...
@@ -26,4 +27,5 @@ public class EntInfoDto {
private
String
endTime
;
private
String
endTime
;
private
Integer
totlaSpmk
;
private
Integer
totlaSpmk
;
private
Integer
totlaCc
;
private
Integer
totlaCc
;
private
Page
page
;
}
}
src/main/resources/mapping/insure/InsurePayMapper.xml
View file @
ec118016
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
<result
property=
"payType"
column=
"pay_type"
/>
<result
property=
"payType"
column=
"pay_type"
/>
<result
property=
"policyId"
column=
"policy_id"
/>
<result
property=
"policyId"
column=
"policy_id"
/>
<result
property=
"serialNumber"
column=
"serial_number"
/>
<result
property=
"serialNumber"
column=
"serial_number"
/>
<result
property=
"payUrl"
column=
"pay_url"
/>
</resultMap>
</resultMap>
...
...
src/main/resources/mapping/qyzx/QyzxEntInfoMMapper.xml
View file @
ec118016
...
@@ -217,10 +217,21 @@
...
@@ -217,10 +217,21 @@
LEFT JOIN yggl_main_emp yme ON yme.org_code = qeim.id
LEFT JOIN yggl_main_emp yme ON yme.org_code = qeim.id
LEFT JOIN ( SELECT sas.org_code AS oid, count( sas.id ) AS totlaSpmk FROM spmk_approve_summary sas GROUP BY sas.org_code ) AS a ON a.oid = qeim.id
LEFT JOIN ( SELECT sas.org_code AS oid, count( sas.id ) AS totlaSpmk FROM spmk_approve_summary sas GROUP BY sas.org_code ) AS a ON a.oid = qeim.id
LEFT JOIN ( SELECT cc.organization_id AS oid, count( cc.id ) AS totlaCc FROM cms_content cc GROUP BY cc.organization_id ) AS b ON b.oid = qeim.id
LEFT JOIN ( SELECT cc.organization_id AS oid, count( cc.id ) AS totlaCc FROM cms_content cc GROUP BY cc.organization_id ) AS b ON b.oid = qeim.id
<where>
<if
test=
"param.name != null and param.name !=''"
>
and qeim.NAME like CONCAT('%',#{name},'%')
</if>
<if
test=
"param.linkMan != null and param.linkMan !=''"
>
and qeim.link_man like CONCAT('%',#{linkMan},'%')
</if>
<if
test=
"param.linkManPhone != null and param.linkManPhone !=''"
>
and qeim.phone like CONCAT('%',#{linkManPhone},'%')
</if>
</where>
GROUP BY
GROUP BY
qeim.id
qeim.id
<if
test=
"pa
ge.offset != null and
page.totalPage !=null"
>
<if
test=
"pa
ram.page.offset != null and param.
page.totalPage !=null"
>
limit #{pa
ge.offset},#{
page.totalPage}
limit #{pa
ram.page.offset},#{param.
page.totalPage}
</if>
</if>
</select>
</select>
...
...
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