提交 | 用户 | 时间
|
a6de49
|
1 |
package com.iailab.module.mcs.service.impl; |
H |
2 |
|
|
3 |
|
|
4 |
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
5 |
import com.iailab.framework.common.service.impl.BaseServiceImpl; |
|
6 |
import com.iailab.framework.common.util.object.ConvertUtils; |
|
7 |
import com.iailab.module.mcs.dao.StModelDocDao; |
|
8 |
import com.iailab.module.mcs.dto.StModelDocDTO; |
|
9 |
import com.iailab.module.mcs.entity.StModelDocEntity; |
|
10 |
import com.iailab.module.mcs.service.StModelDocService; |
|
11 |
import org.springframework.stereotype.Service; |
|
12 |
|
|
13 |
/** |
|
14 |
* @author lirm 1343021927@qq.com |
|
15 |
* @since 1.0.0 2023-05-10 |
|
16 |
*/ |
|
17 |
@Service |
|
18 |
public class StModelDocServiceImpl extends BaseServiceImpl<StModelDocDao, StModelDocEntity> implements StModelDocService { |
|
19 |
|
|
20 |
@Override |
|
21 |
public StModelDocDTO get(String id) { |
|
22 |
StModelDocEntity entity = baseDao.selectOne(new QueryWrapper<StModelDocEntity>().eq("model_id",id)); |
|
23 |
|
|
24 |
return ConvertUtils.sourceToTarget(entity, StModelDocDTO.class); |
|
25 |
} |
|
26 |
|
|
27 |
@Override |
|
28 |
public void update(StModelDocDTO stModelDocDTO) { |
|
29 |
StModelDocEntity stModelDocEntity = ConvertUtils.sourceToTarget(stModelDocDTO,StModelDocEntity.class); |
|
30 |
updateById(stModelDocEntity); |
|
31 |
} |
|
32 |
|
|
33 |
@Override |
|
34 |
public void save(StModelDocDTO stModelDocDTO) { |
|
35 |
StModelDocEntity stModelDocEntity = ConvertUtils.sourceToTarget(stModelDocDTO, StModelDocEntity.class); |
|
36 |
insert(stModelDocEntity); |
|
37 |
} |
|
38 |
|
|
39 |
|
|
40 |
} |