提交 | 用户 | 时间
|
a63a4f
|
1 |
package com.iailab.module.data.ind.data.service.impl; |
潘 |
2 |
|
cf757d
|
3 |
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
a63a4f
|
4 |
import com.iailab.framework.common.pojo.PageResult; |
潘 |
5 |
import com.iailab.framework.common.service.impl.BaseServiceImpl; |
|
6 |
import com.iailab.framework.common.util.object.BeanUtils; |
|
7 |
import com.iailab.module.data.ind.data.dao.IndDataSetFieldDao; |
|
8 |
import com.iailab.module.data.ind.data.entity.IndDataSetFieldEntity; |
|
9 |
import com.iailab.module.data.ind.data.service.IndDataSetFieldService; |
|
10 |
import com.iailab.module.data.ind.data.vo.IndDataSetFieldPageReqVO; |
|
11 |
import com.iailab.module.data.ind.data.vo.IndDataSetFieldSaveReqVO; |
|
12 |
import org.springframework.stereotype.Service; |
|
13 |
|
cf757d
|
14 |
import java.util.List; |
a63a4f
|
15 |
import java.util.UUID; |
潘 |
16 |
|
|
17 |
/** |
|
18 |
* @author PanZhibao |
|
19 |
* @Description |
|
20 |
* @createTime 2024年09月10日 |
|
21 |
*/ |
|
22 |
@Service |
|
23 |
public class IndDataSetFieldServiceImpl extends BaseServiceImpl<IndDataSetFieldDao, IndDataSetFieldEntity> |
|
24 |
implements IndDataSetFieldService { |
|
25 |
|
|
26 |
@Override |
|
27 |
public PageResult<IndDataSetFieldEntity> page(IndDataSetFieldPageReqVO reqVO) { |
|
28 |
return baseDao.selectPage(reqVO); |
|
29 |
} |
|
30 |
|
|
31 |
@Override |
|
32 |
public void create(IndDataSetFieldSaveReqVO createReqVO) { |
|
33 |
IndDataSetFieldEntity entity = BeanUtils.toBean(createReqVO, IndDataSetFieldEntity.class); |
|
34 |
entity.setId(UUID.randomUUID().toString()); |
|
35 |
baseDao.insert(entity); |
|
36 |
} |
|
37 |
|
|
38 |
@Override |
|
39 |
public void update(IndDataSetFieldSaveReqVO updateReqVO) { |
|
40 |
IndDataSetFieldEntity entity = BeanUtils.toBean(updateReqVO, IndDataSetFieldEntity.class); |
|
41 |
baseDao.updateById(entity); |
|
42 |
} |
|
43 |
|
|
44 |
@Override |
|
45 |
public IndDataSetFieldEntity get(String id) { |
|
46 |
return baseDao.selectById(id); |
|
47 |
} |
|
48 |
|
|
49 |
@Override |
|
50 |
public void delete(String id) { |
|
51 |
baseDao.deleteById(id); |
|
52 |
} |
cf757d
|
53 |
|
潘 |
54 |
@Override |
|
55 |
public List<IndDataSetFieldEntity> list(String dataSetId) { |
|
56 |
QueryWrapper<IndDataSetFieldEntity> queryWrapper = new QueryWrapper<>(); |
|
57 |
queryWrapper.eq("data_set_id", dataSetId).orderByAsc("sort"); |
|
58 |
return baseDao.selectList(queryWrapper); |
|
59 |
} |
a63a4f
|
60 |
} |