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
78d31337
Commit
78d31337
authored
Aug 10, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:企微收费
parent
7d3b683b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
99 additions
and
29 deletions
+99
-29
HaobanQywxFeeDTO.java
...a/com/gic/haoban/manage/api/dto/fee/HaobanQywxFeeDTO.java
+19
-0
QywxManageController.java
...ic/haoban/manage/web/controller/QywxManageController.java
+19
-1
TabHaobanQywxFeeAccountInterceptLogMapper.java
...mapper/fee/TabHaobanQywxFeeAccountInterceptLogMapper.java
+13
-4
HaobanQywxFeeAccountInterceptLogService.java
.../service/fee/HaobanQywxFeeAccountInterceptLogService.java
+11
-6
HaobanQywxFeeAccountInterceptLogServiceImpl.java
...fee/impl/HaobanQywxFeeAccountInterceptLogServiceImpl.java
+9
-16
HaobanQywxFeeApiServiceImpl.java
...ice/service/out/impl/fee/HaobanQywxFeeApiServiceImpl.java
+17
-0
TabHaobanQywxFeeAccountInterceptLogMapper.xml
...rces/mapper/TabHaobanQywxFeeAccountInterceptLogMapper.xml
+11
-2
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/fee/HaobanQywxFeeDTO.java
View file @
78d31337
...
@@ -10,6 +10,7 @@ import java.util.Date;
...
@@ -10,6 +10,7 @@ import java.util.Date;
* @since 2022-08-03 16:12:30
* @since 2022-08-03 16:12:30
*/
*/
public
class
HaobanQywxFeeDTO
implements
Serializable
{
public
class
HaobanQywxFeeDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
65108900619188163L
;
private
static
final
long
serialVersionUID
=
-
65108900619188163L
;
private
Long
qwFeeId
;
private
Long
qwFeeId
;
...
@@ -40,6 +41,9 @@ public class HaobanQywxFeeDTO implements Serializable {
...
@@ -40,6 +41,9 @@ public class HaobanQywxFeeDTO implements Serializable {
*/
*/
private
Integer
interceptFlag
;
private
Integer
interceptFlag
;
private
Integer
detailNum
;
private
Integer
autoActiveFlag
;
public
Long
getQwFeeId
()
{
public
Long
getQwFeeId
()
{
return
qwFeeId
;
return
qwFeeId
;
...
@@ -113,5 +117,20 @@ public class HaobanQywxFeeDTO implements Serializable {
...
@@ -113,5 +117,20 @@ public class HaobanQywxFeeDTO implements Serializable {
this
.
interceptFlag
=
interceptFlag
;
this
.
interceptFlag
=
interceptFlag
;
}
}
public
Integer
getDetailNum
()
{
return
detailNum
;
}
public
void
setDetailNum
(
Integer
detailNum
)
{
this
.
detailNum
=
detailNum
;
}
public
Integer
getAutoActiveFlag
()
{
return
autoActiveFlag
;
}
public
void
setAutoActiveFlag
(
Integer
autoActiveFlag
)
{
this
.
autoActiveFlag
=
autoActiveFlag
;
}
}
}
haoban-manage3-operation-web/src/main/java/com/gic/haoban/manage/web/controller/QywxManageController.java
View file @
78d31337
...
@@ -3,12 +3,15 @@ package com.gic.haoban.manage.web.controller;
...
@@ -3,12 +3,15 @@ package com.gic.haoban.manage.web.controller;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.haoban.manage.api.dto.QywxErrorLogDTO
;
import
com.gic.haoban.manage.api.dto.QywxErrorLogDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDTO
;
import
com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDTO
;
import
com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDetailDTO
;
import
com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDetailDTO
;
import
com.gic.haoban.manage.api.dto.qdto.QywxErrorLogListQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.QywxErrorLogListQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.QywxFeeListQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.QywxFeeListQDTO
;
import
com.gic.haoban.manage.api.service.QywxErrorLogApiService
;
import
com.gic.haoban.manage.api.service.QywxErrorLogApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseApiService
;
import
com.gic.haoban.manage.api.service.fee.HaobanQywxFeeApiService
;
import
com.gic.haoban.manage.api.service.fee.HaobanQywxFeeApiService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -29,6 +32,8 @@ public class QywxManageController extends WebBaseController {
...
@@ -29,6 +32,8 @@ public class QywxManageController extends WebBaseController {
private
QywxErrorLogApiService
qywxErrorLogApiService
;
private
QywxErrorLogApiService
qywxErrorLogApiService
;
@Autowired
@Autowired
private
HaobanQywxFeeApiService
haobanQywxFeeApiService
;
private
HaobanQywxFeeApiService
haobanQywxFeeApiService
;
@Autowired
private
WxEnterpriseApiService
wxEnterpriseApiService
;
/**
/**
* 企微报错列表
* 企微报错列表
...
@@ -51,12 +56,25 @@ public class QywxManageController extends WebBaseController {
...
@@ -51,12 +56,25 @@ public class QywxManageController extends WebBaseController {
*/
*/
@RequestMapping
(
value
=
"qywx-fee-list"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"qywx-fee-list"
,
method
=
RequestMethod
.
POST
)
public
RestResponse
qywxFeeList
(
@RequestBody
QywxFeeListQDTO
qywxFeeListQDTO
)
{
public
RestResponse
qywxFeeList
(
@RequestBody
QywxFeeListQDTO
qywxFeeListQDTO
)
{
Page
<
HaobanQywxFeeDTO
>
listPage
=
haobanQywxFeeApiService
.
listPage
(
qywxFeeListQDTO
);
Page
<
HaobanQywxFeeDTO
>
listPage
=
haobanQywxFeeApiService
.
listPage
(
qywxFeeListQDTO
);
List
<
HaobanQywxFeeDTO
>
result
=
listPage
.
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
result
))
{
for
(
HaobanQywxFeeDTO
haobanQywxFeeDTO
:
result
)
{
String
wxEnterpriseId
=
haobanQywxFeeDTO
.
getWxEnterpriseId
();
WxEnterpriseDTO
wxEnterpriseDTO
=
wxEnterpriseApiService
.
getOne
(
wxEnterpriseId
);
if
(
wxEnterpriseDTO
!=
null
)
{
haobanQywxFeeDTO
.
setAutoActiveFlag
(
wxEnterpriseDTO
.
getAutoActiveFlag
());
}
List
<
HaobanQywxFeeDetailDTO
>
haobanQywxFeeDetailDTOS
=
haobanQywxFeeApiService
.
feeDetail
(
wxEnterpriseId
);
haobanQywxFeeDTO
.
setDetailNum
(
CollectionUtils
.
isEmpty
(
haobanQywxFeeDetailDTOS
)
?
0
:
haobanQywxFeeDetailDTOS
.
size
());
}
}
return
RestResponse
.
successResult
(
listPage
);
return
RestResponse
.
successResult
(
listPage
);
}
}
/**
/**
* 拦截查看详情
* 拦截查看详情
*
* @param wxEnterpriseId
* @param wxEnterpriseId
* @return
* @return
*/
*/
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/fee/TabHaobanQywxFeeAccountInterceptLogMapper.java
View file @
78d31337
...
@@ -17,10 +17,10 @@ public interface TabHaobanQywxFeeAccountInterceptLogMapper {
...
@@ -17,10 +17,10 @@ public interface TabHaobanQywxFeeAccountInterceptLogMapper {
/**
/**
* 通过ID查询单条数据
* 通过ID查询单条数据
*
*
* @param feeAccountId 主键
* @param feeAccountI
nterceptI
d 主键
* @return 实例对象
* @return 实例对象
*/
*/
TabHaobanQywxFeeAccountInterceptLog
queryById
(
Long
feeAccountId
);
TabHaobanQywxFeeAccountInterceptLog
queryById
(
Long
feeAccountI
nterceptI
d
);
/**
/**
* 查询指定行数据
* 查询指定行数据
...
@@ -58,10 +58,19 @@ public interface TabHaobanQywxFeeAccountInterceptLogMapper {
...
@@ -58,10 +58,19 @@ public interface TabHaobanQywxFeeAccountInterceptLogMapper {
/**
/**
* 通过主键删除数据
* 通过主键删除数据
*
*
* @param feeAccountId 主键
* @param feeAccountI
nterceptI
d 主键
* @return 影响行数
* @return 影响行数
*/
*/
int
deleteById
(
Long
feeAccountId
);
int
deleteById
(
Long
feeAccountI
nterceptI
d
);
/**
* 查询天气企业服务id
*
* @param wxEnterpriseId wx企业标识
* @return {@link List }<{@link TabHaobanQywxFeeAccountInterceptLog }>
* @author mozhu
* @date 2022-08-10 14:55:59
*/
List
<
TabHaobanQywxFeeAccountInterceptLog
>
queryByWxEnterpriseId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/fee/HaobanQywxFeeAccountInterceptLogService.java
View file @
78d31337
...
@@ -2,6 +2,8 @@ package com.gic.haoban.manage.service.service.fee;
...
@@ -2,6 +2,8 @@ package com.gic.haoban.manage.service.service.fee;
import
com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeAccountInterceptLog
;
import
com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeAccountInterceptLog
;
import
java.util.List
;
/**
/**
* 企业微信账号拦截日志(TabHaobanQywxFeeAccountInterceptLog)表服务接口
* 企业微信账号拦截日志(TabHaobanQywxFeeAccountInterceptLog)表服务接口
*
*
...
@@ -13,10 +15,10 @@ public interface HaobanQywxFeeAccountInterceptLogService {
...
@@ -13,10 +15,10 @@ public interface HaobanQywxFeeAccountInterceptLogService {
/**
/**
* 通过ID查询单条数据
* 通过ID查询单条数据
*
*
* @param feeAccountId 主键
* @param feeAccountI
nterceptI
d 主键
* @return 实例对象
* @return 实例对象
*/
*/
TabHaobanQywxFeeAccountInterceptLog
queryById
(
Long
feeAccountId
);
TabHaobanQywxFeeAccountInterceptLog
queryById
(
Long
feeAccountI
nterceptI
d
);
/**
/**
* 新增数据
* 新增数据
...
@@ -34,12 +36,15 @@ public interface HaobanQywxFeeAccountInterceptLogService {
...
@@ -34,12 +36,15 @@ public interface HaobanQywxFeeAccountInterceptLogService {
*/
*/
TabHaobanQywxFeeAccountInterceptLog
update
(
TabHaobanQywxFeeAccountInterceptLog
tabHaobanQywxFeeAccountInterceptLog
);
TabHaobanQywxFeeAccountInterceptLog
update
(
TabHaobanQywxFeeAccountInterceptLog
tabHaobanQywxFeeAccountInterceptLog
);
/**
/**
*
通过主键删除数据
*
拦截日志
*
*
* @param feeAccountId 主键
* @param wxEnterpriseId wx企业标识
* @return 是否成功
* @return {@link List }<{@link TabHaobanQywxFeeAccountInterceptLog }>
* @author mozhu
* @date 2022-08-10 14:52:32
*/
*/
boolean
deleteById
(
Long
feeAccount
Id
);
List
<
TabHaobanQywxFeeAccountInterceptLog
>
queryByWxEnterpriseId
(
String
wxEnterprise
Id
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/fee/impl/HaobanQywxFeeAccountInterceptLogServiceImpl.java
View file @
78d31337
...
@@ -6,6 +6,8 @@ import com.gic.haoban.manage.service.service.fee.HaobanQywxFeeAccountInterceptLo
...
@@ -6,6 +6,8 @@ import com.gic.haoban.manage.service.service.fee.HaobanQywxFeeAccountInterceptLo
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
/**
* 企业微信账号拦截日志(TabHaobanQywxFeeAccountInterceptLog)表服务实现类
* 企业微信账号拦截日志(TabHaobanQywxFeeAccountInterceptLog)表服务实现类
*
*
...
@@ -18,15 +20,10 @@ public class HaobanQywxFeeAccountInterceptLogServiceImpl implements HaobanQywxFe
...
@@ -18,15 +20,10 @@ public class HaobanQywxFeeAccountInterceptLogServiceImpl implements HaobanQywxFe
@Autowired
@Autowired
private
TabHaobanQywxFeeAccountInterceptLogMapper
tabHaobanQywxFeeAccountInterceptLogMapper
;
private
TabHaobanQywxFeeAccountInterceptLogMapper
tabHaobanQywxFeeAccountInterceptLogMapper
;
/**
* 通过ID查询单条数据
*
* @param feeAccountId 主键
* @return 实例对象
*/
@Override
@Override
public
TabHaobanQywxFeeAccountInterceptLog
queryById
(
Long
feeAccountId
)
{
public
TabHaobanQywxFeeAccountInterceptLog
queryById
(
Long
feeAccountI
nterceptI
d
)
{
return
this
.
tabHaobanQywxFeeAccountInterceptLogMapper
.
queryById
(
feeAccountId
);
return
this
.
tabHaobanQywxFeeAccountInterceptLogMapper
.
queryById
(
feeAccountI
nterceptI
d
);
}
}
...
@@ -54,14 +51,10 @@ public class HaobanQywxFeeAccountInterceptLogServiceImpl implements HaobanQywxFe
...
@@ -54,14 +51,10 @@ public class HaobanQywxFeeAccountInterceptLogServiceImpl implements HaobanQywxFe
return
this
.
queryById
(
tabHaobanQywxFeeAccountInterceptLog
.
getFeeAccountInterceptId
());
return
this
.
queryById
(
tabHaobanQywxFeeAccountInterceptLog
.
getFeeAccountInterceptId
());
}
}
/**
* 通过主键删除数据
*
* @param feeAccountId 主键
* @return 是否成功
*/
@Override
@Override
public
boolean
deleteById
(
Long
feeAccount
Id
)
{
public
List
<
TabHaobanQywxFeeAccountInterceptLog
>
queryByWxEnterpriseId
(
String
wxEnterprise
Id
)
{
return
t
his
.
tabHaobanQywxFeeAccountInterceptLogMapper
.
deleteById
(
feeAccountId
)
>
0
;
return
t
abHaobanQywxFeeAccountInterceptLogMapper
.
queryByWxEnterpriseId
(
wxEnterpriseId
)
;
}
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/fee/HaobanQywxFeeApiServiceImpl.java
View file @
78d31337
...
@@ -26,6 +26,7 @@ import com.gic.wechat.api.dto.qywx.fee.qdto.FeeOrderListQDTO;
...
@@ -26,6 +26,7 @@ import com.gic.wechat.api.dto.qywx.fee.qdto.FeeOrderListQDTO;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -33,6 +34,7 @@ import org.springframework.stereotype.Service;
...
@@ -33,6 +34,7 @@ import org.springframework.stereotype.Service;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
@Service
(
"haobanQywxFeeApiService"
)
@Service
(
"haobanQywxFeeApiService"
)
...
@@ -233,6 +235,21 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
...
@@ -233,6 +235,21 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
tabHaobanQywxFee
.
setInterceptFlag
(
0
);
tabHaobanQywxFee
.
setInterceptFlag
(
0
);
haobanQywxFeeService
.
insert
(
tabHaobanQywxFee
);
haobanQywxFeeService
.
insert
(
tabHaobanQywxFee
);
}
}
List
<
TabHaobanQywxFeeAccountInterceptLog
>
tabHaobanQywxFeeAccountInterceptLogs
=
haobanQywxFeeAccountInterceptLogService
.
queryByWxEnterpriseId
(
wxEnterpriseId
);
if
(
CollectionUtils
.
isNotEmpty
(
tabHaobanQywxFeeAccountInterceptLogs
))
{
TabHaobanQywxFee
tabHaobanQywxFee
=
new
TabHaobanQywxFee
();
tabHaobanQywxFee
.
setQwFeeId
(
UniqueIdUtils
.
uniqueLong
());
tabHaobanQywxFee
.
setCorpName
(
wxEnterpriseDTO
.
getCorpName
());
tabHaobanQywxFee
.
setCorpId
(
corpid
);
tabHaobanQywxFee
.
setWxEnterpriseId
(
wxEnterpriseId
);
tabHaobanQywxFee
.
setInterceptTime
(
DateUtil
.
offsetDay
(
new
Date
(),-
1
));
tabHaobanQywxFee
.
setInterceptUserNum
(
tabHaobanQywxFeeAccountInterceptLogs
.
size
());
tabHaobanQywxFee
.
setPermissionUserNum
(
haobanQywxFeeOrderAccountService
.
countOrderAccountStatus
(
1
,
wxEnterpriseId
));
tabHaobanQywxFee
.
setBuyPermissionUserNum
(
haobanQywxFeeOrderService
.
countExternalContactCount
(
wxEnterpriseId
));
tabHaobanQywxFee
.
setInterceptFlag
(
1
);
haobanQywxFeeService
.
insert
(
tabHaobanQywxFee
);
}
}
}
}
}
...
...
haoban-manage3-service/src/main/resources/mapper/TabHaobanQywxFeeAccountInterceptLogMapper.xml
View file @
78d31337
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_fee_account_intercept_log
from tab_haoban_qywx_fee_account_intercept_log
where fee_account_i
d = #{feeAccoun
tId}
where fee_account_i
ntercept_id = #{feeAccountIntercep
tId}
</select>
</select>
<!--查询指定行数据-->
<!--查询指定行数据-->
...
@@ -98,8 +98,17 @@
...
@@ -98,8 +98,17 @@
<delete
id=
"deleteById"
>
<delete
id=
"deleteById"
>
delete
delete
from tab_haoban_qywx_fee_account_intercept_log
from tab_haoban_qywx_fee_account_intercept_log
where fee_account_i
d = #{feeAccoun
tId}
where fee_account_i
ntercept_id = #{feeAccountIntercep
tId}
</delete>
</delete>
<select
id=
"queryByWxEnterpriseId"
resultMap=
"TabHaobanQywxFeeAccountInterceptLogMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_qywx_fee_account_intercept_log
where wx_enterprise_id = #{wxEnterpriseId}
and DATE_SUB(CURDATE(), INTERVAL 1 DAY)
<![CDATA[ <= ]]>
date(qw_create_time)
</select>
</mapper>
</mapper>
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