Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
b9999c78
Commit
b9999c78
authored
May 15, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取jsticket
parent
7a92b51a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
+17
-4
ch-core/src/main/java/com/wwdz/ch/core/api/OfficialAccountApi.java
...rc/main/java/com/wwdz/ch/core/api/OfficialAccountApi.java
+1
-0
ch-core/src/main/java/com/wwdz/ch/core/api/WxAppletApi.java
ch-core/src/main/java/com/wwdz/ch/core/api/WxAppletApi.java
+15
-3
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/DistributionOrderServiceImpl.java
...ch/wx/impl/distribution/DistributionOrderServiceImpl.java
+1
-1
No files found.
ch-core/src/main/java/com/wwdz/ch/core/api/OfficialAccountApi.java
View file @
b9999c78
...
@@ -193,6 +193,7 @@ public class OfficialAccountApi {
...
@@ -193,6 +193,7 @@ public class OfficialAccountApi {
OkHttpUtil
okHttpUtil
=
OkHttpUtil
.
builder
().
url
(
url
);
OkHttpUtil
okHttpUtil
=
OkHttpUtil
.
builder
().
url
(
url
);
okHttpUtil
.
get
();
okHttpUtil
.
get
();
String
responseStr
=
okHttpUtil
.
async
();
String
responseStr
=
okHttpUtil
.
async
();
logger
.
info
(
"获取JsapiTicket接口返回原文 :{}"
,
responseStr
);
if
(!
responseStr
.
contains
(
"ticket"
))
{
if
(!
responseStr
.
contains
(
"ticket"
))
{
String
errorCode
=
JsonUtils
.
getValueByPath
(
responseStr
,
"errcode"
);
String
errorCode
=
JsonUtils
.
getValueByPath
(
responseStr
,
"errcode"
);
String
errmsg
=
JsonUtils
.
getValueByPath
(
responseStr
,
"errmsg"
);
String
errmsg
=
JsonUtils
.
getValueByPath
(
responseStr
,
"errmsg"
);
...
...
ch-core/src/main/java/com/wwdz/ch/core/api/WxAppletApi.java
View file @
b9999c78
...
@@ -40,7 +40,19 @@ public class WxAppletApi {
...
@@ -40,7 +40,19 @@ public class WxAppletApi {
//获取用户访问小程序数据日趋势
//获取用户访问小程序数据日趋势
private
static
final
String
GET_ACCESS_DATA_URL
=
"https://api.weixin.qq.com/datacube/getweanalysisappiddailyvisittrend?access_token=%s"
;
private
static
final
String
GET_ACCESS_DAY_URL
=
"https://api.weixin.qq.com/datacube/getweanalysisappiddailyvisittrend?access_token=%s"
;
private
static
final
String
GET_ACCESS_WEEK_URL
=
"https://api.weixin.qq.com/datacube/getweanalysisappidweeklyvisittrend?access_token=%s"
;
private
static
final
String
GET_ACCESS_MONTH_URL
=
"https://api.weixin.qq.com/datacube/getweanalysisappidmonthlyvisittrend?access_token=%s"
;
static
Map
<
String
,
String
>
ACCESS_URL_MAP
=
new
HashMap
<>();
static
{
ACCESS_URL_MAP
.
put
(
"day"
,
GET_ACCESS_DAY_URL
);
ACCESS_URL_MAP
.
put
(
"week"
,
GET_ACCESS_WEEK_URL
);
ACCESS_URL_MAP
.
put
(
"month"
,
GET_ACCESS_MONTH_URL
);
}
public
String
checkMedia
(
WxCheckMediaRequestDto
dto
)
{
public
String
checkMedia
(
WxCheckMediaRequestDto
dto
)
{
String
accessToken
=
wxLoginManager
.
getAccessToken
();
String
accessToken
=
wxLoginManager
.
getAccessToken
();
...
@@ -96,10 +108,10 @@ public class WxAppletApi {
...
@@ -96,10 +108,10 @@ public class WxAppletApi {
* @param type
* @param type
* @return
* @return
*/
*/
public
Result
getAccessData
(
String
startTime
,
String
endTime
,
int
type
)
{
public
Result
getAccessData
(
String
startTime
,
String
endTime
,
String
key
)
{
try
{
try
{
String
accessToken
=
wxLoginManager
.
getAccessToken
();
String
accessToken
=
wxLoginManager
.
getAccessToken
();
String
url
=
String
.
format
(
GET_ACCESS_DATA_URL
,
accessToken
);
String
url
=
String
.
format
(
ACCESS_URL_MAP
.
get
(
key
)
,
accessToken
);
OkHttpUtil
okHttpUtil
=
OkHttpUtil
.
builder
().
url
(
url
);
OkHttpUtil
okHttpUtil
=
OkHttpUtil
.
builder
().
url
(
url
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"begin_date"
,
startTime
);
map
.
put
(
"begin_date"
,
startTime
);
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/DistributionOrderServiceImpl.java
View file @
b9999c78
...
@@ -562,7 +562,7 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
...
@@ -562,7 +562,7 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
DistributionOrder
distributionOrder
=
new
DistributionOrder
();
DistributionOrder
distributionOrder
=
new
DistributionOrder
();
distributionOrder
.
setItemId
(
itemId
);
distributionOrder
.
setItemId
(
itemId
);
distributionOrder
.
setItemNum
(
1
);
distributionOrder
.
setItemNum
(
1
);
distributionOrder
.
setShareRecordId
(
"DA"
+
CommConsts
.
SYSTEM_ACCOUNT
);
distributionOrder
.
setShareRecordId
(
CommConsts
.
DEFAULT_SHARE_ID
);
distributionOrder
.
setDistributionOrderId
(
distributionOrderId
);
distributionOrder
.
setDistributionOrderId
(
distributionOrderId
);
distributionOrder
.
setPrepayId
(
prepayId
);
distributionOrder
.
setPrepayId
(
prepayId
);
distributionOrder
.
setBuyerId
(
dto
.
getBuyerId
());
distributionOrder
.
setBuyerId
(
dto
.
getBuyerId
());
...
...
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