提交 | 用户 | 时间
|
e41062
|
1 |
package com.iailab.module.data.ind.item.service.impl; |
潘 |
2 |
|
|
3 |
import com.iailab.framework.common.pojo.PageResult; |
|
4 |
import com.iailab.framework.common.service.impl.BaseServiceImpl; |
|
5 |
import com.iailab.framework.common.util.object.BeanUtils; |
|
6 |
import com.iailab.module.data.ind.item.dao.IndItemDao; |
|
7 |
import com.iailab.module.data.ind.item.entity.IndItemEntity; |
|
8 |
import com.iailab.module.data.ind.item.service.IndItemService; |
|
9 |
import com.iailab.module.data.ind.item.vo.IndItemPageReqVO; |
|
10 |
import com.iailab.module.data.ind.item.vo.IndItemSaveReqVO; |
|
11 |
import org.springframework.stereotype.Service; |
|
12 |
|
|
13 |
import java.util.Date; |
|
14 |
import java.util.UUID; |
|
15 |
|
|
16 |
/** |
|
17 |
* @author PanZhibao |
|
18 |
* @Description |
|
19 |
* @createTime 2024年09月11日 |
|
20 |
*/ |
|
21 |
@Service |
|
22 |
public class IndItemServiceImpl extends BaseServiceImpl<IndItemDao, IndItemEntity> implements IndItemService { |
|
23 |
|
|
24 |
@Override |
|
25 |
public PageResult<IndItemEntity> page(IndItemPageReqVO reqVO) { |
|
26 |
return baseDao.selectPage(reqVO); |
|
27 |
} |
|
28 |
|
|
29 |
@Override |
|
30 |
public void create(IndItemSaveReqVO createReqVO) { |
|
31 |
IndItemEntity entity = BeanUtils.toBean(createReqVO, IndItemEntity.class); |
|
32 |
entity.setId(UUID.randomUUID().toString()); |
|
33 |
entity.setCreateTime(new Date()); |
|
34 |
baseDao.insert(entity); |
|
35 |
} |
|
36 |
|
|
37 |
@Override |
|
38 |
public void update(IndItemSaveReqVO updateReqVO) { |
|
39 |
IndItemEntity entity = BeanUtils.toBean(updateReqVO, IndItemEntity.class); |
|
40 |
entity.setUpdateTime(new Date()); |
|
41 |
baseDao.updateById(entity); |
|
42 |
} |
|
43 |
|
|
44 |
@Override |
|
45 |
public IndItemEntity get(String id) { |
|
46 |
return baseDao.selectById(id); |
|
47 |
} |
|
48 |
|
|
49 |
@Override |
|
50 |
public void delete(String id) { |
|
51 |
baseDao.deleteById(id); |
|
52 |
} |
|
53 |
} |