From 08923c6d95dc8f0f415de94e1d4e3230cdcf7a8e Mon Sep 17 00:00:00 2001 From: houzhongjian <houzhongyi@126.com> Date: 星期四, 14 十一月 2024 15:42:58 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmResultTableServiceImpl.java | 51 ++++++++++++++++++++++++++------------------------- 1 files changed, 26 insertions(+), 25 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmResultTableServiceImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmResultTableServiceImpl.java index 597002c..ba9b6c3 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmResultTableServiceImpl.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmResultTableServiceImpl.java @@ -1,58 +1,59 @@ package com.iailab.module.model.mcs.pre.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.iailab.framework.common.pojo.PageResult; -import com.iailab.framework.common.service.impl.BaseServiceImpl; import com.iailab.module.model.mcs.pre.dao.MmResultTableDao; import com.iailab.module.model.mcs.pre.entity.MmResultTableEntity; -import com.iailab.module.model.mcs.pre.service.MmResultTableService;; +import com.iailab.module.model.mcs.pre.service.MmResultTableService; import com.iailab.module.model.mcs.pre.vo.MmResultTablePageReqVO; import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.UUID; +import java.util.*; + +; /** * @author PanZhibao * @date 2021年04月23日 16:28 */ -@Service("mmResultTableService") -public class MmResultTableServiceImpl extends BaseServiceImpl<MmResultTableDao, MmResultTableEntity> implements MmResultTableService { +@Service +public class MmResultTableServiceImpl extends ServiceImpl<MmResultTableDao, MmResultTableEntity> implements MmResultTableService { + @Autowired + private MmResultTableDao mmResultTableDao; + @Override public PageResult<MmResultTableEntity> page(MmResultTablePageReqVO reqVO) { - return baseDao.selectPage(reqVO); - } - - private QueryWrapper<MmResultTableEntity> getWrapper(Map<String, Object> params) { - String tablename = (String)params.get("tablename"); - - QueryWrapper<MmResultTableEntity> wrapper = new QueryWrapper<>(); - wrapper.like(StringUtils.isNotBlank(tablename),"tablename", tablename); - - return wrapper; + return mmResultTableDao.selectPage(reqVO); } @Override - @Transactional(rollbackFor = Exception.class) + public MmResultTableEntity info(String id) { + return mmResultTableDao.selectById(id); + } + + @Override + public List<MmResultTableEntity> list(Map<String, Object> params) { + return mmResultTableDao.selectList(new QueryWrapper<>()); + } + + @Override public void saveResultTable(MmResultTableEntity resultTable) { resultTable.setId(UUID.randomUUID().toString()); - baseDao.insert(resultTable); + mmResultTableDao.insert(resultTable); } @Override - @Transactional(rollbackFor = Exception.class) public void update(MmResultTableEntity resultTable) { - baseDao.updateById(resultTable); + mmResultTableDao.updateById(resultTable); } @Override - @Transactional(rollbackFor = Exception.class) public void deleteBatch(String[] resultTableIds) { - baseDao.deleteBatchIds(Arrays.asList(resultTableIds)); + mmResultTableDao.deleteBatchIds(Arrays.asList(resultTableIds)); } @Override @@ -63,7 +64,7 @@ queryWrapper.ne(StringUtils.isNotBlank(id), "id", id); queryWrapper.and(wrapper -> wrapper.eq("tablename",tablename)); - List<MmResultTableEntity> list = baseDao.selectList(queryWrapper); + List<MmResultTableEntity> list = mmResultTableDao.selectList(queryWrapper); return list.size(); } } -- Gitblit v1.9.3