Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
邬吉朋
relation
Commits
28ab0abf
Commit
28ab0abf
authored
Aug 01, 2025
by
wujipeng
Browse files
资金流水分页
parent
636458e0
Changes
9
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/platform/controller/UserController.java
View file @
28ab0abf
package
com.platform.controller
;
package
com.platform.controller
;
import
com.platform.model.dto.UserDTO
;
import
com.platform.model.dto.UserDTO
;
import
com.platform.model.entity.ExcelDataEntity
;
import
com.platform.model.resp.Result
;
import
com.platform.model.resp.Result
;
import
com.platform.page.TableDataInfo
;
import
com.platform.service.UserService
;
import
com.platform.service.UserService
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.List
;
@RestController
@RestController
@RequestMapping
(
"/user"
)
@RequestMapping
(
"/user"
)
...
@@ -33,4 +36,11 @@ public class UserController extends BaseController {
...
@@ -33,4 +36,11 @@ public class UserController extends BaseController {
public
Result
<
Boolean
>
add
(
@RequestBody
UserDTO
userDTO
)
{
public
Result
<
Boolean
>
add
(
@RequestBody
UserDTO
userDTO
)
{
return
Result
.
data
(
userService
.
add
(
userDTO
));
return
Result
.
data
(
userService
.
add
(
userDTO
));
}
}
@ApiModelProperty
(
value
=
"资金流水"
)
@PostMapping
(
"/cash/flow/page"
)
public
TableDataInfo
cashFlow
(
@RequestBody
UserDTO
userDTO
)
{
startPage
(
userDTO
.
getPageNum
(),
userDTO
.
getPageSize
());
return
getDataTable
((
userService
.
cashFlow
(
userDTO
)));
}
}
}
src/main/java/com/platform/mapper/ExcelDataMapper.java
View file @
28ab0abf
...
@@ -2,6 +2,7 @@ package com.platform.mapper;
...
@@ -2,6 +2,7 @@ package com.platform.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.platform.model.dto.CaseDTO
;
import
com.platform.model.dto.CaseDTO
;
import
com.platform.model.dto.UserDTO
;
import
com.platform.model.entity.ExcelDataEntity
;
import
com.platform.model.entity.ExcelDataEntity
;
import
com.platform.model.vo.AssociationVO
;
import
com.platform.model.vo.AssociationVO
;
import
com.platform.model.vo.ExcelDataVO
;
import
com.platform.model.vo.ExcelDataVO
;
...
@@ -26,4 +27,7 @@ public interface ExcelDataMapper extends BaseMapper<ExcelDataEntity> {
...
@@ -26,4 +27,7 @@ public interface ExcelDataMapper extends BaseMapper<ExcelDataEntity> {
List
<
ExcelDataEntity
>
queryListByPayUserList
(
@Param
(
"userList"
)
List
<
String
>
userList
,
List
<
ExcelDataEntity
>
queryListByPayUserList
(
@Param
(
"userList"
)
List
<
String
>
userList
,
@Param
(
"caseId"
)
int
caseId
);
@Param
(
"caseId"
)
int
caseId
);
List
<
ExcelDataEntity
>
cashFlow
(
UserDTO
userDTO
);
}
}
src/main/java/com/platform/model/dto/UserDTO.java
View file @
28ab0abf
...
@@ -14,4 +14,13 @@ public class UserDTO extends UserEntity {
...
@@ -14,4 +14,13 @@ public class UserDTO extends UserEntity {
private
List
<
UserAccountEntity
>
userAccountList
;
private
List
<
UserAccountEntity
>
userAccountList
;
@ApiModelProperty
(
value
=
"对方用户名"
)
private
String
otherUserName
;
@ApiModelProperty
(
value
=
"页数"
,
example
=
"0"
)
private
Integer
pageNum
;
@ApiModelProperty
(
value
=
"每页显示的数量"
,
example
=
"10"
)
private
Integer
pageSize
;
}
}
src/main/java/com/platform/model/entity/ExcelDataEntity.java
View file @
28ab0abf
...
@@ -100,4 +100,12 @@ public class ExcelDataEntity {
...
@@ -100,4 +100,12 @@ public class ExcelDataEntity {
@TableField
(
"use_flag"
)
@TableField
(
"use_flag"
)
private
Boolean
useFlag
;
private
Boolean
useFlag
;
@ApiModelProperty
(
"本人账户"
)
@TableField
(
exist
=
false
)
private
String
selfAccount
;
@ApiModelProperty
(
"关联账户"
)
@TableField
(
exist
=
false
)
private
String
associationAccount
;
}
}
src/main/java/com/platform/service/ExcelDataService.java
View file @
28ab0abf
...
@@ -3,6 +3,7 @@ package com.platform.service;
...
@@ -3,6 +3,7 @@ package com.platform.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.platform.model.dto.CaseDTO
;
import
com.platform.model.dto.CaseDTO
;
import
com.platform.model.dto.ExcelDataDTO
;
import
com.platform.model.dto.ExcelDataDTO
;
import
com.platform.model.dto.UserDTO
;
import
com.platform.model.entity.ExcelDataEntity
;
import
com.platform.model.entity.ExcelDataEntity
;
import
com.platform.model.vo.AssociationVO
;
import
com.platform.model.vo.AssociationVO
;
import
com.platform.model.vo.ExcelDataVO
;
import
com.platform.model.vo.ExcelDataVO
;
...
@@ -51,4 +52,6 @@ public interface ExcelDataService extends IService<ExcelDataEntity> {
...
@@ -51,4 +52,6 @@ public interface ExcelDataService extends IService<ExcelDataEntity> {
List
<
ExcelDataEntity
>
queryListByPayUserList
(
List
<
String
>
userList
,
int
caseId
);
List
<
ExcelDataEntity
>
queryListByPayUserList
(
List
<
String
>
userList
,
int
caseId
);
List
<
AssociationVO
>
selectFinancialTransactions
(
String
userName
,
String
caseId
);
List
<
AssociationVO
>
selectFinancialTransactions
(
String
userName
,
String
caseId
);
List
<
ExcelDataEntity
>
cashFlow
(
UserDTO
userDTO
);
}
}
src/main/java/com/platform/service/UserService.java
View file @
28ab0abf
...
@@ -2,9 +2,12 @@ package com.platform.service;
...
@@ -2,9 +2,12 @@ package com.platform.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.platform.model.dto.UserDTO
;
import
com.platform.model.dto.UserDTO
;
import
com.platform.model.entity.ExcelDataEntity
;
import
com.platform.model.entity.UserEntity
;
import
com.platform.model.entity.UserEntity
;
import
com.platform.model.vo.UserVO
;
import
com.platform.model.vo.UserVO
;
import
java.util.List
;
public
interface
UserService
extends
IService
<
UserEntity
>
{
public
interface
UserService
extends
IService
<
UserEntity
>
{
UserVO
getDetail
(
String
userName
,
String
caseId
);
UserVO
getDetail
(
String
userName
,
String
caseId
);
...
@@ -16,4 +19,10 @@ public interface UserService extends IService<UserEntity> {
...
@@ -16,4 +19,10 @@ public interface UserService extends IService<UserEntity> {
* @return Boolean
* @return Boolean
*/
*/
Boolean
add
(
UserDTO
userDTO
);
Boolean
add
(
UserDTO
userDTO
);
/**
* 资金流水
* @return List<ExcelDataEntity>
*/
List
<
ExcelDataEntity
>
cashFlow
(
UserDTO
userDTO
);
}
}
src/main/java/com/platform/service/impl/ExcelDataServiceImpl.java
View file @
28ab0abf
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.platform.mapper.ExcelDataMapper
;
import
com.platform.mapper.ExcelDataMapper
;
import
com.platform.model.dto.CaseDTO
;
import
com.platform.model.dto.CaseDTO
;
import
com.platform.model.dto.UserDTO
;
import
com.platform.model.entity.ExcelDataEntity
;
import
com.platform.model.entity.ExcelDataEntity
;
import
com.platform.model.vo.AssociationVO
;
import
com.platform.model.vo.AssociationVO
;
import
com.platform.model.vo.ExcelDataVO
;
import
com.platform.model.vo.ExcelDataVO
;
...
@@ -70,4 +71,9 @@ public class ExcelDataServiceImpl extends ServiceImpl<ExcelDataMapper, ExcelData
...
@@ -70,4 +71,9 @@ public class ExcelDataServiceImpl extends ServiceImpl<ExcelDataMapper, ExcelData
public
List
<
AssociationVO
>
selectFinancialTransactions
(
String
userName
,
String
caseId
)
{
public
List
<
AssociationVO
>
selectFinancialTransactions
(
String
userName
,
String
caseId
)
{
return
baseMapper
.
selectFinancialTransactions
(
userName
,
caseId
);
return
baseMapper
.
selectFinancialTransactions
(
userName
,
caseId
);
}
}
@Override
public
List
<
ExcelDataEntity
>
cashFlow
(
UserDTO
userDTO
)
{
return
baseMapper
.
cashFlow
(
userDTO
);
}
}
}
src/main/java/com/platform/service/impl/UserServiceImpl.java
View file @
28ab0abf
...
@@ -8,6 +8,7 @@ import com.google.common.collect.Maps;
...
@@ -8,6 +8,7 @@ import com.google.common.collect.Maps;
import
com.google.common.collect.Sets
;
import
com.google.common.collect.Sets
;
import
com.platform.mapper.UserMapper
;
import
com.platform.mapper.UserMapper
;
import
com.platform.model.dto.UserDTO
;
import
com.platform.model.dto.UserDTO
;
import
com.platform.model.entity.ExcelDataEntity
;
import
com.platform.model.entity.UserAccountEntity
;
import
com.platform.model.entity.UserAccountEntity
;
import
com.platform.model.entity.UserEntity
;
import
com.platform.model.entity.UserEntity
;
import
com.platform.model.entity.UserRelationEntity
;
import
com.platform.model.entity.UserRelationEntity
;
...
@@ -148,4 +149,19 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
...
@@ -148,4 +149,19 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
userRelationService
.
saveBatch
(
relationShipList
);
userRelationService
.
saveBatch
(
relationShipList
);
return
Boolean
.
TRUE
;
return
Boolean
.
TRUE
;
}
}
@Override
public
List
<
ExcelDataEntity
>
cashFlow
(
UserDTO
userDTO
)
{
List
<
ExcelDataEntity
>
excelDataList
=
excelDataService
.
cashFlow
(
userDTO
);
for
(
ExcelDataEntity
excelDataEntity
:
excelDataList
)
{
if
(
"出账"
.
equals
(
excelDataEntity
.
getDirection
())){
excelDataEntity
.
setSelfAccount
(
excelDataEntity
.
getPayAccount
());
excelDataEntity
.
setAssociationAccount
(
excelDataEntity
.
getPayeeAccount
());
}
else
if
(
"入账"
.
equals
(
excelDataEntity
.
getDirection
())){
excelDataEntity
.
setSelfAccount
(
excelDataEntity
.
getPayeeAccount
());
excelDataEntity
.
setAssociationAccount
(
excelDataEntity
.
getPayAccount
());
}
}
return
excelDataList
;
}
}
}
src/main/resources/com/platform/mapper/ExcelDataMapper.xml
View file @
28ab0abf
...
@@ -73,4 +73,37 @@
...
@@ -73,4 +73,37 @@
#{userName}
#{userName}
</foreach>
</foreach>
</select>
</select>
<select
id=
"cashFlow"
resultType=
"com.platform.model.entity.ExcelDataEntity"
>
select id,
directory_id,
type,
direction,
time,
amount,
serial,
payee_bank_card,
payee_account,
payee_merchant,
payee_name,
payment_bank_name,
payment_bank_card,
payment_account,
ip,
mac,
external_channel,
pay_account,
remark,
case_id,
pay_user_name,
use_flag,
file_id
from excel_data
where case_id = #{caseId}
and pay_user_name = #{userName}
and (
payee_account = #{otherUserName}
or
payment_account = #{otherUserName}
)
</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