新增knife4j接口文档

cert
anthonywj 2 years ago
parent b88cdac7e6
commit ea85e762ac

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

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

@ -5,12 +5,14 @@ import cn.hutool.core.util.StrUtil;
import com.glxp.api.constant.Constant;
import com.glxp.api.entity.auth.AuthAdmin;
import com.glxp.api.service.auth.CustomerService;
import springfox.documentation.annotations.ApiIgnore;
import javax.annotation.Resource;
/**
*
*/
@ApiIgnore
public class BaseController {
@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.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;
@ApiIgnore
@RestController
public class AuthCheckController {

@ -26,6 +26,8 @@ import java.util.*;
/**
*
*/
@ApiIgnore
@RestController
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.util.IdUtil;
import cn.hutool.core.util.StrUtil;
@ApiIgnore
@RestController
public class DeptController {
@ -47,7 +47,7 @@ public class DeptController {
@Resource
SystemParamConfigService systemParamConfigService;
@AuthRuleAnnotation("")
@ -276,7 +276,7 @@ public class DeptController {
return ResultVOUtils.error(500, "删除失败,一级部门不允许删除!");
}
FilterDeptUserReqeust filterDeptUserReqeust = new FilterDeptUserReqeust();
filterDeptUserReqeust.setDeptId(deptEntity.getId().longValue());
List<DeptUserEntity> deptUserEntities = deptUserService.selectDeptUser(filterDeptUserReqeust);
@ -312,9 +312,9 @@ public class DeptController {
return ResultVOUtils.success("禁用成功!");
}
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.WarehouseUserService;
@ApiIgnore
@RestController
public class DeptUserController {
@ -32,7 +32,7 @@ public class DeptUserController {
@Resource
DeptService deptService;
@Resource
WarehouseUserService warehouseUserService;
@ -61,7 +61,7 @@ public class DeptUserController {
@PostMapping("udi/auth/dept/user/delete")
public BaseResponse delete(@RequestBody DeptUserEntity deptUserEntity) {
//判断此用户是否与除一级部门 还绑定其他部门
FilterDeptUserReqeust filterDeptUserReqeust = new FilterDeptUserReqeust();

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

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

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

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

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

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

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

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

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

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

@ -18,6 +18,7 @@ import java.util.List;
/**
*
*/
@ApiIgnore
@RestController
@Slf4j
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.StrUtil;
import lombok.extern.slf4j.Slf4j;
import springfox.documentation.annotations.ApiIgnore;
@ApiIgnore
@RestController
@Slf4j
public class UserRegisterController extends BaseController {
@ -79,10 +81,10 @@ public class UserRegisterController extends BaseController {
userRegisterEntity.setMobile(mobile);
userRegisterService.saveOrUpdate(userRegisterEntity);
userRegisterEntity = userRegisterService.getOne(new QueryWrapper<UserRegisterEntity>().eq("mobile", mobile));
}
}
userPersons = userPersonService.list(new QueryWrapper<UserPersonEntity>().eq("registerId", userRegisterEntity.getId()));
userCerts = userCertService.selectByRegisterId(userRegisterEntity.getId().toString());
map.put("registerInfo", userRegisterEntity);
map.put("userPersons", userPersons);
map.put("userCerts", userCerts);

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save