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
ffdee020
Commit
ffdee020
authored
Apr 07, 2023
by
jinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询企业是否存在历史订单
parent
c32807bc
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
67 additions
and
0 deletions
+67
-0
LicenceOrderApiService.java
...an/manage/api/service/licence/LicenceOrderApiService.java
+7
-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
+5
-0
LicenceOrderApiServiceImpl.java
.../service/out/impl/licence/LicenceOrderApiServiceImpl.java
+17
-0
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
+13
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/licence/LicenceOrderApiService.java
View file @
ffdee020
...
@@ -144,5 +144,12 @@ public interface LicenceOrderApiService {
...
@@ -144,5 +144,12 @@ public interface LicenceOrderApiService {
*/
*/
ServiceResponse
<
Boolean
>
cancelQywxOrder
(
Long
orderId
);
ServiceResponse
<
Boolean
>
cancelQywxOrder
(
Long
orderId
);
/**
* 查询企业是否有历史订单
* @param wxEnterpriseId
* @return
*/
ServiceResponse
<
Boolean
>
isOrder
(
String
wxEnterpriseId
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/licence/TabHaobanLicenceOrderMapper.java
View file @
ffdee020
...
@@ -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 @
ffdee020
...
@@ -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 @
ffdee020
...
@@ -307,4 +307,9 @@ public class LicenceOrderServiceImpl implements LicenceOrderService {
...
@@ -307,4 +307,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 @
ffdee020
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
;
...
@@ -19,9 +20,11 @@ import com.gic.haoban.manage.api.dto.qdto.licence.LicenceOrderQDTO;
...
@@ -19,9 +20,11 @@ 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.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 +81,8 @@ public class LicenceOrderApiServiceImpl implements LicenceOrderApiService {
...
@@ -78,6 +81,8 @@ public class LicenceOrderApiServiceImpl implements LicenceOrderApiService {
private
Pay4WXService
pay4WXService
;
private
Pay4WXService
pay4WXService
;
@Autowired
@Autowired
private
QywxUserApiService
qywxUserApiService
;
private
QywxUserApiService
qywxUserApiService
;
@Autowired
private
HaobanQywxFeeOrderService
haobanQywxFeeOrderService
;
@Override
@Override
public
ServiceResponse
<
LicenceOrderDTO
>
getLicenceOrderDetail
(
Long
orderId
,
Integer
type
)
{
public
ServiceResponse
<
LicenceOrderDTO
>
getLicenceOrderDetail
(
Long
orderId
,
Integer
type
)
{
...
@@ -411,4 +416,16 @@ public class LicenceOrderApiServiceImpl implements LicenceOrderApiService {
...
@@ -411,4 +416,16 @@ public class LicenceOrderApiServiceImpl implements LicenceOrderApiService {
return
ServiceResponse
.
failure
(
response
.
getCode
(),
response
.
getMessage
());
return
ServiceResponse
.
failure
(
response
.
getCode
(),
response
.
getMessage
());
}
}
@Override
public
ServiceResponse
<
Boolean
>
isOrder
(
String
wxEnterpriseId
)
{
Integer
count
=
licenceOrderService
.
selectCountByWxEnterpriseId
(
wxEnterpriseId
);
if
(
count
==
0
){
List
<
TabHaobanQywxFeeOrder
>
qywxFeeOrderList
=
haobanQywxFeeOrderService
.
listOrder
(
wxEnterpriseId
);
if
(
CollUtil
.
isEmpty
(
qywxFeeOrderList
)){
return
ServiceResponse
.
success
(
false
);
}
}
return
ServiceResponse
.
success
(
true
);
}
}
}
haoban-manage3-service/src/main/resources/mapper/licence/TabHaobanLicenceOrderMapper.xml
View file @
ffdee020
...
@@ -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
</select>
</mapper>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/test/java/LicenceOrderServiceTest.java
View file @
ffdee020
...
@@ -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
(){
ServiceResponse
<
Boolean
>
response
=
licenceOrderApiService
.
isOrder
(
"ca66a01b79474c40b3e7c7f93daf1a3b"
);
}
}
}
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/licence/LicenceOrderController.java
View file @
ffdee020
...
@@ -349,5 +349,18 @@ public class LicenceOrderController {
...
@@ -349,5 +349,18 @@ public class LicenceOrderController {
return
RestResponse
.
successResult
(
orderIdList
.
getResult
());
return
RestResponse
.
successResult
(
orderIdList
.
getResult
());
}
}
/**
* 查询企业是否存在历史订单
*/
@RequestMapping
(
"licence-order-hasOrder"
)
public
RestResponse
<
Boolean
>
hasOrder
()
{
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
<
Boolean
>
response
=
licenceOrderApiService
.
isOrder
(
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