Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
device-new-platform
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
赵啸非
device-new-platform
Commits
1dd270eb
Commit
1dd270eb
authored
Jun 18, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正redis 最大连接数
parent
6a4f9e61
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
device-manager/src/main/java/com/mortals/xhx/busiz/web/TestSendMsgController.java
...java/com/mortals/xhx/busiz/web/TestSendMsgController.java
+3
-5
device-manager/src/main/java/com/mortals/xhx/common/key/Constant.java
...er/src/main/java/com/mortals/xhx/common/key/Constant.java
+1
-0
device-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/DeviceSendThirdPartyService.java
...aemon/applicationservice/DeviceSendThirdPartyService.java
+6
-5
No files found.
device-manager/src/main/java/com/mortals/xhx/busiz/web/TestSendMsgController.java
View file @
1dd270eb
...
...
@@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil;
import
cn.hutool.http.HttpUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.service.ICacheService
;
import
com.mortals.framework.service.ILogService
;
import
com.mortals.framework.service.impl.FileLogServiceImpl
;
...
...
@@ -65,17 +66,14 @@ public class TestSendMsgController {
}
@GetMapping
(
"updateDevice"
)
public
String
updateDevice
()
{
log
.
info
(
"刷新设备的产品编码"
);
ApiResp
<
DeviceResp
>
rsp
=
new
ApiResp
<>();
rsp
.
setCode
(
ApiRespCodeEnum
.
SUCCESS
.
getValue
());
public
Rest
<
Void
>
updateDevice
()
{
List
<
DeviceEntity
>
updateProductCodeList
=
deviceService
.
find
(
new
DeviceQuery
());
for
(
DeviceEntity
deviceEntity
:
updateProductCodeList
)
{
deviceService
.
update
(
deviceEntity
);
}
return
JSON
.
toJSONString
(
rsp
);
return
Rest
.
ok
(
);
}
...
...
device-manager/src/main/java/com/mortals/xhx/common/key/Constant.java
View file @
1dd270eb
...
...
@@ -45,6 +45,7 @@ public final class Constant {
public
static
final
String
DES_STR
=
"FZV1D&tr"
;
public
static
final
Integer
SERVER_PORT
=
28074
;
public
static
Integer
SEND_INTEVEL
=
1000
;
public
static
final
Integer
CLIENT_PORT
=
28073
;
/**
* 设备心跳检查时间(秒)
...
...
device-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/DeviceSendThirdPartyService.java
View file @
1dd270eb
...
...
@@ -16,6 +16,7 @@ import org.springframework.stereotype.Component;
import
org.springframework.util.ObjectUtils
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
Constant
.
PARAM_SERVER_PHP_IN_HTTP_URL
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
Constant
.
SEND_INTEVEL
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
RedisKey
.
KEY_DEVICE_THIRDPARTY_QUEUE
;
@Component
...
...
@@ -41,7 +42,7 @@ public class DeviceSendThirdPartyService implements IApplicationStartedService {
log
.
info
(
"初始化发送线程数量"
);
//启动短信发送响应更新线程
sendTaskThreadPool
.
execute
(()
->
{
int
waitTime
=
1000
;
int
waitTime
=
SEND_INTEVEL
;
while
(!
stopped
)
{
try
{
DeviceReq
deviceReq
=
cacheService
.
lpop
(
KEY_DEVICE_THIRDPARTY_QUEUE
,
DeviceReq
.
class
);
...
...
@@ -51,10 +52,10 @@ public class DeviceSendThirdPartyService implements IApplicationStartedService {
log
.
info
(
"sendThirty resp ==>{}"
,
JSON
.
toJSONString
(
resp
));
}
try
{
Thread
.
sleep
(
waitTime
);
}
catch
(
InterruptedException
e2
)
{
}
//
try {
//
Thread.sleep(waitTime);
//
} catch (InterruptedException e2) {
//
}
}
catch
(
Exception
e
)
{
log
.
error
(
"异常"
,
e
);
...
...
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