|
@@ -36,7 +36,6 @@ import com.xy.utils.enums.DeviceNetSateType;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.AllArgsConstructor;
|
|
-import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
@@ -222,7 +221,6 @@ public class MercMiniDeviceController {
|
|
|
|
|
|
@PostMapping("active")
|
|
@PostMapping("active")
|
|
@ApiOperation("激活设备")
|
|
@ApiOperation("激活设备")
|
|
- @Transactional(rollbackFor = Exception.class)
|
|
|
|
public R active(@RequestBody MercMiniDeviceDto.Active active) {
|
|
public R active(@RequestBody MercMiniDeviceDto.Active active) {
|
|
DeviceInfo deviceInfo = deviceInfoService.getById(active.getDeviceId());
|
|
DeviceInfo deviceInfo = deviceInfoService.getById(active.getDeviceId());
|
|
int factory = deviceInfo.getDeviceType() == EnumDeviceType.N_5.getIntCode() ? 2 : 1;
|
|
int factory = deviceInfo.getDeviceType() == EnumDeviceType.N_5.getIntCode() ? 2 : 1;
|