Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
3f36b210
Commit
3f36b210
authored
Mar 27, 2023
by
jinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口修改
parent
a5f4fdae
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
132 additions
and
35 deletions
+132
-35
LicenceOrderPageDTO.java
...ic/haoban/manage/api/dto/licence/LicenceOrderPageDTO.java
+60
-0
LicenceOrderPageQDTO.java
...ban/manage/api/dto/qdto/licence/LicenceOrderPageQDTO.java
+10
-1
LicenceOrderApiService.java
...an/manage/api/service/licence/LicenceOrderApiService.java
+19
-14
LicenceOrderController.java
.../haoban/manage/web/controller/LicenceOrderController.java
+27
-11
LicenceOrderPageVO.java
.../gic/haoban/manage/web/vo/licence/LicenceOrderPageVO.java
+12
-5
LicenceOrderApiServiceImpl.java
.../service/out/impl/licence/LicenceOrderApiServiceImpl.java
+0
-0
LicenceOrderServiceTest.java
...anage3-service/src/test/java/LicenceOrderServiceTest.java
+1
-1
LicenceOrderController.java
...manage/web/controller/licence/LicenceOrderController.java
+3
-3
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/licence/LicenceOrderPageDTO.java
View file @
3f36b210
...
...
@@ -107,6 +107,66 @@ public class LicenceOrderPageDTO implements Serializable {
* 到期时间
*/
private
Date
expireTime
;
/**
* 企业微信支付时间
*/
private
Date
qywxPayTime
;
/**
* gic商户Id
*/
private
String
enterpriseId
;
/**
* gic品牌名称
*/
private
String
enterpriseName
;
/**
* wx企业Id
*/
private
String
wxEnterpriseId
;
/**
* 微信商户名称
*/
private
String
wxEnterpriseName
;
public
Date
getQywxPayTime
()
{
return
qywxPayTime
;
}
public
void
setQywxPayTime
(
Date
qywxPayTime
)
{
this
.
qywxPayTime
=
qywxPayTime
;
}
public
String
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
String
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
public
String
getEnterpriseName
()
{
return
enterpriseName
;
}
public
void
setEnterpriseName
(
String
enterpriseName
)
{
this
.
enterpriseName
=
enterpriseName
;
}
public
String
getWxEnterpriseId
()
{
return
wxEnterpriseId
;
}
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
;
}
public
String
getWxEnterpriseName
()
{
return
wxEnterpriseName
;
}
public
void
setWxEnterpriseName
(
String
wxEnterpriseName
)
{
this
.
wxEnterpriseName
=
wxEnterpriseName
;
}
public
Date
getExpireTime
()
{
return
expireTime
;
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/qdto/licence/LicenceOrderPageQDTO.java
View file @
3f36b210
...
...
@@ -58,7 +58,16 @@ public class LicenceOrderPageQDTO extends BasePageInfo implements Serializable
* 创建人名称
*/
private
String
creatorName
;
/**
* 支付方式 1在线支付 2对公转账
*/
private
Integer
payType
;
public
Integer
getPayType
()
{
return
payType
;
}
public
void
setPayType
(
Integer
payType
)
{
this
.
payType
=
payType
;
}
public
String
getEnterpriseId
()
{
return
enterpriseId
;
}
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/licence/LicenceOrderApiService.java
View file @
3f36b210
...
...
@@ -7,7 +7,6 @@ import com.gic.haoban.manage.api.dto.licence.LicenceOrderPageDTO;
import
com.gic.haoban.manage.api.dto.qdto.licence.LicenceOrderPageQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.licence.LicenceOrderQDTO
;
import
java.text.ParseException
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -27,7 +26,7 @@ public interface LicenceOrderApiService {
* @param orderId 订单id
* @return LicenceOrderDTO
*/
ServiceResponse
<
LicenceOrderDTO
>
getLicenceOrderDetail
(
Long
orderId
,
Integer
type
);
ServiceResponse
<
LicenceOrderDTO
>
getLicenceOrderDetail
(
Long
orderId
,
Integer
type
);
/**
* 删除订单
...
...
@@ -61,7 +60,7 @@ public interface LicenceOrderApiService {
* @param wxFlag 1微信订单状态 0 企业微信订单状态
* @return
*/
ServiceResponse
<
Boolean
>
updateLicenceOrderType
(
Long
orderId
,
Integer
type
,
String
enterpriseId
,
String
wxEnterpriseId
,
String
creatorName
,
Integer
wxFlag
);
ServiceResponse
<
Boolean
>
updateLicenceOrderType
(
Long
orderId
,
Integer
type
,
String
enterpriseId
,
String
wxEnterpriseId
,
String
creatorName
,
Integer
wxFlag
);
/**
* 订单凭证上传
...
...
@@ -70,7 +69,7 @@ public interface LicenceOrderApiService {
* @param voucher 凭证url
* @return
*/
ServiceResponse
<
Boolean
>
uploadLicenceOrderVoucher
(
Long
orderId
,
String
voucher
,
String
enterpriseId
,
String
wxEnterpriseId
,
String
creatorName
);
ServiceResponse
<
Boolean
>
uploadLicenceOrderVoucher
(
Long
orderId
,
String
voucher
,
String
enterpriseId
,
String
wxEnterpriseId
,
String
creatorName
);
/**
* 订单支付接口
...
...
@@ -78,7 +77,7 @@ public interface LicenceOrderApiService {
* @param orderId 订单id
* @return
*/
ServiceResponse
<
Boolean
>
payLicenceOrder
(
Long
orderId
,
String
wxEnterpriseId
);
ServiceResponse
<
String
>
payLicenceOrder
(
Long
orderId
,
String
wxEnterpriseId
);
/**
* 查询企业是否存在订单未支付接口
...
...
@@ -92,40 +91,46 @@ public interface LicenceOrderApiService {
* 微信通知回调接口
*/
ServiceResponse
<
Boolean
>
wxCallBack
(
String
params
);
/**
* 企业微信通知回调接口
*/
ServiceResponse
<
Boolean
>
qywxCallBack
(
String
params
);
/**
* 保存微信交易信息
* @param orderId 订单id
*
* @param orderId 订单id
* @param transactionCode 订单编号
* @param prepayId 微信预支付id
* @param wxOrderId 微信支付id
* @param prepayId
微信预支付id
* @param wxOrderId
微信支付id
* @return
*/
ServiceResponse
<
Boolean
>
saveTransactionCode
(
Long
orderId
,
String
transactionCode
,
String
prepayId
,
String
wxOrderId
,
Date
payTime
);
/**
* 查询订单编号id
* @param param 查询参数
* @param type 0 微信订单编号 1 企业微信订单编号
*
* @param param 查询参数
* @param type 0 微信订单编号 1 企业微信订单编号
* @param wxEnterpriseId
* @return
*/
ServiceResponse
<
List
<
String
>>
getOrderIdList
(
String
param
,
Integer
type
,
String
wxEnterpriseId
);
ServiceResponse
<
List
<
String
>>
getOrderIdList
(
String
param
,
Integer
type
,
String
wxEnterpriseId
);
/**
* 审核订单
*
* @param orderId 订单id
* @param flag 是否通过 0 否 1是
* @param reason 不通过原因
* @param flag
是否通过 0 否 1是
* @param reason
不通过原因
* @return
*/
ServiceResponse
<
Boolean
>
checkLicenceOrder
(
Long
orderId
,
Integer
flag
,
String
reason
,
String
enterpriseId
,
String
wxEnterpriseId
,
String
creatorName
);
ServiceResponse
<
Boolean
>
checkLicenceOrder
(
Long
orderId
,
Integer
flag
,
String
reason
,
String
enterpriseId
,
String
wxEnterpriseId
,
String
creatorName
);
/**
* 微信退款
*
* @return
*/
ServiceResponse
<
Boolean
>
wxRefund
(
Long
orderId
);
...
...
haoban-manage3-operation-web/src/main/java/com/gic/haoban/manage/web/controller/LicenceOrderController.java
View file @
3f36b210
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson.JSON
;
...
...
@@ -77,15 +78,26 @@ public class LicenceOrderController {
if
(
loginUser
==
null
||
StringUtils
.
isBlank
(
loginUser
.
getEnterpriseId
()))
{
return
RestResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCode
.
ERR_4
.
getCode
()),
HaoBanErrCode
.
ERR_4
.
getMsg
());
}
String
enterpriseId
=
loginUser
.
getEnterpriseId
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
String
clerkName
=
loginUser
.
getClerkName
();
LicenceOrderPageQDTO
qdto
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
licenceOrderPageQO
),
LicenceOrderPageQDTO
.
class
);
qdto
.
setEnterpriseId
(
enterpriseId
);
qdto
.
setWxEnterpriseId
(
wxEnterpriseId
);
qdto
.
setCreatorName
(
clerkName
);
ServiceResponse
<
Page
<
LicenceOrderPageDTO
>>
licenceOrderPage
=
licenceOrderApiService
.
getLicenceOrderPage
(
qdto
);
Page
<
LicenceOrderPageVO
>
result
=
PageHelperUtils
.
changePageToCurrentPage
(
licenceOrderPage
.
getResult
(),
LicenceOrderPageVO
.
class
);
if
(
CollUtil
.
isNotEmpty
(
result
.
getResult
()))
{
for
(
LicenceOrderPageVO
vo
:
result
.
getResult
())
{
//查询gic品牌名称
EnterpriseDTO
enterpriseDTO
=
enterpriseService
.
getEnterpriseById
(
vo
.
getEnterpriseId
());
if
(
ObjectUtil
.
isNotNull
(
enterpriseDTO
))
{
vo
.
setEnterpriseName
(
enterpriseDTO
.
getEnterpriseName
());
}
WxEnterpriseDTO
wxEnterpriseDTO
=
wxEnterpriseApiService
.
getOne
(
vo
.
getWxEnterpriseId
());
if
(
ObjectUtil
.
isNotNull
(
wxEnterpriseDTO
))
{
vo
.
setWxEnterpriseName
(
wxEnterpriseDTO
.
getCorpName
());
}
}
}
return
RestResponse
.
successResult
(
result
);
}
...
...
@@ -104,8 +116,8 @@ public class LicenceOrderController {
Boolean
result
=
licenceOrderApiService
.
updateLicenceOrderType
(
orderId
,
2
,
enterpriseId
,
wxEnterpriseId
,
clerkName
,
1
).
getResult
();
//微信退款
ServiceResponse
<
Boolean
>
response
=
licenceOrderApiService
.
wxRefund
(
orderId
);
if
(!
response
.
isSuccess
()){
return
RestResponse
.
failure
(
response
.
getCode
(),
response
.
getMessage
());
if
(!
response
.
isSuccess
())
{
return
RestResponse
.
failure
(
response
.
getCode
(),
response
.
getMessage
());
}
return
RestResponse
.
successResult
(
result
);
}
...
...
@@ -114,24 +126,28 @@ public class LicenceOrderController {
* 支付订单
*/
@RequestMapping
(
"licence-order-pay"
)
public
RestResponse
<
Boolean
>
payLicenceOrder
(
@RequestParam
Long
orderId
)
{
public
RestResponse
<
String
>
payLicenceOrder
(
@RequestParam
Long
orderId
)
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
if
(
loginUser
==
null
||
StringUtils
.
isBlank
(
loginUser
.
getEnterpriseId
()))
{
return
RestResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCode
.
ERR_4
.
getCode
()),
HaoBanErrCode
.
ERR_4
.
getMsg
());
}
Boolean
result
=
licenceOrderApiService
.
payLicenceOrder
(
orderId
,
loginUser
.
getWxEnterpriseId
()).
getResult
();
return
RestResponse
.
successResult
(
result
);
ServiceResponse
<
String
>
response
=
licenceOrderApiService
.
payLicenceOrder
(
orderId
,
loginUser
.
getWxEnterpriseId
());
if
(
response
.
isSuccess
())
{
return
RestResponse
.
successResult
(
response
.
getResult
());
}
return
RestResponse
.
failure
(
response
.
getCode
(),
response
.
getMessage
());
}
/**
* 审核订单
*
* @param orderId 订单id
* @param flag 是否通过 0 否 1是
* @param reason 不通过原因
* @param flag
是否通过 0 否 1是
* @param reason
不通过原因
* @return
*/
@RequestMapping
(
"licence-order-check"
)
public
RestResponse
<
Boolean
>
checkLicenceOrder
(
@RequestParam
Long
orderId
,
Integer
flag
,
String
reason
)
{
public
RestResponse
<
Boolean
>
checkLicenceOrder
(
@RequestParam
Long
orderId
,
Integer
flag
,
String
reason
)
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
if
(
loginUser
==
null
||
StringUtils
.
isBlank
(
loginUser
.
getEnterpriseId
()))
{
return
RestResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCode
.
ERR_4
.
getCode
()),
HaoBanErrCode
.
ERR_4
.
getMsg
());
...
...
@@ -139,7 +155,7 @@ public class LicenceOrderController {
String
enterpriseId
=
loginUser
.
getEnterpriseId
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
String
clerkName
=
loginUser
.
getClerkName
();
Boolean
result
=
licenceOrderApiService
.
checkLicenceOrder
(
orderId
,
flag
,
reason
,
enterpriseId
,
wxEnterpriseId
,
clerkName
).
getResult
();
Boolean
result
=
licenceOrderApiService
.
checkLicenceOrder
(
orderId
,
flag
,
reason
,
enterpriseId
,
wxEnterpriseId
,
clerkName
).
getResult
();
return
RestResponse
.
successResult
(
result
);
}
...
...
haoban-manage3-operation-web/src/main/java/com/gic/haoban/manage/web/vo/licence/LicenceOrderPageVO.java
View file @
3f36b210
...
...
@@ -108,19 +108,26 @@ public class LicenceOrderPageVO implements Serializable {
* 创建人名称
*/
private
String
creatorName
;
/**
* 企业微信支付时间
*/
private
Date
qywxPayTime
;
/**
* gic商户Id
*/
private
String
enterpriseId
;
/**
* gic品牌名称
*/
private
String
enterpriseName
;
/**
*
企业微信商户名称
*
wx企业Id
*/
private
String
wxEnterprise
Name
;
private
String
wxEnterprise
Id
;
/**
*
企业微信支付时间
*
微信商户名称
*/
private
Date
qywxPayTi
me
;
private
String
wxEnterpriseNa
me
;
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/licence/LicenceOrderApiServiceImpl.java
View file @
3f36b210
This diff is collapsed.
Click to expand it.
haoban-manage3-service/src/test/java/LicenceOrderServiceTest.java
View file @
3f36b210
...
...
@@ -43,7 +43,7 @@ public class LicenceOrderServiceTest {
}
@Test
public
void
test4
(){
ServiceResponse
<
Boolean
>
result
=
licenceOrderApiService
.
payLicenceOrder
(
512360219787935783L
,
"ca66a01b79474c40b3e7c7f93daf1a3b"
);
ServiceResponse
<
String
>
result
=
licenceOrderApiService
.
payLicenceOrder
(
512360219787935783L
,
"ca66a01b79474c40b3e7c7f93daf1a3b"
);
}
@Test
public
void
test5
(){
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/licence/LicenceOrderController.java
View file @
3f36b210
...
...
@@ -127,7 +127,7 @@ public class LicenceOrderController {
}
else
{
time
=
licenceOrderQO
.
getTimeValue
()+
"天"
;
}
String
logValue
=
"【购买企微许可账号】:企业员工账号"
+
licenceOrderQO
.
getExternalContactCount
()+
"个,时长"
+
time
;
String
logValue
=
"【购买企微许可账号】:
订单编号"
+
result
+
",
企业员工账号"
+
licenceOrderQO
.
getExternalContactCount
()+
"个,时长"
+
time
;
GicLogRecordEvaluationContext
.
putAttribute
(
"logValue"
,
logValue
);
return
RestResponse
.
successResult
(
result
);
}
...
...
@@ -173,7 +173,7 @@ public class LicenceOrderController {
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
String
clerkName
=
loginUser
.
getClerkName
();
Boolean
result
=
licenceOrderApiService
.
updateLicenceOrderType
(
orderId
,
type
,
enterpriseId
,
wxEnterpriseId
,
clerkName
,
1
).
getResult
();
String
logValue
=
"【取消购买企微许可账号订单】:订单编号"
+
dto
.
getTransactionId
()
+
",取消时间"
+
DateUtil
.
dateToStr
(
new
Date
(),
DateUtil
.
FORMAT_DATETIME_19
);
String
logValue
=
"【取消购买企微许可账号订单】:订单编号"
+
orderId
+
",取消时间"
+
DateUtil
.
dateToStr
(
new
Date
(),
DateUtil
.
FORMAT_DATETIME_19
);
GicLogRecordEvaluationContext
.
putAttribute
(
"logValue"
,
logValue
);
return
RestResponse
.
successResult
(
result
);
}
...
...
@@ -198,7 +198,7 @@ public class LicenceOrderController {
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
String
clerkName
=
loginUser
.
getClerkName
();
Boolean
result
=
licenceOrderApiService
.
uploadLicenceOrderVoucher
(
orderId
,
voucher
,
enterpriseId
,
wxEnterpriseId
,
clerkName
).
getResult
();
String
logValue
=
"【上传购买企微许可账号支付凭证】:订单编号"
+
dto
.
getTransactionId
()
+
",上传时间"
+
DateUtil
.
dateToStr
(
new
Date
(),
DateUtil
.
FORMAT_DATETIME_19
);
String
logValue
=
"【上传购买企微许可账号支付凭证】:订单编号"
+
orderId
+
",上传时间"
+
DateUtil
.
dateToStr
(
new
Date
(),
DateUtil
.
FORMAT_DATETIME_19
);
GicLogRecordEvaluationContext
.
putAttribute
(
"logValue"
,
logValue
);
return
RestResponse
.
successResult
(
result
);
}
...
...
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