修改之前模块查询条件 以及新增api接口管理模块
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
yudao-ui-admin CI / build (14.x) (push) Has been cancelled
yudao-ui-admin CI / build (16.x) (push) Has been cancelled

This commit is contained in:
lxd 2024-07-28 15:31:50 +08:00
parent 5ee1781f2e
commit d50a296845
12 changed files with 606 additions and 6 deletions

View File

@ -0,0 +1,125 @@
package cn.iocoder.yudao.module.system.controller.admin.apiconfig;
import com.mzt.logapi.starter.annotation.LogRecord;
import org.springframework.web.bind.annotation.*;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import java.util.*;
import java.io.IOException;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
import cn.iocoder.yudao.module.system.controller.admin.apiconfig.vo.*;
import cn.iocoder.yudao.module.system.dal.dataobject.apiconfig.ApiconfigDO;
import cn.iocoder.yudao.module.system.service.apiconfig.ApiconfigService;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
@Tag(name = "管理后台 - 接口配置")
@RestController
@RequestMapping("/system/apiconfig")
@Validated
public class ApiconfigController {
@Resource
private ApiconfigService apiconfigService;
@PostMapping("/create")
@Operation(summary = "创建接口配置")
@PreAuthorize("@ss.hasPermission('system:apiconfig:create')")
@LogRecord(type = "接口配置", subType = "创建", bizNo ="{{#createReqVO.getId}}" , success = "创建ID为{{#createReqVO.getId}}的接口配置")
public CommonResult<String> createApiconfig(@Valid @RequestBody ApiconfigSaveReqVO createReqVO) {
String msg="";
if (!apiconfigService.GetApiCodeIsExist(createReqVO.getApiCode()))
{
UUID guid = UUID.randomUUID();
createReqVO.setId(guid.toString());
msg= apiconfigService.createApiconfig(createReqVO);
}
else
{
msg="Api代码重复";
}
return success(msg);
}
@PutMapping("/update")
@Operation(summary = "更新接口配置")
@PreAuthorize("@ss.hasPermission('system:apiconfig:update')")
@LogRecord(type = "接口配置", subType = "更新", bizNo ="{{#createReqVO.getId}}" , success = "更新ID为{{#createReqVO.getId}}的接口配置")
public CommonResult<Boolean> updateApiconfig(@Valid @RequestBody ApiconfigSaveReqVO updateReqVO) {
boolean bol=true;
if (!apiconfigService.GetApiCodeIsExist(updateReqVO.getApiCode()))
{
apiconfigService.updateApiconfig(updateReqVO);
}
else
{
bol=false;
}
return success(bol);
}
@DeleteMapping("/delete")
@Operation(summary = "删除接口配置")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('system:apiconfig:delete')")
@LogRecord(type = "接口配置", subType = "删除", bizNo ="{{#id}}" , success = "删除ID为{{#id}}的接口配置")
public CommonResult<Boolean> deleteApiconfig(@RequestParam("id") String id) {
ApiconfigSaveReqVO updateReqVO=new ApiconfigSaveReqVO();
updateReqVO.setId(id);
updateReqVO.setIsdelete("1");
apiconfigService.updateApiconfig(updateReqVO);
//apiconfigService.deleteApiconfig(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得接口配置")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('system:apiconfig:query')")
public CommonResult<ApiconfigRespVO> getApiconfig(@RequestParam("id") String id) {
ApiconfigDO apiconfig = apiconfigService.getApiconfig(id);
return success(BeanUtils.toBean(apiconfig, ApiconfigRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得接口配置分页")
@PreAuthorize("@ss.hasPermission('system:apiconfig:query')")
public CommonResult<PageResult<ApiconfigRespVO>> getApiconfigPage(@Valid ApiconfigPageReqVO pageReqVO) {
PageResult<ApiconfigDO> pageResult = apiconfigService.getApiconfigPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, ApiconfigRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出接口配置 Excel")
@PreAuthorize("@ss.hasPermission('system:apiconfig:export')")
@ApiAccessLog(operateType = EXPORT)
public void exportApiconfigExcel(@Valid ApiconfigPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<ApiconfigDO> list = apiconfigService.getApiconfigPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "接口配置.xls", "数据", ApiconfigRespVO.class,
BeanUtils.toBean(list, ApiconfigRespVO.class));
}
}

View File

@ -0,0 +1,53 @@
package cn.iocoder.yudao.module.system.controller.admin.apiconfig.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
@Schema(description = "管理后台 - 接口配置分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ApiconfigPageReqVO extends PageParam {
@Schema(description = "机构ID", example = "22500")
private String orgId;
@Schema(description = "接口类别下拉选项HIS接口 体检接口LIS接口EMR接口", example = "1")
private String apiType;
@Schema(description = "接口名称HIS登记信息同步体检的登记信息同步检查项目同步", example = "李四")
private String apiName;
@Schema(description = "接口地址", example = "https://www.iocoder.cn")
private String apiUrl;
@Schema(description = "sqlserver , mysql ,oracle", example = "2")
private String databaseType;
@Schema(description = "第三方数据库的IP")
private String databaseIP;
@Schema(description = "第三方数据库的端口")
private String databasePort;
@Schema(description = "第三方数据库的登录用户名", example = "李四")
private String databaseUserName;
@Schema(description = "第三方数据库的登录密码")
private String databasePwd;
@Schema(description = "第三方软件的制造商")
private String softwareManufacturer;
@Schema(description = "是否删除1为删除")
private String isdelete;
@Schema(description = "备注信息", example = "随便")
private String remark;
@Schema(description = "api代码his01,his02,tj01,tj02 此为接口代码唯一每条接口一个api代码")
private String apiCode;
}

View File

@ -0,0 +1,70 @@
package cn.iocoder.yudao.module.system.controller.admin.apiconfig.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.util.*;
import com.alibaba.excel.annotation.*;
@Schema(description = "管理后台 - 接口配置 Response VO")
@Data
@ExcelIgnoreUnannotated
public class ApiconfigRespVO {
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "10797")
@ExcelProperty("主键")
private String id;
@Schema(description = "机构ID", example = "22500")
@ExcelProperty("机构ID")
private String orgId;
@Schema(description = "接口类别下拉选项HIS接口 体检接口LIS接口EMR接口", example = "1")
@ExcelProperty("接口类别下拉选项HIS接口 体检接口LIS接口EMR接口")
private String apiType;
@Schema(description = "接口名称HIS登记信息同步体检的登记信息同步检查项目同步", example = "李四")
@ExcelProperty("接口名称HIS登记信息同步体检的登记信息同步检查项目同步")
private String apiName;
@Schema(description = "接口地址", example = "https://www.iocoder.cn")
@ExcelProperty("接口地址")
private String apiUrl;
@Schema(description = "sqlserver , mysql ,oracle", example = "2")
@ExcelProperty("sqlserver , mysql ,oracle")
private String databaseType;
@Schema(description = "第三方数据库的IP")
@ExcelProperty("第三方数据库的IP")
private String databaseIP;
@Schema(description = "第三方数据库的端口")
@ExcelProperty("第三方数据库的端口")
private String databasePort;
@Schema(description = "第三方数据库的登录用户名", example = "李四")
@ExcelProperty("第三方数据库的登录用户名")
private String databaseUserName;
@Schema(description = "第三方数据库的登录密码")
@ExcelProperty("第三方数据库的登录密码")
private String databasePwd;
@Schema(description = "第三方软件的制造商")
@ExcelProperty("第三方软件的制造商")
private String softwareManufacturer;
@Schema(description = "是否删除1为删除")
@ExcelProperty("是否删除1为删除")
private String isdelete;
@Schema(description = "备注信息", example = "随便")
@ExcelProperty("备注信息")
private String remark;
@Schema(description = "api代码his01,his02,tj01,tj02 此为接口代码唯一每条接口一个api代码", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("api代码his01,his02,tj01,tj02 此为接口代码唯一每条接口一个api代码")
private String apiCode;
}

View File

@ -0,0 +1,54 @@
package cn.iocoder.yudao.module.system.controller.admin.apiconfig.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
@Schema(description = "管理后台 - 接口配置新增/修改 Request VO")
@Data
public class ApiconfigSaveReqVO {
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "10797")
private String id;
@Schema(description = "机构ID", example = "22500")
private String orgId;
@Schema(description = "接口类别下拉选项HIS接口 体检接口LIS接口EMR接口", example = "1")
private String apiType;
@Schema(description = "接口名称HIS登记信息同步体检的登记信息同步检查项目同步", example = "李四")
private String apiName;
@Schema(description = "接口地址", example = "https://www.iocoder.cn")
private String apiUrl;
@Schema(description = "sqlserver , mysql ,oracle", example = "2")
private String databaseType;
@Schema(description = "第三方数据库的IP")
private String databaseIP;
@Schema(description = "第三方数据库的端口")
private String databasePort;
@Schema(description = "第三方数据库的登录用户名", example = "李四")
private String databaseUserName;
@Schema(description = "第三方数据库的登录密码")
private String databasePwd;
@Schema(description = "第三方软件的制造商")
private String softwareManufacturer;
@Schema(description = "是否删除1为删除")
private String isdelete;
@Schema(description = "备注信息", example = "随便")
private String remark;
@Schema(description = "api代码his01,his02,tj01,tj02 此为接口代码唯一每条接口一个api代码", requiredMode = Schema.RequiredMode.REQUIRED)
private String apiCode;
}

View File

@ -0,0 +1,93 @@
package cn.iocoder.yudao.module.system.dal.dataobject.apiconfig;
import lombok.*;
import java.util.*;
import com.baomidou.mybatisplus.annotation.*;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
/**
* 接口配置 DO
*
* @author 李晓东
*/
@TableName("tb_apiconfig")
@KeySequence("tb_apiconfig_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写
@Data
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ApiconfigDO {
/**
* 主键
*/
@TableId(type = IdType.INPUT)
private String id;
/**
* 机构ID
*/
@TableField("orgId")
private String orgId;
/**
* 接口类别下拉选项HIS接口 体检接口LIS接口EMR接口
*/
@TableField("apiType")
private String apiType;
/**
* 接口名称HIS登记信息同步体检的登记信息同步检查项目同步
*/
@TableField("apiName")
private String apiName;
/**
* 接口地址
*/
@TableField("apiUrl")
private String apiUrl;
/**
* sqlserver , mysql ,oracle
*/
@TableField("databaseType")
private String databaseType;
/**
* 第三方数据库的IP
*/
@TableField("databaseIP")
private String databaseIP;
/**
* 第三方数据库的端口
*/
@TableField("databasePort")
private String databasePort;
/**
* 第三方数据库的登录用户名
*/
@TableField("databaseUserName")
private String databaseUserName;
/**
* 第三方数据库的登录密码
*/
@TableField("databasePwd")
private String databasePwd;
/**
* 第三方软件的制造商
*/
@TableField("softwareManufacturer")
private String softwareManufacturer;
/**
* 是否删除1为删除
*/
@TableField("isdelete")
private String isdelete;
/**
* 备注信息
*/
@TableField("remark")
private String remark;
/**
* api代码his01,his02,tj01,tj02 此为接口代码唯一每条接口一个api代码
*/
@TableField("apiCode")
private String apiCode;
}

View File

@ -0,0 +1,45 @@
package cn.iocoder.yudao.module.system.dal.mysql.apiconfig;
import java.util.*;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.system.dal.dataobject.apiconfig.ApiconfigDO;
import cn.iocoder.yudao.module.system.dal.dataobject.org.OrgUnitDO;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.system.controller.admin.apiconfig.vo.*;
import org.apache.ibatis.annotations.Param;
/**
* 接口配置 Mapper
*
* @author 李晓东
*/
@InterceptorIgnore(tenantLine = "true")
@Mapper
public interface ApiconfigMapper extends BaseMapperX<ApiconfigDO> {
default PageResult<ApiconfigDO> selectPage(ApiconfigPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<ApiconfigDO>()
//.eqIfPresent(ApiconfigDO::getOrgId, reqVO.getOrgId())
.eqIfPresent(ApiconfigDO::getApiType, reqVO.getApiType())
.likeIfPresent(ApiconfigDO::getApiName, reqVO.getApiName())
// .eqIfPresent(ApiconfigDO::getApiUrl, reqVO.getApiUrl())
// .eqIfPresent(ApiconfigDO::getDatabaseType, reqVO.getDatabaseType())
// .eqIfPresent(ApiconfigDO::getDatabaseIP, reqVO.getDatabaseIP())
// .eqIfPresent(ApiconfigDO::getDatabasePort, reqVO.getDatabasePort())
// .likeIfPresent(ApiconfigDO::getDatabaseUserName, reqVO.getDatabaseUserName())
// .eqIfPresent(ApiconfigDO::getDatabasePwd, reqVO.getDatabasePwd())
// .eqIfPresent(ApiconfigDO::getSoftwareManufacturer, reqVO.getSoftwareManufacturer())
// .eqIfPresent(ApiconfigDO::getIsdelete, reqVO.getIsdelete())
// .eqIfPresent(ApiconfigDO::getRemark, reqVO.getRemark())
.likeIfPresent(ApiconfigDO::getApiCode, reqVO.getApiCode())
.eq(ApiconfigDO::getIsdelete, '0')
.orderByDesc(ApiconfigDO::getId));
}
///验证APICode是否存在
int getAPICodeIsExist(@Param("apiCode") String apiCode);
}

View File

@ -5,7 +5,9 @@ import java.util.*;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.system.dal.dataobject.apiconfig.ApiconfigDO;
import cn.iocoder.yudao.module.system.dal.dataobject.doctor.DoctorDO;
import cn.iocoder.yudao.module.system.dal.dataobject.wx.WxDO;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.system.controller.admin.doctor.vo.*;
@ -23,8 +25,7 @@ public interface DoctorMapper extends BaseMapperX<DoctorDO> {
return selectPage(reqVO, new LambdaQueryWrapperX<DoctorDO>()
.likeIfPresent(DoctorDO::getDoctorName, reqVO.getDoctorName())
.likeIfPresent(DoctorDO::getDepartmentName, reqVO.getDepartmentName())
.or(wrapper -> wrapper.eq(DoctorDO::getIsdelete, 0))
.or(wrapper -> wrapper.isNull(DoctorDO::getIsdelete))
.eq(DoctorDO::getIsdelete, '0')
.orderByDesc(DoctorDO::getDoctorID));
}

View File

@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.system.dal.mysql.org;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.system.dal.dataobject.apiconfig.ApiconfigDO;
import cn.iocoder.yudao.module.system.dal.dataobject.doctor.DoctorDO;
import cn.iocoder.yudao.module.system.dal.dataobject.org.OrgUnitDO;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
@ -32,8 +33,7 @@ public interface OrgUnitMapper extends BaseMapperX<OrgUnitDO> {
.betweenIfPresent(OrgUnitDO::getCreateDate, reqVO.getCreateDate())
.likeIfPresent(OrgUnitDO::getHighLevelOrgName, reqVO.getHighLevelOrgName())
.eqIfPresent(OrgUnitDO::getOrgLogoUrl, reqVO.getOrgLogoUrl())
.or(wrapper -> wrapper.eq(OrgUnitDO::getIsdelete, 0))
.or(wrapper -> wrapper.isNull(OrgUnitDO::getIsdelete))
.eq(OrgUnitDO::getIsdelete, '0')
.orderByDesc(OrgUnitDO::getOrgID));
}
//查询当前ID 是否存在

View File

@ -25,8 +25,7 @@ public interface WxMapper extends BaseMapperX<WxDO> {
.likeIfPresent(WxDO::getWxUserid, reqVO.getWxUserid())
.likeIfPresent(WxDO::getBindTel, reqVO.getBindTel())
.likeIfPresent(WxDO::getPersonName, reqVO.getPersonName())
.or(wrapper -> wrapper.eq(WxDO::getIsdelete, 0))
.or(wrapper -> wrapper.isNull(WxDO::getIsdelete))
.eq(WxDO::getIsdelete, '0')
.orderByDesc(WxDO::getId));
}

View File

@ -0,0 +1,58 @@
package cn.iocoder.yudao.module.system.service.apiconfig;
import java.util.*;
import cn.iocoder.yudao.module.system.controller.admin.apiconfig.vo.*;
import cn.iocoder.yudao.module.system.dal.dataobject.apiconfig.ApiconfigDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import javax.validation.Valid;
/**
* 接口配置 Service 接口
*
* @author 李晓东
*/
public interface ApiconfigService {
/**
* 创建接口配置
*
* @param createReqVO 创建信息
* @return 编号
*/
String createApiconfig(@Valid ApiconfigSaveReqVO createReqVO);
/**
* 更新接口配置
*
* @param updateReqVO 更新信息
*/
void updateApiconfig(@Valid ApiconfigSaveReqVO updateReqVO);
/**
* 删除接口配置
*
* @param id 编号
*/
void deleteApiconfig(String id);
/**
* 获得接口配置
*
* @param id 编号
* @return 接口配置
*/
ApiconfigDO getApiconfig(String id);
/**
* 获得接口配置分页
*
* @param pageReqVO 分页查询
* @return 接口配置分页
*/
PageResult<ApiconfigDO> getApiconfigPage(ApiconfigPageReqVO pageReqVO);
boolean GetApiCodeIsExist(String AppCode);
}

View File

@ -0,0 +1,87 @@
package cn.iocoder.yudao.module.system.service.apiconfig;
import cn.iocoder.yudao.framework.common.exception.ErrorCode;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import cn.iocoder.yudao.module.system.controller.admin.apiconfig.vo.*;
import cn.iocoder.yudao.module.system.dal.dataobject.apiconfig.ApiconfigDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.system.dal.mysql.apiconfig.ApiconfigMapper;
import javax.annotation.Resource;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*;
/**
* 接口配置 Service 实现类
*
* @author 李晓东
*/
@Service
@Validated
public class ApiconfigServiceImpl implements ApiconfigService {
@Resource
private ApiconfigMapper apiconfigMapper;
@Override
public String createApiconfig(ApiconfigSaveReqVO createReqVO) {
// 插入
ApiconfigDO apiconfig = BeanUtils.toBean(createReqVO, ApiconfigDO.class);
apiconfigMapper.insert(apiconfig);
// 返回
return apiconfig.getId();
}
@Override
public void updateApiconfig(ApiconfigSaveReqVO updateReqVO) {
// 校验存在
validateApiconfigExists(updateReqVO.getId());
// 更新
ApiconfigDO updateObj = BeanUtils.toBean(updateReqVO, ApiconfigDO.class);
apiconfigMapper.updateById(updateObj);
}
@Override
public void deleteApiconfig(String id) {
// 校验存在
validateApiconfigExists(id);
// 删除
apiconfigMapper.deleteById(id);
}
private void validateApiconfigExists(String id) {
if (apiconfigMapper.selectById(id) == null) {
throw exception(new ErrorCode(1, "ID为空"));
}
}
@Override
public ApiconfigDO getApiconfig(String id) {
return apiconfigMapper.selectById(id);
}
@Override
public PageResult<ApiconfigDO> getApiconfigPage(ApiconfigPageReqVO pageReqVO) {
return apiconfigMapper.selectPage(pageReqVO);
}
@Override
public boolean GetApiCodeIsExist(String AppCode) {
boolean bol = false;
int count = apiconfigMapper.getAPICodeIsExist(AppCode);
if (count > 0) {
bol = true;
}
return bol;
}
}

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.iocoder.yudao.module.system.dal.mysql.apiconfig.ApiconfigMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
<select id="getAPICodeIsExist" resultType="java.lang.Integer">
select count(*) from tb_apiconfig where apiCode=#{apiCode}
</select>
</mapper>