Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fit-finance
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fitness-server
fit-finance
Commits
8a1ec79c
Commit
8a1ec79c
authored
Apr 23, 2024
by
程裕兵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:latest success apply
parent
c0893fa1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
0 deletions
+46
-0
api/src/main/java/com/jiejing/fitness/finance/api/merchant/StudioMerchantApi.java
+4
-0
api/src/main/java/com/jiejing/fitness/finance/api/merchant/StudioMerchantApiFallback.java
+6
-0
app/src/main/java/com/jiejing/fitness/finance/app/controller/merchant/StudioMerchantController.java
+8
-0
repository/src/main/java/com/jiejing/fitness/finance/repository/service/StudioMerchantApplyRpService.java
+10
-0
service/src/main/java/com/jiejing/fitness/finance/service/merchant/StudioMerchantService.java
+8
-0
service/src/main/java/com/jiejing/fitness/finance/service/merchant/impl/StudioMerchantServiceImpl.java
+10
-0
No files found.
api/src/main/java/com/jiejing/fitness/finance/api/merchant/StudioMerchantApi.java
View file @
8a1ec79c
...
@@ -62,6 +62,10 @@ public interface StudioMerchantApi {
...
@@ -62,6 +62,10 @@ public interface StudioMerchantApi {
@PostMapping
(
value
=
"/private/studioMerchant/getLatestApply"
)
@PostMapping
(
value
=
"/private/studioMerchant/getLatestApply"
)
JsonResult
<
StudioMerchantApplyVO
>
getLatestApply
(
GetStudioLatestMerchantApplyRequest
request
);
JsonResult
<
StudioMerchantApplyVO
>
getLatestApply
(
GetStudioLatestMerchantApplyRequest
request
);
@ApiOperation
(
value
=
"查询最近一条成功的申请记录"
,
tags
=
{
TAG
})
@PostMapping
(
value
=
"/private/studioMerchant/getLatestSuccessApply"
)
JsonResult
<
StudioMerchantApplyVO
>
getLatestSuccessApply
(
GetStudioLatestMerchantApplyRequest
request
);
@ApiOperation
(
value
=
"分页查询场馆进件申请记录"
,
tags
=
{
TAG
})
@ApiOperation
(
value
=
"分页查询场馆进件申请记录"
,
tags
=
{
TAG
})
@PostMapping
(
value
=
"/private/studioMerchant/pageApply"
)
@PostMapping
(
value
=
"/private/studioMerchant/pageApply"
)
JsonResult
<
PageVO
<
StudioMerchantApplyVO
>>
pageApply
(
PageStudioMerchantApplyRequest
request
);
JsonResult
<
PageVO
<
StudioMerchantApplyVO
>>
pageApply
(
PageStudioMerchantApplyRequest
request
);
...
...
api/src/main/java/com/jiejing/fitness/finance/api/merchant/StudioMerchantApiFallback.java
View file @
8a1ec79c
...
@@ -70,6 +70,12 @@ public class StudioMerchantApiFallback implements FallbackFactory<StudioMerchant
...
@@ -70,6 +70,12 @@ public class StudioMerchantApiFallback implements FallbackFactory<StudioMerchant
}
}
@Override
@Override
public
JsonResult
<
StudioMerchantApplyVO
>
getLatestSuccessApply
(
GetStudioLatestMerchantApplyRequest
request
)
{
return
JsonResult
.
rpcError
();
}
@Override
public
JsonResult
<
PageVO
<
StudioMerchantApplyVO
>>
pageApply
(
PageStudioMerchantApplyRequest
request
)
{
public
JsonResult
<
PageVO
<
StudioMerchantApplyVO
>>
pageApply
(
PageStudioMerchantApplyRequest
request
)
{
return
JsonResult
.
rpcError
();
return
JsonResult
.
rpcError
();
}
}
...
...
app/src/main/java/com/jiejing/fitness/finance/app/controller/merchant/StudioMerchantController.java
View file @
8a1ec79c
...
@@ -103,6 +103,14 @@ public class StudioMerchantController implements StudioMerchantApi {
...
@@ -103,6 +103,14 @@ public class StudioMerchantController implements StudioMerchantApi {
return
JsonResult
.
success
(
studioMerchantService
.
getLatestApply
(
request
.
getStudioId
()));
return
JsonResult
.
success
(
studioMerchantService
.
getLatestApply
(
request
.
getStudioId
()));
}
}
@ApiOperation
(
value
=
"查询最近一条成功的申请记录"
,
tags
=
{
TAG
})
@PostMapping
(
value
=
"/private/studioMerchant/getLatestSuccessApply"
)
@Override
public
JsonResult
<
StudioMerchantApplyVO
>
getLatestSuccessApply
(
@RequestBody
@Valid
GetStudioLatestMerchantApplyRequest
request
)
{
return
JsonResult
.
success
(
studioMerchantService
.
getLatestSuccessApply
(
request
.
getStudioId
()));
}
@ApiOperation
(
value
=
"分页查询场馆进件申请记录"
,
tags
=
{
TAG
})
@ApiOperation
(
value
=
"分页查询场馆进件申请记录"
,
tags
=
{
TAG
})
@PostMapping
(
value
=
"/private/studioMerchant/pageApply"
)
@PostMapping
(
value
=
"/private/studioMerchant/pageApply"
)
@Override
@Override
...
...
repository/src/main/java/com/jiejing/fitness/finance/repository/service/StudioMerchantApplyRpService.java
View file @
8a1ec79c
...
@@ -144,4 +144,14 @@ public class StudioMerchantApplyRpService extends
...
@@ -144,4 +144,14 @@ public class StudioMerchantApplyRpService extends
.
findFirst
().
orElse
(
null
);
.
findFirst
().
orElse
(
null
);
}
}
public
StudioMerchantApply
getLatestSuccessApply
(
Long
studioId
)
{
QueryWrapper
<
StudioMerchantApply
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
StudioMerchantApply
.
STUDIO_ID
,
studioId
);
wrapper
.
in
(
StudioMerchantApply
.
APPLY_TYPE
,
Lists
.
newArrayList
(
ApplyTypeEnum
.
OPEN
.
getCode
(),
ApplyTypeEnum
.
RE_OPEN
.
getCode
()));
wrapper
.
eq
(
StudioMerchantApply
.
OPEN_STATE
,
OpenStateEnums
.
SUCCESS
.
getCode
());
wrapper
.
orderByDesc
(
StudioMerchantApply
.
ID
);
return
Optional
.
ofNullable
(
this
.
baseMapper
.
selectList
(
wrapper
)).
orElse
(
new
ArrayList
<>(
1
)).
stream
()
.
findFirst
().
orElse
(
null
);
}
}
}
service/src/main/java/com/jiejing/fitness/finance/service/merchant/StudioMerchantService.java
View file @
8a1ec79c
...
@@ -136,4 +136,12 @@ public interface StudioMerchantService {
...
@@ -136,4 +136,12 @@ public interface StudioMerchantService {
*/
*/
Boolean
checkUnbind
(
Long
studioId
,
Long
merchantId
);
Boolean
checkUnbind
(
Long
studioId
,
Long
merchantId
);
/**
* 获取最后一条成功的申请记录
*
* @param studioId 场馆ID
* @return 申请记录
*/
StudioMerchantApplyVO
getLatestSuccessApply
(
Long
studioId
);
}
}
service/src/main/java/com/jiejing/fitness/finance/service/merchant/impl/StudioMerchantServiceImpl.java
View file @
8a1ec79c
...
@@ -282,6 +282,16 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
...
@@ -282,6 +282,16 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
.
anyMatch
(
e
->
!
e
.
getPartyId
().
equals
(
studioId
));
.
anyMatch
(
e
->
!
e
.
getPartyId
().
equals
(
studioId
));
}
}
@Override
public
StudioMerchantApplyVO
getLatestSuccessApply
(
Long
studioId
)
{
StudioMerchantApply
apply
=
studioMerchantApplyRpService
.
getLatestSuccessApply
(
studioId
);
if
(
null
==
apply
)
{
return
null
;
}
Map
<
Long
,
String
>
urlMap
=
this
.
getResouceseUrlMap
(
apply
);
return
MerchantConvert
.
convertApply
(
apply
,
urlMap
);
}
private
void
doOpenMerchantSuccess
(
MerchantEvent
event
)
{
private
void
doOpenMerchantSuccess
(
MerchantEvent
event
)
{
StudioMerchantApply
apply
=
studioMerchantApplyRpService
.
getByIdForUpdate
(
StudioMerchantApply
apply
=
studioMerchantApplyRpService
.
getByIdForUpdate
(
...
...
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