添加程序软件信息接口

This commit is contained in:
xy
2024-09-19 13:52:06 +08:00
parent 72807b6d13
commit 46a9922313
6 changed files with 168 additions and 3 deletions

View File

@@ -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;
/**
* <p>
* 系统软件表 前端控制器
* </p>
*
* @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<CsSoftInfoPO> findSoftInfo(@RequestParam String id){
String methodDescribe = getMethodDescribe("findSoftInfo");
CsSoftInfoPO po = csSoftInfoMapper.selectById(id);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
}
}