大屏接口

dev_0531
yechenhao 5 years ago
parent dd840823b2
commit 00b443bbd2

@ -65,5 +65,5 @@ public interface OpCustomerDOMapper extends BaseMapper<OpCustomer> {
*/ */
List<StoreAddDTO> selectAddCustomerTopShop(@Param("shopIds")List<Long> shopIds, @Param("startDate")String startDate, @Param("endDate")String endDate); List<StoreAddDTO> selectAddCustomerTopShop(@Param("shopIds")List<Long> shopIds, @Param("startDate")String startDate, @Param("endDate")String endDate);
Integer countCustomerByDate(@Param("startDate")String startDate, @Param("endDate") String endDate); Integer countCustomerByDate(@Param("shopIds") List<Long> shopIds,@Param("startDate")String startDate, @Param("endDate") String endDate);
} }

@ -221,7 +221,7 @@ public class CustomerViewService {
//新增好友 //新增好友
// Long newCustomerCount = customerList.stream().filter(customerDO -> filterCustomerByRegisterTime(customerDO, selectStartTime, selectEndTime)).count(); // Long newCustomerCount = customerList.stream().filter(customerDO -> filterCustomerByRegisterTime(customerDO, selectStartTime, selectEndTime)).count();
Integer newCustomerCount = opCustomerDOMapper.countCustomerByDate(selectStartTime, selectEndTime); Integer newCustomerCount = opCustomerDOMapper.countCustomerByDate(shopIdList,selectStartTime, selectEndTime);
customerViewVO.setNewCustomer(new Long(newCustomerCount)); customerViewVO.setNewCustomer(new Long(newCustomerCount));
//新增好友(去重) //新增好友(去重)
Long newValidCustomerCount = validCustomerList.stream().filter(customerDO -> filterCustomerByRegisterTime(customerDO, selectStartTime, selectEndTime)).count(); Long newValidCustomerCount = validCustomerList.stream().filter(customerDO -> filterCustomerByRegisterTime(customerDO, selectStartTime, selectEndTime)).count();

@ -184,7 +184,13 @@
join poi_store t0 on t0.id = t1.store_id join poi_store t0 on t0.id = t1.store_id
left join poi_store_staff t5 ON t5.store_id = t0.id and t1.user_id = t5.id left join poi_store_staff t5 ON t5.store_id = t0.id and t1.user_id = t5.id
JOIN op_customer t2 ON t2.id = t1.customer_id JOIN op_customer t2 ON t2.id = t1.customer_id
where t2.create_time >= #{startDate} where t1.create_time >= #{startDate}
and t2.create_time &lt;= #{endDate} and t1.create_time &lt;= #{endDate}
<if test="shopIds != null and shopIds.size > 0">
and t1.store_id in
<foreach collection="shopIds" separator="," item="item" index="index" close=")" open="(">
#{item}
</foreach>
</if>
</select> </select>
</mapper> </mapper>

Loading…
Cancel
Save