重复消费(帐分)问题

This commit is contained in:
wangshuai 2024-07-21 10:35:50 +08:00
parent 5803fecf11
commit 60efc54586
3 changed files with 13 additions and 1 deletions

View File

@ -1,5 +1,6 @@
package com.ruoyi.business.mapper; package com.ruoyi.business.mapper;
import java.util.Collection;
import java.util.List; import java.util.List;
import com.ruoyi.business.domain.BusOrderInfo; import com.ruoyi.business.domain.BusOrderInfo;
@ -68,4 +69,6 @@ public interface BusReturnVisitInfoMapper
int countByToday(String storeCode); int countByToday(String storeCode);
int getByDate(@Param("storeCode") String storeCode, @Param("sT") String sT, @Param("eT") String eT); int getByDate(@Param("storeCode") String storeCode, @Param("sT") String sT, @Param("eT") String eT);
Collection<BusReturnVisitInfo> returnVisitInfoList(@Param("privcyPhone") String privcyPhone);
} }

View File

@ -336,7 +336,9 @@ public class AiServiceImpl implements IAiService {
} }
content = busStoreConfigInfo.getContent4(); content = busStoreConfigInfo.getContent4();
} }
if(busReturnVisitInfoMapper.returnVisitInfoList(busOrderInfo.getPrivcyPhone()).size()>0){
continue;
}
// 当日此店铺营销限额 // 当日此店铺营销限额
if ("1".equals(busStoreConfigInfo.getQuotaStatus()) && busStoreConfigInfo.getQuota() != 0){ if ("1".equals(busStoreConfigInfo.getQuotaStatus()) && busStoreConfigInfo.getQuota() != 0){
int quota = busReturnVisitInfoMapper.countByToday(storeInfo.getStoreCode()); int quota = busReturnVisitInfoMapper.countByToday(storeInfo.getStoreCode());

View File

@ -127,6 +127,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getByDate" resultType="java.lang.Integer"> <select id="getByDate" resultType="java.lang.Integer">
select count(id) from bus_return_visit_info where store_code = #{storeCode} and return_visit_time between #{sT} and #{eT} select count(id) from bus_return_visit_info where store_code = #{storeCode} and return_visit_time between #{sT} and #{eT}
</select> </select>
<select id="returnVisitInfoList" resultType="com.ruoyi.business.domain.BusReturnVisitInfo">
<include refid="selectBusReturnVisitInfoVo"/>
<where>
<if test="privcyPhone != null and privcyPhone != ''"> and phone_number = #{privcyPhone}</if>
and return_visit_time is null
</where>
</select>
</mapper> </mapper>