Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhouYixun committed Mar 19, 2022
1 parent 49dbcf5 commit 08908ae
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 26 deletions.
14 changes: 7 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3'
services:
sonic-server-eureka:
image: "sonicorg/sonic-server-eureka:v1.3.1-release"
image: "sonicorg/sonic-server-eureka:v1.3.2-beta"
hostname: sonic-server-eureka
environment:
- EUREKA_HOST=sonic-server-eureka
Expand All @@ -12,7 +12,7 @@ services:
ports:
- "9090:9090"
sonic-server-bus:
image: "sonicorg/sonic-server-bus:v1.3.1-release"
image: "sonicorg/sonic-server-bus:v1.3.2-beta"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
Expand All @@ -24,7 +24,7 @@ services:
depends_on:
- sonic-server-eureka
sonic-server-gateway:
image: "sonicorg/sonic-server-gateway:v1.3.1-release"
image: "sonicorg/sonic-server-gateway:v1.3.2-beta"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
Expand All @@ -38,7 +38,7 @@ services:
ports:
- "8094:8094"
sonic-server-controller:
image: "sonicorg/sonic-server-controller:v1.3.1-release"
image: "sonicorg/sonic-server-controller:v1.3.2-beta"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
Expand All @@ -51,7 +51,7 @@ services:
- sonic-server-eureka
- sonic-server-gateway
sonic-server-folder:
image: "sonicorg/sonic-server-folder:v1.3.1-release"
image: "sonicorg/sonic-server-folder:v1.3.2-beta"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
Expand All @@ -68,7 +68,7 @@ services:
- sonic-server-eureka
- sonic-server-gateway
sonic-server-task:
image: "sonicorg/sonic-server-task:v1.3.1-release"
image: "sonicorg/sonic-server-task:v1.3.2-beta"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
Expand All @@ -81,7 +81,7 @@ services:
- sonic-server-eureka
- sonic-server-gateway
sonic-server-transport:
image: "sonicorg/sonic-server-transport:v1.3.1-release"
image: "sonicorg/sonic-server-transport:v1.3.2-beta"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
Expand Down
14 changes: 7 additions & 7 deletions docker-swarm.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3'
services:
sonic-server-eureka:
image: "sonicorg/sonic-server-eureka:v1.3.1-release"
image: "sonicorg/sonic-server-eureka:v1.3.2-beta"
hostname: sonic-server-eureka
environment:
- EUREKA_HOST=sonic-server-eureka # You should checkout sonic-server-eureka env to support more.
Expand All @@ -24,7 +24,7 @@ services:
delay: 20s
max_attempts: 6
sonic-server-bus:
image: "sonicorg/sonic-server-bus:v1.3.1-release"
image: "sonicorg/sonic-server-bus:v1.3.2-beta"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
Expand All @@ -48,7 +48,7 @@ services:
delay: 20s
max_attempts: 6
sonic-server-gateway:
image: "sonicorg/sonic-server-gateway:v1.3.1-release"
image: "sonicorg/sonic-server-gateway:v1.3.2-beta"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
Expand All @@ -74,7 +74,7 @@ services:
delay: 20s
max_attempts: 6
sonic-server-controller:
image: "sonicorg/sonic-server-controller:v1.3.1-release"
image: "sonicorg/sonic-server-controller:v1.3.2-beta"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
Expand All @@ -99,7 +99,7 @@ services:
delay: 20s
max_attempts: 6
sonic-server-folder:
image: "sonicorg/sonic-server-folder:v1.3.1-release"
image: "sonicorg/sonic-server-folder:v1.3.2-beta"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
Expand Down Expand Up @@ -128,7 +128,7 @@ services:
delay: 20s
max_attempts: 6
sonic-server-task:
image: "sonicorg/sonic-server-task:v1.3.1-release"
image: "sonicorg/sonic-server-task:v1.3.2-beta"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
Expand All @@ -153,7 +153,7 @@ services:
delay: 20s
max_attempts: 6
sonic-server-transport:
image: "sonicorg/sonic-server-transport:v1.3.1-release"
image: "sonicorg/sonic-server-transport:v1.3.2-beta"
environment:
- PROFILE=prod
- EUREKA_URL=http://sonic:sonic@sonic-server-eureka:9090/eureka/
Expand Down
2 changes: 1 addition & 1 deletion sonic-server-bus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>sonic-server-bus</artifactId>
<version>1.3.1-release</version>
<version>1.3.2-beta</version>
<packaging>jar</packaging>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion sonic-server-controller/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>sonic-server-controller</artifactId>
<version>1.3.1-release</version>
<version>1.3.2-beta</version>
<packaging>jar</packaging>

<!-- 依赖列表 -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,13 @@
@Service
public class DevicesServiceImpl extends SonicServiceImpl<DevicesMapper, Devices> implements DevicesService {

@Autowired private DevicesMapper devicesMapper;
@Autowired
private DevicesMapper devicesMapper;

@Autowired private UsersService usersService;
@Autowired private TestSuitesDevicesMapper testSuitesDevicesMapper;
@Autowired
private UsersService usersService;
@Autowired
private TestSuitesDevicesMapper testSuitesDevicesMapper;

@Override
public boolean saveDetail(DeviceDetailChange deviceDetailChange) {
Expand Down Expand Up @@ -148,6 +151,7 @@ public void deviceStatus(JSONObject jsonMsg) {
}
if (jsonMsg.getString("model") != null) {
newDevices.setName(jsonMsg.getString("model"));
newDevices.setChiName(getName(jsonMsg.getString("model")));
}
newDevices.setNickName("");
newDevices.setUser("");
Expand All @@ -172,6 +176,7 @@ public void deviceStatus(JSONObject jsonMsg) {
if (jsonMsg.getString("model") != null) {
if (!jsonMsg.getString("model").equals("未知")) {
devices.setModel(jsonMsg.getString("model"));
devices.setChiName(getName(jsonMsg.getString("model")));
}
}
if (jsonMsg.getString("version") != null) {
Expand All @@ -189,7 +194,9 @@ public void deviceStatus(JSONObject jsonMsg) {
if (jsonMsg.getString("manufacturer") != null) {
devices.setManufacturer(jsonMsg.getString("manufacturer"));
}
devices.setStatus(jsonMsg.getString("status"));
if (jsonMsg.getString("status") != null) {
devices.setStatus(jsonMsg.getString("status"));
}
save(devices);
}
}
Expand Down Expand Up @@ -238,7 +245,7 @@ public void refreshDevicesTemper(JSONObject jsonObject) {
@Override
public Integer findTemper() {
return devicesMapper.findTemper(Arrays.asList(DeviceStatus.ONLINE
,DeviceStatus.DEBUGGING,DeviceStatus.TESTING));
, DeviceStatus.DEBUGGING, DeviceStatus.TESTING));
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion sonic-server-eureka/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>sonic-server-eureka</artifactId>
<version>1.3.1-release</version>
<version>1.3.2-beta</version>
<packaging>jar</packaging>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion sonic-server-folder/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>sonic-server-folder</artifactId>
<version>1.3.1-release</version>
<version>1.3.2-beta</version>
<packaging>jar</packaging>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion sonic-server-gateway/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>sonic-server-gateway</artifactId>
<version>1.3.1-release</version>
<version>1.3.2-beta</version>
<packaging>jar</packaging>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion sonic-server-task/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>sonic-server-task</artifactId>
<version>1.3.1-release</version>
<version>1.3.2-beta</version>
<packaging>jar</packaging>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion sonic-server-transport/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>sonic-server-transport</artifactId>
<version>1.3.1-release</version>
<version>1.3.2-beta</version>
<packaging>jar</packaging>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,21 @@ public RespModel reboot(@RequestParam(name = "id") int id) {
}
}

@WebAspect
@GetMapping("/stop")
public RespModel<String> stop(@RequestParam(name = "id") int id) {
RespModel agent = controllerFeignClient.findAgentById(id);
if (agent.getCode() == 2000) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("msg", "stop");
LinkedHashMap a = (LinkedHashMap) agent.getData();
NettyServer.getMap().get(a.get("id")).writeAndFlush(jsonObject.toJSONString());
return new RespModel<>(2000, "发送成功!");
} else {
return agent;
}
}

@WebAspect
@PostMapping("/sendTestData")
public RespModel sendTestData(@RequestBody JSONObject jsonObject) {
Expand Down

0 comments on commit 08908ae

Please sign in to comment.