Explorar o código

接口调整升级-定时相关内容调整

lantone %!s(int64=5) %!d(string=hai) anos
pai
achega
55ead7f80e
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      src/main/java/com/diagbot/service/impl/QcTypeServiceImpl.java

+ 10 - 0
src/main/java/com/diagbot/service/impl/QcTypeServiceImpl.java

@@ -1,5 +1,6 @@
 package com.diagbot.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.dto.QcTypePageDTO;
 import com.diagbot.entity.QcType;
@@ -23,4 +24,13 @@ public class QcTypeServiceImpl extends ServiceImpl<QcTypeMapper, QcType> impleme
     public IPage<QcTypePageDTO> getList(QcTypePageVO qcTypePageVO) {
         return baseMapper.getList(qcTypePageVO);
     }
+
+    public Long saveT(QcType qcType){
+        this.baseMapper.insert(qcType);
+        QueryWrapper<QcType> qWrapper =new QueryWrapper<>();
+        qWrapper.eq("name",qcType.getName());
+        qWrapper.eq("hospital_id", qcType.getHospitalId());
+        QcType entity=this.baseMapper.selectOne(qWrapper);
+        return entity.getId();
+    }
 }