From 9cfbabe0cbe096cfd1343d5bd6540bc47e01836a Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期一, 09 九月 2024 15:09:53 +0800
Subject: [PATCH] 修复查询问题

---
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleSchemeServiceImpl.java |   53 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 52 insertions(+), 1 deletions(-)

diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleSchemeServiceImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleSchemeServiceImpl.java
index 2a98eb3..3461fc6 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleSchemeServiceImpl.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleSchemeServiceImpl.java
@@ -1,16 +1,67 @@
 package com.iailab.module.model.mcs.sche.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.iailab.framework.common.pojo.PageResult;
 import com.iailab.framework.common.service.impl.BaseServiceImpl;
+import com.iailab.framework.common.util.object.BeanUtils;
 import com.iailab.module.model.mcs.sche.dao.StScheduleSchemeDao;
 import com.iailab.module.model.mcs.sche.entity.StScheduleSchemeEntity;
 import com.iailab.module.model.mcs.sche.service.StScheduleSchemeService;
+import com.iailab.module.model.mcs.sche.vo.StScheduleSchemePageReqVO;
+import com.iailab.module.model.mcs.sche.vo.StScheduleSchemeSaveReqVO;
 import org.springframework.stereotype.Service;
+
+import java.util.Date;
+import java.util.UUID;
 
 /**
  * @author PanZhibao
  * @date 2021年08月11日 12:06
  */
-@Service("stScheduleSchemeService")
+@Service
 public class StScheduleSchemeServiceImpl extends BaseServiceImpl<StScheduleSchemeDao, StScheduleSchemeEntity>
         implements StScheduleSchemeService {
+
+    @Override
+    public PageResult<StScheduleSchemeEntity> page(StScheduleSchemePageReqVO reqVO) {
+        return baseDao.selectPage(reqVO);
+    }
+
+    @Override
+    public void create(StScheduleSchemeSaveReqVO createReqVO) {
+        StScheduleSchemeEntity entity = BeanUtils.toBean(createReqVO, StScheduleSchemeEntity.class);
+        entity.setId(UUID.randomUUID().toString());
+        baseDao.insert(entity);
+    }
+
+    @Override
+    public void update(StScheduleSchemeSaveReqVO createReqVO) {
+        StScheduleSchemeEntity entity = BeanUtils.toBean(createReqVO, StScheduleSchemeEntity.class);
+        baseDao.updateById(entity);
+    }
+
+    @Override
+    public void delete(String id) {
+        baseDao.deleteById(id);
+    }
+
+    @Override
+    public StScheduleSchemeEntity getInfo(String id) {
+        return baseDao.selectById(id);
+    }
+
+    @Override
+    public StScheduleSchemeEntity getByCode(String code) {
+        QueryWrapper<StScheduleSchemeEntity> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("code", code);
+        return baseDao.selectOne(queryWrapper);
+    }
+
+    @Override
+    public void updateTime(String id, Date scheduleTime) {
+        StScheduleSchemeEntity entity = new StScheduleSchemeEntity();
+        entity.setId(id);
+        entity.setScheduleTime(scheduleTime);
+        baseDao.updateById(entity);
+    }
 }

--
Gitblit v1.9.3