获取线索报名的会销列表及详情

This commit is contained in:
feng.li
2023-12-18 17:45:54 +08:00
parent ee013f8c13
commit fae3b4408e
8 changed files with 166 additions and 6 deletions

View File

@@ -5,9 +5,9 @@ import com.cool.store.dto.exhibition.ExhibitionStatisticsDTO;
import com.cool.store.entity.HyExhibitionDO;
import com.cool.store.mapper.HyExhibitionMapper;
import com.cool.store.utils.StringUtil;
import io.swagger.models.auth.In;
import com.cool.store.vo.exhibition.PartnerExhibitionInfoVO;
import com.cool.store.vo.exhibition.PartnerExhibitionListVO;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
@@ -119,4 +119,17 @@ public class HyExhibitionDAO {
return hyExhibitionMapper.listByExhibitionGroupId(exhibitionGroupId,includeClose);
}
public List<PartnerExhibitionListVO> getPartnerExhibitionList(Long partnerLineId) {
if (partnerLineId == null) {
return new ArrayList<>();
}
return hyExhibitionMapper.getPartnerExhibitionList(partnerLineId);
}
public PartnerExhibitionInfoVO getPartnerExhibitionInfo(Integer exhibitionId, Long partnerLineId) {
if (exhibitionId == null || partnerLineId == null) {
return new PartnerExhibitionInfoVO();
}
return hyExhibitionMapper.getPartnerExhibitionInfo(exhibitionId, partnerLineId);
}
}

View File

@@ -3,9 +3,9 @@ package com.cool.store.mapper;
import com.cool.store.dto.exhibition.ExhibitionDTO;
import com.cool.store.dto.exhibition.ExhibitionStatisticsDTO;
import com.cool.store.entity.HyExhibitionDO;
import io.swagger.models.auth.In;
import com.cool.store.vo.exhibition.PartnerExhibitionInfoVO;
import com.cool.store.vo.exhibition.PartnerExhibitionListVO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
@@ -66,4 +66,19 @@ public interface HyExhibitionMapper {
*/
List<HyExhibitionDO> listByExhibitionGroupId(@Param("exhibitionGroupId") Integer exhibitionGroupId, @Param("includeClose") Boolean includeClose);
/**
* 获取线索报名参加的会销列表
* @param partnerLineId
* @return
*/
List<PartnerExhibitionListVO> getPartnerExhibitionList(@Param("partnerLineId") Long partnerLineId);
/**
* 获取线索报名的会销详情
*
* @param exhibitionId
* @param partnerLineId
* @return
*/
PartnerExhibitionInfoVO getPartnerExhibitionInfo(@Param("exhibitionId") Integer exhibitionId, @Param("partnerLineId") Long partnerLineId);
}

View File

@@ -372,4 +372,37 @@
</if>
</trim>
</sql>
<select id="getPartnerExhibitionList" resultType="com.cool.store.vo.exhibition.PartnerExhibitionListVO">
SELECT
t2.id AS exhibitionId,
t2.exhibition_code AS exhibitionCode,
t2.exhibition_name AS exhibitionName,
t2.start_date AS exhibitionDate
FROM `hy_partner_exhibition` t1
INNER JOIN `hy_exhibition` t2 ON t1.exhibition_id = t2.id
WHERE t1.deleted = 0
AND t2.deleted = 0
AND t1.participation_status != 7
AND t2.closed_type = 0
AND t1.partner_line_id = #{partnerLineId}
</select>
<select id="getPartnerExhibitionInfo" resultType="com.cool.store.vo.exhibition.PartnerExhibitionInfoVO">
SELECT
t1.id AS exhibitionId,
t1.exhibition_code AS exhibitionCode,
t1.exhibition_name AS exhibitionName,
t1.start_date AS exhibitionDate,
t1.location AS exhibitionPosition
FROM `hy_exhibition` t1
INNER JOIN `hy_partner_exhibition` t2 ON t1.id = t2.exhibition_id
WHERE t1.deleted = 0
AND t1.closed_type = 0
AND t2.deleted = 0
AND t2.participation_status != 7
AND t2.partner_line_id = #{partnerLineId}
AND t1.id = #{exhibitionId}
</select>
</mapper>