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
443381c8
Commit
443381c8
authored
Apr 10, 2023
by
徐高华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/企微许可账号购买' into 'master'
Feature/企微许可账号购买 See merge request
!1113
parents
2f8335a5
29a333ab
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
103 additions
and
3 deletions
+103
-3
LicenceOrderApiService.java
...an/manage/api/service/licence/LicenceOrderApiService.java
+7
-0
Config.java
...ain/java/com/gic/haoban/manage/service/config/Config.java
+11
-0
TabHaobanLicenceOrderMapper.java
...rvice/dao/mapper/licence/TabHaobanLicenceOrderMapper.java
+7
-0
LicenceOrderService.java
...n/manage/service/service/licence/LicenceOrderService.java
+6
-0
LicenceOrderServiceImpl.java
...service/service/licence/impl/LicenceOrderServiceImpl.java
+8
-1
LicenceOrderApiServiceImpl.java
.../service/out/impl/licence/LicenceOrderApiServiceImpl.java
+38
-2
TabHaobanLicenceOrderMapper.xml
.../resources/mapper/licence/TabHaobanLicenceOrderMapper.xml
+8
-0
LicenceOrderServiceTest.java
...anage3-service/src/test/java/LicenceOrderServiceTest.java
+4
-0
LicenceOrderController.java
...manage/web/controller/licence/LicenceOrderController.java
+14
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/licence/LicenceOrderApiService.java
View file @
443381c8
...
@@ -144,5 +144,12 @@ public interface LicenceOrderApiService {
...
@@ -144,5 +144,12 @@ public interface LicenceOrderApiService {
*/
*/
ServiceResponse
<
Boolean
>
cancelQywxOrder
(
Long
orderId
);
ServiceResponse
<
Boolean
>
cancelQywxOrder
(
Long
orderId
);
/**
* 是否显示弹窗 true 显示 false 不显示
* @param wxEnterpriseId
* @return
*/
ServiceResponse
<
HashMap
<
String
,
Integer
>>
hasPopup
(
String
wxEnterpriseId
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/config/Config.java
View file @
443381c8
...
@@ -41,6 +41,17 @@ public class Config {
...
@@ -41,6 +41,17 @@ public class Config {
@Value
(
"${bankName}"
)
@Value
(
"${bankName}"
)
private
String
bankName
;
private
String
bankName
;
@Value
(
"${dingUrl}"
)
private
String
dingUrl
;
public
String
getDingUrl
()
{
return
dingUrl
;
}
public
void
setDingUrl
(
String
dingUrl
)
{
this
.
dingUrl
=
dingUrl
;
}
public
String
getAccountName
()
{
public
String
getAccountName
()
{
return
accountName
;
return
accountName
;
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/licence/TabHaobanLicenceOrderMapper.java
View file @
443381c8
...
@@ -129,4 +129,11 @@ public interface TabHaobanLicenceOrderMapper {
...
@@ -129,4 +129,11 @@ public interface TabHaobanLicenceOrderMapper {
*/
*/
Integer
saveCallBackTime
(
@Param
(
"orderId"
)
Long
orderId
,
@Param
(
"type"
)
Integer
type
,
@Param
(
"time"
)
Date
time
);
Integer
saveCallBackTime
(
@Param
(
"orderId"
)
Long
orderId
,
@Param
(
"type"
)
Integer
type
,
@Param
(
"time"
)
Date
time
);
/**
* 根据wxEnterpriseId查询企业订单已支付数量
*
* @param wxEnterpriseId
*/
Integer
selectCountByWxEnterpriseId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/licence/LicenceOrderService.java
View file @
443381c8
...
@@ -140,6 +140,12 @@ public interface LicenceOrderService {
...
@@ -140,6 +140,12 @@ public interface LicenceOrderService {
* @return
* @return
*/
*/
Boolean
saveCallBackTime
(
Long
orderId
,
Integer
type
,
Date
time
);
Boolean
saveCallBackTime
(
Long
orderId
,
Integer
type
,
Date
time
);
/**
* 根据wxEnterpriseId查询企业订单已支付数量
*
* @param wxEnterpriseId
*/
Integer
selectCountByWxEnterpriseId
(
String
wxEnterpriseId
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/licence/impl/LicenceOrderServiceImpl.java
View file @
443381c8
...
@@ -189,6 +189,8 @@ public class LicenceOrderServiceImpl implements LicenceOrderService {
...
@@ -189,6 +189,8 @@ public class LicenceOrderServiceImpl implements LicenceOrderService {
String
dateToStr
=
DateUtil
.
dateToStr
(
new
Date
(),
DateUtil
.
FORMAT_DATETIME_19
);
String
dateToStr
=
DateUtil
.
dateToStr
(
new
Date
(),
DateUtil
.
FORMAT_DATETIME_19
);
//发送钉钉消息通知
//发送钉钉消息通知
String
host
=
config
.
getHost
();
String
host
=
config
.
getHost
();
//拿到钉钉群机器人url
String
dingUrl
=
config
.
getDingUrl
();
// 最后一个分隔符位置
// 最后一个分隔符位置
int
lastIndex
=
host
.
lastIndexOf
(
"/"
);
int
lastIndex
=
host
.
lastIndexOf
(
"/"
);
// 倒数第二个分隔符位置
// 倒数第二个分隔符位置
...
@@ -197,7 +199,7 @@ public class LicenceOrderServiceImpl implements LicenceOrderService {
...
@@ -197,7 +199,7 @@ public class LicenceOrderServiceImpl implements LicenceOrderService {
String
url
=
subHost
+
"enterprise-operation/#/finance-config/wx-order-detail?tabId=wx_account_order&orderId="
+
orderId
;
String
url
=
subHost
+
"enterprise-operation/#/finance-config/wx-order-detail?tabId=wx_account_order&orderId="
+
orderId
;
String
msg
=
"标题:企微账号许可通知\n品牌名称:"
+
enterpriseName
+
"\n"
+
"企业名称:"
+
wxEnterpriseName
+
"\n"
+
"消息内容:"
+
dateToStr
+
String
msg
=
"标题:企微账号许可通知\n品牌名称:"
+
enterpriseName
+
"\n"
+
"企业名称:"
+
wxEnterpriseName
+
"\n"
+
"消息内容:"
+
dateToStr
+
"新增订单(编号:"
+
tabHaobanLicenceOrder
.
getOrderNumber
()
+
"),请尽快处理!\n"
+
url
;
"新增订单(编号:"
+
tabHaobanLicenceOrder
.
getOrderNumber
()
+
"),请尽快处理!\n"
+
url
;
DingUtils
.
send
(
msg
,
"https://oapi.dingtalk.com/robot/send?access_token=63074c9fc1ac2c00aa62477facdf16e5fa2388cf6a621edba1fb05d6e55d031f"
,
tru
e
);
DingUtils
.
send
(
msg
,
dingUrl
,
fals
e
);
return
true
;
return
true
;
}
}
...
@@ -307,4 +309,9 @@ public class LicenceOrderServiceImpl implements LicenceOrderService {
...
@@ -307,4 +309,9 @@ public class LicenceOrderServiceImpl implements LicenceOrderService {
tabHaobanLicenceOrderMapper
.
saveCallBackTime
(
orderId
,
type
,
time
);
tabHaobanLicenceOrderMapper
.
saveCallBackTime
(
orderId
,
type
,
time
);
return
true
;
return
true
;
}
}
@Override
public
Integer
selectCountByWxEnterpriseId
(
String
wxEnterpriseId
)
{
return
tabHaobanLicenceOrderMapper
.
selectCountByWxEnterpriseId
(
wxEnterpriseId
);
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/licence/LicenceOrderApiServiceImpl.java
View file @
443381c8
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
.
licence
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
.
licence
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
...
@@ -10,6 +11,7 @@ import com.gic.commons.util.DateUtil;
...
@@ -10,6 +11,7 @@ import com.gic.commons.util.DateUtil;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.haoban.manage.api.dto.StaffActiveDataDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.api.dto.licence.LicenceOrderDTO
;
import
com.gic.haoban.manage.api.dto.licence.LicenceOrderDTO
;
import
com.gic.haoban.manage.api.dto.licence.LicenceOrderPageDTO
;
import
com.gic.haoban.manage.api.dto.licence.LicenceOrderPageDTO
;
...
@@ -19,9 +21,13 @@ import com.gic.haoban.manage.api.dto.qdto.licence.LicenceOrderQDTO;
...
@@ -19,9 +21,13 @@ import com.gic.haoban.manage.api.dto.qdto.licence.LicenceOrderQDTO;
import
com.gic.haoban.manage.api.service.WxEnterpriseApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseApiService
;
import
com.gic.haoban.manage.api.service.licence.LicenceOrderApiService
;
import
com.gic.haoban.manage.api.service.licence.LicenceOrderApiService
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeOrder
;
import
com.gic.haoban.manage.service.entity.licence.TabHaobanLicenceOrder
;
import
com.gic.haoban.manage.service.entity.licence.TabHaobanLicenceOrder
;
import
com.gic.haoban.manage.service.entity.licence.TabHaobanLicenceOrderProgress
;
import
com.gic.haoban.manage.service.entity.licence.TabHaobanLicenceOrderProgress
;
import
com.gic.haoban.manage.service.service.StaffClerkRelationService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseActiveDataService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.fee.HaobanQywxFeeOrderService
;
import
com.gic.haoban.manage.service.service.licence.LicenceOrderProgressService
;
import
com.gic.haoban.manage.service.service.licence.LicenceOrderProgressService
;
import
com.gic.haoban.manage.service.service.licence.LicenceOrderService
;
import
com.gic.haoban.manage.service.service.licence.LicenceOrderService
;
import
com.gic.haoban.manage.service.util.DingUtils
;
import
com.gic.haoban.manage.service.util.DingUtils
;
...
@@ -78,6 +84,10 @@ public class LicenceOrderApiServiceImpl implements LicenceOrderApiService {
...
@@ -78,6 +84,10 @@ public class LicenceOrderApiServiceImpl implements LicenceOrderApiService {
private
Pay4WXService
pay4WXService
;
private
Pay4WXService
pay4WXService
;
@Autowired
@Autowired
private
QywxUserApiService
qywxUserApiService
;
private
QywxUserApiService
qywxUserApiService
;
@Autowired
private
StaffClerkRelationService
staffClerkRelationService
;
@Autowired
private
WxEnterpriseActiveDataService
wxEnterpriseActiveDataService
;
@Override
@Override
public
ServiceResponse
<
LicenceOrderDTO
>
getLicenceOrderDetail
(
Long
orderId
,
Integer
type
)
{
public
ServiceResponse
<
LicenceOrderDTO
>
getLicenceOrderDetail
(
Long
orderId
,
Integer
type
)
{
...
@@ -239,6 +249,8 @@ public class LicenceOrderApiServiceImpl implements LicenceOrderApiService {
...
@@ -239,6 +249,8 @@ public class LicenceOrderApiServiceImpl implements LicenceOrderApiService {
String
dateToStr
=
DateUtil
.
dateToStr
(
new
Date
(),
DateUtil
.
FORMAT_DATETIME_19
);
String
dateToStr
=
DateUtil
.
dateToStr
(
new
Date
(),
DateUtil
.
FORMAT_DATETIME_19
);
//发送钉钉消息通知
//发送钉钉消息通知
String
host
=
config
.
getHost
();
String
host
=
config
.
getHost
();
//拿到钉钉群机器人url
String
dingUrl
=
config
.
getDingUrl
();
// 最后一个分隔符位置
// 最后一个分隔符位置
int
lastIndex
=
host
.
lastIndexOf
(
"/"
);
int
lastIndex
=
host
.
lastIndexOf
(
"/"
);
// 倒数第二个分隔符位置
// 倒数第二个分隔符位置
...
@@ -247,7 +259,7 @@ public class LicenceOrderApiServiceImpl implements LicenceOrderApiService {
...
@@ -247,7 +259,7 @@ public class LicenceOrderApiServiceImpl implements LicenceOrderApiService {
String
url
=
subHost
+
"enterprise-operation/#/finance-config/wx-order-detail?tabId=wx_account_order&orderId="
+
licenceOrder
.
getOrderId
();
String
url
=
subHost
+
"enterprise-operation/#/finance-config/wx-order-detail?tabId=wx_account_order&orderId="
+
licenceOrder
.
getOrderId
();
String
msg
=
"标题:企微账号许可通知\n品牌名称:"
+
enterpriseName
+
"\n"
+
"企业名称:"
+
wxEnterpriseName
+
"\n"
+
"消息内容:"
+
dateToStr
+
String
msg
=
"标题:企微账号许可通知\n品牌名称:"
+
enterpriseName
+
"\n"
+
"企业名称:"
+
wxEnterpriseName
+
"\n"
+
"消息内容:"
+
dateToStr
+
"新增订单(编号:"
+
licenceOrder
.
getOrderNumber
()
+
"),请尽快处理!\n"
+
url
;
"新增订单(编号:"
+
licenceOrder
.
getOrderNumber
()
+
"),请尽快处理!\n"
+
url
;
DingUtils
.
send
(
msg
,
"https://oapi.dingtalk.com/robot/send?access_token=63074c9fc1ac2c00aa62477facdf16e5fa2388cf6a621edba1fb05d6e55d031f"
,
tru
e
);
DingUtils
.
send
(
msg
,
dingUrl
,
fals
e
);
return
ServiceResponse
.
success
(
true
);
return
ServiceResponse
.
success
(
true
);
}
}
...
@@ -359,6 +371,8 @@ public class LicenceOrderApiServiceImpl implements LicenceOrderApiService {
...
@@ -359,6 +371,8 @@ public class LicenceOrderApiServiceImpl implements LicenceOrderApiService {
}
}
//发送钉钉消息通知
//发送钉钉消息通知
String
host
=
config
.
getHost
();
String
host
=
config
.
getHost
();
//拿到钉钉群机器人url
String
dingUrl
=
config
.
getDingUrl
();
// 最后一个分隔符位置
// 最后一个分隔符位置
int
lastIndex
=
host
.
lastIndexOf
(
"/"
);
int
lastIndex
=
host
.
lastIndexOf
(
"/"
);
// 倒数第二个分隔符位置
// 倒数第二个分隔符位置
...
@@ -367,7 +381,7 @@ public class LicenceOrderApiServiceImpl implements LicenceOrderApiService {
...
@@ -367,7 +381,7 @@ public class LicenceOrderApiServiceImpl implements LicenceOrderApiService {
String
url
=
subHost
+
"enterprise-operation/#/finance-config/wx-order-detail?tabId=wx_account_order&orderId="
+
order
.
getOrderId
();
String
url
=
subHost
+
"enterprise-operation/#/finance-config/wx-order-detail?tabId=wx_account_order&orderId="
+
order
.
getOrderId
();
String
msg
=
"标题:企微账号许可通知\n品牌名称:"
+
enterpriseName
+
"\n"
+
"企业名称:"
+
wxEnterpriseName
+
"\n"
+
"消息内容:订单编号:"
+
order
.
getOrderNumber
()
String
msg
=
"标题:企微账号许可通知\n品牌名称:"
+
enterpriseName
+
"\n"
+
"企业名称:"
+
wxEnterpriseName
+
"\n"
+
"消息内容:订单编号:"
+
order
.
getOrderNumber
()
+
",申请微信退款失败,请查看原因并处理!\n"
+
"失败原因:"
+
refund
.
getErr_code_des
()+
"\n"
+
url
;
+
",申请微信退款失败,请查看原因并处理!\n"
+
"失败原因:"
+
refund
.
getErr_code_des
()+
"\n"
+
url
;
DingUtils
.
send
(
msg
,
"https://oapi.dingtalk.com/robot/send?access_token=63074c9fc1ac2c00aa62477facdf16e5fa2388cf6a621edba1fb05d6e55d031f"
,
tru
e
);
DingUtils
.
send
(
msg
,
dingUrl
,
fals
e
);
return
ServiceResponse
.
failure
(
refund
.
getResult_code
(),
refund
.
getErr_code_des
());
return
ServiceResponse
.
failure
(
refund
.
getResult_code
(),
refund
.
getErr_code_des
());
}
}
//更新微信订单状态
//更新微信订单状态
...
@@ -411,4 +425,26 @@ public class LicenceOrderApiServiceImpl implements LicenceOrderApiService {
...
@@ -411,4 +425,26 @@ public class LicenceOrderApiServiceImpl implements LicenceOrderApiService {
return
ServiceResponse
.
failure
(
response
.
getCode
(),
response
.
getMessage
());
return
ServiceResponse
.
failure
(
response
.
getCode
(),
response
.
getMessage
());
}
}
@Override
public
ServiceResponse
<
HashMap
<
String
,
Integer
>>
hasPopup
(
String
wxEnterpriseId
)
{
HashMap
<
String
,
Integer
>
map
=
new
HashMap
<>();
map
.
put
(
"hasPopup"
,
0
);
map
.
put
(
"count"
,
0
);
List
<
String
>
list
=
staffClerkRelationService
.
listByWxEnterpriseId
(
wxEnterpriseId
);
if
(
CollUtil
.
isEmpty
(
list
)){
return
ServiceResponse
.
success
(
map
);
}
Integer
count
=
licenceOrderService
.
selectCountByWxEnterpriseId
(
wxEnterpriseId
);
if
(
count
==
0
){
StaffActiveDataDTO
dto
=
wxEnterpriseActiveDataService
.
getWxEnterpriseActiveDataByWxEnterpriseId
(
wxEnterpriseId
);
if
(
null
!=
dto
&&
dto
.
getPurchased
()!=
null
&&
dto
.
getPurchased
()
>
0
){
return
ServiceResponse
.
success
(
map
);
}
map
.
put
(
"hasPopup"
,
1
);
map
.
put
(
"count"
,
list
.
size
());
return
ServiceResponse
.
success
(
map
);
}
return
ServiceResponse
.
success
(
map
);
}
}
}
haoban-manage3-service/src/main/resources/mapper/licence/TabHaobanLicenceOrderMapper.xml
View file @
443381c8
...
@@ -345,4 +345,11 @@
...
@@ -345,4 +345,11 @@
and delete_flag = 0
and delete_flag = 0
</update>
</update>
<select
id=
"selectCountByWxEnterpriseId"
resultType=
"java.lang.Integer"
>
SELECT count(*)
FROM tab_haoban_licence_order
WHERE wx_enterprise_id = #{wxEnterpriseId}
and delete_flag = 0 and order_status = 1
</select>
</mapper>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/test/java/LicenceOrderServiceTest.java
View file @
443381c8
...
@@ -64,4 +64,8 @@ public class LicenceOrderServiceTest {
...
@@ -64,4 +64,8 @@ public class LicenceOrderServiceTest {
licenceOrderApiService
.
qywxCallBack
(
JSON
.
toJSONString
(
json
));
licenceOrderApiService
.
qywxCallBack
(
JSON
.
toJSONString
(
json
));
}
}
@Test
public
void
test7
(){
licenceOrderApiService
.
hasPopup
(
"ca66a01b79474c40b3e7c7f93daf1a3b"
);
}
}
}
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/licence/LicenceOrderController.java
View file @
443381c8
...
@@ -349,5 +349,19 @@ public class LicenceOrderController {
...
@@ -349,5 +349,19 @@ public class LicenceOrderController {
return
RestResponse
.
successResult
(
orderIdList
.
getResult
());
return
RestResponse
.
successResult
(
orderIdList
.
getResult
());
}
}
/**
* 是否显示弹窗 hasPopup 0不弹出 1弹出
* count 关联数量
*/
@RequestMapping
(
"licence-order-hasPopup"
)
public
RestResponse
<
HashMap
<
String
,
Integer
>>
hasPopup
()
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
if
(
loginUser
==
null
||
StringUtils
.
isBlank
(
loginUser
.
getEnterpriseId
()))
{
return
RestResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCode
.
ERR_4
.
getCode
()),
HaoBanErrCode
.
ERR_4
.
getMsg
());
}
ServiceResponse
<
HashMap
<
String
,
Integer
>>
response
=
licenceOrderApiService
.
hasPopup
(
loginUser
.
getWxEnterpriseId
());
return
RestResponse
.
successResult
(
response
.
getResult
());
}
}
}
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