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
a211073a
Commit
a211073a
authored
Jun 05, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上新通知测试环境不执行
parent
f15e607c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
ch-wx-api/src/main/java/com/wwdz/ch/wx/api/LogisticsApi.java
ch-wx-api/src/main/java/com/wwdz/ch/wx/api/LogisticsApi.java
+0
-2
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SelfPageServiceImpl.java
...com/wwdz/ch/wx/impl/distribution/SelfPageServiceImpl.java
+0
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/job/NewItemNoticeJob.java
...pi/src/main/java/com/wwdz/ch/wx/job/NewItemNoticeJob.java
+10
-1
No files found.
ch-wx-api/src/main/java/com/wwdz/ch/wx/api/LogisticsApi.java
View file @
a211073a
...
...
@@ -7,13 +7,11 @@ import com.wwdz.ch.core.entity.LogisticsRequestDto;
import
com.wwdz.ch.core.entity.TrailInfo
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.util.Base64
;
import
com.wwdz.ch.core.util.OkHttpUtil
;
import
com.xxdxxs.utils.JsonUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
java.io.*
;
import
java.net.HttpURLConnection
;
import
java.net.URL
;
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SelfPageServiceImpl.java
View file @
a211073a
...
...
@@ -182,7 +182,6 @@ public class SelfPageServiceImpl implements SelfPageService {
}
}
selfPageInfoVo
.
setUserOfferNum
(
num
);
return
Result
.
success
(
selfPageInfoVo
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"查询藏家个人主页失败 error : {}"
,
e
);
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/job/NewItemNoticeJob.java
View file @
a211073a
...
...
@@ -18,6 +18,7 @@ import org.redisson.api.RedissonClient;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.CollectionUtils
;
...
...
@@ -55,11 +56,19 @@ public class NewItemNoticeJob {
@Autowired
AliSmsSender
aliSmsSender
;
@Value
(
"${spring.profiles.active}"
)
private
String
env
;
/**
* 每天晚上八点执行一次
*/
//
@Scheduled(cron = "0 0 20 * * ?")
@Scheduled
(
cron
=
"0 0 20 * * ?"
)
public
void
execute
()
{
if
(
"dev"
.
equals
(
env
))
{
logger
.
info
(
">>>>>>>>>>>>>>>>>>>>>>> dev环境, 不执行发送商品上新通知定时作业<<<<<<<<<<<<<<<<<<<<<"
);
return
;
}
RLock
lock
=
redissonClient
.
getLock
(
NEW_ITEM_NOTICE_KEY
);
if
(!
lock
.
tryLock
())
{
logger
.
warn
(
"发送商品上新通知,当前服务实例获取锁成功: {} 获取锁失败,锁被占用不执行"
,
Thread
.
currentThread
().
getId
());
...
...
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