parent
8cfa440e92
commit
018edb596c
@ -0,0 +1,46 @@
|
||||
package cn.estsh.i3plus.core.api.iservice.busi;
|
||||
|
||||
import cn.estsh.i3plus.pojo.platform.bean.ToolType;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description : 硬件类型服务接口
|
||||
* @Reference :
|
||||
* @Author : yunhao
|
||||
* @Date : 2018-10-28 12:32
|
||||
* @Modify :
|
||||
**/
|
||||
public interface IToolTypeService {
|
||||
|
||||
/**
|
||||
* 添加硬件类型
|
||||
* @param toolType
|
||||
*/
|
||||
void insertToolType(ToolType toolType);
|
||||
|
||||
/**
|
||||
* 删除硬件类型
|
||||
* @param id
|
||||
*/
|
||||
void deleteToolTypeById(String id);
|
||||
|
||||
/**
|
||||
* 修改硬件类型
|
||||
* @param toolType
|
||||
*/
|
||||
void updateToolType(ToolType toolType);
|
||||
|
||||
/**
|
||||
* 查找全部硬件类型
|
||||
* @return
|
||||
*/
|
||||
List<ToolType> listToolType();
|
||||
|
||||
/**
|
||||
* 根据id查找硬件类型
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
ToolType getToolTypeById(String id);
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package cn.estsh.i3plus.core.apiservice.serviceimpl.busi;
|
||||
|
||||
import cn.estsh.i3plus.core.api.iservice.busi.IToolTypeService;
|
||||
import cn.estsh.i3plus.pojo.platform.bean.Organize;
|
||||
import cn.estsh.i3plus.pojo.platform.bean.ToolType;
|
||||
import cn.estsh.i3plus.pojo.platform.repository.ToolRepository;
|
||||
import cn.estsh.i3plus.pojo.platform.repository.ToolTypeRepository;
|
||||
import cn.estsh.impp.framework.boot.util.ValidatorBean;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description : 硬件类型接口实现
|
||||
* @Reference :
|
||||
* @Author : yunhao
|
||||
* @Date : 2018-10-28 12:35
|
||||
* @Modify :
|
||||
**/
|
||||
@Service
|
||||
public class ToolTypeServiceImpl implements IToolTypeService {
|
||||
public static final Logger LOGGER = LoggerFactory.getLogger(ToolTypeServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private ToolTypeRepository toolTypeRDao;
|
||||
|
||||
@Override
|
||||
public void insertToolType(ToolType toolType) {
|
||||
LOGGER.info("硬件类型 TOOL_TYPE toolType:{}",toolType);
|
||||
toolTypeRDao.insert(toolType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteToolTypeById(String id) {
|
||||
LOGGER.info("硬件类型 TOOL_TYPE id:{}",id);
|
||||
toolTypeRDao.deleteById(Long.parseLong(id));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateToolType(ToolType toolType) {
|
||||
LOGGER.info("硬件类型 TOOL_TYPE toolType:{}",toolType);
|
||||
toolTypeRDao.update(toolType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ToolType> listToolType() {
|
||||
LOGGER.info("硬件类型 TOOL_TYPE list");
|
||||
return toolTypeRDao.list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ToolType getToolTypeById(String id) {
|
||||
LOGGER.info("硬件类型 TOOL_TYPE id:{}",id);
|
||||
return toolTypeRDao.getById(Long.parseLong(id));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue