新增knife4j接口文档

cert
anthonywj 2 years ago
parent b88cdac7e6
commit ea85e762ac

@ -1,17 +1,21 @@
package com.glxp.api.common.res; package com.glxp.api.common.res;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
/** /**
* *
*
* @param <T> * @param <T>
*/ */
@Data @Data
@ApiModel(value = "返回结果类")
public class BaseResponse<T> { public class BaseResponse<T> {
@ApiModelProperty(value = "状态码 成功20000")
private Integer code; private Integer code;
@ApiModelProperty(value = "响应信息")
private String message; private String message;
@ApiModelProperty(value = "响应数据")
private T data; private T data;
} }

@ -15,7 +15,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
@EnableSwagger2WebMvc @EnableSwagger2WebMvc
public class Knife4jConfiguration { public class Knife4jConfiguration {
@Value("${knife4j.enable:false}") @Value("${knife4j.enable:true}")
private boolean enable; private boolean enable;
@Bean(value = "defaultApi2") @Bean(value = "defaultApi2")

@ -5,12 +5,14 @@ import cn.hutool.core.util.StrUtil;
import com.glxp.api.constant.Constant; import com.glxp.api.constant.Constant;
import com.glxp.api.entity.auth.AuthAdmin; import com.glxp.api.entity.auth.AuthAdmin;
import com.glxp.api.service.auth.CustomerService; import com.glxp.api.service.auth.CustomerService;
import springfox.documentation.annotations.ApiIgnore;
import javax.annotation.Resource; import javax.annotation.Resource;
/** /**
* *
*/ */
@ApiIgnore
public class BaseController { public class BaseController {
@Resource @Resource

@ -14,11 +14,13 @@ import org.springframework.web.bind.annotation.GetMapping;
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;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.validation.Valid; import javax.validation.Valid;
import java.util.List; import java.util.List;
@ApiIgnore
@RestController @RestController
public class AuthCheckController { public class AuthCheckController {

@ -26,6 +26,8 @@ import java.util.*;
/** /**
* *
*/ */
@ApiIgnore
@RestController @RestController
public class AuthUserController extends BaseController { public class AuthUserController extends BaseController {

@ -36,7 +36,7 @@ import com.glxp.api.service.system.SystemParamConfigService;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
@ApiIgnore
@RestController @RestController
public class DeptController { public class DeptController {
@ -47,7 +47,7 @@ public class DeptController {
@Resource @Resource
SystemParamConfigService systemParamConfigService; SystemParamConfigService systemParamConfigService;
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@ -276,7 +276,7 @@ public class DeptController {
return ResultVOUtils.error(500, "删除失败,一级部门不允许删除!"); return ResultVOUtils.error(500, "删除失败,一级部门不允许删除!");
} }
FilterDeptUserReqeust filterDeptUserReqeust = new FilterDeptUserReqeust(); FilterDeptUserReqeust filterDeptUserReqeust = new FilterDeptUserReqeust();
filterDeptUserReqeust.setDeptId(deptEntity.getId().longValue()); filterDeptUserReqeust.setDeptId(deptEntity.getId().longValue());
List<DeptUserEntity> deptUserEntities = deptUserService.selectDeptUser(filterDeptUserReqeust); List<DeptUserEntity> deptUserEntities = deptUserService.selectDeptUser(filterDeptUserReqeust);
@ -312,9 +312,9 @@ public class DeptController {
return ResultVOUtils.success("禁用成功!"); return ResultVOUtils.success("禁用成功!");
} }
public String isCheckStatus(Integer status, DeptEntity deptEntity) { public String isCheckStatus(Integer status, DeptEntity deptEntity) {
//启用的时候需要判断上级是不是被禁用 //启用的时候需要判断上级是不是被禁用

@ -22,7 +22,7 @@ import com.glxp.api.service.auth.DeptService;
import com.glxp.api.service.auth.DeptUserService; import com.glxp.api.service.auth.DeptUserService;
import com.glxp.api.service.auth.WarehouseUserService; import com.glxp.api.service.auth.WarehouseUserService;
@ApiIgnore
@RestController @RestController
public class DeptUserController { public class DeptUserController {
@ -32,7 +32,7 @@ public class DeptUserController {
@Resource @Resource
DeptService deptService; DeptService deptService;
@Resource @Resource
WarehouseUserService warehouseUserService; WarehouseUserService warehouseUserService;
@ -61,7 +61,7 @@ public class DeptUserController {
@PostMapping("udi/auth/dept/user/delete") @PostMapping("udi/auth/dept/user/delete")
public BaseResponse delete(@RequestBody DeptUserEntity deptUserEntity) { public BaseResponse delete(@RequestBody DeptUserEntity deptUserEntity) {
//判断此用户是否与除一级部门 还绑定其他部门 //判断此用户是否与除一级部门 还绑定其他部门
FilterDeptUserReqeust filterDeptUserReqeust = new FilterDeptUserReqeust(); FilterDeptUserReqeust filterDeptUserReqeust = new FilterDeptUserReqeust();

@ -57,6 +57,7 @@ import lombok.extern.slf4j.Slf4j;
/** /**
* *
*/ */
@ApiIgnore
@RestController @RestController
@Slf4j @Slf4j
public class LoginController extends BaseController { public class LoginController extends BaseController {
@ -209,8 +210,8 @@ public class LoginController extends BaseController {
@Resource @Resource
DeptService deptService; DeptService deptService;
@Resource @Resource
ISysRoleService sysRoleService; ISysRoleService sysRoleService;

@ -19,6 +19,7 @@ import java.util.List;
/** /**
* *
*/ */
@ApiIgnore
@Validated @Validated
@RequiredArgsConstructor @RequiredArgsConstructor
@RestController @RestController

@ -20,6 +20,7 @@ import java.util.List;
/** /**
* *
*/ */
@ApiIgnore
@RestController @RestController
@RequestMapping("/system/dict/type") @RequestMapping("/system/dict/type")
public class SysDictTypeController extends BaseController { public class SysDictTypeController extends BaseController {

@ -24,6 +24,7 @@ import java.util.Map;
* *
* @author Lion Li * @author Lion Li
*/ */
@ApiIgnore
@RestController @RestController
@RequestMapping("/system/menu") @RequestMapping("/system/menu")
public class SysMenuController extends BaseController { public class SysMenuController extends BaseController {

@ -22,7 +22,7 @@ import javax.annotation.Resource;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;
@ApiIgnore
@Validated @Validated
@RequiredArgsConstructor @RequiredArgsConstructor
@RestController @RestController

@ -45,6 +45,7 @@ import java.util.stream.Collectors;
* *
* @author Lion Li * @author Lion Li
*/ */
@ApiIgnore
@Validated @Validated
@RequiredArgsConstructor @RequiredArgsConstructor
@RestController @RestController

@ -19,6 +19,8 @@ import com.glxp.api.res.basic.BasicUdiRelResponse;
import com.glxp.api.res.basic.UdiRelevanceResponse; import com.glxp.api.res.basic.UdiRelevanceResponse;
import com.glxp.api.service.auth.CustomerService; import com.glxp.api.service.auth.CustomerService;
import com.glxp.api.service.basic.BasicUdiRelService; import com.glxp.api.service.basic.BasicUdiRelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.Data; import lombok.Data;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -39,10 +41,12 @@ import com.glxp.api.util.udi.FilterUdiUtils;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import springfox.documentation.annotations.ApiIgnore;
/** /**
* *
*/ */
@Api(tags = "注册企业医疗器械信息绑定接口")
@Slf4j @Slf4j
@RestController @RestController
public class UdiSyncController extends BaseController { public class UdiSyncController extends BaseController {
@ -58,8 +62,8 @@ public class UdiSyncController extends BaseController {
@Resource @Resource
CustomerService customerService; CustomerService customerService;
//获取同步库UDI信息 //获取同步库UDI信息
@ApiIgnore
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@GetMapping("udiwms/udiinfo/filterUdi") @GetMapping("udiwms/udiinfo/filterUdi")
public BaseResponse filterUdi(FilterUdiRelRequest filterUdiRelRequest) { public BaseResponse filterUdi(FilterUdiRelRequest filterUdiRelRequest) {
@ -106,6 +110,7 @@ public class UdiSyncController extends BaseController {
//获取同步库医疗器械注册人信息 //获取同步库医疗器械注册人信息
@ApiIgnore
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@GetMapping("udiwms/udiinfo/filterCompany") @GetMapping("udiwms/udiinfo/filterCompany")
public BaseResponse filterCompany(UdiCompanyRequest udiCompanyRequest) { public BaseResponse filterCompany(UdiCompanyRequest udiCompanyRequest) {
@ -122,6 +127,7 @@ public class UdiSyncController extends BaseController {
//获取同步库UDI信息 //获取同步库UDI信息
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@ApiIgnore
@GetMapping("udi/basic/rel/filter") @GetMapping("udi/basic/rel/filter")
public BaseResponse filterRel(FilterUdiRelRequest filterUdiRelRequest) { public BaseResponse filterRel(FilterUdiRelRequest filterUdiRelRequest) {
String nameCode; String nameCode;
@ -149,6 +155,7 @@ public class UdiSyncController extends BaseController {
//产品信息关联新增 //产品信息关联新增
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@ApiOperation(value = "注册企业新增医疗器械信息", response = BaseResponse.class)
@PostMapping("udi/basic/rel/save") @PostMapping("udi/basic/rel/save")
public BaseResponse saveRel(@RequestBody BasicUdiReRequest basicUdiReRequest) { public BaseResponse saveRel(@RequestBody BasicUdiReRequest basicUdiReRequest) {
BasicUdiRelEntity basicUdiRelEntity = new BasicUdiRelEntity(); BasicUdiRelEntity basicUdiRelEntity = new BasicUdiRelEntity();
@ -163,6 +170,7 @@ public class UdiSyncController extends BaseController {
//产品信息关联新增 //产品信息关联新增
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@ApiOperation(value = "注册企业批量新增医疗器械信息", response = BaseResponse.class)
@PostMapping("udi/basic/rel/batch/save") @PostMapping("udi/basic/rel/batch/save")
public BaseResponse batchSaveRel(@RequestBody UdiSelectRequest udiSelectRequest) { public BaseResponse batchSaveRel(@RequestBody UdiSelectRequest udiSelectRequest) {
String userId = customerService.getUserId() + ""; String userId = customerService.getUserId() + "";
@ -182,7 +190,7 @@ public class UdiSyncController extends BaseController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@PostMapping("udi/basic/rel/delete") @PostMapping("udi/basic/rel/delete")
public BaseResponse saveRel(@RequestBody DeleteRequest deleteRequest) { public BaseResponse deletRel(@RequestBody DeleteRequest deleteRequest) {
basicUdiRelService.removeById(deleteRequest.getId()); basicUdiRelService.removeById(deleteRequest.getId());
return ResultVOUtils.success("删除成功!"); return ResultVOUtils.success("删除成功!");
} }
@ -217,6 +225,7 @@ public class UdiSyncController extends BaseController {
/** /**
* DI * DI
*/ */
@ApiIgnore
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@GetMapping("udiwms/udiinfo/local/filterByUuid") @GetMapping("udiwms/udiinfo/local/filterByUuid")
public BaseResponse filterLocalByUuid(FilterUdiRelRequest filterUdiRelRequest) { public BaseResponse filterLocalByUuid(FilterUdiRelRequest filterUdiRelRequest) {

@ -14,6 +14,7 @@ import com.glxp.api.service.monitor.ISysLogininforService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
@ -21,6 +22,7 @@ import java.util.List;
/** /**
* 访 * 访
*/ */
@ApiIgnore
@Validated @Validated
@RequiredArgsConstructor @RequiredArgsConstructor
@RestController @RestController

@ -14,12 +14,14 @@ import com.glxp.api.service.monitor.ISysOperLogService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List; import java.util.List;
/** /**
* *
*/ */
@ApiIgnore
@Validated @Validated
@RequiredArgsConstructor @RequiredArgsConstructor
@RestController @RestController

@ -32,6 +32,7 @@ import java.util.List;
* @date : 2023/5/18 9:38 * @date : 2023/5/18 9:38
* @modyified By : * @modyified By :
*/ */
@ApiIgnore
@RestController @RestController
public class SupCertController { public class SupCertController {
@Resource @Resource

@ -18,6 +18,7 @@ import java.util.List;
/** /**
* *
*/ */
@ApiIgnore
@RestController @RestController
@Slf4j @Slf4j
public class UserComanyController extends BaseController { public class UserComanyController extends BaseController {

@ -39,7 +39,9 @@ import com.glxp.api.util.CaptchaUtils;
import cn.hutool.core.util.ReUtil; import cn.hutool.core.util.ReUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import springfox.documentation.annotations.ApiIgnore;
@ApiIgnore
@RestController @RestController
@Slf4j @Slf4j
public class UserRegisterController extends BaseController { public class UserRegisterController extends BaseController {
@ -79,10 +81,10 @@ public class UserRegisterController extends BaseController {
userRegisterEntity.setMobile(mobile); userRegisterEntity.setMobile(mobile);
userRegisterService.saveOrUpdate(userRegisterEntity); userRegisterService.saveOrUpdate(userRegisterEntity);
userRegisterEntity = userRegisterService.getOne(new QueryWrapper<UserRegisterEntity>().eq("mobile", mobile)); userRegisterEntity = userRegisterService.getOne(new QueryWrapper<UserRegisterEntity>().eq("mobile", mobile));
} }
userPersons = userPersonService.list(new QueryWrapper<UserPersonEntity>().eq("registerId", userRegisterEntity.getId())); userPersons = userPersonService.list(new QueryWrapper<UserPersonEntity>().eq("registerId", userRegisterEntity.getId()));
userCerts = userCertService.selectByRegisterId(userRegisterEntity.getId().toString()); userCerts = userCertService.selectByRegisterId(userRegisterEntity.getId().toString());
map.put("registerInfo", userRegisterEntity); map.put("registerInfo", userRegisterEntity);
map.put("userPersons", userPersons); map.put("userPersons", userPersons);
map.put("userCerts", userCerts); map.put("userCerts", userCerts);

@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List; import java.util.List;
@ApiIgnore
@RestController @RestController
public class ClassifyCodeController { public class ClassifyCodeController {

@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
@ApiIgnore
@RestController @RestController
public class CompanyController { public class CompanyController {

@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
@ApiIgnore
@RestController @RestController
public class ConnectTestController { public class ConnectTestController {

@ -22,6 +22,7 @@ import javax.validation.Valid;
import java.security.MessageDigest; import java.security.MessageDigest;
import java.util.List; import java.util.List;
@ApiIgnore
@Slf4j @Slf4j
@RestController @RestController
public class DeviceKeyController { public class DeviceKeyController {

@ -28,6 +28,7 @@ import java.util.List;
* @date : 2023/3/20 13:58 * @date : 2023/3/20 13:58
* @modyified By : * @modyified By :
*/ */
@ApiIgnore
@RestController @RestController
public class SysMenuHelpController { public class SysMenuHelpController {

@ -28,7 +28,7 @@ import javax.annotation.Resource;
import javax.validation.Valid; import javax.validation.Valid;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ApiIgnore
@RestController @RestController
public class SysParamConfigController { public class SysParamConfigController {

@ -30,7 +30,7 @@ import javax.validation.Valid;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ApiIgnore
@RestController @RestController
public class SysPdfModuleController { public class SysPdfModuleController {

@ -27,7 +27,7 @@ import java.io.File;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ApiIgnore
@RestController @RestController
public class SysPdfTemplateController { public class SysPdfTemplateController {

@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List; import java.util.List;
@ApiIgnore
@RestController @RestController
public class SysRemindMsgController { public class SysRemindMsgController {

@ -3,6 +3,7 @@ package com.glxp.api.req.basic;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.util.Date;
@ -14,11 +15,13 @@ public class BasicUdiReRequest {
/** /**
* uuid * uuid
*/ */
@ApiModelProperty(value = "国家库uuid", required = true)
private String uuid; private String uuid;
/** /**
* ID * ID
*/ */
@ApiModelProperty(value = "企业信息ID外键", required = true)
private Long companyIdFk; private Long companyIdFk;
/** /**
@ -29,6 +32,7 @@ public class BasicUdiReRequest {
/** /**
* *
*/ */
@ApiModelProperty(value = "备注信息", required = false)
private String remark; private String remark;
/** /**

Loading…
Cancel
Save