demo优化,新增init方法
This commit is contained in:
@@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.medication.domain.Medication;
|
||||
import com.openhis.medication.domain.MedicationDetail;
|
||||
|
||||
/**
|
||||
* 药品基本信息管理Service接口
|
||||
@@ -20,4 +21,11 @@ public interface IMedicationService extends IService<Medication> {
|
||||
* @return 药品信息列表
|
||||
*/
|
||||
List<Medication> getList(List<Long> medicationIdList);
|
||||
|
||||
/**
|
||||
* 查询药品详细信息列表
|
||||
*
|
||||
* @return 药品详细信息列表
|
||||
*/
|
||||
List<MedicationDetail> getDetailList();
|
||||
}
|
||||
@@ -2,16 +2,17 @@ package com.openhis.medication.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
import com.openhis.medication.domain.Medication;
|
||||
import com.openhis.medication.domain.MedicationDetail;
|
||||
import com.openhis.medication.mapper.MedicationMapper;
|
||||
import com.openhis.medication.service.IMedicationService;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
@@ -22,9 +23,11 @@ import lombok.extern.slf4j.Slf4j;
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class MedicationServiceImpl extends ServiceImpl<MedicationMapper, Medication> implements IMedicationService {
|
||||
|
||||
@Autowired
|
||||
private MedicationMapper medicationMapper;
|
||||
|
||||
/**
|
||||
* 查询药品信息列表
|
||||
*
|
||||
@@ -42,4 +45,15 @@ public class MedicationServiceImpl extends ServiceImpl<MedicationMapper, Medicat
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询药品详细信息列表
|
||||
*
|
||||
* @return 药品详细信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<MedicationDetail> getDetailList() {
|
||||
return medicationMapper.selectDetailList();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user