| | |
| | | |
| | | @Override |
| | | public int upStandardTemplate(StandardTemplate standardTemplate) { |
| | | if(standardTemplate.getThing().equals("")){ |
| | | standardTemplate.setThing(null); |
| | | } |
| | | return standardTemplateMapper.updateById(standardTemplate); |
| | | } |
| | | |
| | |
| | | |
| | | @Override |
| | | public String getStandTempThingById(Integer templateId) { |
| | | return standardTemplateMapper.selectById(templateId).getThing(); |
| | | StandardTemplate standardTemplate = standardTemplateMapper.selectById(templateId); |
| | | if(standardTemplate==null){ |
| | | return null; |
| | | }else{ |
| | | return standardTemplate.getThing(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public String getStandTempNameById(Integer templateId) { |
| | | return standardTemplateMapper.selectById(templateId).getName(); |
| | | StandardTemplate standardTemplate = standardTemplateMapper.selectById(templateId); |
| | | if(standardTemplate==null){ |
| | | return null; |
| | | }else{ |
| | | return standardTemplate.getName(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public StandardTemplate getStandTempIdByName(String name) { |
| | | return standardTemplateMapper.getStandTempIdByName(name); |
| | | } |
| | | } |