|
@@ -1,39 +0,0 @@
|
|
|
-package org.dromara.bulk.service.impl;
|
|
|
-
|
|
|
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
-import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
-import lombok.RequiredArgsConstructor;
|
|
|
-import org.dromara.bulk.domain.bo.daHuoDingDanGuanLiBo;
|
|
|
-import org.dromara.bulk.domain.daHuoDingDanGuanLi;
|
|
|
-import org.dromara.bulk.domain.vo.daHuoDingDanGuanLiVo;
|
|
|
-import org.dromara.bulk.mapper.daHuoDingDanGuanLiMapper;
|
|
|
-import org.dromara.bulk.service.daHuoDingDanGuanLiService;
|
|
|
-import org.dromara.common.core.domain.R;
|
|
|
-import org.dromara.common.core.utils.MapstructUtils;
|
|
|
-import org.dromara.common.mybatis.core.page.PageQuery;
|
|
|
-import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
-import org.springframework.validation.annotation.Validated;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-
|
|
|
-@RequiredArgsConstructor
|
|
|
-@Service
|
|
|
-public class daHuoDingDanGuanLiServiceImpl implements daHuoDingDanGuanLiService {
|
|
|
- private final daHuoDingDanGuanLiMapper daHuoDingDanGuanLiMapper;
|
|
|
- @Override
|
|
|
- public TableDataInfo <daHuoDingDanGuanLiVo> selectPageDaHuoDingDanGuanLiList(daHuoDingDanGuanLiBo daHuoDingDanGuanLiBo, PageQuery pageQuery) {
|
|
|
- QueryWrapper<daHuoDingDanGuanLi> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.eq(StringUtils.isNotBlank(daHuoDingDanGuanLiBo.getName()),"name", daHuoDingDanGuanLiBo.getName())
|
|
|
- .eq(StringUtils.isNotBlank(daHuoDingDanGuanLiBo.getPhone()), "phone", daHuoDingDanGuanLiBo.getPhone())
|
|
|
- .eq(StringUtils.isNotBlank(daHuoDingDanGuanLiBo.getContact_name()), "contact_name", daHuoDingDanGuanLiBo.getContact_name());
|
|
|
- Page<daHuoDingDanGuanLiVo> page = daHuoDingDanGuanLiMapper.selectVoPage(pageQuery.build(), queryWrapper);
|
|
|
- return TableDataInfo.build(page);
|
|
|
- }
|
|
|
- @Override
|
|
|
- public int insertDaHuoDingDanGuanLi(@Validated @RequestBody daHuoDingDanGuanLiBo daHuoDingDanGuanLiBo) {
|
|
|
- daHuoDingDanGuanLi daHuoDingDanGuanLi=MapstructUtils.convert(daHuoDingDanGuanLiBo, daHuoDingDanGuanLi.class);
|
|
|
-
|
|
|
- return daHuoDingDanGuanLiMapper.insert(daHuoDingDanGuanLi);
|
|
|
- }
|
|
|
-}
|