推送逻辑新增校验

This commit is contained in:
zhangchenbiao
2024-04-19 10:34:04 +08:00
parent c38cd9b4a4
commit 8e66e20e97
4 changed files with 71 additions and 4 deletions

View File

@@ -136,4 +136,16 @@ public class PointRecommendDAO {
}
return pointRecommendMapper.rejectPoint(lineId, pointId, reason);
}
/**
* 获取铺位推送了哪些列表
* @param pointId
* @return
*/
public List<PointRecommendDO> getRecommendPointListByPointId(Long pointId) {
if(Objects.isNull(pointId)){
return Lists.newArrayList();
}
return pointRecommendMapper.getRecommendPointListByPointId(pointId);
}
}

View File

@@ -80,4 +80,11 @@ public interface PointRecommendMapper extends Mapper<PointRecommendDO> {
* @return
*/
Integer rejectPoint(@Param("lineId") Long lineId, @Param("pointId") Long pointId, @Param("reason") String reason);
/**
* 获取铺位推送过哪些线索
* @param pointId
* @return
*/
List<PointRecommendDO> getRecommendPointListByPointId(@Param("pointId") Long pointId);
}

View File

@@ -13,6 +13,10 @@
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="allColumn">
id, line_id, point_id, development_manager, status, reason, deleted, create_time, update_time
</sql>
<update id="updateShopPointRecommendStatus">
update xfsg_point_recommend set status = #{status} where point_id = #{pointId} and deleted = 0
<if test="excludeStatus != null and excludeStatus.size()>0">
@@ -72,7 +76,7 @@
<select id="getLineRecommendPointPage" resultType="com.cool.store.dto.point.MiniPointPageDTO">
select
p.id as pointId,
p.line_id as lineId,
pr.line_id as lineId,
p.point_name as pointName,
p.point_code as pointCode,
p.region_id as regionId,
@@ -103,7 +107,7 @@
xfsg_point_recommend
set
status = if(line_id = #{lineId}, 2, 3)
where point_id = #{pointId} and deleted = 0
where point_id = #{pointId} and deleted = 0 and status = 1
</update>
<update id="rejectPoint">
@@ -112,6 +116,15 @@
set
status = 4,
reason = #{reason}
where point_id = #{pointId} and line_id = #{lineId} and deleted = 0
where point_id = #{pointId} and line_id = #{lineId} and deleted = 0 and status = 1
</update>
<select id="getRecommendPointListByPointId" resultMap="BaseResultMap">
select
<include refid="allColumn"/>
from
xfsg_point_recommend
where
point_id = #{pointId} and deleted = 0
</select>
</mapper>