From 46a992231372185ff9b029d09f6d076d6e69a75d Mon Sep 17 00:00:00 2001 From: xy <748613696@qq.com> Date: Thu, 19 Sep 2024 13:52:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=A8=8B=E5=BA=8F=E8=BD=AF?= =?UTF-8?q?=E4=BB=B6=E4=BF=A1=E6=81=AF=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../njcn/csdevice/pojo/po/CsSoftInfoPO.java | 61 +++++++++++++++++++ .../equipment/CsSoftInfoController.java | 52 ++++++++++++++++ .../csdevice/mapper/CsSoftInfoMapper.java | 16 +++++ .../csdevice/service/ICsSoftInfoService.java | 16 +++++ .../impl/CsEquipmentDeliveryServiceImpl.java | 6 +- .../service/impl/CsSoftInfoServiceImpl.java | 20 ++++++ 6 files changed, 168 insertions(+), 3 deletions(-) create mode 100644 cs-device/cs-device-api/src/main/java/com/njcn/csdevice/pojo/po/CsSoftInfoPO.java create mode 100644 cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/controller/equipment/CsSoftInfoController.java create mode 100644 cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/mapper/CsSoftInfoMapper.java create mode 100644 cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/service/ICsSoftInfoService.java create mode 100644 cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/service/impl/CsSoftInfoServiceImpl.java diff --git a/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/pojo/po/CsSoftInfoPO.java b/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/pojo/po/CsSoftInfoPO.java new file mode 100644 index 0000000..0774035 --- /dev/null +++ b/cs-device/cs-device-api/src/main/java/com/njcn/csdevice/pojo/po/CsSoftInfoPO.java @@ -0,0 +1,61 @@ +package com.njcn.csdevice.pojo.po; + +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + *

+ * 系统软件表 + *

+ * + * @author xuyang + * @since 2023-05-17 + */ +@Data +@TableName("cs_soft_info") +public class CsSoftInfoPO implements Serializable { + + private static final long serialVersionUID = 1L; + + private String id; + + /** + * 读写操作属性:“r” + */ + private String opAttr; + + /** + * 操作系统名称,裸机系统填Null + */ + private String osName; + + /** + * 操作系统版本,裸机系统填Null + */ + private String osVersion; + + /** + * 应用程序版本号 + */ + private String appVersion; + + /** + * 应用程序发布日期 + */ + private LocalDateTime appDate; + + /** + * 应用程序校验码 + */ + private String appCheck; + + /** + * 是否支持远程升级程序 + */ + private String softUpdate; + + +} diff --git a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/controller/equipment/CsSoftInfoController.java b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/controller/equipment/CsSoftInfoController.java new file mode 100644 index 0000000..47d8054 --- /dev/null +++ b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/controller/equipment/CsSoftInfoController.java @@ -0,0 +1,52 @@ +package com.njcn.csdevice.controller.equipment; + + +import com.njcn.access.pojo.po.CsSoftInfoPO; +import com.njcn.common.pojo.annotation.OperateInfo; +import com.njcn.common.pojo.enums.common.LogEnum; +import com.njcn.common.pojo.enums.response.CommonResponseEnum; +import com.njcn.common.pojo.response.HttpResult; +import com.njcn.common.utils.HttpResultUtil; +import com.njcn.csdevice.mapper.CsSoftInfoMapper; +import com.njcn.web.controller.BaseController; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 系统软件表 前端控制器 + *

+ * + * @author xuyang + * @since 2023-08-09 + */ +@Slf4j +@RestController +@RequestMapping("/csSoftInfo") +@Api(tags = "装置程序信息") +@AllArgsConstructor +@Validated +public class CsSoftInfoController extends BaseController { + + private final CsSoftInfoMapper csSoftInfoMapper; + + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @PostMapping("/findSoftInfo") + @ApiOperation("获取程序软件信息") + @ApiImplicitParam(name = "id", value = "id", required = true) + public HttpResult findSoftInfo(@RequestParam String id){ + String methodDescribe = getMethodDescribe("findSoftInfo"); + CsSoftInfoPO po = csSoftInfoMapper.selectById(id); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe); + } + +} + diff --git a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/mapper/CsSoftInfoMapper.java b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/mapper/CsSoftInfoMapper.java new file mode 100644 index 0000000..647013b --- /dev/null +++ b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/mapper/CsSoftInfoMapper.java @@ -0,0 +1,16 @@ +package com.njcn.csdevice.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.njcn.access.pojo.po.CsSoftInfoPO; + +/** + *

+ * 系统软件表 Mapper 接口 + *

+ * + * @author xuyang + * @since 2023-08-09 + */ +public interface CsSoftInfoMapper extends BaseMapper { + +} diff --git a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/service/ICsSoftInfoService.java b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/service/ICsSoftInfoService.java new file mode 100644 index 0000000..f4e57c2 --- /dev/null +++ b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/service/ICsSoftInfoService.java @@ -0,0 +1,16 @@ +package com.njcn.csdevice.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.njcn.access.pojo.po.CsSoftInfoPO; + +/** + *

+ * 系统软件表 服务类 + *

+ * + * @author xuyang + * @since 2023-08-09 + */ +public interface ICsSoftInfoService extends IService { + +} diff --git a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/service/impl/CsEquipmentDeliveryServiceImpl.java b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/service/impl/CsEquipmentDeliveryServiceImpl.java index 43fbf5e..622b0ad 100644 --- a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/service/impl/CsEquipmentDeliveryServiceImpl.java +++ b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/service/impl/CsEquipmentDeliveryServiceImpl.java @@ -18,12 +18,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.njcn.access.api.AskDeviceDataFeignClient; -import com.njcn.access.api.CsSoftInfoFeignClient; import com.njcn.access.pojo.po.CsSoftInfoPO; import com.njcn.common.pojo.exception.BusinessException; import com.njcn.csdevice.constant.DataParam; import com.njcn.csdevice.enums.AlgorithmResponseEnum; import com.njcn.csdevice.mapper.CsEquipmentDeliveryMapper; +import com.njcn.csdevice.mapper.CsSoftInfoMapper; import com.njcn.csdevice.pojo.param.*; import com.njcn.csdevice.pojo.po.*; import com.njcn.csdevice.pojo.vo.CsEquipmentDeliveryVO; @@ -89,7 +89,7 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl + * 系统软件表 服务实现类 + *

+ * + * @author xuyang + * @since 2023-08-09 + */ +@Service +public class CsSoftInfoServiceImpl extends ServiceImpl implements ICsSoftInfoService { + +}