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
5bf43d5e
Commit
5bf43d5e
authored
Aug 11, 2025
by
zhuxiang
Browse files
Merge remote-tracking branch 'origin/dev' into dev
parents
6e5dd7ca
a0107fcd
Changes
8
Show whitespace changes
Inline
Side-by-side
src/main/java/com/platform/controller/UserController.java
View file @
5bf43d5e
...
...
@@ -22,9 +22,9 @@ public class UserController extends BaseController {
private
UserService
userService
;
@ApiOperation
(
value
=
"用户详情"
)
@
Ge
tMapping
(
"/detail"
)
public
Result
detail
(
@Request
Param
String
userName
,
@RequestParam
int
caseId
)
{
return
Result
.
data
(
userService
.
getDetail
(
user
Name
,
caseId
));
@
Pos
tMapping
(
"/detail"
)
public
Result
detail
(
@Request
Body
UserDTO
userDTO
)
{
return
Result
.
data
(
userService
.
getDetail
(
user
DTO
));
}
@ApiOperation
(
value
=
"编辑用户信息"
)
...
...
src/main/java/com/platform/mapper/ExcelDataMapper.java
View file @
5bf43d5e
...
...
@@ -24,7 +24,7 @@ public interface ExcelDataMapper extends BaseMapper<ExcelDataEntity> {
List
<
ExcelDataEntity
>
queryList
(
CaseDTO
caseDTO
);
List
<
AssociationVO
>
selectFinancialTransactions
(
@Param
(
"userName"
)
String
userName
,
@Param
(
"caseId"
)
int
caseId
);
List
<
AssociationVO
>
selectFinancialTransactions
(
UserDTO
userDTO
);
List
<
ExcelDataVO
>
queryListByPayUserList
(
@Param
(
"userList"
)
List
<
String
>
userList
,
@Param
(
"caseId"
)
int
caseId
);
...
...
@@ -34,7 +34,7 @@ public interface ExcelDataMapper extends BaseMapper<ExcelDataEntity> {
List
<
ExcelDataEntity
>
relationPage
(
@Param
(
"oneselfAccountList"
)
List
<
String
>
oneselfAccountList
,
@Param
(
"otherAccountList"
)
List
<
String
>
otherAccountList
);
List
<
ExcelDataEntity
>
queryInfoList
(
CaseDTO
caseDTO
);
List
<
AssociationVO
>
queryAccountTemporary
(
@Param
(
"userName"
)
String
userName
,
@Param
(
"caseId"
)
int
caseId
);
List
<
AssociationVO
>
queryAccountTemporary
(
UserDTO
userDTO
);
List
<
ExcelDataEntity
>
accountCashFlow
(
UserDTO
userDTO
);
List
<
ExcelDataEntity
>
queryListByPayeeNameAndPayUserName
(
@Param
(
"payeeName"
)
String
payeeName
,
@Param
(
"caseId"
)
int
caseId
);
...
...
src/main/java/com/platform/model/dto/UserDTO.java
View file @
5bf43d5e
package
com.platform.model.dto
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.platform.model.entity.CaseRuleConfigEntity
;
import
com.platform.model.entity.UserAccountEntity
;
import
com.platform.model.entity.UserEntity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
import
java.util.List
;
@EqualsAndHashCode
(
callSuper
=
true
)
...
...
@@ -36,4 +39,18 @@ public class UserDTO extends UserEntity {
private
String
newName
;
private
Double
minAmount
;
private
Double
maxAmount
;
private
Integer
minTransaction
;
private
Integer
maxTransaction
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
startTime
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
endTime
;
}
src/main/java/com/platform/service/ExcelDataService.java
View file @
5bf43d5e
...
...
@@ -49,7 +49,7 @@ public interface ExcelDataService extends IService<ExcelDataEntity> {
List
<
ExcelDataVO
>
queryListByPayUserList
(
List
<
String
>
userList
,
int
caseId
);
List
<
AssociationVO
>
selectFinancialTransactions
(
String
userName
,
int
caseId
);
List
<
AssociationVO
>
selectFinancialTransactions
(
UserDTO
userDTO
);
List
<
ExcelDataEntity
>
cashFlow
(
UserDTO
userDTO
);
...
...
@@ -59,7 +59,7 @@ public interface ExcelDataService extends IService<ExcelDataEntity> {
List
<
ExcelDataEntity
>
queryListByPayUserName
(
ExcelDataDTO
excelDataDTO
);
List
<
AssociationVO
>
queryAccountTemporary
(
String
userName
,
int
caseId
);
List
<
AssociationVO
>
queryAccountTemporary
(
UserDTO
userDTO
);
List
<
ExcelDataEntity
>
accountCashFlow
(
UserDTO
userDTO
);
List
<
ExcelDataEntity
>
queryListByPayeeName
(
String
oldName
,
int
caseId
);
...
...
src/main/java/com/platform/service/UserService.java
View file @
5bf43d5e
...
...
@@ -12,7 +12,7 @@ import com.platform.model.vo.UserVO;
import
java.util.List
;
public
interface
UserService
extends
IService
<
UserEntity
>
{
UserVO
getDetail
(
String
userName
,
int
caseId
);
UserVO
getDetail
(
UserDTO
userDTO
);
boolean
updateUser
(
UserDTO
userDTO
);
...
...
src/main/java/com/platform/service/impl/ExcelDataServiceImpl.java
View file @
5bf43d5e
...
...
@@ -74,8 +74,8 @@ public class ExcelDataServiceImpl extends ServiceImpl<ExcelDataMapper, ExcelData
}
@Override
public
List
<
AssociationVO
>
selectFinancialTransactions
(
String
userName
,
int
caseId
)
{
return
baseMapper
.
selectFinancialTransactions
(
user
Name
,
caseId
);
public
List
<
AssociationVO
>
selectFinancialTransactions
(
UserDTO
userDTO
)
{
return
baseMapper
.
selectFinancialTransactions
(
user
DTO
);
}
@Override
...
...
@@ -125,8 +125,8 @@ public class ExcelDataServiceImpl extends ServiceImpl<ExcelDataMapper, ExcelData
}
@Override
public
List
<
AssociationVO
>
queryAccountTemporary
(
String
userName
,
int
caseId
)
{
return
baseMapper
.
queryAccountTemporary
(
user
Name
,
caseId
);
public
List
<
AssociationVO
>
queryAccountTemporary
(
UserDTO
userDTO
)
{
return
baseMapper
.
queryAccountTemporary
(
user
DTO
);
}
@Override
...
...
src/main/java/com/platform/service/impl/UserServiceImpl.java
View file @
5bf43d5e
...
...
@@ -44,24 +44,24 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
private
ExcelDataService
excelDataService
;
@Override
public
UserVO
getDetail
(
String
userName
,
int
caseId
)
{
public
UserVO
getDetail
(
UserDTO
userDTO
)
{
UserEntity
userEntity
=
baseMapper
.
selectOne
(
new
LambdaQueryWrapper
<
UserEntity
>()
.
eq
(
UserEntity:
:
getUserName
,
userName
).
eq
(
UserEntity:
:
getCaseId
,
c
aseId
));
.
eq
(
UserEntity:
:
getUserName
,
user
DTO
.
getUser
Name
()
).
eq
(
UserEntity:
:
getCaseId
,
userDTO
.
getC
aseId
()
));
if
(
ObjectUtils
.
isEmpty
(
userEntity
))
{
return
account
(
user
Name
,
caseId
);
return
account
(
user
DTO
);
}
else
{
return
personnel
(
user
Name
,
caseId
,
userEntity
);
return
personnel
(
user
DTO
,
userEntity
);
}
}
private
UserVO
account
(
String
userName
,
int
caseId
)
{
private
UserVO
account
(
UserDTO
userDTO
)
{
UserVO
userVO
=
new
UserVO
();
userVO
.
setUserName
(
userName
);
userVO
.
setCaseId
(
c
aseId
);
userVO
.
setUserName
(
user
DTO
.
getUser
Name
()
);
userVO
.
setCaseId
(
userDTO
.
getC
aseId
()
);
//本人账号数量
HashSet
<
String
>
account
=
Sets
.
newHashSet
();
//查询关联资金
List
<
AssociationVO
>
financialTransactions
=
excelDataService
.
queryAccountTemporary
(
user
Name
,
caseId
);
List
<
AssociationVO
>
financialTransactions
=
excelDataService
.
queryAccountTemporary
(
user
DTO
);
Map
<
String
,
List
<
AssociationVO
>>
detailsFunds
=
Maps
.
newHashMap
();
for
(
AssociationVO
financialTransaction
:
financialTransactions
)
{
if
(
financialTransaction
.
getDirection
().
equals
(
"出账"
))
{
...
...
@@ -110,22 +110,22 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
}
@NotNull
private
UserVO
personnel
(
String
userName
,
int
caseId
,
UserEntity
userEntity
)
{
private
UserVO
personnel
(
UserDTO
userDTO
,
UserEntity
userEntity
)
{
UserVO
userVO
=
DozerUtils
.
convertBean
(
userEntity
,
UserVO
.
class
);
if
(
userVO
!=
null
)
{
//查看用户账户列表
List
<
UserAccountEntity
>
userAccountEntityList
=
userAccountService
.
queryListByUserName
(
userName
);
List
<
UserAccountEntity
>
userAccountEntityList
=
userAccountService
.
queryListByUserName
(
user
DTO
.
getUser
Name
()
);
userVO
.
setUserAccountList
(
userAccountEntityList
);
}
List
<
UserRelationEntity
>
relationShipList
=
userRelationService
.
list
(
new
LambdaQueryWrapper
<
UserRelationEntity
>()
.
eq
(
UserRelationEntity:
:
getUserName
,
userEntity
.
getUserName
()).
eq
(
UserRelationEntity:
:
getCaseId
,
c
aseId
));
.
eq
(
UserRelationEntity:
:
getUserName
,
userEntity
.
getUserName
()).
eq
(
UserRelationEntity:
:
getCaseId
,
userDTO
.
getC
aseId
()
));
if
(!
ObjectUtils
.
isEmpty
(
relationShipList
))
{
userVO
.
setRelationShipList
(
relationShipList
);
}
//本人账号数量
HashSet
<
String
>
account
=
Sets
.
newHashSet
();
//查询关联资金
List
<
AssociationVO
>
financialTransactions
=
excelDataService
.
selectFinancialTransactions
(
user
Name
,
caseId
);
List
<
AssociationVO
>
financialTransactions
=
excelDataService
.
selectFinancialTransactions
(
user
DTO
);
Map
<
String
,
List
<
AssociationVO
>>
detailsFunds
=
Maps
.
newHashMap
();
for
(
AssociationVO
financialTransaction
:
financialTransactions
)
{
if
(
financialTransaction
.
getDirection
().
equals
(
"出账"
))
{
...
...
src/main/resources/com/platform/mapper/ExcelDataMapper.xml
View file @
5bf43d5e
...
...
@@ -64,10 +64,29 @@
from excel_data
where case_id = #{caseId}
and pay_user_name = #{userName}
<if
test=
"startTime != null"
>
and time >= #{startTime}
</if>
<if
test=
"endTime != null"
>
and time
<
= #{endTime}
</if>
group by
payee_account,
payment_account,
direction
HAVING 1=1
<if
test=
"minAmount != null"
>
and sum(amount) >= #{minAmount}
</if>
<if
test=
"maxAmount != null"
>
and sum(amount)
<
= #{maxAmount}
</if>
<if
test=
"minTransaction != null"
>
and count(*) >= #{minTransaction}
</if>
<if
test=
"maxTransaction != null"
>
and count(*)
<
= #{maxTransaction}
</if>
</select>
<select
id=
"queryListByPayUserList"
resultType=
"com.platform.model.vo.ExcelDataVO"
>
...
...
@@ -197,10 +216,29 @@
from excel_data
where case_id = #{caseId}
and payee_name = #{userName}
<if
test=
"startTime != null"
>
and time >= #{startTime}
</if>
<if
test=
"endTime != null"
>
and time
<
= #{endTime}
</if>
group by
payee_account,
payment_account,
direction
HAVING 1=1
<if
test=
"minAmount != null"
>
and sum(amount) >= #{minAmount}
</if>
<if
test=
"maxAmount != null"
>
and sum(amount)
<
= #{maxAmount}
</if>
<if
test=
"minTransaction != null"
>
and count(*) >= #{minTransaction}
</if>
<if
test=
"maxTransaction != null"
>
and count(*)
<
= #{maxTransaction}
</if>
</select>
<select
id=
"accountCashFlow"
resultType=
"com.platform.model.entity.ExcelDataEntity"
>
select id,
...
...
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