会销组下会销列表+手机号查询线索信息

This commit is contained in:
苏竹红
2023-12-13 17:03:27 +08:00
parent a05215c89e
commit e92b9ec3eb
12 changed files with 82 additions and 14 deletions

View File

@@ -101,11 +101,11 @@ public class HyExhibitionDAO {
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)){
return new ArrayList<>();
}
return hyExhibitionMapper.listByExhibitionGroupIds(exhibitionGroupIdList);
return hyExhibitionMapper.listByExhibitionGroupIds(exhibitionGroupIdList,filterCloseExhibition);
}
public Integer lineSignUpCount(Integer exhibitionGroupId, Long lineId){

View File

@@ -54,7 +54,7 @@ public interface HyExhibitionMapper {
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);

View File

@@ -276,6 +276,9 @@
<foreach collection="list" item="groupId" open="and exhibition_group_id in (" separator="," close=")">
#{groupId}
</foreach>
<if test="filterCloseExhibition">
and closed_type = 0
</if>
</where>
order by id asc
</select>

View File

@@ -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;
}
}

View File

@@ -70,9 +70,11 @@ public interface ExhibitionService {
/**
* 会销组详情
* @param exhibitionGroupId
* @param includeCollaborators true-包含协作人信息 false_不包含
* @param filterCloseExhibition true-过滤关闭的会销 false-不过滤关闭的会销
* @return
*/
ExhibitionGroupDetailVO getExhibitionGroupDetail(Integer exhibitionGroupId);
ExhibitionGroupDetailVO getExhibitionGroupDetail(Integer exhibitionGroupId,Boolean includeCollaborators,Boolean filterCloseExhibition);
/**
* 会销详情

View File

@@ -5,6 +5,7 @@ import com.cool.store.exception.ApiException;
import com.cool.store.request.PartnerUserInfoRequest;
import com.cool.store.vo.ApplyBaseInfoVO;
import com.cool.store.vo.InviteCodeDetailVO;
import com.cool.store.vo.partner.PartnerUserBaseVO;
public interface PartnerUserInfoService {
@@ -18,4 +19,5 @@ public interface PartnerUserInfoService {
ApplyBaseInfoVO updatePartnerUserInfo(PartnerUserInfoRequest partnerUserInfoRequest) throws ApiException;
PartnerUserBaseVO getPartnerInfo(String mobile);
}

View File

@@ -7,6 +7,7 @@ import com.cool.store.context.PartnerUserHolder;
import com.cool.store.dao.HyOpenAreaInfoDAO;
import com.cool.store.dao.HyPartnerUserInfoDAO;
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.HyPartnerLineInfoDO;
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.InviteCodeDetailVO;
import com.cool.store.vo.PartnerUserInfoVO;
import com.cool.store.vo.partner.PartnerUserBaseVO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
@@ -152,6 +154,15 @@ public class PartnerUserInfoServiceImpl implements PartnerUserInfoService {
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) {
hyPartnerUserInfoDO.setUsername(partnerUserInfoRequest.getUsername());
hyPartnerUserInfoDO.setMobile(partnerUserInfoRequest.getMobile());

View File

@@ -309,7 +309,7 @@ public class ExhibitionServiceImpl implements ExhibitionService {
return myExhibitionGroupDTOPage;
}
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));
List<MyExhibitionGroupVO> result = new ArrayList<>();
@@ -351,7 +351,7 @@ public class ExhibitionServiceImpl implements ExhibitionService {
}
@Override
public ExhibitionGroupDetailVO getExhibitionGroupDetail(Integer exhibitionGroupId) {
public ExhibitionGroupDetailVO getExhibitionGroupDetail(Integer exhibitionGroupId,Boolean includeCollaborators,Boolean filterCloseExhibition) {
//查询标签组
HyExhibitionGroupDO hyExhibitionGroupDO = hyExhibitionGroupDAO.selectByPrimaryKey(exhibitionGroupId);
if (ObjectUtils.isEmpty(hyExhibitionGroupDO)){
@@ -360,7 +360,7 @@ public class ExhibitionServiceImpl implements ExhibitionService {
ExhibitionGroupDetailVO exhibitionGroupDetailVO = new ExhibitionGroupDetailVO();
exhibitionGroupDetailVO.setExhibitionGroupName(hyExhibitionGroupDO.getExhibitionGroupName());
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<>();
//会销对应的会销协作人map
Map<String, CollaboratorVO> resultMap = getExhibitionCollaboratorMap(exhibitionDTOS);
@@ -371,8 +371,9 @@ public class ExhibitionServiceImpl implements ExhibitionService {
exhibitionVO.setStartDate(exhibitionDTO.getStartDate());
exhibitionVO.setLocation(exhibitionDTO.getLocation());
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<>();
userIdList.forEach(userIds->{
coll.add(resultMap.get(userIds));

View File

@@ -12,6 +12,7 @@ import com.cool.store.service.*;
import com.cool.store.vo.*;
import com.cool.store.vo.interview.InterviewVO;
import com.cool.store.vo.partner.PartnerSimpleBaseInfoVO;
import com.cool.store.vo.partner.PartnerUserBaseVO;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@@ -346,4 +347,10 @@ public class DeskController {
public ResponseResult<PartnerSimpleBaseInfoVO> queryBaseInfo(@RequestParam(value = "partnerLineId")Long 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));
}
}

View File

@@ -65,7 +65,7 @@ public class ExhibitionController {
@GetMapping(value = "/getExhibitionGroupDetail")
@ApiOperation("会销组详情")
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));
}
}

View File

@@ -10,10 +10,7 @@ import com.cool.store.vo.exhibition.SignUpExhibitionVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -38,4 +35,10 @@ public class ExhibitionController {
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));
}
}

View File

@@ -14,6 +14,7 @@ import com.cool.store.service.*;
import com.cool.store.utils.RedisUtilPool;
import com.cool.store.vo.*;
import com.cool.store.vo.cuser.IdentityCardInfoVO;
import com.cool.store.vo.partner.PartnerUserBaseVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
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));
}
}