会销组下会销列表+手机号查询线索信息
This commit is contained in:
@@ -101,11 +101,11 @@ public class HyExhibitionDAO {
|
|||||||
return result.stream().collect(Collectors.toMap(ExhibitionStatisticsDTO::getExhibitionCode, date -> date));
|
return result.stream().collect(Collectors.toMap(ExhibitionStatisticsDTO::getExhibitionCode, date -> date));
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<ExhibitionDTO> listByExhibitionGroupIds(List<Integer> exhibitionGroupIdList){
|
public List<ExhibitionDTO> listByExhibitionGroupIds(List<Integer> exhibitionGroupIdList,Boolean filterCloseExhibition){
|
||||||
if (CollectionUtils.isEmpty(exhibitionGroupIdList)){
|
if (CollectionUtils.isEmpty(exhibitionGroupIdList)){
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
return hyExhibitionMapper.listByExhibitionGroupIds(exhibitionGroupIdList);
|
return hyExhibitionMapper.listByExhibitionGroupIds(exhibitionGroupIdList,filterCloseExhibition);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer lineSignUpCount(Integer exhibitionGroupId, Long lineId){
|
public Integer lineSignUpCount(Integer exhibitionGroupId, Long lineId){
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public interface HyExhibitionMapper {
|
|||||||
|
|
||||||
List<ExhibitionStatisticsDTO> exhibitionStatistic(@Param("list") List<String> exhibitionCodeList);
|
List<ExhibitionStatisticsDTO> exhibitionStatistic(@Param("list") List<String> exhibitionCodeList);
|
||||||
|
|
||||||
List<ExhibitionDTO> listByExhibitionGroupIds(@Param("list") List<Integer> exhibitionGroupIdList);
|
List<ExhibitionDTO> listByExhibitionGroupIds(@Param("list") List<Integer> exhibitionGroupIdList, @Param("filterCloseExhibition") Boolean filterCloseExhibition);
|
||||||
|
|
||||||
Integer lineSignUpCount(@Param("exhibitionGroupId") Integer exhibitionGroupId, @Param("lineId") Long lineId);
|
Integer lineSignUpCount(@Param("exhibitionGroupId") Integer exhibitionGroupId, @Param("lineId") Long lineId);
|
||||||
|
|
||||||
|
|||||||
@@ -276,6 +276,9 @@
|
|||||||
<foreach collection="list" item="groupId" open="and exhibition_group_id in (" separator="," close=")">
|
<foreach collection="list" item="groupId" open="and exhibition_group_id in (" separator="," close=")">
|
||||||
#{groupId}
|
#{groupId}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
<if test="filterCloseExhibition">
|
||||||
|
and closed_type = 0
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by id asc
|
order by id asc
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.cool.store.vo.partner;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2023/12/13 16:38
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PartnerUserBaseVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("手机号")
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
@ApiModelProperty("申请人姓名")
|
||||||
|
private String partnerName;
|
||||||
|
|
||||||
|
@ApiModelProperty("意向开店区域")
|
||||||
|
private String wantShopArea;
|
||||||
|
|
||||||
|
|
||||||
|
public PartnerUserBaseVO() {}
|
||||||
|
public PartnerUserBaseVO(String mobile, String partnerName, String wantShopArea) {
|
||||||
|
this.mobile = mobile;
|
||||||
|
this.partnerName = partnerName;
|
||||||
|
this.wantShopArea = wantShopArea;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -70,9 +70,11 @@ public interface ExhibitionService {
|
|||||||
/**
|
/**
|
||||||
* 会销组详情
|
* 会销组详情
|
||||||
* @param exhibitionGroupId
|
* @param exhibitionGroupId
|
||||||
|
* @param includeCollaborators true-包含协作人信息 false_不包含
|
||||||
|
* @param filterCloseExhibition true-过滤关闭的会销 false-不过滤关闭的会销
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
ExhibitionGroupDetailVO getExhibitionGroupDetail(Integer exhibitionGroupId);
|
ExhibitionGroupDetailVO getExhibitionGroupDetail(Integer exhibitionGroupId,Boolean includeCollaborators,Boolean filterCloseExhibition);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 会销详情
|
* 会销详情
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.cool.store.exception.ApiException;
|
|||||||
import com.cool.store.request.PartnerUserInfoRequest;
|
import com.cool.store.request.PartnerUserInfoRequest;
|
||||||
import com.cool.store.vo.ApplyBaseInfoVO;
|
import com.cool.store.vo.ApplyBaseInfoVO;
|
||||||
import com.cool.store.vo.InviteCodeDetailVO;
|
import com.cool.store.vo.InviteCodeDetailVO;
|
||||||
|
import com.cool.store.vo.partner.PartnerUserBaseVO;
|
||||||
|
|
||||||
public interface PartnerUserInfoService {
|
public interface PartnerUserInfoService {
|
||||||
|
|
||||||
@@ -18,4 +19,5 @@ public interface PartnerUserInfoService {
|
|||||||
|
|
||||||
ApplyBaseInfoVO updatePartnerUserInfo(PartnerUserInfoRequest partnerUserInfoRequest) throws ApiException;
|
ApplyBaseInfoVO updatePartnerUserInfo(PartnerUserInfoRequest partnerUserInfoRequest) throws ApiException;
|
||||||
|
|
||||||
|
PartnerUserBaseVO getPartnerInfo(String mobile);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import com.cool.store.context.PartnerUserHolder;
|
|||||||
import com.cool.store.dao.HyOpenAreaInfoDAO;
|
import com.cool.store.dao.HyOpenAreaInfoDAO;
|
||||||
import com.cool.store.dao.HyPartnerUserInfoDAO;
|
import com.cool.store.dao.HyPartnerUserInfoDAO;
|
||||||
import com.cool.store.dto.log.UserInfoUpdateDTO;
|
import com.cool.store.dto.log.UserInfoUpdateDTO;
|
||||||
|
import com.cool.store.dto.partner.MobileCheckDTO;
|
||||||
import com.cool.store.entity.HyOpenAreaInfoDO;
|
import com.cool.store.entity.HyOpenAreaInfoDO;
|
||||||
import com.cool.store.entity.HyPartnerLineInfoDO;
|
import com.cool.store.entity.HyPartnerLineInfoDO;
|
||||||
import com.cool.store.entity.HyPartnerUserInfoDO;
|
import com.cool.store.entity.HyPartnerUserInfoDO;
|
||||||
@@ -22,6 +23,7 @@ import com.cool.store.utils.RedisUtilPool;
|
|||||||
import com.cool.store.vo.ApplyBaseInfoVO;
|
import com.cool.store.vo.ApplyBaseInfoVO;
|
||||||
import com.cool.store.vo.InviteCodeDetailVO;
|
import com.cool.store.vo.InviteCodeDetailVO;
|
||||||
import com.cool.store.vo.PartnerUserInfoVO;
|
import com.cool.store.vo.PartnerUserInfoVO;
|
||||||
|
import com.cool.store.vo.partner.PartnerUserBaseVO;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@@ -152,6 +154,15 @@ public class PartnerUserInfoServiceImpl implements PartnerUserInfoService {
|
|||||||
return applyBaseInfoVO;
|
return applyBaseInfoVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PartnerUserBaseVO getPartnerInfo(String mobile) {
|
||||||
|
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByMobile(mobile);
|
||||||
|
if (hyPartnerUserInfoDO == null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return new PartnerUserBaseVO(hyPartnerUserInfoDO.getMobile(),hyPartnerUserInfoDO.getUsername(),hyPartnerUserInfoDO.getWantShopArea());
|
||||||
|
}
|
||||||
|
|
||||||
private void fillUserInfoDOByRequest(HyPartnerUserInfoDO hyPartnerUserInfoDO, PartnerUserInfoRequest partnerUserInfoRequest) {
|
private void fillUserInfoDOByRequest(HyPartnerUserInfoDO hyPartnerUserInfoDO, PartnerUserInfoRequest partnerUserInfoRequest) {
|
||||||
hyPartnerUserInfoDO.setUsername(partnerUserInfoRequest.getUsername());
|
hyPartnerUserInfoDO.setUsername(partnerUserInfoRequest.getUsername());
|
||||||
hyPartnerUserInfoDO.setMobile(partnerUserInfoRequest.getMobile());
|
hyPartnerUserInfoDO.setMobile(partnerUserInfoRequest.getMobile());
|
||||||
|
|||||||
@@ -309,7 +309,7 @@ public class ExhibitionServiceImpl implements ExhibitionService {
|
|||||||
return myExhibitionGroupDTOPage;
|
return myExhibitionGroupDTOPage;
|
||||||
}
|
}
|
||||||
List<Integer> groupIds = myExhibitionGroupDTOS.stream().map(MyExhibitionGroupDTO::getId).collect(Collectors.toList());
|
List<Integer> groupIds = myExhibitionGroupDTOS.stream().map(MyExhibitionGroupDTO::getId).collect(Collectors.toList());
|
||||||
List<ExhibitionDTO> exhibitionDTOS = hyExhibitionDAO.listByExhibitionGroupIds(groupIds);
|
List<ExhibitionDTO> exhibitionDTOS = hyExhibitionDAO.listByExhibitionGroupIds(groupIds,Boolean.FALSE);
|
||||||
Map<Integer, List<ExhibitionDTO>> groupMap = exhibitionDTOS.stream().collect(Collectors.groupingBy(ExhibitionDTO::getExhibitionGroupId));
|
Map<Integer, List<ExhibitionDTO>> groupMap = exhibitionDTOS.stream().collect(Collectors.groupingBy(ExhibitionDTO::getExhibitionGroupId));
|
||||||
|
|
||||||
List<MyExhibitionGroupVO> result = new ArrayList<>();
|
List<MyExhibitionGroupVO> result = new ArrayList<>();
|
||||||
@@ -351,7 +351,7 @@ public class ExhibitionServiceImpl implements ExhibitionService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ExhibitionGroupDetailVO getExhibitionGroupDetail(Integer exhibitionGroupId) {
|
public ExhibitionGroupDetailVO getExhibitionGroupDetail(Integer exhibitionGroupId,Boolean includeCollaborators,Boolean filterCloseExhibition) {
|
||||||
//查询标签组
|
//查询标签组
|
||||||
HyExhibitionGroupDO hyExhibitionGroupDO = hyExhibitionGroupDAO.selectByPrimaryKey(exhibitionGroupId);
|
HyExhibitionGroupDO hyExhibitionGroupDO = hyExhibitionGroupDAO.selectByPrimaryKey(exhibitionGroupId);
|
||||||
if (ObjectUtils.isEmpty(hyExhibitionGroupDO)){
|
if (ObjectUtils.isEmpty(hyExhibitionGroupDO)){
|
||||||
@@ -360,7 +360,7 @@ public class ExhibitionServiceImpl implements ExhibitionService {
|
|||||||
ExhibitionGroupDetailVO exhibitionGroupDetailVO = new ExhibitionGroupDetailVO();
|
ExhibitionGroupDetailVO exhibitionGroupDetailVO = new ExhibitionGroupDetailVO();
|
||||||
exhibitionGroupDetailVO.setExhibitionGroupName(hyExhibitionGroupDO.getExhibitionGroupName());
|
exhibitionGroupDetailVO.setExhibitionGroupName(hyExhibitionGroupDO.getExhibitionGroupName());
|
||||||
exhibitionGroupDetailVO.setId(hyExhibitionGroupDO.getId());
|
exhibitionGroupDetailVO.setId(hyExhibitionGroupDO.getId());
|
||||||
List<ExhibitionDTO> exhibitionDTOS = hyExhibitionDAO.listByExhibitionGroupIds(Arrays.asList(exhibitionGroupId));
|
List<ExhibitionDTO> exhibitionDTOS = hyExhibitionDAO.listByExhibitionGroupIds(Arrays.asList(exhibitionGroupId),filterCloseExhibition);
|
||||||
List<ExhibitionVO> exhibitionVOS = new ArrayList<>();
|
List<ExhibitionVO> exhibitionVOS = new ArrayList<>();
|
||||||
//会销对应的会销协作人map
|
//会销对应的会销协作人map
|
||||||
Map<String, CollaboratorVO> resultMap = getExhibitionCollaboratorMap(exhibitionDTOS);
|
Map<String, CollaboratorVO> resultMap = getExhibitionCollaboratorMap(exhibitionDTOS);
|
||||||
@@ -371,8 +371,9 @@ public class ExhibitionServiceImpl implements ExhibitionService {
|
|||||||
exhibitionVO.setStartDate(exhibitionDTO.getStartDate());
|
exhibitionVO.setStartDate(exhibitionDTO.getStartDate());
|
||||||
exhibitionVO.setLocation(exhibitionDTO.getLocation());
|
exhibitionVO.setLocation(exhibitionDTO.getLocation());
|
||||||
exhibitionVO.setId(exhibitionDTO.getId());
|
exhibitionVO.setId(exhibitionDTO.getId());
|
||||||
if (StringUtils.isNotEmpty(exhibitionDTO.getCollaboratorStr())){
|
//需要加载协作人才加载 不需要的时候 不加载
|
||||||
List<String> userIdList = Arrays.asList(exhibitionDTO.getCollaboratorStr().substring(1).split(Constants.COMMA));
|
if (includeCollaborators&&StringUtils.isNotEmpty(exhibitionDTO.getCollaboratorStr())){
|
||||||
|
List<String> userIdList = Arrays.asList(exhibitionDTO.getCollaboratorStr().substring(CommonConstants.ONE).split(Constants.COMMA));
|
||||||
List<CollaboratorVO> coll = new ArrayList<>();
|
List<CollaboratorVO> coll = new ArrayList<>();
|
||||||
userIdList.forEach(userIds->{
|
userIdList.forEach(userIds->{
|
||||||
coll.add(resultMap.get(userIds));
|
coll.add(resultMap.get(userIds));
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import com.cool.store.service.*;
|
|||||||
import com.cool.store.vo.*;
|
import com.cool.store.vo.*;
|
||||||
import com.cool.store.vo.interview.InterviewVO;
|
import com.cool.store.vo.interview.InterviewVO;
|
||||||
import com.cool.store.vo.partner.PartnerSimpleBaseInfoVO;
|
import com.cool.store.vo.partner.PartnerSimpleBaseInfoVO;
|
||||||
|
import com.cool.store.vo.partner.PartnerUserBaseVO;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
@@ -346,4 +347,10 @@ public class DeskController {
|
|||||||
public ResponseResult<PartnerSimpleBaseInfoVO> queryBaseInfo(@RequestParam(value = "partnerLineId")Long partnerLineId){
|
public ResponseResult<PartnerSimpleBaseInfoVO> queryBaseInfo(@RequestParam(value = "partnerLineId")Long partnerLineId){
|
||||||
return ResponseResult.success(hyPartnerLineInfoService.queryBaseInfo(partnerLineId));
|
return ResponseResult.success(hyPartnerLineInfoService.queryBaseInfo(partnerLineId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping(path = "/getPartnerInfo")
|
||||||
|
@ApiOperation("线索基本信息")
|
||||||
|
public ResponseResult<PartnerUserBaseVO> getPartnerInfo(@RequestParam(value = "mobile")String mobile){
|
||||||
|
return ResponseResult.success(partnerUserInfoService.getPartnerInfo(mobile));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ public class ExhibitionController {
|
|||||||
@GetMapping(value = "/getExhibitionGroupDetail")
|
@GetMapping(value = "/getExhibitionGroupDetail")
|
||||||
@ApiOperation("会销组详情")
|
@ApiOperation("会销组详情")
|
||||||
public ResponseResult getExhibitionGroupDetail(@RequestParam(required = false,value = "exhibitionGroupId") Integer exhibitionGroupId) {
|
public ResponseResult getExhibitionGroupDetail(@RequestParam(required = false,value = "exhibitionGroupId") Integer exhibitionGroupId) {
|
||||||
return ResponseResult.success(exhibitionService.getExhibitionGroupDetail(exhibitionGroupId));
|
return ResponseResult.success(exhibitionService.getExhibitionGroupDetail(exhibitionGroupId,Boolean.TRUE,Boolean.FALSE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -138,4 +138,6 @@ public class ExhibitionController {
|
|||||||
return ResponseResult.success(exhibitionService.closeExhibition(exhibitionId,user));
|
return ResponseResult.success(exhibitionService.closeExhibition(exhibitionId,user));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,10 +10,7 @@ import com.cool.store.vo.exhibition.SignUpExhibitionVO;
|
|||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
@@ -38,4 +35,10 @@ public class ExhibitionController {
|
|||||||
return ResponseResult.success(exhibitionService.signUpExhibition(dto,new LoginUserInfo()));
|
return ResponseResult.success(exhibitionService.signUpExhibition(dto,new LoginUserInfo()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping(value = "/getExhibitionList")
|
||||||
|
@ApiOperation("会销组详情")
|
||||||
|
public ResponseResult getExhibitionGroupDetail(@RequestParam(required = false,value = "exhibitionGroupId") Integer exhibitionGroupId) {
|
||||||
|
return ResponseResult.success(exhibitionService.getExhibitionGroupDetail(exhibitionGroupId,Boolean.FALSE,Boolean.TRUE));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import com.cool.store.service.*;
|
|||||||
import com.cool.store.utils.RedisUtilPool;
|
import com.cool.store.utils.RedisUtilPool;
|
||||||
import com.cool.store.vo.*;
|
import com.cool.store.vo.*;
|
||||||
import com.cool.store.vo.cuser.IdentityCardInfoVO;
|
import com.cool.store.vo.cuser.IdentityCardInfoVO;
|
||||||
|
import com.cool.store.vo.partner.PartnerUserBaseVO;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
@@ -254,4 +255,10 @@ public class PartnerController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping(path = "/getPartnerInfo")
|
||||||
|
@ApiOperation("线索基本信息")
|
||||||
|
public ResponseResult<PartnerUserBaseVO> getPartnerInfo(@RequestParam(value = "mobile")String mobile){
|
||||||
|
return ResponseResult.success(partnerUserInfoService.getPartnerInfo(mobile));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user