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
c6c26678
Commit
c6c26678
authored
Aug 14, 2024
by
程裕兵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:listBoundEmbeddedXcx
parent
62815b70
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
1 deletions
+40
-1
service/src/main/java/com/jiejing/fitness/finance/service/merchant/convert/StudioEmbeddedXcxConvert.java
+8
-0
service/src/main/java/com/jiejing/fitness/finance/service/merchant/impl/StudioMerchantServiceImpl.java
+32
-1
No files found.
service/src/main/java/com/jiejing/fitness/finance/service/merchant/convert/StudioEmbeddedXcxConvert.java
View file @
c6c26678
...
@@ -83,4 +83,12 @@ public class StudioEmbeddedXcxConvert {
...
@@ -83,4 +83,12 @@ public class StudioEmbeddedXcxConvert {
toInit
.
setUpdateTime
(
new
Date
());
toInit
.
setUpdateTime
(
new
Date
());
return
toInit
;
return
toInit
;
}
}
public
static
StudioEmbeddedXcxApply
toFail
(
Long
id
,
EmbededXcxEnum
state
)
{
StudioEmbeddedXcxApply
toInit
=
new
StudioEmbeddedXcxApply
();
toInit
.
setId
(
id
);
toInit
.
setState
(
state
.
getCode
());
toInit
.
setUpdateTime
(
new
Date
());
return
toInit
;
}
}
}
service/src/main/java/com/jiejing/fitness/finance/service/merchant/impl/StudioMerchantServiceImpl.java
View file @
c6c26678
...
@@ -300,7 +300,9 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
...
@@ -300,7 +300,9 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
"申请半屏小程序"
);
"申请半屏小程序"
);
Integer
code
=
result
.
getInteger
(
"errcode"
);
Integer
code
=
result
.
getInteger
(
"errcode"
);
String
message
=
result
.
getString
(
"errmsg"
);
String
message
=
result
.
getString
(
"errmsg"
);
if
(!
WX_SUCCESS_CODE
.
equals
(
code
))
{
if
(
WX_SUCCESS_CODE
.
equals
(
code
))
{
this
.
doComplete
(
entity
.
getId
(),
appId
);
}
else
{
studioEmbeddedXcxApplyRpService
.
updateById
(
studioEmbeddedXcxApplyRpService
.
updateById
(
StudioEmbeddedXcxConvert
.
toRefuse
(
entity
.
getId
(),
message
));
StudioEmbeddedXcxConvert
.
toRefuse
(
entity
.
getId
(),
message
));
}
}
...
@@ -314,6 +316,35 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
...
@@ -314,6 +316,35 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
});
});
}
}
private
void
doComplete
(
Long
id
,
String
appId
)
{
HalfScreenXcxAuthVO
vo
=
weXcxService
.
listBoundEmbeddedXcx
(
wxComponentAppId
,
appId
,
0
,
100
);
if
(
null
==
vo
)
{
return
;
}
if
(
CollectionUtil
.
isEmpty
(
vo
.
getWxaEmbeddedList
()))
{
return
;
}
AuthXcxInfo
info
=
vo
.
getWxaEmbeddedList
().
stream
().
filter
(
e
->
e
.
getAppId
().
equals
(
embeddedAppId
))
.
findFirst
().
orElse
(
null
);
if
(
null
==
info
)
{
return
;
}
EmbededXcxEnum
state
=
EmbededXcxEnum
.
getByWxCode
(
Integer
.
parseInt
(
info
.
getStatus
()));
switch
(
state
)
{
case
SUCCESS:
studioEmbeddedXcxApplyRpService
.
updateById
(
StudioEmbeddedXcxConvert
.
toSuccess
(
id
));
break
;
case
REFUSE:
case
TIMEOUT:
case
REVOKE:
case
CANCEL:
studioEmbeddedXcxApplyRpService
.
updateById
(
StudioEmbeddedXcxConvert
.
toFail
(
id
,
state
));
break
;
default
:
break
;
}
}
@Override
@Override
public
void
syncEmbeddedXcx
()
{
public
void
syncEmbeddedXcx
()
{
List
<
AuthXcxInfo
>
list
=
this
.
listBoundAppIds
();
List
<
AuthXcxInfo
>
list
=
this
.
listBoundAppIds
();
...
...
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