提交意向申请后刷新线索会销状态

This commit is contained in:
feng.li
2023-12-29 13:58:22 +08:00
parent 1cdff3cd99
commit 9b04b1a370
4 changed files with 35 additions and 4 deletions

View File

@@ -156,4 +156,11 @@ public class HyPartnerExhibitionDAO {
}
return hyPartnerExhibitionMapper.getLineByExhibitionIds(exhibitionIds);
}
public void updateStatusAfterSubmitIndustry(Long partnerLineId) {
if (partnerLineId == null) {
return;
}
hyPartnerExhibitionMapper.updateStatusAfterSubmitIndustry(partnerLineId);
}
}

View File

@@ -3,11 +3,10 @@ package com.cool.store.dao;
import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
import com.cool.store.entity.HyPartnerIntentInfoDO;
import com.cool.store.mapper.HyPartnerIntentInfoMapper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList;
@@ -26,7 +25,13 @@ public class HyPartnerIntentInfoDAO {
@Resource
HyPartnerIntentInfoMapper hyPartnerIntentInfoMapper;
public int insertSelective( HyPartnerIntentInfoDO record){
@Autowired
HyPartnerExhibitionDAO hyPartnerExhibitionDAO;
@Transactional
public int insertSelective( HyPartnerIntentInfoDO record){
//增加修改线索会销状态
hyPartnerExhibitionDAO.updateStatusAfterSubmitIndustry(record.getPartnerLineId());
return hyPartnerIntentInfoMapper.insertSelective(record);
}

View File

@@ -116,4 +116,10 @@ public interface HyPartnerExhibitionMapper {
* @return
*/
List<ExhibitionLineDTO> getLineByExhibitionIds(List<Integer> exhibitionIds);
/**
* 在线索提交意向申请后刷线线索报名会销的状态
* @param partnerLineId
*/
int updateStatusAfterSubmitIndustry(@Param("partnerLineId") Long partnerLineId);
}

View File

@@ -499,4 +499,17 @@
</foreach>
)
</select>
<update id="updateStatusAfterSubmitIndustry">
UPDATE hy_partner_exhibition t1
INNER JOIN hy_exhibition t2 ON t1.exhibition_id = t2.id
SET t1.participation_status = 3
WHERE t1.deleted = 0
AND t2.deleted = 0
AND t2.closed_type = 0
AND partner_line_id = #{partnerLineId}
AND participation_status = 1
</update>
</mapper>