riku
2022-02-18 d59d55575d913646b7a90fca651904ab889c6723
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
package cn.flightfeather.thirdappmodule.repository.dao
 
import cn.flightfeather.thirdappmodule.bean.entity.ChangeAdvice
import cn.flightfeather.thirdappmodule.common.database.DbFactory
import com.ping.greendao.gen.ChangeAdviceDao
import io.reactivex.Observable
 
/**
 * @author riku
 * Date: 2019/7/29
 * 问题类型相关数据库操作
 */
class ProblemTypeDao {
 
    /**
     * 获取问题对应的整改建议
     */
    fun getSuggestion(ptGuid: String): Observable<List<ChangeAdvice>> {
        return DbFactory.getGreenDaoObservable().map {
            it.changeAdviceDao.queryBuilder()
                    .where(
                            ChangeAdviceDao.Properties.AdProblemtypeguid.eq(ptGuid)
                    ).list()
        }
    }
 
}