BGateDao.java 992 Bytes
package com.viontech.keliu.dao;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @author: zhuhai
 * Date: 2023-12-22
 * Time: 17:38
 */
@Repository
public class BGateDao {

    @Resource
    private JdbcTemplate jdbcTemplate;

    /**
     * 获取门店出入口监控点
     * @param mallId
     * @return
     */
    public List<Long> getMallInOutGateIds(Long mallId) {
        String sql = "select id from b_gate where mall_id = ? and is_mall_gate = 1;";
        return jdbcTemplate.queryForList(sql, Long.class, mallId);
    }

    /**
     * 获取门店内的监控点
     * @param mallId
     * @return
     */
    public List<Long> getMallInsideGateIds(Long mallId) {
        String sql = "select id from b_gate where mall_id = ? and is_mall_gate = 0;";
        return jdbcTemplate.queryForList(sql, Long.class, mallId);
    }
}