查找加盟商接口,改造跟进日志接口

This commit is contained in:
shuo.wang
2025-01-08 14:19:07 +08:00
parent ea9caaa6f1
commit 3579bb5f7c
19 changed files with 154 additions and 24 deletions

View File

@@ -19,7 +19,7 @@ public interface LineFollowService {
* @param pageSize
* @return
*/
PageInfo<LineFollowLogVO> getFollowLogPage(Long lineId, Integer pageNum, Integer pageSize);
PageInfo<LineFollowLogVO> getFollowLogPage(Long lineId, Integer pageNum, Integer pageSize,Integer type);
/**
* 新增跟进日志

View File

@@ -5,6 +5,8 @@ import com.cool.store.request.*;
import com.cool.store.vo.*;
import com.github.pagehelper.PageInfo;
import java.util.List;
/**
* @Author suzhuhong
* @Date 2024/3/25 13:45
@@ -97,5 +99,7 @@ public interface LineService {
String getPayPicByLineId(Long lineId);
//增加查询资质审核的意向加盟商或正式加盟商搜索范围为全部
List<LineVO> getLines(LinesRequest request);
}

View File

@@ -2,9 +2,12 @@ package com.cool.store.service.impl;
import com.cool.store.dao.LineFollowLogDAO;
import com.cool.store.dao.LineInfoDAO;
import com.cool.store.dao.ShopInfoDAO;
import com.cool.store.entity.LineFollowLogDO;
import com.cool.store.entity.LineInfoDO;
import com.cool.store.entity.ShopInfoDO;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.FollowLogTypeEnum;
import com.cool.store.exception.ServiceException;
import com.cool.store.request.LineFollowLogRequest;
import com.cool.store.service.LineFollowService;
@@ -30,10 +33,12 @@ public class LineFollowServiceImpl implements LineFollowService {
private LineFollowLogDAO lineFollowLogDAO;
@Resource
private LineInfoDAO lineInfoDAO;
@Resource
private ShopInfoDAO shopInfoDAO;
@Override
public PageInfo<LineFollowLogVO> getFollowLogPage(Long lineId, Integer pageNum, Integer pageSize) {
Page<LineFollowLogDO> followLogPage = lineFollowLogDAO.getFollowLogPage(lineId, pageNum, pageSize);
public PageInfo<LineFollowLogVO> getFollowLogPage(Long lineId, Integer pageNum, Integer pageSize,Integer type) {
Page<LineFollowLogDO> followLogPage = lineFollowLogDAO.getFollowLogPage(lineId, pageNum, pageSize,type);
PageInfo resultPage = new PageInfo(followLogPage);
List<LineFollowLogVO> resultList = LineFollowLogVO.convertList(followLogPage);
resultPage.setList(resultList);
@@ -42,10 +47,21 @@ public class LineFollowServiceImpl implements LineFollowService {
@Override
public Long addFollowLog(LineFollowLogRequest followLog, String operateUserId, String operateUsername) {
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(followLog.getLineId());
if(Objects.isNull(lineInfo)){
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
if (followLog.getType().equals(FollowLogTypeEnum.LINE.getCode())){
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(followLog.getLineId());
if(Objects.isNull(lineInfo)){
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
}
return lineFollowLogDAO.addFollowLog(lineInfo, operateUserId, operateUsername, followLog.getMessage(),followLog.getType());
}
return lineFollowLogDAO.addFollowLog(lineInfo, operateUserId, operateUsername, followLog.getMessage());
if (followLog.getType().equals(FollowLogTypeEnum.SHOP.getCode())){
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(followLog.getLineId());
if (Objects.isNull(shopInfo)){
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
}
return lineFollowLogDAO.addFollowLogByShop(shopInfo,operateUserId,operateUsername, followLog.getMessage(),followLog.getType());
}
return null;
}
}

View File

@@ -497,6 +497,12 @@ public class LineServiceImpl implements LineService {
return regionQrcodeConfigDao.getPayPicByRegionId(bigRegionId);
}
@Override
public List<LineVO> getLines(LinesRequest request) {
PageHelper.startPage(request.getPageNum(), request.getPageSize());
return lineInfoDAO.getLines(request.getKeyword());
}
/**
* 计算预期时间
* @param startTime