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
84970b15
Commit
84970b15
authored
Aug 14, 2024
by
程裕兵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:添加半屏小程序
parent
15762201
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
30 deletions
+30
-30
repository/src/main/java/com/jiejing/fitness/finance/repository/service/StudioEmbeddedXcxApplyRpService.java
+18
-18
service/src/main/java/com/jiejing/fitness/finance/service/merchant/convert/StudioEmbeddedXcxConvert.java
+3
-3
service/src/main/java/com/jiejing/fitness/finance/service/merchant/impl/StudioMerchantServiceImpl.java
+9
-9
No files found.
repository/src/main/java/com/jiejing/fitness/finance/repository/service/StudioEmbeddedXcxApplyRpService.java
View file @
84970b15
...
@@ -36,40 +36,40 @@ import org.springframework.stereotype.Service;
...
@@ -36,40 +36,40 @@ import org.springframework.stereotype.Service;
public
class
StudioEmbeddedXcxApplyRpService
extends
public
class
StudioEmbeddedXcxApplyRpService
extends
MapperRepoService
<
Long
,
StudioEmbeddedXcxApply
,
StudioEmbeddedXcxApplyMapper
>
{
MapperRepoService
<
Long
,
StudioEmbeddedXcxApply
,
StudioEmbeddedXcxApplyMapper
>
{
public
Map
<
String
,
StudioEmbeddedXcxApply
>
mapByStudioIdAndA
uthorizerA
ppId
(
Long
studioId
,
public
Map
<
String
,
StudioEmbeddedXcxApply
>
mapByStudioIdAndAppId
(
Long
studioId
,
String
componentAppId
,
String
systemXcxAppId
,
List
<
String
>
a
uthorizerA
ppIds
)
{
String
componentAppId
,
String
systemXcxAppId
,
List
<
String
>
appIds
)
{
return
this
.
listByStudioIdAndA
uthorizerAppId
(
studioId
,
componentAppId
,
systemXcxAppId
,
authorizerA
ppIds
)
return
this
.
listByStudioIdAndA
ppId
(
studioId
,
componentAppId
,
systemXcxAppId
,
a
ppIds
)
.
stream
().
collect
(
Collectors
.
toMap
(
StudioEmbeddedXcxApply:
:
getAppId
,
e
->
e
));
.
stream
().
collect
(
Collectors
.
toMap
(
StudioEmbeddedXcxApply:
:
getAppId
,
e
->
e
));
}
}
public
List
<
StudioEmbeddedXcxApply
>
listByStudioIdAndA
uthorizerA
ppId
(
Long
studioId
,
String
componentAppId
,
public
List
<
StudioEmbeddedXcxApply
>
listByStudioIdAndAppId
(
Long
studioId
,
String
componentAppId
,
String
systemXcxAppId
,
List
<
String
>
a
uthorizerA
ppIds
)
{
String
systemXcxAppId
,
List
<
String
>
appIds
)
{
QueryWrapper
<
StudioEmbeddedXcxApply
>
wrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
StudioEmbeddedXcxApply
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
StudioEmbeddedXcxApply
.
STUDIO_ID
,
studioId
);
wrapper
.
eq
(
StudioEmbeddedXcxApply
.
STUDIO_ID
,
studioId
);
wrapper
.
in
(
StudioEmbeddedXcxApply
.
COMPONENT_APP_ID
,
componentAppId
);
wrapper
.
eq
(
StudioEmbeddedXcxApply
.
COMPONENT_APP_ID
,
componentAppId
);
wrapper
.
in
(
StudioEmbeddedXcxApply
.
APP_ID
,
systemXcxAppId
);
wrapper
.
eq
(
StudioEmbeddedXcxApply
.
AUTHORIZER_
APP_ID
,
systemXcxAppId
);
wrapper
.
in
(
StudioEmbeddedXcxApply
.
A
UTHORIZER_APP_ID
,
authorizerA
ppIds
);
wrapper
.
in
(
StudioEmbeddedXcxApply
.
A
PP_ID
,
a
ppIds
);
return
Optional
.
ofNullable
(
this
.
baseMapper
.
selectList
(
wrapper
)).
orElse
(
new
ArrayList
<>(
1
));
return
Optional
.
ofNullable
(
this
.
baseMapper
.
selectList
(
wrapper
)).
orElse
(
new
ArrayList
<>(
1
));
}
}
public
StudioEmbeddedXcxApply
getByStudioIdAndA
uthorizerA
ppId
(
Long
studioId
,
String
componentAppId
,
public
StudioEmbeddedXcxApply
getByStudioIdAndAppId
(
Long
studioId
,
String
componentAppId
,
String
systemXcxAppId
,
String
a
uthorizerA
ppId
)
{
String
systemXcxAppId
,
String
appId
)
{
QueryWrapper
<
StudioEmbeddedXcxApply
>
wrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
StudioEmbeddedXcxApply
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
StudioEmbeddedXcxApply
.
STUDIO_ID
,
studioId
);
wrapper
.
eq
(
StudioEmbeddedXcxApply
.
STUDIO_ID
,
studioId
);
wrapper
.
in
(
StudioEmbeddedXcxApply
.
COMPONENT_APP_ID
,
componentAppId
);
wrapper
.
eq
(
StudioEmbeddedXcxApply
.
COMPONENT_APP_ID
,
componentAppId
);
wrapper
.
in
(
StudioEmbeddedXcxApply
.
APP_ID
,
systemXcxA
ppId
);
wrapper
.
eq
(
StudioEmbeddedXcxApply
.
APP_ID
,
a
ppId
);
wrapper
.
eq
(
StudioEmbeddedXcxApply
.
AUTHORIZER_APP_ID
,
authorizer
AppId
);
wrapper
.
eq
(
StudioEmbeddedXcxApply
.
AUTHORIZER_APP_ID
,
systemXcx
AppId
);
return
Optional
.
ofNullable
(
this
.
baseMapper
.
selectList
(
wrapper
))
return
Optional
.
ofNullable
(
this
.
baseMapper
.
selectList
(
wrapper
))
.
orElse
(
new
ArrayList
<>(
1
))
.
orElse
(
new
ArrayList
<>(
1
))
.
stream
().
findFirst
().
orElse
(
null
);
.
stream
().
findFirst
().
orElse
(
null
);
}
}
public
List
<
StudioEmbeddedXcxApply
>
listByA
uthorizerA
ppIds
(
String
componentAppId
,
String
systemXcxAppId
,
public
List
<
StudioEmbeddedXcxApply
>
listByAppIds
(
String
componentAppId
,
String
systemXcxAppId
,
List
<
String
>
a
uthorizerA
ppIds
)
{
List
<
String
>
appIds
)
{
QueryWrapper
<
StudioEmbeddedXcxApply
>
wrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
StudioEmbeddedXcxApply
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
in
(
StudioEmbeddedXcxApply
.
COMPONENT_APP_ID
,
componentAppId
);
wrapper
.
eq
(
StudioEmbeddedXcxApply
.
COMPONENT_APP_ID
,
componentAppId
);
wrapper
.
in
(
StudioEmbeddedXcxApply
.
APP_ID
,
systemXcxAppId
);
wrapper
.
eq
(
StudioEmbeddedXcxApply
.
AUTHORIZER_
APP_ID
,
systemXcxAppId
);
wrapper
.
in
(
StudioEmbeddedXcxApply
.
A
UTHORIZER_APP_ID
,
authorizerA
ppIds
);
wrapper
.
in
(
StudioEmbeddedXcxApply
.
A
PP_ID
,
a
ppIds
);
return
Optional
.
ofNullable
(
this
.
baseMapper
.
selectList
(
wrapper
)).
orElse
(
new
ArrayList
<>(
1
));
return
Optional
.
ofNullable
(
this
.
baseMapper
.
selectList
(
wrapper
)).
orElse
(
new
ArrayList
<>(
1
));
}
}
}
}
service/src/main/java/com/jiejing/fitness/finance/service/merchant/convert/StudioEmbeddedXcxConvert.java
View file @
84970b15
...
@@ -17,12 +17,12 @@ import java.util.stream.Collectors;
...
@@ -17,12 +17,12 @@ import java.util.stream.Collectors;
public
class
StudioEmbeddedXcxConvert
{
public
class
StudioEmbeddedXcxConvert
{
public
static
StudioEmbeddedXcxApply
toEntity
(
Long
studioId
,
String
componentAppId
,
String
systemXcxAppId
,
public
static
StudioEmbeddedXcxApply
toEntity
(
Long
studioId
,
String
componentAppId
,
String
systemXcxAppId
,
String
a
uthorizerA
ppId
)
{
String
appId
)
{
StudioEmbeddedXcxApply
record
=
new
StudioEmbeddedXcxApply
();
StudioEmbeddedXcxApply
record
=
new
StudioEmbeddedXcxApply
();
record
.
setId
(
IdWorker
.
getId
());
record
.
setId
(
IdWorker
.
getId
());
record
.
setComponentAppId
(
componentAppId
);
record
.
setComponentAppId
(
componentAppId
);
record
.
setAppId
(
systemXcxAppId
);
record
.
setA
uthorizerA
ppId
(
systemXcxAppId
);
record
.
setA
uthorizerAppId
(
authorizerA
ppId
);
record
.
setA
ppId
(
a
ppId
);
record
.
setStudioId
(
studioId
);
record
.
setStudioId
(
studioId
);
record
.
setState
(
EmbededXcxEnum
.
INIT
.
getCode
());
record
.
setState
(
EmbededXcxEnum
.
INIT
.
getCode
());
record
.
setCreateTime
(
new
Date
());
record
.
setCreateTime
(
new
Date
());
...
...
service/src/main/java/com/jiejing/fitness/finance/service/merchant/impl/StudioMerchantServiceImpl.java
View file @
84970b15
...
@@ -257,10 +257,10 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
...
@@ -257,10 +257,10 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
}
}
@Override
@Override
public
StudioEmbeddedXcxVO
getEmbeddedXcx
(
Long
studioId
,
String
a
uthorizerA
ppId
)
{
public
StudioEmbeddedXcxVO
getEmbeddedXcx
(
Long
studioId
,
String
appId
)
{
String
systemAppId
=
this
.
listSystemXcxAppIds
().
stream
().
findFirst
().
orElse
(
null
);
String
systemAppId
=
this
.
listSystemXcxAppIds
().
stream
().
findFirst
().
orElse
(
null
);
StudioEmbeddedXcxApply
embeddedXcx
=
studioEmbeddedXcxApplyRpService
.
getByStudioIdAndA
uthorizerA
ppId
(
StudioEmbeddedXcxApply
embeddedXcx
=
studioEmbeddedXcxApplyRpService
.
getByStudioIdAndAppId
(
studioId
,
wxComponentAppId
,
systemAppId
,
a
uthorizerA
ppId
);
studioId
,
wxComponentAppId
,
systemAppId
,
appId
);
if
(
null
==
embeddedXcx
)
{
if
(
null
==
embeddedXcx
)
{
return
null
;
return
null
;
}
}
...
@@ -269,8 +269,8 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
...
@@ -269,8 +269,8 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
@Async
(
"financeThreadPool"
)
@Async
(
"financeThreadPool"
)
@Override
@Override
public
void
bindEmbeddedXcx
(
Long
studioId
,
List
<
String
>
a
uthorizerA
ppIds
)
{
public
void
bindEmbeddedXcx
(
Long
studioId
,
List
<
String
>
appIds
)
{
if
(
CollectionUtil
.
isEmpty
(
a
uthorizerA
ppIds
))
{
if
(
CollectionUtil
.
isEmpty
(
appIds
))
{
return
;
return
;
}
}
String
systemXcxAppId
=
this
.
listSystemXcxAppIds
().
stream
().
findFirst
().
orElse
(
null
);
String
systemXcxAppId
=
this
.
listSystemXcxAppIds
().
stream
().
findFirst
().
orElse
(
null
);
...
@@ -278,9 +278,9 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
...
@@ -278,9 +278,9 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
return
;
return
;
}
}
Map
<
String
,
StudioEmbeddedXcxApply
>
existMap
=
studioEmbeddedXcxApplyRpService
.
mapByStudioIdAndA
uthorizerA
ppId
(
Map
<
String
,
StudioEmbeddedXcxApply
>
existMap
=
studioEmbeddedXcxApplyRpService
.
mapByStudioIdAndAppId
(
studioId
,
wxComponentAppId
,
systemXcxAppId
,
a
uthorizerA
ppIds
);
studioId
,
wxComponentAppId
,
systemXcxAppId
,
appIds
);
a
uthorizerA
ppIds
.
stream
()
appIds
.
stream
()
.
filter
(
appId
->
null
==
existMap
.
get
(
appId
)
||
EmbededXcxEnum
.
isFail
(
existMap
.
get
(
appId
).
getState
()))
.
filter
(
appId
->
null
==
existMap
.
get
(
appId
)
||
EmbededXcxEnum
.
isFail
(
existMap
.
get
(
appId
).
getState
()))
.
forEach
(
appId
->
{
.
forEach
(
appId
->
{
log
.
info
(
"bind embedded xcx {}, {}"
,
studioId
,
appId
);
log
.
info
(
"bind embedded xcx {}, {}"
,
studioId
,
appId
);
...
@@ -321,7 +321,7 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
...
@@ -321,7 +321,7 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
return
;
return
;
}
}
List
<
StudioEmbeddedXcxApply
>
applies
=
studioEmbeddedXcxApplyRpService
.
listByA
uthorizerA
ppIds
(
List
<
StudioEmbeddedXcxApply
>
applies
=
studioEmbeddedXcxApplyRpService
.
listByAppIds
(
wxComponentAppId
,
systemAppId
,
list
.
stream
().
map
(
AuthXcxInfo:
:
getAppId
).
collect
(
Collectors
.
toList
()));
wxComponentAppId
,
systemAppId
,
list
.
stream
().
map
(
AuthXcxInfo:
:
getAppId
).
collect
(
Collectors
.
toList
()));
if
(
CollectionUtil
.
isEmpty
(
applies
))
{
if
(
CollectionUtil
.
isEmpty
(
applies
))
{
return
;
return
;
...
...
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