package com.iailab.module.mcs.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.iailab.framework.common.service.impl.BaseServiceImpl; import com.iailab.framework.common.util.object.ConvertUtils; import com.iailab.module.mcs.dao.StModelDocDao; import com.iailab.module.mcs.dto.StModelDocDTO; import com.iailab.module.mcs.entity.StModelDocEntity; import com.iailab.module.mcs.service.StModelDocService; import org.springframework.stereotype.Service; /** * @author lirm 1343021927@qq.com * @since 1.0.0 2023-05-10 */ @Service public class StModelDocServiceImpl extends BaseServiceImpl implements StModelDocService { @Override public StModelDocDTO get(String id) { StModelDocEntity entity = baseDao.selectOne(new QueryWrapper().eq("model_id",id)); return ConvertUtils.sourceToTarget(entity, StModelDocDTO.class); } @Override public void update(StModelDocDTO stModelDocDTO) { StModelDocEntity stModelDocEntity = ConvertUtils.sourceToTarget(stModelDocDTO,StModelDocEntity.class); updateById(stModelDocEntity); } @Override public void save(StModelDocDTO stModelDocDTO) { StModelDocEntity stModelDocEntity = ConvertUtils.sourceToTarget(stModelDocDTO, StModelDocEntity.class); insert(stModelDocEntity); } }