|
@@ -0,0 +1,74 @@
|
|
|
+package com.fjhx.common.service.logistics.impl;
|
|
|
+
|
|
|
+import cn.hutool.core.bean.BeanUtil;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.fjhx.common.entity.logistics.dto.LogisticsCompanyInfoDto;
|
|
|
+import com.fjhx.common.entity.logistics.dto.LogisticsCompanyInfoSelectDto;
|
|
|
+import com.fjhx.common.entity.logistics.po.LogisticsCompanyInfo;
|
|
|
+import com.fjhx.common.entity.logistics.vo.LogisticsCompanyInfoVo;
|
|
|
+import com.fjhx.common.mapper.logistics.LogisticsCompanyInfoMapper;
|
|
|
+import com.fjhx.common.service.logistics.LogisticsCompanyInfoService;
|
|
|
+import com.ruoyi.common.utils.wrapper.IWrapper;
|
|
|
+import com.ruoyi.common.utils.wrapper.SqlField;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * <p>
|
|
|
+ * 物流公司信息 服务实现类
|
|
|
+ * </p>
|
|
|
+ *
|
|
|
+ * @author
|
|
|
+ * @since 2024-03-18
|
|
|
+ */
|
|
|
+@Service
|
|
|
+public class LogisticsCompanyInfoServiceImpl extends ServiceImpl<LogisticsCompanyInfoMapper, LogisticsCompanyInfo> implements LogisticsCompanyInfoService {
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<LogisticsCompanyInfoVo> getList(LogisticsCompanyInfoSelectDto dto) {
|
|
|
+ IWrapper<LogisticsCompanyInfo> wrapper = getWrapper();
|
|
|
+
|
|
|
+ wrapper.keyword(dto.getKeyword(),
|
|
|
+ new SqlField("lci.name"),
|
|
|
+ new SqlField("lci.account_name"),
|
|
|
+ new SqlField("lci.account_number")
|
|
|
+ );
|
|
|
+
|
|
|
+ wrapper.orderByDesc("lci", LogisticsCompanyInfo::getId);
|
|
|
+ List<LogisticsCompanyInfoVo> list = this.baseMapper.getList(wrapper);
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Page<LogisticsCompanyInfoVo> getPage(LogisticsCompanyInfoSelectDto dto) {
|
|
|
+ IWrapper<LogisticsCompanyInfo> wrapper = getWrapper();
|
|
|
+ wrapper.orderByDesc("lci", LogisticsCompanyInfo::getId);
|
|
|
+ Page<LogisticsCompanyInfoVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
|
|
|
+ return page;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public LogisticsCompanyInfoVo detail(Long id) {
|
|
|
+ LogisticsCompanyInfo LogisticsCompanyInfo = this.getById(id);
|
|
|
+ LogisticsCompanyInfoVo result = BeanUtil.toBean(LogisticsCompanyInfo, LogisticsCompanyInfoVo.class);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void add(LogisticsCompanyInfoDto logisticsCompanyInfoDto) {
|
|
|
+ this.save(logisticsCompanyInfoDto);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void edit(LogisticsCompanyInfoDto logisticsCompanyInfoDto) {
|
|
|
+ this.updateById(logisticsCompanyInfoDto);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void delete(Long id) {
|
|
|
+ this.removeById(id);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|