|
@@ -1,18 +1,23 @@
|
|
package com.yh.saas.plugin.yiliangyiyun.service.impl;
|
|
package com.yh.saas.plugin.yiliangyiyun.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
|
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
|
|
|
+import com.baomidou.mybatisplus.plugins.Page;
|
|
|
|
+import com.google.common.collect.Lists;
|
|
import com.yh.saas.plugin.yiliangyiyun.constant.NumberConstant;
|
|
import com.yh.saas.plugin.yiliangyiyun.constant.NumberConstant;
|
|
import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
|
|
import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
|
|
import com.yh.saas.plugin.yiliangyiyun.entity.AgentCargoOwnerInfo;
|
|
import com.yh.saas.plugin.yiliangyiyun.entity.AgentCargoOwnerInfo;
|
|
import com.yh.saas.plugin.yiliangyiyun.entity.CargoOwnerCompInfo;
|
|
import com.yh.saas.plugin.yiliangyiyun.entity.CargoOwnerCompInfo;
|
|
import com.yh.saas.plugin.yiliangyiyun.entity.CompanyInfo;
|
|
import com.yh.saas.plugin.yiliangyiyun.entity.CompanyInfo;
|
|
|
|
+import com.yh.saas.plugin.yiliangyiyun.entity.PublishTaskInfo;
|
|
import com.yh.saas.plugin.yiliangyiyun.mapper.AgentCargoOwnerInfoMapper;
|
|
import com.yh.saas.plugin.yiliangyiyun.mapper.AgentCargoOwnerInfoMapper;
|
|
import com.yh.saas.plugin.yiliangyiyun.service.IAgentCargoOwnerInfoService;
|
|
import com.yh.saas.plugin.yiliangyiyun.service.IAgentCargoOwnerInfoService;
|
|
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
+import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
/**
|
|
* <p>
|
|
* <p>
|
|
@@ -27,15 +32,27 @@ public class AgentCargoOwnerInfoServiceImpl extends ServiceImpl<AgentCargoOwnerI
|
|
|
|
|
|
/**
|
|
/**
|
|
*代理货主列表
|
|
*代理货主列表
|
|
- * @param commonId
|
|
|
|
|
|
+ * @param agentCargoOwnerInfo
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public List<AgentCargoOwnerInfo> selectAgentCargoOwner(String commonId) {
|
|
|
|
- List<AgentCargoOwnerInfo> agentCargoOwnerInfoList = this.selectList(new EntityWrapper<AgentCargoOwnerInfo>()
|
|
|
|
- .eq(AgentCargoOwnerInfo.QueryFiles.COMMON_ID, commonId)
|
|
|
|
- .eq(AgentCargoOwnerInfo.QueryFiles.DELETE_FLAG, NumberConstant.CONSTANT0));
|
|
|
|
- return agentCargoOwnerInfoList;
|
|
|
|
|
|
+ public Page<AgentCargoOwnerInfo> selectAgentCargoOwner(AgentCargoOwnerInfo agentCargoOwnerInfo) {
|
|
|
|
+ Map<String, Object> pageView = new HashMap<>();
|
|
|
|
+ pageView.put("startRecord", (agentCargoOwnerInfo.getCurrentPage() - 1)
|
|
|
|
+ * agentCargoOwnerInfo.getPageSize());
|
|
|
|
+ //用户id
|
|
|
|
+ pageView.put("commonId", agentCargoOwnerInfo.getCommonId());
|
|
|
|
+ pageView.put("pageSize", agentCargoOwnerInfo.getPageSize());
|
|
|
|
+ pageView.put("currentPage", agentCargoOwnerInfo.getCurrentPage());
|
|
|
|
+ // 查询任务总数
|
|
|
|
+ Integer dataCount = baseMapper.getCountByCondition(pageView);
|
|
|
|
+ List<AgentCargoOwnerInfo> dataList = baseMapper.getListByCondition(pageView);
|
|
|
|
+ Page<AgentCargoOwnerInfo> page = new Page<>();
|
|
|
|
+ page.setRecords(dataList == null ? Lists.newArrayList() : dataList);
|
|
|
|
+ page.setTotal(dataCount == null ? 0 : dataCount);
|
|
|
|
+ page.setCurrent(agentCargoOwnerInfo.getCurrentPage());
|
|
|
|
+ page.setSize(agentCargoOwnerInfo.getPageSize());
|
|
|
|
+ return page;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|