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
6be0e033
Commit
6be0e033
authored
Aug 14, 2024
by
程裕兵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:添加半屏小程序
parent
222c702d
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
15 deletions
+26
-15
app/src/main/resources/application-canary.yml
+3
-0
app/src/main/resources/application-dev.yml
+3
-0
app/src/main/resources/application-local.yml
+2
-0
app/src/main/resources/application-prod.yml
+3
-0
app/src/main/resources/application-rc.yml
+3
-0
service/src/main/java/com/jiejing/fitness/finance/service/merchant/impl/StudioMerchantServiceImpl.java
+12
-15
No files found.
app/src/main/resources/application-canary.yml
View file @
6be0e033
...
...
@@ -27,3 +27,5 @@ finance:
wx
:
component
:
appId
:
wxe6c4979bafd48126
authorizer
:
appId
:
wx06a084dcba4f0a05
\ No newline at end of file
app/src/main/resources/application-dev.yml
View file @
6be0e033
...
...
@@ -27,3 +27,5 @@ finance:
wx
:
component
:
appId
:
wxda913f3b6f1439b4
authorizer
:
appId
:
wxf187be22c2234300
\ No newline at end of file
app/src/main/resources/application-local.yml
View file @
6be0e033
...
...
@@ -32,3 +32,5 @@ finance:
wx
:
component
:
appId
:
wxda913f3b6f1439b4
authorizer
:
appId
:
wxf187be22c2234300
app/src/main/resources/application-prod.yml
View file @
6be0e033
...
...
@@ -27,3 +27,5 @@ finance:
wx
:
component
:
appId
:
wxe6c4979bafd48126
authorizer
:
appId
:
wx06a084dcba4f0a05
\ No newline at end of file
app/src/main/resources/application-rc.yml
View file @
6be0e033
...
...
@@ -27,3 +27,5 @@ finance:
wx
:
component
:
appId
:
wxfe4c26daa7e85d14
authorizer
:
appId
:
wxf187be22c2234300
\ No newline at end of file
service/src/main/java/com/jiejing/fitness/finance/service/merchant/impl/StudioMerchantServiceImpl.java
View file @
6be0e033
...
...
@@ -131,6 +131,9 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
@Value
(
"${wx.component.appId}"
)
private
String
wxComponentAppId
;
@Value
(
"${wx.authorizer.appId}"
)
private
String
authorizerAppId
;
private
static
final
Integer
WX_SUCCESS_CODE
=
0
;
private
final
static
List
<
String
>
SPECIAL_FAIL_LIST
=
Lists
.
newArrayList
(
...
...
@@ -258,9 +261,8 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
@Override
public
StudioEmbeddedXcxVO
getEmbeddedXcx
(
Long
studioId
,
String
appId
)
{
String
systemAppId
=
this
.
listSystemXcxAppIds
().
stream
().
findFirst
().
orElse
(
null
);
StudioEmbeddedXcxApply
embeddedXcx
=
studioEmbeddedXcxApplyRpService
.
getByStudioIdAndAppId
(
studioId
,
wxComponentAppId
,
system
AppId
,
appId
);
studioId
,
wxComponentAppId
,
authorizer
AppId
,
appId
);
if
(
null
==
embeddedXcx
)
{
return
null
;
}
...
...
@@ -273,13 +275,9 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
if
(
CollectionUtil
.
isEmpty
(
appIds
))
{
return
;
}
String
systemXcxAppId
=
this
.
listSystemXcxAppIds
().
stream
().
findFirst
().
orElse
(
null
);
if
(
StringUtil
.
isBlank
(
systemXcxAppId
))
{
return
;
}
Map
<
String
,
StudioEmbeddedXcxApply
>
existMap
=
studioEmbeddedXcxApplyRpService
.
mapByStudioIdAndAppId
(
studioId
,
wxComponentAppId
,
systemXcx
AppId
,
appIds
);
studioId
,
wxComponentAppId
,
authorizer
AppId
,
appIds
);
appIds
.
stream
()
.
filter
(
appId
->
null
==
existMap
.
get
(
appId
)
||
EmbededXcxEnum
.
isFail
(
existMap
.
get
(
appId
).
getState
()))
.
forEach
(
appId
->
{
...
...
@@ -287,13 +285,13 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
StudioEmbeddedXcxApply
entity
=
existMap
.
get
(
appId
);
if
(
null
==
entity
)
{
entity
=
StudioEmbeddedXcxConvert
.
toEntity
(
studioId
,
wxComponentAppId
,
systemXcx
AppId
,
appId
);
entity
=
StudioEmbeddedXcxConvert
.
toEntity
(
studioId
,
wxComponentAppId
,
authorizer
AppId
,
appId
);
studioEmbeddedXcxApplyRpService
.
insert
(
entity
);
}
else
{
studioEmbeddedXcxApplyRpService
.
updateById
(
StudioEmbeddedXcxConvert
.
toInit
(
entity
));
}
try
{
JSONObject
result
=
weXcxService
.
addEmbeddedXcx
(
wxComponentAppId
,
systemXcx
AppId
,
appId
,
JSONObject
result
=
weXcxService
.
addEmbeddedXcx
(
wxComponentAppId
,
authorizer
AppId
,
appId
,
"申请半屏小程序"
);
Integer
code
=
result
.
getInteger
(
"errcode"
);
String
message
=
result
.
getString
(
"errmsg"
);
...
...
@@ -315,14 +313,13 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
@Override
public
void
syncEmbeddedXcx
()
{
String
systemAppId
=
this
.
listSystemXcxAppIds
().
stream
().
findFirst
().
orElse
(
null
);
List
<
AuthXcxInfo
>
list
=
this
.
listBoundAppIds
(
systemAppId
);
List
<
AuthXcxInfo
>
list
=
this
.
listBoundAppIds
();
if
(
CollectionUtil
.
isEmpty
(
list
))
{
return
;
}
List
<
StudioEmbeddedXcxApply
>
applies
=
studioEmbeddedXcxApplyRpService
.
listByAppIds
(
wxComponentAppId
,
system
AppId
,
list
.
stream
().
map
(
AuthXcxInfo:
:
getAppId
).
collect
(
Collectors
.
toList
()));
List
<
StudioEmbeddedXcxApply
>
applies
=
studioEmbeddedXcxApplyRpService
.
listByAppIds
(
wxComponentAppId
,
authorizer
AppId
,
list
.
stream
().
map
(
AuthXcxInfo:
:
getAppId
).
collect
(
Collectors
.
toList
()));
if
(
CollectionUtil
.
isEmpty
(
applies
))
{
return
;
}
...
...
@@ -362,13 +359,13 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
});
}
private
List
<
AuthXcxInfo
>
listBoundAppIds
(
String
systemAppId
)
{
private
List
<
AuthXcxInfo
>
listBoundAppIds
()
{
List
<
AuthXcxInfo
>
result
=
new
ArrayList
<>();
int
num
=
100
;
for
(
int
start
=
0
;
start
<
10
;
start
++)
{
HalfScreenXcxAuthVO
vo
=
weXcxService
.
listEmbeddedXcx
(
wxComponentAppId
,
system
AppId
,
start
,
num
);
HalfScreenXcxAuthVO
vo
=
weXcxService
.
listEmbeddedXcx
(
wxComponentAppId
,
authorizer
AppId
,
start
,
num
);
if
(
CollectionUtil
.
isEmpty
(
vo
.
getWxaEmbeddedList
()))
{
break
;
}
...
...
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