提交 | 用户 | 时间
|
7fd198
|
1 |
package com.iailab.module.model.mcs.sche.service.impl; |
潘 |
2 |
|
bbc1ee
|
3 |
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
潘 |
4 |
import com.iailab.framework.common.pojo.PageResult; |
7fd198
|
5 |
import com.iailab.framework.common.service.impl.BaseServiceImpl; |
bbc1ee
|
6 |
import com.iailab.framework.common.util.object.BeanUtils; |
7fd198
|
7 |
import com.iailab.module.model.mcs.sche.dao.StScheduleSchemeDao; |
潘 |
8 |
import com.iailab.module.model.mcs.sche.entity.StScheduleSchemeEntity; |
|
9 |
import com.iailab.module.model.mcs.sche.service.StScheduleSchemeService; |
bbc1ee
|
10 |
import com.iailab.module.model.mcs.sche.vo.StScheduleSchemePageReqVO; |
潘 |
11 |
import com.iailab.module.model.mcs.sche.vo.StScheduleSchemeSaveReqVO; |
7fd198
|
12 |
import org.springframework.stereotype.Service; |
bbc1ee
|
13 |
|
潘 |
14 |
import java.util.Date; |
|
15 |
import java.util.UUID; |
7fd198
|
16 |
|
潘 |
17 |
/** |
|
18 |
* @author PanZhibao |
|
19 |
* @date 2021年08月11日 12:06 |
|
20 |
*/ |
bbc1ee
|
21 |
@Service |
7fd198
|
22 |
public class StScheduleSchemeServiceImpl extends BaseServiceImpl<StScheduleSchemeDao, StScheduleSchemeEntity> |
潘 |
23 |
implements StScheduleSchemeService { |
bbc1ee
|
24 |
|
潘 |
25 |
@Override |
|
26 |
public PageResult<StScheduleSchemeEntity> page(StScheduleSchemePageReqVO reqVO) { |
|
27 |
return baseDao.selectPage(reqVO); |
|
28 |
} |
|
29 |
|
|
30 |
@Override |
|
31 |
public void create(StScheduleSchemeSaveReqVO createReqVO) { |
|
32 |
StScheduleSchemeEntity entity = BeanUtils.toBean(createReqVO, StScheduleSchemeEntity.class); |
|
33 |
entity.setId(UUID.randomUUID().toString()); |
|
34 |
baseDao.insert(entity); |
|
35 |
} |
|
36 |
|
|
37 |
@Override |
51c1c2
|
38 |
public void update(StScheduleSchemeSaveReqVO updateReqVO) { |
潘 |
39 |
StScheduleSchemeEntity entity = BeanUtils.toBean(updateReqVO, StScheduleSchemeEntity.class); |
bbc1ee
|
40 |
baseDao.updateById(entity); |
潘 |
41 |
} |
|
42 |
|
|
43 |
@Override |
|
44 |
public void delete(String id) { |
|
45 |
baseDao.deleteById(id); |
|
46 |
} |
|
47 |
|
|
48 |
@Override |
|
49 |
public StScheduleSchemeEntity getInfo(String id) { |
|
50 |
return baseDao.selectById(id); |
|
51 |
} |
|
52 |
|
|
53 |
@Override |
|
54 |
public StScheduleSchemeEntity getByCode(String code) { |
|
55 |
QueryWrapper<StScheduleSchemeEntity> queryWrapper = new QueryWrapper<>(); |
|
56 |
queryWrapper.eq("code", code); |
|
57 |
return baseDao.selectOne(queryWrapper); |
|
58 |
} |
|
59 |
|
|
60 |
@Override |
|
61 |
public void updateTime(String id, Date scheduleTime) { |
|
62 |
StScheduleSchemeEntity entity = new StScheduleSchemeEntity(); |
|
63 |
entity.setId(id); |
|
64 |
entity.setScheduleTime(scheduleTime); |
|
65 |
baseDao.updateById(entity); |
|
66 |
} |
7fd198
|
67 |
} |