admin
2021-03-20 ad3ac53da1c3a11a96ae62d790aa61a81b9eab91
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package com.yeshi.buwan.dao;
 
import com.yeshi.buwan.dao.base.BaseDao;
import com.yeshi.buwan.domain.VideoResourceMapExtraInfo;
import org.springframework.stereotype.Repository;
 
import java.util.List;
 
@Repository
public class VideoResourceMapExtraInfoDao extends BaseDao<VideoResourceMapExtraInfo> {
 
    /**
     * 根据主键查询
     *
     * @param idList
     * @return
     */
    public List<VideoResourceMapExtraInfo> listByIds(List<String> idList) {
        String where = "";
        for (String id : idList) {
            where += " vi.id = ? or";
        }
        if (where.endsWith("or"))
            where = where.substring(0, where.length() - 2);
        String[] params = new String[idList.size()];
        idList.toArray(params);
        return list("from VideoResourceMapExtraInfo vi  where " + where, params);
    }
 
}