| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.mapper.StandardTemplateMapper; |
| | | import com.yuanchu.mom.pojo.StandardTemplate; |
| | | import com.yuanchu.mom.service.StandardTemplateService; |
| | | import com.yuanchu.mom.mapper.StandardTemplateMapper; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | |
| | | @Override |
| | | public int upStandardTemplate(StandardTemplate standardTemplate) { |
| | | if(standardTemplate.getThing().equals("")){ |
| | | standardTemplate.setThing(null); |
| | | } |
| | | return standardTemplateMapper.updateById(standardTemplate); |
| | | } |
| | | |
| | |
| | | public List<StandardTemplate> getStandardTemplate() { |
| | | return standardTemplateMapper.selectList(Wrappers.<StandardTemplate>lambdaQuery().select(StandardTemplate::getId,StandardTemplate::getName)); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public String getStandTempThingById(Integer templateId) { |
| | | StandardTemplate standardTemplate = standardTemplateMapper.selectById(templateId); |
| | | if(standardTemplate==null){ |
| | | return null; |
| | | }else{ |
| | | return standardTemplate.getThing(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public String getStandTempNameById(Integer templateId) { |
| | | StandardTemplate standardTemplate = standardTemplateMapper.selectById(templateId); |
| | | if(standardTemplate==null){ |
| | | return null; |
| | | }else{ |
| | | return standardTemplate.getName(); |
| | | } |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public StandardTemplate getStandTempIdByName(String name) { |
| | | return standardTemplateMapper.getStandTempIdByName(name); |
| | | } |
| | | } |